Skip to content

Node.js API for communicating with RuuviTag BLE Sensor Beacon and decoding data to JSON

License

Notifications You must be signed in to change notification settings

HeikkiHei/nodeapi-ruuvitag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodeapi-ruuvitag

nodeapi-ruuvitag provides an access to RuuviTag BLE Sensor Beacons and reading/parsing data to JSON format.

Prerequisites

Installing

  • Clone this repository
  • cd into the cloned repository
  • Intall the dependencies:
$ npm install

Usage

Run the application server with the following command and then go to address: http://localhost:3001

$ node index.js

If you run into problems with permissions, try

$ sudo node index.js

Also print the data to the console using command

$ node index.js -v

Same notation for permissions applies here.

Data Formats

  • Example JSON for Data Format 5 (RAWv2), and with extended hardcoded values to match that of the Ruuvi Station gateway:
"tags": [
    {
    "accelX": "Number",
    "accelY": "Number",
    "accelZ": "Number",
    "connectable": "Boolean",
    "createDate": "Date",
    "dataFormat": "Number",
    "defaultBackground": "Number",
    "favorite": "Boolean",
    "humidity": "Number",
    "humidityOffset": "Number",
    "id": "String",
    "measurementSequenceNumber": "Number",
    "movementCounter": "Number",
    "name": "String",
    "pressure": "Number",
    "rssi": "Number",
    "temperature": "Number",
    "txPower": "Number",
    "updateAt": "String",
    "voltage": "Number"
    }
],
"batteryLevel": "Number",
"deviceId": "String",
"eventId": "String",
"time": "String"

License

Licensed under the MIT License.

About

Node.js API for communicating with RuuviTag BLE Sensor Beacon and decoding data to JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published