- Go the IBM Watson IoT Platform Quickstart: https://quickstart.internetofthings.ibmcloud.com/iotsensor/
- Copy the device ID found in the upper right hand corner, such as “cd2b389949ff”. Keep this page open.
- In a new page, go to freeboard.io and register a new free account.
- Login to freeboard.io with your account and create a new board.
- Click “Add” under “datasources” and select “MQTT”
- Enter a Name of “example”
- In the Topic field, replace “DEVICEID” with the device ID you copied from the quickstart page
- You should not change any of the other default settings for the quickstart. Click “Save” and if everything is working, you should see the datasource get updated every few seconds. If it says “Last updated: never” you are not receiving any MQTT messages and have an issue.
- In freeboard.io click “Add Pane” and in the new pane click the “+” icon to add a “Gauge” widget
- In the gauge widget configuration, set the following and replace “DEVICEID” with the device from the quickstart, and click save
- Title: Temperature
- Value: datasources[“example”][“DEVICEID”][“d”][“temp”]
- Units: Celcius
- Minimum: 0
- Maximum: 100
As you get deeper in MQTT, you can find ways to provide confirmed delivery, persistence with queues, last will and testament, client X509 certificates, and so much more. The best part about MQTT is how far you can go with it!