In the previous three chapters, we learned how MQTT works in detail. We understood how to establish a connection between an MQTT client and an MQTT server. We learned what happened when we subscribed to topic filters and when a publisher sent messages to specific topics. We installed a Mosquitto server and then we secured it.
Now, we will use Python as our main programming language to generate MQTT clients that will act as publishers and subscribers. We will connect a Python MQTT client to the MQTT server and we will process commands to control a small vehicle with MQTT messages. The small vehicle replicates many capabilities found in real-life road vehicles.
We will use TLS encryption and TLS authentication because we don't want any MQTT client to be able to send commands to our vehicle. We want our Python 3.x...