In this tutorial, we will be demonstrating connectivity to IBM's Watson IoT platform (internetofthings.ibmcloud.com). We will use a RediGate 120e to demonstrate, but this tutorial can be applied to any RediGate device with internet connectivity.
MQTT_Client (paste under Clients)
Copy Table data from the Elecsys-IBM-Demo.xml Internal Channel 15 → Scan Table into your RediGate Configuration (in Internal Channel, open Scan Table, right-click and select Paste, over-write data).
The "Scan Period" object tells the RediGate which RTU (Unit 2, labeled as FieldUnitInternalMast2) to run at an interval (Scan Period) which is set to every 30 seconds. This is how frequently the data will be published to Watson IoT. Warning: Data charges may result from excessive usage of Watson IoT service and/or cellular data plan. |
Edit the JSON_RBE → Topic Rules object so that the table entries comply with the rules that IBM expects for your gateway type, device type, etc. See IBM Watson IoT Use Case Notes for more information about acceptable topic architectures.
The following is given as an example in this configuration (change gatewaytype to match the Device type created in your IoT Platform):GATEWAY PUBLISH topic: iot-2/type/gatewaytype/id/${SERIAL}/evt/STAT/fmt/json
GATEWAY SUBSCRIPTION topic: iot-2/type/gatewaytype/id/${SERIAL}/cmd/SYS/fmt/json
DEVICE PUBLISH topic: iot-2/type/DEV/id/${SERIAL}_${DEV}/evt/RBE/fmt/json
DEVICE SUBSCRIPTION topic: iot-2/type/DEV/id/${SERIAL}_${DEV}/cmd/CMD/fmt/json
NOTE: use one or the other graphic, not both.
Upload configuration to the RediGate
In the Devices section of Watson IoT, you should a gateway with a "Device ID" that matches the serial number of your RediGate, and two devices connected to the gateway named "(your serial number)_SimData" and "(your serial number)_VirtualRW":
Data should be being sent from the SimData RTU every 30 seconds:
It may take up to 5 minutes after uploading the configuration to the Redigate for the connection to IBM to be established, especially over a cellular connection. |
Once your RediGate is publishing simulated data to Watson IoT, you are ready to move on to publishing data from a field device that talks one of the 60+ protocols the RediGate supports.