I want to connect to IBMs Watson IoT platform in Node-RED. How do I do that?
I want to connect to IBMs Watson IoT platform in Node-RED. How do I do that?
There are two nodes in Node-RED that allow you sending data to IBM Watson or receiving data from. They are installed in the gateways by default.
In the nodes you can either select to be a registered user by entering your IBM credentials of your personal IBM Watson account or you can specify to use the quickstart mode which is generating a user accountless instant web site for you where you can push a single value to for test purposes.
The IBM Watson nodes sending and receiving data via the MQTT protocol. This protocol uses specific TCP/IP ports to send data across. These are the ports 1883 and 8883(ssl).The quickstart method is best pratice to check if your gateway is connected to the internet and if the ports are open by your IT.
When you click the link next to the Quickstart Id you browser will forward you to a page like this https://quickstart.internetofthings.ibmcloud.com/#/device/1a1d88ee.b57177/sensor/ where you can see the pushed data instantly.
Next to the opened TCP/IP ports make sure you entered a gateway address in the network LAN settings within the gateways' control panel. Else they do not know where to route the TCP/IP frames to in case the IP address of the IBM Watson service is outside the local IP address range which is quite usual.
The last important setting is to specify at least one DNS server in the same LAN settings dialog to translate the addressed domain name within the MQTT nodes to an IP address via this name server.
Additional informations about the IBM Watson IoT services can be found here on the web:
https://console.ng.bluemix.net/docs/services/IoT/index.html
https://console.ng.bluemix.net/docs/services/IoT/iotplatform_task.html#iotplatform_task