bosch-thermostat / home-assistant-bosch-custom-component

HA custom component for Bosch thermostats
Apache License 2.0
206 stars 44 forks source link

`hc1 target temperature` and `hc1 current room setpoint` not matching #380

Closed hardysim closed 3 months ago

hardysim commented 5 months ago

Describe the bug The values for hc1 target temperature and hc1 current room setpoint are not matching. I think this should be the same value. When looking into some official bosch-apps (HomeCom and Smart Home) I see the value of hc1 current room setpoint so I think this is the correct one. Sadly, the other one is used for the climate card.

Also hc1 target temperature (and with it the climate card) is not updating (very often?).

Plus, I get the two values in separate graphs even they use the same unit?!

To Reproduce Steps to reproduce the behavior:

  1. alter the setpoint in a bosch app or wait for the automation to change it (day/night cycle)
  2. hc1 current room setpoint is updated immediately and shows the correct value
  3. hc1 target temperature (and its climate card) is not updated or shows an old/wrong value

Expected behavior Those two sensors should match the value set on the heater / the bosch apps. A workaround would be to use hc1 current room setpoint as the source of the climate card.

Screenshots image

image

Version

Debug SCAN http://jsonblob.com/1205427746993201152

Additional context Add any other context about the problem here.

hardysim commented 5 months ago

Further investigation reveals that hc1 target temperature is the value, the user/automatic programs set they "wish" to have. But hc1 current room setpoint is the "actual" value, the heater is using depending of the summer/winter threshold and other factors (if its too warm outside, it will fall to 0 / off). So they might differ.

But I do not get the correct values for hc1 target temperature. It should match the values set in the bosch apps / the automatic program and update, if they change. I get updates immediately between the bosch apps, if I change the "wish"-temperatures. So there seems to be a problem on updating this value in HA.

hardysim commented 5 months ago

Plus, I get the two values in separate graphs even they use the same unit?!

I found this so it looks like a HA issue https://github.com/home-assistant/frontend/pull/19485

honikos commented 5 months ago

Further investigation reveals that hc1 target temperature is the value, the user/automatic programs set they "wish" to have. But hc1 current room setpoint is the "actual" value, the heater is using depending of the summer/winter threshold and other factors (if its too warm outside, it will fall to 0 / off). So they might differ.

But I do not get the correct values for hc1 target temperature. It should match the values set in the bosch apps / the automatic program and update, if they change. I get updates immediately between the bosch apps, if I change the "wish"-temperatures. So there seems to be a problem on updating this value in HA.

same for me

Version

pszafer commented 5 months ago

I need bosch scan so I can load in HA what you see. and send screenshot of those entities from dev tools -> states.

honikos commented 5 months ago

after upgrade to HA Bosch component version 0.24.6 the sensor.hc1_current_room_setpoint matches the room_setpoint from Bosch app.

hardysim commented 5 months ago

I'm using 0.24.6 now as well and it's not that better. Both values seem correct at first when looking at current/todays data but after changing the "wish" temperature in one of the bosch apps for a moment (see the spike at the end of the graph), sensor.hc1_current_room_setpoint updated immediately but hc1 target temperature (climate.hc1) keeps showing the old value:

image

Maybe the update interval for this is too slow? Looking at a whole week it bounces (correctly?) around:

image

hardysim commented 5 months ago

I was finally able to get a debug scan. Please have a look at it here: http://jsonblob.com/1205427746993201152

pszafer commented 4 months ago

can you make 2 scans, when you have setpoint set to 24 and then set it to 25.5 (or 22.5) and make second scan.

hardysim commented 4 months ago

Sure, here you go. I've set the setpoint via the Bosch Smart Home app (to be independent from Home Assistant), waited 1 minute so HA can pick it up and did the scan.

Scan with setpoint 24°C Scan with setpoint 25,5°C


Edit 1: Just a few seconds later the value for hc1 current room setpoint switched to 25,5°C as well. So it just took some more time? But this isn't consistent since I had the problem for multiple days? Anyway, here's another scan at the moment, when both values show 25,5°C.


Edit 2: So this time, the behavior was different: hc1 target temperature updated earlier than hc1 current room setpoint but both updated to the correct value eventually after 3 minutes or so. This would be fine and correct I guess?

pszafer commented 4 months ago

It looks like this. HC1 Current room setpoint is logical current target temperature, but unfortunately when you have schedule comfort or eco set it doesn't update for most users.

If you set custom target temp during schedule, then this one is going into temporaryRoomSetpoint. And again for most users it doesn't get reflected in currentRoomSetpoint.

So in first iterations of this component target temperature I was showing to user it was currentRoomSetpoint and most of the time it was wrong. Now component shows temporaryRoomSetpoint if value > 0, otherwise it shows temperature from your schedule. The best would be to change temperature only from HA, then if value is accepted it is cached for one minute and within one minute bosch api should respond with setting temperature.

If you have better algorithm to show current target temperature you can try to figure it out and give suggestion what to do. Just have in mind that for many users currentRoomSetpoint always shows 0... (or maybe bosch fixed it in recent versions and I'm not aware of that?)

pszafer commented 3 months ago

I'll close that for now. Feel free to suggest something and I can reopen