Subscribing to a Data Stream

Subscribing to a Data Stream from Node-RED in Raspberry Pi

In this example, we will show you how to subscribe to Data Streams from your project with Node-Red in Raspberry Pi. Data Stream subscriptions are used to receive the data that other devices are publishing.

IMPORTANT: You can only subscribe to Data Streams that are part of your project

1. Configure the Data Stream In node

Drag and drop the datastream in node into your canvas

Double-click on the datastreams in node.

Here we will add the device client that will be used to subscribe to our data stream.

NOTE: If you have previously configured any nodes with your Client Id and Password, your node should already be configured, if not you need to add your Client Id and Password by clicking the edit button in the Server row, for more information on setting up a client go to Creating a Device Client.

Your device client should now be displayed as your server.

Next, we will click the refresh button in the Topic row and select our Data Stream

Click Done.

Click Deploy and you are now subscribing to another data stream within your project.

‚Äč