Reputation: 123
I have the IBM tutorial on using Arduino+Bluemix, up and running. I would now like to take a decision on the cloud and let the Arduino subscribe to a topic containing the decision message. For this, I am trying to use the IBM IOT out node in my Node-RED editor. However, I am not sure of how to configure this node.
Are there any tutorials that cover this use-case (IBM IOT out node + Arduino, MQTT)- or documentation on the node properties?
Thanks. NK
Upvotes: 0
Views: 556
Reputation: 6826
This is the picture of an IoT output node I'm using on the Coursera IoT course, works for me sending data to the Sense HAT device plugged onto my pi.
At the client side I'm using NodeRED (using a Pi this is easy :-) and an IoT input node which does the subscription to the command.
The docs describe how to subscribe to commands HERE under the heading Subscribing to Commands.
The subscription topic should look like iot-2/cmd/[command_id]/fmt/[format_string]
, so for my pi to subscribe to the command in the picture the topic should be iot-2/cmd/display/fmt/json
- although I haven't tried that myself, it should work.
Upvotes: 2
Reputation: 4964
You need to configure the IBM IoT out node to publish messages to the device ID of your Arduino. The msg.payload
will be the message you send to your Arduino. You will also need to set the topic
as well, the topic contains your deviceId
also. Then you will need to have your Arduino subscribe to the topic to receive the messages.
Upvotes: 0