Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BT / Sonoff TRVZB - Offset wrong and/or UI indication wrong #1489

Open
DattiHD opened this issue Nov 22, 2024 Discussed in #1486 · 31 comments
Open

BT / Sonoff TRVZB - Offset wrong and/or UI indication wrong #1489

DattiHD opened this issue Nov 22, 2024 Discussed in #1486 · 31 comments

Comments

@DattiHD
Copy link

DattiHD commented Nov 22, 2024

Discussed in #1486

Originally posted by DattiHD November 21, 2024
Hi,

maybe someone has an idea how to fix this issue:

Software I am using:
BT:
1.6.1

Z2MQTT:
1.41.0

Home Assisstant
Core
2024.11.1
Supervisor
2024.11.2
Operating System
13.2
Frontend
20241106.2

Hardware:
Sonoff TRVZB
Govee H5100

This happens for all my TRVs but let's take my living room TRV as an example.
This is it's configuration [edit: changing the calibration type to standard or aggressive does not affect the described behaviour]:
config

image

It is set to hit a temperature of 20 °C. I would expect that it would start to heat when the Govee Sensor reports a temperature that is below 19.8 °C.

However what actually happens is that the UI Card indicates heating when the ext. sensors temperature is < 20.0.
BT

And the TRVZB is still idle because the last offset change was over an hour ago and the local temp is still > target temp.
zigbee

Does anyone know how to decrease the interval of the offset correction? There are no indicators for any errors that would prevent BT from correcting the offset:
image

@NeosNDG
Copy link

NeosNDG commented Nov 24, 2024

HI,

can you turn on debugging of BT and take a look at the logs whether you´ll see entries similar to this:
2024-11-24 00:59:36.652 DEBUG (MainThread) [custom_components.better_thermostat.events.temperature] better_thermostat None: external_temperature changed from 17.9 to 17.8
2024-11-24 00:59:36.652 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.heizung_wohnzimmer_thermostat - new local calibration: -3.6 | external_temp: 17.8, trv_temp: 17.7, calibration: -3.6

I´m running TRVZB´s via ZHA and the behaviour of the UI card is the same. So, I assume that it´s a display issues with the card (or even works as designed?) but BT is turning down the offset low enough once your external temp sensor hit´s the offset temp.

When it comes to your target temp steps (just because you marked it red in your screenshot), I figured the TRVZB´s only support 0.5° steps unfortunately but that shouldn´t be related to the issue anyway, I guess.

@DattiHD
Copy link
Author

DattiHD commented Nov 24, 2024

Hi NeosNDG,
thank you for your reply. I already had a look at the log files and i can see that BT is changing the Offset:

2024-11-24 15:22:45.737 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.kinderzimmerheizung - new local calibration: -0.4 | external_temp: 19.7, trv_temp: 19.4, calibration: -0.6

After using BT for some days i would say that there are two issues I can identify:

  • The heating icon does not represent the actual state the device is in and is does not take the tolerance into account. If you want to know what your heater is actually doing, you have to check Z2MQTT (or respective services/gateways).
  • As we can see BT does change the offset but I do not understand the interval between the changes. If you monitor the temp graph over a whole day the temperature is more or less there where you want it to be (in my case +/- 0.5 which seems pretty good to me as from what I have read, the Sonoff TRVZB have a hysteresis of 1 °C). If you expext fast an reliable changes that is where you encounter problems. A situation I had this morning: The target is set to 20 °C. My temp sensor measures 20.3 °C. I'm turning down the target to 19 °C. Card indicates heating is off. TRVZ still heats because the offset has not been adapted and still reads 16.3 °C --> so either you set the target to a really low temp (which might be risky if it is cold and you forget to increase it again) or you change the offset manually to match you ambient temperature.

However, despite these flaws this addon is a great piece of work. Thanks to the founder and the contributers!

@NeosNDG
Copy link

NeosNDG commented Nov 24, 2024

