New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

loriot-rb

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loriot-rb

  • 0.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

IOT at you service with LoraWan and Ruby

Manage your devices with Loriot cloud system

Version     Travis CI   Quality

What is Lora?

LoRaWAN is a Low Power Wide Area Network with features that support low-cost, mobile, and secure bi-directional communication for Internet of Things (IoT), machine-to-machine (M2M), and smart city, and industrial applications. LoRaWAN is optimized for low power consumption and is designed to support large networks with millions and millions of devices. Innovative features of LoRaWAN include support for redundant operation, geolocation, low-cost, and low-power - devices can even run on energy harvesting technologies enabling the mobility and ease of use of Internet of Things.

Install

gem install loriot-rb

To use it in a bundle, add to gem file gem 'loriot-rb' and run bundle install

Connection to loriot server

Establish a secure connection to your Loriot Application on the cloud.

This version only support the TLS protocol.

From irb require the library:

require 'loriot-rb'

then create an instance

lora = LoriotClient.new

if you are in debug mode you should also receive a json:

{ "hello":"LORIOT.io TLS Server", "version":"1.0.4" }

Send data to a device

lora.send_cmd(EUI: 'Insert here your EUI code', confirmed: true, data: "0101")

Request example:

{ "cmd":"tx", "EUI":"BE7A0000000010B7", "port":40, "confirmed":false, "data":"0101" }

Response example:

{ "cmd":"txd", "EUI":"BE7A0000000010B7", "seqdn":114, "seqq":113, "ts":1489133179385 }

"cmd":"txd" show the data sent to the gateway

The response could also be:

{ "cmd":"tx", "EUI":"BE7A0000000010CF", "seqdn": 4, "data": "0301", "success": "Data enqueued" }

Receive Data

To listen your devices:

lora.listen

Close the connection

lora.quit

Compatibility

Ruby 2.3+

Install

gem install loriot-rb

To use it in a bundle, add to gem file gem 'loriot-rb' and run bundle install

To Do

  • Connect to a device with tls protocol v0.1.0
  • Send data to a device v0.1.0
  • Receive data from a device v0.2.0
  • Organization in modules to support new protocols v0.2.0
  • Add a configuration v0.3.0
  • Add a rails generator v0.3.0
  • Test with many devices

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-feature)
  3. Commit your changes (git commit -am 'I made extensive use of all my creativity')
  4. Push to the branch (git push origin my-feature)
  5. Create new Pull Request

Testing

Wide coverage with xx unit tests and xxx assertions

To test locally install the development requirements:

bundle install

Then execute:

bundle exec ruby test/unit_test.rb

Performance tests:

bundle exec ruby test/performance_test.rb

Found a bug?

Please open an issue.

License

The GNU Lesser General Public License, version 3.0 (LGPL-3.0) See LICENSE file

FAQs

Package last updated on 18 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc