homebridge-homematic
homebridge-homematic copied to clipboard
Room temperature (and likely other Rega values) not updating
Describe the bug Room temperature values from thermostats are not showing current values, they stay at the initial value read on booting homebridge.
Version [e.g. 22] v0.2.226
Which Homematic Device or Service the bug is about HmIP-eTRV-B
To Reproduce Steps to reproduce the behavior:
- Register an HmIP-eTRV-B thermostat
- Reboot homebridge
- Room temperature shown in Device view (or in Home App on iOS) is acurate and in sync with value shown in CCU.
- Make room temperature change (open window, start AC, ...)
Actual behaviour Room temperature in Homebridge will not update, getting out of sync with real metrics shown in CCU.
Expected behavior Room temperature in Homebridge should update, staying in sync with metrics shown in CCU.
Additional context I have analysed this yesterday. The bug lies in the fact that before any Rega request is sent, the HomeMaticCacheManager is checked for a stored value. For the initial request after reboot this is OK, as there will be a cache miss. However, as the cache entries never expire, any consecutive (rega) request will simply be answered by the cache and no current values are fetched.
I observed this in context of the ThermostatServiceIP service's ACTUAL_TEMPERATURE datapoint. However given the generic approach of the rega request and the cache interaction, I assume many other values might also be affected. Maybe all values that are not pushed into Homebridge but rather just regularly queried. However, I did not dive deep enough into the code to be sure about this. Consider it a hunch.