I agree @DattiHD.

Your summary also matches my experience. Although I started put the latter part regarding how fast BT reacts when target temp has been reached more to a subjective feeling as when I watch for it to happen, it always feels like forever when in fact it´s only a matter of minutes. Still, it could (should?) be faster.

@viprapp
Copy link

viprapp commented Nov 26, 2024

I'm experiencing the same issue with my setup, which consists of eight Sonoff TRVZB devices (firmware v1.2.1). I've tested this with both Zigbee2MQTT v1.41.0 and Better Thermostat (BT) versions 1.6.1 and 1.7 beta.

Observed Behavior
The BT thermostat indicates "heating" throughout the night, but the actual thermostat remains idle. This results in the room temperature dropping 2°C below the target temperature.

BT Interface:
BT Interface Screenshot

Original Thermostat Interface:
Original Thermostat Screenshot

I am currently using the normal calibration offset setting with overheating protection enabled, as I have also noticed overshooting issues in the past.

I strongly suspect that the root cause lies in the offset logic, which might not be accurately applied or functioning as intended. The AI calibration feature is even more unreliable.

I also really think this integration is a gem but unfortunately in its current state it causes a lot of headaches for these TRVs.

@MrUhu
Copy link

MrUhu commented Nov 26, 2024

I encounter the same problem.
Interestingly when setting the target temperature via automation, it seems to be ignored because the offset isn't updated. So my bathroom has a cozy 19°C in the morning when it should be 23°C. Same with the rest of the flat.
When setting the temperature manually higher than the automatically set temperature, the TRV starts heating, even when I set it back to the intended temperature - of course only heating until the lower target temperature is reached.

Something is off with the timing of the offset calibration with the newer firmware (beforehand I had a different issue - one of three TRVs was heating although the target temperature was long reached). So this issue can specifically be a problem with the SonOff TRVs.

Edit: Ah yes, the other issue I had was #1410

@MrUhu
Copy link

MrUhu commented Nov 27, 2024

After some tinkering I can definitely say, that the offset is calculated completely wrong. One thermostat, although it should have heated up the room by two degrees, was calibrated 8.5 °C above internal temperature (21°C was the target, 27.5 °C was the calibration). The others were calibrated differently in this triplet of thermostats, but still: Neither would have heated like this.

One workaround - to the confusion of my wife - is setting the calibration mode to "Target Temperature". Like this the thermostat is heating like expected when a temperature is set. The only problem is: After the temperature is set, the digits on the thermostat go all over the place, because it is calibrated by target temperature.

Anyway. Additionally I saw that, although the thermostats are calibrated by target temperature, all of them change the offset regularly - and are always above the reported room temperature. 2,5 calibration with 23 internal temperature, when outside temperature is 21...

@DattiHD
Copy link
Author

DattiHD commented Nov 28, 2024

I can confirm the behaviour described by @MrUhu. I also was quite suprised, that the offset was still being adapted by BT although being in target temp mode. Thats why I went back to offset mode.
As MrUhu describes, the offset can be all over the place some times. At least in my case and in accordance with @NeosNDG the offset is being set to a more reasonable value within some minutes.

@Rhizix
Copy link

Rhizix commented Nov 29, 2024

Just wanted to chime in and say that I am encountering a similar issue.
The offset doesn't actually seem to do anything and my Sonoff TRV's were heating while the Better Thermostat entity for them said they were idle :/
Really hoping for a fix for this.

@MrUhu
Copy link

MrUhu commented Nov 30, 2024

For anyone with trouble:
Kinda flawlessly working for me is Version 1.6.
It seems like the fixes in 1.6.1 and the changes in first Beta 1.7 causing problems in general or specifically with Sonoff TRVZB. The calibration in the beta also seems...messed up, see #1470.

I'm running with 1.6 right now and apart from occasional heating shown in the dashboard but not any heating taking place (difference from target to current temperature <0.3 °C) - I have no problems.

