View on GitHub


LCD touchscreen for Home Automation

Flash firmware to ESP8266

The first order of business will be to flash the provided firmware to the ESP8266. You can do this using the NodeMCU Flasher (easy, Windows-only) or the Arduino IDE (less easy, but cross-platform). You should only need to run through this process once as future firmware updates can be applied through the provided web interface.

NodeMCU Flasher

If you’re running Windows and you just want to get started without dealing with Arduino this is probably going to be your best option.

Required Downloads

NodeMCU Flasher Process

Now proceed to First-time Setup to connect to your wireless network.

Arduino IDE

Download the IDE for your platform and follow these instructions to add support for the ESP8266 platform.

Required Libraries

Next you will need to add several libraries to your Arduino environment. Follow this guide for the general process and add the following libraries to your IDE:

To enable future firmware updates you’ll need to modify settings in the Arudino IDE for 1M SPIFFs, leaving 3M free for code and updates. In the Arduino IDE select Tools > Flash Size: > 4M (1M SPIFFS). If you’re using PlatformIO instead of Arduino, modify the build flags to include -Wl,-Teagle.flash.4m1m.ld Arduino Erase All Flash Contents

Warning: ArduinoJson as installed by the Arduino IDE is a beta release, which currently doesn’t work with the existing codebase. You’ll need to manually install the latest stable 5.x release for this sketch to work.

ESP8266 for Arduino version 2.4.2 breaks LCD firmware uploading from the web page, use version 2.4.1 of the ESP8266 board manager package to compile until this error is resolved. If using PlatformIO, set the directive platform = espressif8266@1.7.3 in your platformio.ini.

First-time Setup

Once your device has been flashed, restart it and connect to the WiFi SSID and password displayed on the LCD panel (or serial output if you don’t have the LCD ready). You should be prompted to open a configuration website to find your WiFi network and password. You can set the MQTT broker information and admin credentials now, or use the web interface to do so later. Once you save settings the device will connect to your network. Congratulations, you are now online!

WiFi Config 0 WiFi Config 1 WiFi Config 2

Firmware updates

After the initial firmware deployment you should be able to upload new firmware through the web admin interface or using Arduino OTA updates without connecting to your device via USB.