Learn how to publish and subscribe to messages sent via an MQTT message broker to be able to remotely control or monitor the status of devices, including Arduino, Raspberry Pi, Android, PC, and Wemos D1.
In this video I'll demonstrate how to install and setup the Mosquitto MQTT server, available at www.mosquitto.org, on a Windows PC. I'll then create clients that subscribe to topics on that MQTT broker running on an Arduino UNO (via an Ethernet shield), a WeMos D1 (connected via built-in Wi-Fi), and a Raspberry Pi (connected via built-in ethernet), and control those devices by publishing messages using a command-line PC application and an Android app.
You can access the wiring diagram, additional documentation, and code downloads used in this video at https://www.patreon.com/posts/17921563
00:00 - 05:55 Introduction and Demonstration
05:56 - 07:34 Android client demonstration
07:35 - 13:03 Arduino, Wemos, and Raspberry Pi Wiring
13:04 - 20:01 Installing and testing the Mosquitto MQTT server
20:02 - 37:24 Code for Arduino Ethernet and MQTT client
37:25 - 43:05 Code for Wemos WiFi and MQTT client
43:06 - 48:33 Code for Raspberry Pi MQTT client
48:34 - 50:10 Android client (MQTT Dash)
50:11 - 51:12 Wrapup