@ishbuggy
Copy link

ishbuggy commented Dec 3, 2024

I have the same issue, since updating from 1.6 my Sonoff TRVs will frequently have the offset way out of date, despite the BT thermostat knowing the room temp and setting the heating to off. The room temp can be above the heating setpoint, but the offset on the TRV remains very very low so it keeps heating for a long time, even hours sometimes. This does cause the room to get way too hot, several degrees above the setpoint. Reloading the BT integration resets it and it fixes itself. Also, quickly setting the eco temp (set to 16C in my case) and then back to normal in the BT integration also seems to kind of "reset" the offset so it is fixed. But this is very annoying and also does not help unless I am constantly watching it. This problem was not present in v1.6 and earlier, to my knowledge.

Sonoff TRV version: 1.1.5
Z2M version: 1.41.0
BT version: 1.6.1

@krekos
Copy link

krekos commented Dec 11, 2024

Same problem here. I used BT in version 1.7-Beta and I found that multiple times in week i have to reset offset on TRV's.
Sonoff TRV FW: 1.2.1

@MrUhu
Copy link

MrUhu commented Dec 11, 2024

Same problem here. I used BT in version 1.7-Beta and I found that multiple times in week i have to reset offset on TRV's. Sonoff TRV FW: 1.2.1

Use 1.6. (not 1.6.1)
This is running flawlessly for me. Haven't had any issues regarding Better Thermostat in the last two weeks.

@nightfever77
Copy link

nightfever77 commented Dec 12, 2024

Same issue here last night. (1.6.1)
Calibration offset was set to -13° for heating up in the evening (target 22°). Target was lowered to 20° later on but the offset stuck on that value. The TRV was heating the whole night (room temp 22,5° in the morning), but BT climate was idle.

The Sonoff TRVZB supports an offset range from -12,8 to 12,7 in 0,2 steps. Maybe it's getting buggy when BT pulls an offset out of that range.
I set up a Node-Red flow, that will check the offset regularly. If the value is out of the supported range it resets it to zero, then calculates the difference between local and room temperature and pulls the result to the TRV's local offset again.
If it is still buggy, I will deactivate BT's calibration and run it fully in Node-Red.

@akopachov
Copy link

Same problem for me.
Sonoff TRVZB (v1.2.1) + BT (1.6, 1.6.1, 1.7.0-beta.1)

I saw 1.6 is working fine for somebody, but it looks like for me even 1.6 does some weird things with calibration value in "offset base" + "ai time-based" mode.

@krekos
Copy link

krekos commented Dec 12, 2024

BT 1.6 working fine. Try to reapair the TRV's. Especially if you update FW lately. For me Offset was funky after FW updates.

Same problem for me. Sonoff TRVZB (v1.2.1) + BT (1.6, 1.6.1, 1.7.0-beta.1)

I saw 1.6 is working fine for somebody, but it looks like for me even 1.6 does some weird things with calibration value in "offset base" + "ai time-based" mode.

@nightfever77
Copy link

For me it was working fine until BT triggered an offset value out of the TRVZB's supported range.

@fridayAr
Copy link

I can also confirm this problem. I went from 1.5.1 -> 1.7.0-Beta1 and the noticed the exact same behavior.

@nightfever77
Copy link

Try to reapair the TRV's.

How ?

@krekos
Copy link

krekos commented Dec 13, 2024

Try to reapair the TRV's.

How ?

Ah, badly written... Pair the TRV againg.

@fridayAr
Copy link

I can also confirm this problem. I went from 1.5.1 -> 1.7.0-Beta1 and the noticed the exact same behavior.

After going back to 1.5.1 everything works flawlessly again

Try to reapair the TRV's.

How ?

Ah, badly written... Pair the TRV againg.

Do you mean in z2m or just delete them in BT and create them anew? I tried the later one and it did not work.

@nightfever77
Copy link

