WiFi thermostat - Extension by manual mode - ESP8266

23/06/2021

The WiFi thermostat project for the ESP8266 microcontroller was originally created similar to a room thermostat, which is controlled automatically with its data - i. target temperature and hysteresis. Automated control is used especially during the autumn, winter and early spring months. However, during the summer, the thermostat is switched off manually. Since the existing web application did not allow it and could only work in automatic mode, I created an extension of the original web application version of the thermostat for free with the option to select the mode and select the output. So far in the experimental - test version.

In order to permanently store the set data, I use software-emulated EEPROM memory in flash memory. In the existing implementation, the value for the set (target) temperature and hysteresis was stored in the EEPROM. The output status was generated automatically based on the automatic mode. For manual control, it was necessary to ensure that the value for the mode (Automatic / Manual) and the status of the output to be used in manual mode were saved. The status of the output stored in the EEPROM can only be changed in manual mode.

In automatic mode, the status of this output is not taken into account and is not overwritten, as it would reduce the life of the EEPROM sector or the entire flash memory. Storage is thus efficient in terms of maximum flash memory life, which allows for about 10,000 overwrites. Hardware EEPROM memory supports up to 100,000. The mode is written to offset 150 of the EEPROM memory, the output status to offset 200. In total, the size of the software emulated EEPROM memory is 512B. 

To control the mode and status of the output in manual mode, 4 subpages (zap.html, vyp.html, manual.html, automat.html) have been added to the web application, which will launch the given functionalities if the user opens them (by clicking on the button / by manually entering them in the URL). browser). This version is without mDNS record yet, the connection to the IP address of the WiFi thermostat is used.

The WiFi thermostat has become popular mainly due to the easy implementation of a compiled (.bin) program into the microcontroller via the ESPTOOL tool, which can be used to load the program into the microcontroller. It is also easy to control via a web interface that adapts to any device. The interface is clear and can be understood by all ages. Thermostat control is convenient via computer, smart TV or smartphone. Likewise, the initial configuration of the thermostat is convenient, as WiFi Manager for configuring the home WiFi network where you want to connect the thermostat is implemented via a web interface and uses Captive Portal, which can redirect the user directly to the configuration page.

Configuration is simple, it displays all available WiFi networks in range, including the% power of the received signal, which the web server restores in real time. This makes it possible to find out which access point in range is best for a WiFi thermostat. In the meantime, I, as the author of the project, also received feedback from users. The thermostat is stable and users have been able to replace their original room thermostat with a WiFi variant with the ESP8266 microcontroller. Most thermostats use NO and COM control contacts to control the boiler output.

The same is true for this WiFi thermostat. After disconnecting the old thermostat, users connected only the cables to the NO and COM terminals of the SRD-05VDC-SL-C electromagnetic relay and were able to fully use the thermostat function without other interventions. The latest version of the WiFi thermostat is 1.0.3e, which extends the original version 1.0.3 with the possibility of an experimental manual mode for testing

Try the WiFi thermostat on the ESP8266 platform: https://martinius96.github.io/WiFi-termostat/en/

Github project repository: https://github.com/martinius96/WiFi-thermostat


© 2021 Martin Chlebovec - Arduino Blog - . All rights reserved
Powered by Webnode Cookies
Create your website for free! This website was made with Webnode. Create your own for free today! Get started