ESP thermostat control for the ra8875 touch screen

for any one who might be interested, here a sketch for esp wifi relay to be controlled by my RA8875 display user interface … it based on my autoDS1820 mqtt sketch, it can control up to 8 relays controlled by 8 ds1820. it was meant for zone control for hydronic floor heating system… it also will control a normal heating equipment. but you loose several relays 2-4 relays to control cooling, heating and fan ( plus eco if you have this function)
Thermo_mqtt_esp_1_wt.zip (4.8 KB).

it also has the added benefit-- you can plug in a heck of a lot more DS1820 into it (much more then 20 though you will have to provide thier own power to do that and keep lengths under 50M). but those will not be controlled they simply transmit data automatically created Mqtt topic based on it ROM ID that you can load into the RA8875 screen. but it response will slow down 2 seconds for each ds1820 (search and flush data from onewire). the ds1820 are hot plug-able and you can add more to it with out shutting down and powering up again they will be automatically detected and start broadcasting data moments later. it also saves your preset temperature ranges. so if the power goes out it will start up again with the same temperature setting that you had before… I will provide a total sketch for the ra8875 with zone and thermostat features in a couple day as I will be gone, travelling back and forth for the next week … though the current one will work with a little adaption of the topics all I really need to do is add in controls for off/heating/cooling fan auto/fan on( though on esp that proving tricky for some reason) .

good luck have fun

1 Like

Thermo_mqtt_esp_1_wt_update.zip (5.3 KB)

here a nicer cleaned up version sorted out all the issues I was having ( turns out Serial.print was fudging me up for some reason I had to be careful where i placed it otherwise commands that came after them were lost)

this version works very very well. it will detect sensor failure and report which sensor failed, it also turn off all relay device connected to failed sensor… it will only report failure of sensors that you have listed to watch ( ie sensor 1-8 in relations to the relay)… it will still work by auto creating MQtt of other sensors it just not report if they fail. you can add it in if you want by simply copying and pasting a few lines of code and expand watch dog list

the other portion connected to RA8875 is 1/2 finished had to increase input to 50 on the esp base but that is finished. now just to map the LCD interface the zones . radial dial touch zones for switches and what nots ( error and condition display). once doe I will post the updated version of the RA8875 here as it is related specifically to this thermostat function

1 Like

well finished it well ahead of scheduled here a picture of the the front page displaying sensor error for sensor 1 ( it was unplugged )


the thermostat page the green and yellow dots are symbols for where the fan is in auto or manual mode and the yellow(red/off/ blue /cooling yellow/heating mode)

the zone pages this is meant for radiant heating systems you can adjust temperatures in different zones touch left or right to move temperature seting up and down for each zone

Arduino.zip (22.9 KB)

also when the system comes online it will display whether the the any of your sensors are online example temp.sensors if all are online it will display the unit as being online ie online1, online2 online3 etc and as sensor fails it will display error 1 , error 2 … to which sensor has failed for very easy diagnostic of problems

there 2 ino in the zip file
one for the thermostat controller
the esp translator for the screen
and the screen display

okay good look have fun

I disabled the WU as it esp WU thig was not very stable and my router version need a abit more where I have to remove a couple character from it send as the LCD screen has no font for it and it messes it up

1 Like

I guess the last update to this ESP8266 thermostat project. the previous one was based on headless thermostatic control and a remote touch screen… this is a one will work still with the remote screen but also has a local screen. it using a PCF8574 to control the relays so now it is expandable easily to include many more relay controls. it also has a builtin RTC. I might add in later a NTP version for those who wish not to use a RTC. the RTC is for setting of variable temperature during a time period. I e: to save energy it is better to let your building cool down a couple degrees at night it save you +25% on your heating costs … it a simple DIFF of a maximum of 5 degrees

S-T = start time ( yellow 6:00 hrs)
E-T = end time ( red 22:00 hrs)
DIF = temperature differential ( white 19 diff of 2 c from the set temp of 21)
so from the above example between the time of 6:00 to 22:00 the temperature it will heat to 22C after 22:00 and before 6:00 it will heat to 19C

Thermo_mqtt_esp_LCD_update.zip (7.7 KB)

it was a little hard to squeeze every thing into to there and make it work but it does here are the only files I know that will work together and play nice . the other ones out there were having compatibility issues with each other and/or the ESP

Adafruit_ILI9341esp.zip (9.5 KB)
PCF8574_library-master.zip (9.4 MB)