nightfever77 commented Dec 13, 2024

Yesterday afternoon I downgraded BT to 1.6, but the behavior persists:
At 10 pm the target temp has been lowered to 20°C by schedule. BT climate changed its target and went to idle (room temp 22°C), but it did not raise the offset. So the TRV was still heating untill I reset the offset manually.
No idea why this only happens in the evening.

@krekos
Copy link

krekos commented Dec 13, 2024

I can also confirm this problem. I went from 1.5.1 -> 1.7.0-Beta1 and the noticed the exact same behavior.

After going back to 1.5.1 everything works flawlessly again

Try to reapair the TRV's.

How ?

Ah, badly written... Pair the TRV againg.

Do you mean in z2m or just delete them in BT and create them anew? I tried the later one and it did not work.

Z2M

@fridayAr
Copy link

But aren't you using 1.6, not 1.7.0-Beta1?

In my case it would be to much trouble repairing every single TRV. I'm using them in my whole house on every floor and in sync with my heatpump.
I'll just stay on 1.5.1 and wait for this issue to be resolved.

@NeosNDG
Copy link

NeosNDG commented Dec 13, 2024

Although I´m running on ZHA, I do have the same or at least very similar issues with BT 1.6.1. Re-pairing doesn´t help.

Not sure whether this has been accepted as an issue yet? It´s not assigned at least.

Also, it´s very corwded and basically includes two issues at once if I´m not mistaken

  • BT calibration issue (with Sonoff TRVs)
  • BT UI card showing heating when in fact BT isn´t (and shouldn´t due to tolerance configured in BT?)

@fridayAr
Copy link

@KartoffelToby is there anything we can provide to help?

@Schmigelo
Copy link

Although I´m running on ZHA, I do have the same or at least very similar issues with BT 1.6.1. Re-pairing doesn´t help.

Not sure whether this has been accepted as an issue yet? It´s not assigned at least.

Also, it´s very corwded and basically includes two issues at once if I´m not mistaken

  • BT calibration issue (with Sonoff TRVs)
  • BT UI card showing heating when in fact BT isn´t (and shouldn´t due to tolerance configured in BT?)

I can only agree with the previous speakers. I have the same problems. The target-based settings help, but overall it doesn't work as well as offset-based.

@akopachov
Copy link

I managed to get more or less stable results by using "Offset Based" + "Aggressive" + "Overheat protection" combination. It is not ideal, but at least seems to be working stable on the latest Beta, and does not result to over\under heat.

@fridayAr
Copy link

I guess we need to wait till 1.7.xxx is out of beta. Seems other TRV also have some issues.

@krekos
Copy link

krekos commented Jan 5, 2025

Did someone tried latest B2 release if it's still bugged?

@szaszgyozo
Copy link

I tried B2 release, and kept happening to me.

@folfy
Copy link
Collaborator

folfy commented Jan 9, 2025

For debugging heating/control loop issues, we need proper logs and diag. data (see below), and ideally screenshots of the statistics graphs of the BT climate entity, TRV climate entity, and if applicable/existing, TRV local calibration/offset and valve position entity.

Also sry, but offset based calibration is broken in b2, waiting for approval to get the fix with b3 - #1553 / #1555

In regards to changing the icon representation: It's kinda hard to determine a good way for this, like you can have multiple TRVs and would have to combine the state, and even then it might not be rly heating in the end. Technically heating is requested from the TRV, so the heating indication is shown. Improving this in some way, would be related to #1236.

diagnostic data
IMPORTANT:
Download and paste the diagnostic data from your Better Thermostat Entity(s) below. (not working in v1.6.1 and v1.7.0b1 - please update)
https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics

debug log
Depending on how complicated you issue is, it might be necessary to enable debug logging for BT,
reproduce the issue, and then upload this logfile here.
https://www.home-assistant.io/docs/configuration/troubleshooting/#enabling-debug-logging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests