MQTT Node
MQTT Node
MQTT is a lightweight communication protocol ideal for embedded devices with limited connectivity. It is the preferred communication mechanism between your devices and the Rayven Platform.
You can use the MQTT node to receive data from devices using the MQTT communication protocol. A single MQTT node can receive data for all the devices in your solution. It will output each device payload in the order received.
The IP address of the Rayven MQTT broker is 52.169.16.32
Adding an MQTT node to your workflow
- First, select your desired solution and navigate to the Rayven Workflow.
- Select ‘Inputs’ from the left-hand panel.
- Find the MQTT node and drag it onto the canvas.
- Double click on the MQTT node to open its configuration window.
Configuring your MQTT node
- Give your node a name. Choose something simple that clearly explains its purpose. You must pick a name that has three or more characters.
- Select a broker type from the drop-down menu. The options are:
- TCP,
- TLS,
- WebSockets,
- Secure WebSockets.
- Enter a username. For the node to receive data, this must match the username entered on the device or hardware.
- Each MQTT node generates a unique topic ID. This ID will be auto-filled and can't be changed. You must send data to Rayven in the following format:
- [[topic_ID]]/[[device_ID]]
- You must append the unique device ID to the topic ID. Ensure you include the slash after the topic ID.
- You will see an auto-filled unique URL. This URL points to the Rayven server and can't be changed.
- An example of this URL format is https://my.rayven.io:8082/api/main?uid=1564c1d5321f0154422882bd3f80853587a3&deviceid=[[device_id]]
- Select the payload format from the drop-down menu. JSON is the recommended default, but String and XML formats are also supported.
- You can enter a Client ID as an optional additional parameter.
- Choose whether to configure a password for extra security. For successful authentication, this password must match the one set on your device. It must be at least 8 characters long and include at least one lower case character, one upper case character, and one special character such as ! or *.
- It is possible to send unique device IDs by entering the payload field name that contains the device ID under 'Payload Device ID Field Name'.
Adding timestamps
You can configure the timestamps of your input node so that it records when it receives data from a device. The device will need to have a time zone configured, and you will need to define the following fields on your HTTP input node:
- Date Field Name
- Enter the name of the date field as it appears in the device payload.
- Date Format
- Specify the format of the data received, for example, dd/MM/yyyy or hh:mm:ss.
- If using a 24-hour format, enter the hours in capital letters (e.g. HH/mm/ss).
- Timezone
- Select the time zone for the device from a drop-down list.
Activation
Once you have finished configuring the node, click 'activate' and then 'save'. The node is now ready to receive data.
See Also: Section 3.3: Adding and Managing Devices
As of Release: 17.11.2021