The WiFi thermostat project exists in several versions, which are available on Githube in the repository of the whole project. Versions differ in functionality only in advanced usage options and remote firmware update options. The firmware is available in compiled - binary form, which is executable for the target platform. Therefore, it is tested in advance, compiled for you. The firmware is universal, which guarantees that it will work with the cloned binary program on all microcontrollers in the same way.
Firmware name | Firmware features | ESP8266 | ESP32 |
---|---|---|---|
WiFi_TERMOSTAT | Thermostat with the possibility of setting the target temperature and hysteresis via a web interface, controlled automatically | ESP8266 EN firmware | ESP32 EN firmware |
WiFi_TERMOSTAT_mDNS | Thermostat with the possibility of setting the target temperature and hysteresis via a web interface, controlled automatically. Possibility to use a domain name within the LAN network (mDNS record) for connection with thermostat | ESP8266 EN firmware | ESP32 EN firmware |
WiFi_TERMOSTAT_MANUAL_experimental | Thermostat with the possibility of setting the target temperature and hysteresis via a web interface, controlled automatically. Experimental possibility of manual control of SW output by a button from a web server. Switching heating control modes automatic / manual. | ESP8266 SK firmware | ESP32 SK firmware |
To upload the binary program to the ESP platform, it is necessary to use the ESPTOOL tool. The tool also uses, for example, the Arduino IDE environment for uploading the program after compilation, or the development framework from Espressif Systems - ESP-IDF. For the ESP32 platform, it is necessary to hold the BOOT button until the beginning of the "Connecting ........_____....." recording process, or to do a pulldown on GPIO 0 (if the development kit does not have a BOOT button on the board ). An automated - executable .bat script is prepared in the folder of each firmware (it has a set COM port of the microcontroller set to COM7 for ESP8266 and COM17 for ESP32), which starts the enclosed ESPTOOL and loads the program with the specific firmware located in the given folder.
The destination COM port must be changed based on the COM port on which your board / microcontroller logs in - (can be found via the Peripherals and Drivers Manager on which COM port is ESP logged in). The ESP8266 microcontroller on the NodeMCU / Wemos D1 Mini development kits most often has a CH340 USB-UART converter and also acts in the device manager under this name. In the case of the ESP32 microcontroller, the most commonly used USB-UART converter is CP2102 from Silicon Labs - referred to as the CP210X USB UART Bridge. The program implementation for ESP8266 assumes that the board has loaded the basic parts of the flash memory - the partition table and so on ... The binary program is exclusively a thermostat application without other bundled parts of the program. After loading the program, the ESPTOOL program window automatically shuts down and performs a software restart of the ESP platform, which then boots the new firmware and prepares the WiFi thermostat for use. For the ESP8266 microcontroller, the firmware is written to the standard offset 0x00000 - (the partition table is not part of the firmware, it is not required). The firmware for ESP32 also contains a partition table that is written to offset 0x8000, the bootloader to offset 0x1000. The firmware itself is written to the standard offset 0x10000.
If the data on the existing WiFi network is not stored in its flash memory (for example, also from a sketch recorded before), it will start broadcasting its own SSID - WiFi_TERMOSTAT_AP . After connecting to a WiFi network with a smartphone / computer, the WiFi Manager web interface is available at 192.168.4.1 , which provides the option of configuring a WiFi thermostat for your home WiFi network. In the interface it is possible to enter the name and password of the existing WiFi network to which the WiFi thermostat will connect.