ESP8266 HVAC control

Hi .
How do I show temperature readings like 19.50 and 21.30? Many have changed value. However, the temperature information shown in the Oled screen is rounded by the program. I want to use 2-digit numbers after the decimal point.

Your code is taking DHT temperature readings in multiple places, sometimes multiple times in the same function.
In some cases youā€™re using a float variable to hold the result, in others an integer variable to hold the result.
Obviously an integer variable type canā€™t display decimal places.

The sensible approach would be to have one function which takes temperature and humidity readings and saves them to global float variables, then re-use these values in multiple places through your code, rather than keep taking new readings each time.

Pete.

1 Like

Thank you so much. Iā€™m going to simplify.

Hello,

Can you please explain to me the purpose of ā€œTemperatureCorrectionsā€. Itā€™s = 0 and never gets updated?

Also how often does it happen that the DHT11 spits out a faulty reading that you would have to check for a good one?

Thanks

It allows you to calibrate the readingsFrom the DHT11. If you enter the settings menu, and go to temperature correction, you can offset the measured reading by +/-5 degrees.

Hi! this is my question tooā€¦
In my case, i just canĀ“t get a wire through my house so i wanted to send the signal through wifiā€¦
So, what i need is that this HVAC CONTROLER ESP8266 is the one connected to the DHT11 (the reading and analyzing side) on 1st Floorā€¦ and i need other side with an ESP8266 connected to a ESP Relay Board, managing to BRIDGE the original Ambient sensor of the Water heating system in the basement.
I did my work and managed to asemble a program for each sideā€¦ but sadly with no hysteresis; so once the server side says it reached the temperature, the other side just acknowledges and turns all the system on and off each 2secs.
I just donĀ“t need Alexa, oled screen, wifi server, nor ITTT. All i need is just a way to get indication of the state of the relay in my Blink screen, HYSTERESYS control, temp reading and temp adjustment.
SORRY for the long post.

I personally would put this in a new topic, and just explain what you are doing there.

I believe your problem is with your if else statement.if (Te<TD+-1) I would think it should look more like this if (Te < (TD-1)) . You should also make sure there is no hot air from the heater blowing near your temperature probe, as this could also cause cycling issues.

You should also remove the temperature reading code from the loop() and put it in your blynkAnotherDevice() function. The DHT 11 should only be read every 2 seconds at a maximum, so its 4 second interval should be OK. Also, the DHT 11 can sometimes return an error reading, so you may want to account for that as well.

I would probably use an esle if as well. as you are reading the temp every 4 second I suspect there will be a point where the temperature may fluctuate and the if statement will be not true during one 4 second period, and then true in the next. this may occur for a few intervals, causing cycling. So instead of else I would use else if (Te > (TD+1))

WOW! That was fast!
GRACIAS TOTALES!

Ottimo progetto!

Buongiorno scrivo dallā€™ Italia , stavo seguendo con piacere questo suo progetto , e mi piace, Vorrei usarlo per il mio riscaldamento, ma Alexa non funziona con tutti i comandi , solo On/Off. Peccato!!
Comunque complimenti

Sarebbe interessante un Manual 15/60/120

You can use segmented switch :thinking:

Iā€™m not sure why Alexa is only responding to ā€œturn onā€ and ā€œturn off.ā€ You might want to look into the exact wording that the Italian version Alexa expects when increasing or decreasing the relative brightness of Phillips Hue light bulbs. Phillips Hue is the system that weā€™re emulating for Alexa voice commands.

Ok, grazie

Di nulla.

Salve, nel suo progetto volevo inserire anche un lcd display 1602, ma non ci riesco.e fattibile? Grazie

It wouldnā€™t work with the ESP-01, because it doesnā€™t have enough pins. However, there are plenty of other ESP8266 boards you could use. Iā€™d suggest a WEMOS D1 Mini. Hereā€™s an example of using one with the 1602 display:

https://robojax.com/using-lcd1602-i2c-d1-mini-nodemcu-esp8266-and-arduino

Grazie, ho usato esp32, ho inserito lcd :+1: