I am trying to build a thermostat that is controlled both by HA interface and physical buttons. I have a DHT11 (will be replaced by 22), a OLED display (temperature, humidity, setpoint) and 2 buttons (+ and - for setpoint) connected to NodeMCU. I am using this configuration because not everyone visiting the house will be technical enough to use HA.
I have created a generic thermostat that receives information from sensor via mqtt. Everything works well. I have also managed to make the buttons modify the temperature setpoint of the thermostat, BUT only to another value.
Hi Cristian
Please help me, what settings did you use to read setpoint temperature from home assistant on oled. In the forum I found just how to enter the date and temperature of the DHT22 sensor but nothing about setpoint.
Pe OLED afisez temperatura si setpoint. Temperatura o afisez direct, fara sa mai treaca prin HA. Cat despre setpoint, folosesc input number in configuration.yaml pentru a seta temperatura dorita, ca mai jos:
Partea de cod din NodeMCU nu am cum sa ti-o dau ca e pe alt coputer la care nu am acces momentan. Insa pot sa iti fac un rezumat scurt: citesti valoarea de pe mqtt si o pui pe OLED (poti folosi exemple de la light dimming, e acelasi principiu). Nu uita sa dai subscribe in NodeMCU la topicul MQTT pe care trimiti setpointul (setpoint1/setpoint1 in cazul de fata). Daca nu te descurci, cand mai ajung la computerul cu codul din NodeMCU, ti-l dau si pe ala.
a doua este releul care comanda pornirea încălzirii apei centralei.
Cele două le-am setat să se deschidă și închidă după cum este temperatura comandata de termostat. Dar dacă din diferite motive accidental se oprește alimentarea montajului de la centrala, la restart nu mai citește statusul termostatului decât când primește impuls de la el.