Firmware for my board named ESP8266MCU12, based on ESP8266 microcontroller.
This device use a PZEM-004T board as power meter device and use MQTT protocol to send data to OpenHAB Smart Home Automation System.
Built with platformio (https://platformio.org) and visual studio code (https://code.visualstudio.com)
Depends on the following dd libraries:
- ddcommon
- ddwifi
- ddmqtt
- ddpzem004t
To build your firmware bin file:
- clone this repository with the --recursive flag to checkout dd-libraries
- rename file include/user-config-template.h in include/user-config.h
- set your WIFI and MQTT settings in file include/user-config.h
Firmware file will be in .pio/build/esp12e/firmware.bin
To upload using OTA, open http://ip-device/update on a browser and point to the firmware *.bin file
Open http://ip-device to get sensor state and device info in your browser
- main contains work in progress commits - NOT STABLE branch
- master contains STABLE commits and releases
- For autoversion management script => PlatformIO forum "How to build got revision into binary for version output?"
- For OTA/WebServer support => randomnerdtutorials.com ESP8266 NodeMCU OTA (Over-the-Air) Updates - AsyncElegantOTA (VS Code + PlatformIO), AsyncElegantOTA Library