How to set Node-RED up to communicate with Databoom via MQTT

 

Before beginning...

Before beginning to build the flow diagram in Node-RED, some operations have to be done in Databoom:

  • Create a device with the MQTT type and note down its token, clientID and publication topic;
  • 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: injectmqtt and function.

 

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.

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 23 of the function);

In the mqtt-to-databoom block fields for the MQTT transmission must be specified

  • publication topic (Topic field in the node properties);
  • the client id (in the server edit window, accessible by clicking the button with the pencil icon next to the server field in the node properties);
  • autenthication (in the server edit window, in the security tab), username is the Databoom username, while the password is the OAuth token.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.