nodeapi-ruuvitag provides an access to RuuviTag BLE Sensor Beacons and reading/parsing data to JSON format.
- RuuviTag sensor(s)
- V8 JavaScript engine Node.js
- @abandonware/noble
- Superuser rights
- Clone this repository
- cd into the cloned repository
- Intall the dependencies:
$ npm install
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.
- 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"
Licensed under the MIT License.