A simple script to connect ESP8266-based on/off switches to MQTT. I use this to connect my relay switches to 🏠 Home Assistant. Built using the Arduino Core for ESP8266.
-
Clone this repository and copy the
src/sample.configuration.h
file tosrc/configuration.h
:cp src/sample.configuration.h src/configuration.h
-
Edit the
src/configuration.h
file to use your credentials. -
Install the required libraries.
-
Build and upload to your ESP8266 using the PlatformIO IDE.