MQTT-With-the-Raspberry-Pi-and-ESP8266

ESP8266 publishes and python subscribes.

Encouraged by Appiko

INTRODUCTION

MQTT, or MQ Telemetry Transport, is a messaging protocol which allows multiple devices to talk to each other. MQTT is based around the idea that devices can publish or subscribe to topics.

OBJECTIVE

Publishing to a topic using an ESP8266, and creating a Python script that will subscribe to this same topic, via a Raspberry Pi which will act as the MQTT Broker.

METHODOLOGY

  • Basic Raspberry Pi Setup
  • Run and install Mosquitto broker
  • Installing Python Paho-MQTT
  • Creating the Python Script
  • Programming the ESP8266 using arduino
WORKING SCHEMATIC