dbuezas / eq3btsmart

57 stars 9 forks source link

Implement time synchronization #111

Closed torfbolt closed 1 week ago

torfbolt commented 1 week ago

I sometimes have the problem that my thermostats use the wrong time, especially after a DST switch. This could be solved by setting the device time via a synchronization command.

I searched for this and it looks like this feature actually exists in the BLE API. There is even an implementation of the sync command here: https://github.com/Heckie75/eQ-3-radiator-thermostat/

Would it be possible to add this to the HA integration?

dbuezas commented 1 week ago

This is already the case. Each time the state of the eq3 is queried, the time is set. My guess is that either the eq3 summer time is misconfigured or the home assistant machine has the wrong time zone

dbuezas commented 1 week ago

https://github.com/dbuezas/eq3btsmart/blob/main/custom_components/dbuezas_eq3btsmart/python_eq3bt/eq3bt/eq3btsmart.py#L163

torfbolt commented 1 week ago

Nice, thanks. I've checked the HA time settings, a template of "{{ now() }}" prints the correct time & DST time zone. Is there a way to configure the DST setting via BLE?

torfbolt commented 1 week ago

Btw, what time does the thermostat expect via BLE? The DST-time or the non-DST time? Does it correct for DST itself?

torfbolt commented 1 week ago

Ok, weird. DST is enabled both in HA and in the thermostat (I just noticed you already read it out and show it in the status). The time in the device was also correct. When I manually stepped through the on-device time config menu, it somehow "remembered" that it should be heating and switched to comfort level.

So it's not an issue of the wrong time.

The device seems to not follow the configured program sometimes. Did you hear of this before, any ideas what could be wrong? This issue can be closed, but of course I'd be very grateful for any hints where to debug.

Btw, device firmware is 146.

dbuezas commented 1 week ago

I think so, yes, but I'm not sure.

dbuezas commented 1 week ago

Yeah, i didn't notice it misbehaving. I suggest you plot it to make sure what you observed was not somebody changing manually the temperature, or the window open detection or something like that

dbuezas commented 1 week ago

And unfortunately no, there's no way to set dst via Bluetooth afaik. You can set it from the device itself