Before beginning to build the flow diagram in Node-RED, some operations have to be done in Databoom:
- Create a device with the Node-RED type and note its token down;
- Create some singals for the device and note down their tokens;
- Assure to validate the signals so the data sent by Node-RED won't get lost;
- Create an OAuth token in Settings -> Credentials that enable data forwarding to Databoom.
Creating a flow in Node-RED
For the example flow diagram the the following blocks are used: inject, debug, function and http request.
To forward data to Databoom it is possible to follow the diagram attached to the article
Timestamp blocks are intervals at the end of which random values are generate to populate the signals to forward to Databoom. Interval values should be greater than 60 seconds, no value is loggend under this threshold.
The values noted down previously go in the prepare-data-to-push block:
- signal tokens (rows 8 and 15 of the function);
- device token (row 21 of the function);
- OAuth token (row 27 of the function, after the keyword Bearer).