0

I have connected Raspberry Pi to IBM watson-IoT platform Cloud using Node-Red. I send the Pi's cpu temperature to Cloud, and checked dashboard.

I want to request the stored data from other raspberry Pi. So, I am tring [http request-http response] node using Node-RED.

Is this approach right? does anyone know how to easily do this? or have any related documents?

I attached figure that represent my environment. Wish your help. Thanks.

enter image description here

hardillb
  • 54,545
  • 11
  • 67
  • 105
구자훈
  • 1
  • 1
  • The http-response node will not do anything useful in the flow you have shown – hardillb Jun 20 '18 at 07:40
  • do you store the data from the other Pi (Sensor Device) in Watson IoT Platform using cloudant? If so, if you have NodeRed as well in Client Device, then you can use a cloudant node to retrieve the data stored in the cloudant service. Or, if you want to see the real-time data sent by the Sensor Device you can use and IoT Out node to receive the events on Client Device. – idan Jun 20 '18 at 08:14

1 Answers1

0

If you are just interested in receiving events that have been published to the Watson IoT Platform within a Node-RED flow, the easiest way to do this is to use the ibmiot node that comes with the node-red-contrib-scx-ibmiotapp module. This module does not come with Node-RED by default, so you will need to:

  1. Click on the hamburger icon in the top right of the Node-RED dashboard
  2. Click Manage palette
  3. Click the Install tab in the User Settings fly out
  4. Type node-red-contrib-scx-ibmiotapp in the search box
  5. Click the Install button for the module

You may need to restart Node-RED in order for the ibmiot node to appear in the palette.

enter image description here

When you have added an instance of the ibmiot node to a flow, you need to make sure that you:

  1. Specify a value for the Authentication property of API Key
  2. Specify an API Key that you have created in your Watson IoT Platform Org
  3. Specify a value for the Input Type property of Device Event

You can define specific values for the Device Type, Device Id and Event properties if you are interested in specific events... or use wildcards. These values are used to construct the MQTT topic string that the node will subscribe to once it has connected.

enter image description here

Thanks.