node-red-node-fitbit
v0.1.0
Published
Node-RED nodes that get information from a Fitbit
Downloads
12
Readme
node-red-node-fitbit
Node-RED nodes that gets information from a Fitbit record
Install
Run the following command in the root directory of your Node-RED install
npm install node-red-node-fitbit
Usage
Two nodes that get reports from Fitbit.
Input Node
Polls Fitbit for new data.
The generated messages are determined by the node type property as follows:
- goals - Messages are only sent when a daily goal is reached. The
msg.payload
contains an achievement message and themsg.data
property contains the current activities data. - sleep - Messages are only sent when a new daily sleep record becomes available. The
msg.payload
contains sleep log data. - badges - Messages are only sent when a new badge is earned. The
msg.payload
contains the badge message and themsg.data
property contains a single badge entry from the list returned by the badges API call.
Query node
Retrieves user data from Fitbit.
The msg.payload
is determined by the node type property as
follows:
- activities - the
msg.payload
contains daily activities data. - sleep - the
msg.payload
contains sleep log data for the main sleep and themsg.data
property contains the complete sleep data result. - badges - the
msg.payload
contains data about badges awarded.
The msg.date
property may be set to an ISO 8601 format
date (e.g. 2014-09-25) to retrieve historical data for
activities and sleep log. If no date is supplied, then data for
today will be retrieved. In the case of sleep, this is the data
for the preceding sleep.