tilt-send-data

1.0.2 • Public • Published

tilt-send-data

Nodejs Command Line Utility to read Tilt Hydrometers and Post data to a Cloud Service (ubidots.com)

NOTE: The source code of this repository is available at Github.

Requirements

Installations Required

Using npm, install the utility:

$ npm install -g tilt-send-data                                                                                                                                                                                                                                                

Command Line

The command requires the following arguments to be able to handle data data with Ubidots:

-T --token [token] -> Ubidots TOKEN
-t --timeout [timeout] -> Interval timeout to send the request (in minutes)

Reference to the following guide to know where is located the TOKEN of your Ubidots Account.

To run the command reference to the structure below:

$ tilt-send-data -T "{Ubidots_TOKEN}" -t {timeout_in_minutes} 

Command example:

$ tilt-send-data -T "BBFF-KvcUDRGARBkUDR5bogMVuKVcKigvsYAMvVVr9H278H2u2M34KvSne8R" -t 1

The command above will handle a request with temperature, gravity, and rssi values every one minute.

Server Response:

{ 
  rssi: [ { status_code: 201 } ],
  temperature: [ { status_code: 201 } ],
  gravity: [ { status_code: 201 } ] 
}

Optional Arguments

  • Data values optional arguments:

As optional arguments you can handle measured power, accuracy, and proximity values:

-m, --measuredPower [measuredPower] -> add measured power reading to the request
-a, --accuracy [accuracy] -> add accuracy reading to the request
-p, --proximity [proximity] -> add reading to the request

To run the command with the optional arguments reference to the structure below:

$ tilt-send-data -T "{Ubidots_TOKEN}" -t {timeout_in_minutes} -m "{device_label_mesuredPower}" -a "{device_label_accuracy}" -p "{device_label_proximity}"

Command example:

$ tilt-send-data -T "BBFF-KvcUDRGARBkUDR5bogMVuKVcKigvsYAMvVVr9H278H2u2M34KvSne8R" -t 1 -m "mesuredPower" -a "accuracy" -p "proximity"

The command above will handle a request with the default data (temperature, gravity, and rssi), plus the measured power, accuracy, and proximity values every one minute.

Server Response:

{ 
  temperature: [ { status_code: 201 } ],                                                                                                                                                                                                                                       
  proximity: [ { status_code: 201 } ],                                                                                                                                                                                                                                         
  gravity: [ { status_code: 201 } ],                                                                                                                                                                                                                                           
  rssi: [ { status_code: 201 } ],                                                                                                                                                                                                                                              
  mesuredpower: [ { status_code: 201 } ],                                                                                                                                                                                                                                      
  accuracy: [ { status_code: 201 } ] 
} 
  • Ubidots Server optional argument:

The host assigned by default is industrial.api.ubidots.com which is the one assigned for the Ubidots Business License. If you are under the Ubidots Education License, you should use the host things.ubidots.com. To replace it, you ought to assign it as argument:

-u, --url [url] -> post to specified url 

Addtionals Resources

For more information about the Ubidots Cloud visualization with the incoming data, reference to the following guide

Package Sidebar

Install

npm i tilt-send-data

Weekly Downloads

7

Version

1.0.2

License

MIT

Unpacked Size

14.8 kB

Total Files

4

Last publish

Collaborators

  • mariacarlinahernandez