In this chapter, we will write Python code to use the PubNub cloud-based real-time MQTT provider in combination with a Mosquitto MQTT server to monitor a surfing competition. We will build a solution from scratch by analyzing the requirements, and we will write Python code that will run on waterproof IoT boards connected to multiple sensors in surfboards. We will define the topics and commands, and we will work with a cloud-based MQTT server in combination with the Mosquitto MQTT server used in the previous chapters. We will cover the following:
- Understanding the requirements
- Defining the topics and payloads
- Coding a surfboard sensor emulator
- Configuring PubNub MQTT interface
- Publishing data retrieved from sensors to the cloud-based MQTT server
- Working with multiple MQTT servers
- Building a web...