ESPAltherma icon indicating copy to clipboard operation
ESPAltherma copied to clipboard

behaviour when home assistant goes offline

Open m-reuter opened this issue 3 years ago • 9 comments

Hi, what is the expected behaviour when home assistant goes offline. For example when I shutdown my raspberry pi, the heat pump stops heating and looses the little icon for the room thermostat. I am usually in automatic mode (but during the day the automation is on).

  • is this the expected behaviour?
  • does it mean the heat pump is working in automated mode (as if the room thermostat is not installed) or rather it means that there is no heating request from room thermostat any longer, which is why it shuts off?
  • the ESP is connected via MQTT, so the heat pump should not even know about the Raspi and Homeassistant. It should just continue running?
  • or maybe I wired it so that the relay switches off after a short time unless HA tells it not to? Then I should probably swap those cables to the other connection in order to ensure that if my Raspy looses power, it will continue to heat?

Thanks.

m-reuter avatar Mar 17 '21 16:03 m-reuter

What is the „little icon for the room thermostat“? Do you mean the „Ext“ icon?

KalaNagHTD avatar Mar 17 '21 17:03 KalaNagHTD

Yes, EXT and the heat waves next to it, instead I see the icon for automatic 1.

m-reuter avatar Mar 17 '21 18:03 m-reuter

„Ext“ shows up when the thermostat contacts are closed and disappears when they are open.

Am 17.03.2021 um 19:17 schrieb Martin Reuter @.***>:

 Yes, EXT and the heat waves next to it, instead I see the icon for automatic 1.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

KalaNagHTD avatar Mar 18 '21 06:03 KalaNagHTD

Thanks, that means the relay opens the contacts when the server goes down .. and Rotex stops heating. @raomin is there a way to keep it in the state it was in even if the Raspi goes offline? Because the opposite behaviour is also not wanted (because then it could be that Raspi looses power at night and then Rotex starts heating). Thanks

m-reuter avatar Mar 18 '21 11:03 m-reuter

Hi @m-reuter, You're raising a good point. Currently, ESPAltherma is retrying to connect to the MQTT for a 30 secs, then if it still fails it will reboot.

Normally, when ESPAltherma reboots, it restores its previous state. But it does this after connecting to MQTT...! So in practice, when MQTT is off, it will turn off the relay until MQTT is back.

I still believe that a failure to connect to the MQTT should trigger a reboot at one point (as it may be caused by things that would be cleaned up by a reboot eg, wifi/dhcp issue). Now it could be longer than 30 sec and also the relay state should remain after reboot and while (trying to) connecting to the MQTT.

I'll implement this change.

raomin avatar Mar 18 '21 21:03 raomin

Done! It should reboot every 500s but restore immediately its state.

Give it a try and tell us!

raomin avatar Mar 18 '21 22:03 raomin

Thanks. I tried it and it seems to work now. "EXT" symbol stayed active even though the MQTT server was down. However, it looks to me that the m5stick is constantly rebooting (like every couple seconds, not waiting 500s). Is that only the first time ?

m-reuter avatar Mar 19 '21 19:03 m-reuter

No, it shouldn't reboot. If it is it must be crashing for some reasons I haven't anticipated. I'll try turning off also mqtt. Did you turn off only the MQTT or also the wifi?

raomin avatar Mar 19 '21 20:03 raomin

Only the raspberry pi , which is running mqtt and homeassistant. Wifi was still up.

m-reuter avatar Mar 19 '21 23:03 m-reuter

I guess this was solved by #157

raomin avatar Nov 05 '22 23:11 raomin