In this section, we will publish sensory data to an online dashboard using the MQTT protocol. This will involve setting up an account with the ThingsBoard website and making use of the demo environment.
Publishing sensory data to cloud-based services
Install the MQTT library
We will use the MQTT protocol in order to communicate with the dashboard in ThingsBoard. To set up the library on the Raspberry Pi, do the following:
- Open a Terminal appliance from the main tool bar
- Type sudo pip3 install pho-mqtt
- You should see the library install