Sonoff TRVZB - Temperature offset doesn't seem to be working #880
-
Sorry if this is a misconfiguration, but i can't see what I'm doing wrong. It seems that even though I now have external temperature sensors my sonoff trvzbs are not getting a temperature offset from VT I've just set this one manually. Before I did, it was set to 0
Anyone know what I'm doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 42 comments 25 replies
-
Hello @doubledrat
What does it mean exactly ? Have you some screen copy or whatever to explain what you have seen ? |
Beta Was this translation helpful? Give feedback.
-
The temperature offset of my trv was 0, even though the room thermometer
was showing 2 degrees lower than the trv temperature.
I was under the impression that VT would adjust the trv temperature-offset
so that the trv internal temperature matches the room temperature?
The room was too cold because the trvs thought they had reached temperature
and turned themselves off.
This is just one example, all my vtherms seem to be doing the same
…On Fri, 31 Jan 2025, 20:37 Jean-Marc Collin, ***@***.***> wrote:
Hello @doubledrat <https://github.com/doubledrat>
It seems that even though I now have external temperature sensors my
sonoff trvzbs are not getting a temperature offset from VT
What does it mean exactly ? Have you some screen copy or whatever to
explain what you have seen ?
—
Reply to this email directly, view it on GitHub
<#880 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBJZILLTPGML4VFLYTD2NPNITAVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBSGIYDAMQ>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12022002@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Thinking more about this, surely there's no way you can directly control
the trv with only opening degree. Don't you need closing degree as well?
It's the trv that decides if it's open or closed. If you're not
constraining the amount it closes, then without offsetting the onboard
temperature reading, we will see the issue I describe - it thinks it's
reached temperature, so it closes - 100% closed.
I'm assuming that your code doesn't bother offsetting if the trv is set to
"direct control of valve"?
Or am I way off?!
…On Fri, 31 Jan 2025, 20:37 Jean-Marc Collin, ***@***.***> wrote:
Hello @doubledrat <https://github.com/doubledrat>
It seems that even though I now have external temperature sensors my
sonoff trvzbs are not getting a temperature offset from VT
What does it mean exactly ? Have you some screen copy or whatever to
explain what you have seen ?
—
Reply to this email directly, view it on GitHub
<#880 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBJZILLTPGML4VFLYTD2NPNITAVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBSGIYDAMQ>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12022002@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Like I said, my calibration offset doesn't seem to be changing. So the
trv thinks it's hot and turns off
What should I see in the log if calibration is actually happening?
…On Sun, 2 Feb 2025, 20:16 Jean-Marc Collin, ***@***.***> wrote:
You need opening degree AND offset calibration in order to have something
working.
You can also have opening degree AND closing_degree but then you will fall
into a bug into the Sonoff climate which impacts the hvac_action which is
used by the central boiler feature.
You should see the calibration offset vary over time at each cycle (5 min
in your case).
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBKXGDIS3NPJ7XZ4LGL2NZ4J7AVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBTGQZDMMY>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12034263@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I never see that in the logs. What i do see is this though
```
2025-02-02 20:47:15.107 INFO (MainThread)
[custom_components.versatile_thermostat.thermostat_climate]
VersatileThermostat-VT Downstairs Loo - regulation calculation will be done
2025-02-02 20:47:15.107 INFO (MainThread)
[custom_components.versatile_thermostat.thermostat_climate]
VersatileThermostat-VT Downstairs Loo - dtemp (0.0) is < 0.5 -> forget the
regulation send
2025-02-02 20:47:24.825 INFO (MainThread)
[custom_components.versatile_thermostat.thermostat_climate]
VersatileThermostat-VT Utility - Calling
ThermostatClimate._send_regulated_temperature force=False
```
Looking for dtemp, it's always 0.0
```
2025-02-02 19:17:24.813 INFO (MainThread)
[custom_components.versatile_thermostat.thermostat_climate]
VersatileThermostat-VT Utility - dtemp (0.0) is < 0.5 -> forget the
regulation send
```
|
Beta Was this translation helpful? Give feedback.
-
I've looked at your code and me not seeing any valve regulation messages
should not be possible as far as I can see!
Tomorrow I'll put some additional DEBUG lines in and see if I can work out
what's going on
…On Sun, 2 Feb 2025, 20:50 Jean-Marc Collin, ***@***.***> wrote:
It seems correctly configured
number.trv_downstairs_loo_local_temperature_calibration
You can try with Development Tools / Action to change it and see if it is
changing on your Sonoff TRVZB.
Concernant les logs en mode debug tu devrais trouver ça:
_LOGGER.debug(
"%s - valve regulation - I have sent offset_calibration=%s opening_degree=%s closing_degree=%s",
self,
offset,
self._percent_open,
closing_degree,
)
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBKFK2ZNX7KDB7SKIFD2N2AJZAVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBTGQ2DSNA>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12034494@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I'm so sorry Jean-Marc. Debug had turned itself off at some point and I
hadn't noticed!
Now I'll have to wait for it to misbehave again in order to work out what's
going on. At the moment it is behaving as expected
…On Mon, 3 Feb 2025, 07:58 Jean-Marc Collin, ***@***.***> wrote:
You are certainly not in DEBUG level. See here:
https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/troubleshooting.md#enable-logs-for-the-versatile-thermostat
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBMYLNJFVQTLUBWS34L2N4OUDAVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBTHAYDOOA>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12038078@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I may be getting somewhere. I'm in the office. the vtherm set temperature is 20 and the office thermostat is 17.8 The TRV has 100% opening degree with a calibration offset of -2.9. It has a target temp of 20 and thinks it's 21. As it thinks it has reached temperature, it has closed So the office is 17.8 and the radiator is no longer on, which is obviously incorrect. I think the issue is that the offset is only sent when the radiator is sent a new opening degree which only happens when something has changed? As vt has determined that nothing has changed, it's sending nothing. when the radiator is cold, the offset is not large, vt sets the offset, turns on the radiator all fine. As the radiator heats, the trv's temperature gets more incorrect as it's so close to the heat-source, but the offset is never recalculated, so I get the issue I'm seeing I think the temperature offset needs to be calculated and sent (if different) even when nothing else has changed? does that make sense?
|
Beta Was this translation helpful? Give feedback.
-
This also has the side-effect of vt thinking the boiler needs to be on, even though the trv's are shut, so it's blasting out of my radiators in the 2 rooms that have no thermostat |
Beta Was this translation helpful? Give feedback.
-
Are sonoff aware of the bug you mention? The seem quite keen to improve their products. Can you tell me where I can find details of the bug please? Perhaps we can work out a way to avoid it? |
Beta Was this translation helpful? Give feedback.
-
No, I'm English.
…On Mon, 3 Feb 2025, 21:14 Jean-Marc Collin, ***@***.***> wrote:
Are you French ?
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBPD6RRXY5SZZMXNJ232N7L2HAVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBUG43DQNQ>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12047686@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I try to understand your various post but you write more quickly than I can read and understand. I will try to respond to some pionts:
Yes, that is right. The offset is send only if the opening degree has change.
yes. I think you are right. That is not how it is implemented but you are certainly right on this point. But, once the TRV is open, the temperature should change and then a new opening degree with new calibration offset should be sent.
Do you talk about the bug in hvac_action if closing_degree is used ? I don't know. As I said oftently, I don't have any Sonoff TRVZB myself. All I know, is reported by user only. The bug is: when opening_degree is set AND closing_degree is set as 100 - opening_degree, the hvac_action of the Sonoff |
Beta Was this translation helpful? Give feedback.
-
Je comprends ce que vous dites à propos du changement de température qui devrait déclencher une nouvelle ouverture et un calibrage décalé. Tout ce que je peux dire, c'est que cela ne se produit pas, comme vous pouvez le voir dans l'extrait du journal. Je vais jeter un autre coup d'œil au code pour voir si je peux repérer quelque chose qui expliquerait cela. En ce qui concerne l'action HVAC, je peux comprendre pourquoi cela se produit. Vous avez réglé la vanne pour qu'elle ne puisse pas bouger, donc elle est en veille. Si vous avez le contrôle sur les degrés d'ouverture et de fermeture, vous ne devriez plus demander à la vanne quelle est son action HVAC, n'est-ce pas ? Vous savez. Si le degré d'ouverture est > 0, cela chauffe. PS : la discussion 885 semble évoquer le même problème que celui que je rencontre ? I see what you are saying about the temperature change should trigger a new opening and calibration offset. All I can say is it is not happening, as you can see from the log extract. I will have another look at the code and see if I can spot anything that tells us why. As for the hvac action, I can understand why that would happen. You've set the valve so it cannot move, so it is idle. Surely if you have control over both opening and closing degrees, you should no longer be asking the valve what it's hvac action is? You know. If the opening degree is > 0 it is heating. PS discussion 885 looks like the same problem I am having? |
Beta Was this translation helpful? Give feedback.
-
Looks like a similar problem I and another guy have.. have a look in the Versatile Thermostat Thread @home assistant Forum |
Beta Was this translation helpful? Give feedback.
-
Looking at the thread posted by @b4rRa , I think there is something you can test :
Let me know if this does fix the issue. |
Beta Was this translation helpful? Give feedback.
-
Hi Jean-Marc
if opening 0 closing can be 100. this will report idle once temperature
drops, but that is true
if opening 100, closing needs room to move, so I made opening 98 and
closing 1 (99 and 0 *may *work, but I wanted to avoid 0 just in case)
opening degree 40 -> closing degree = 59 (instead of 60)
opening degree 60 -> closing degree = 39 (instead of 40)
this is the (ugly!) way I did it
# Send closing_degree if set
closing_degree = None
if self.have_closing_degree_entity:
if self._percent_open >= self._max_opening_degree:
self._percent_open -= 2 # give enough room for closing
degree to be 1 away from opening degree (sonoff trv bug)
closingDegree = round(self._max_opening_degree - self
._percent_open)
closingDegree -= 1
if self._percent_open < 1:
closingDegree = 100 ####### NEEDS TO BE
SELF._MAX_CLOSING_DEGREE
await self._send_value_to_number(
self._closing_degree_entity_id,
closing_degree := closingDegree,
)
# Send opening_degree
await super().send_percent_open()
I had to move send_percent_open() below this code as my closing degree code
might change it.
While you are editing, perhaps you can round the offset calibration, as
sometimes we get e.g. -1.999999999
# send offset_calibration to the difference between target temp and
local temp
offset = None
if self.have_offset_calibration_entity:
if (
(local_temp := self
._climate_underlying.underlying_current_temperature)
is not None
and (room_temp := self._thermostat.current_temperature) is
not None
and (
current_offset := get_safe_float(
self._hass, self._offset_calibration_entity_id
)
)
is not None
):
offset = min(
self._max_offset_calibration,
max(
self._min_offset_calibration,
*round(room_temp - (local_temp -
current_offset),1),*
),
)
await self._send_value_to_number(
self._offset_calibration_entity_id, offset
)
…On Mon, 10 Feb 2025 at 16:38, Jean-Marc Collin ***@***.***> wrote:
that is a very good news. I think I will implement this as a beta release
with this small change.
opening degree = power_percent (with eventual min value)
closing degree = max(99 - opening_degree, 0)
opening degree 100 -> closing degree = 0
opening degree 40 -> closing degree = 59 (instead of 60)
opening degree 60 -> closing degree = 39 (instead of 40)
opening degree 0 -> closing degree = 99 (instead of 100)
Does it sound good for you ?
That should do the trick.
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBLXWP3FU33XKWEZII32PDIX5AVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJSGMZDANI>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12123205@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
we can't do that because 100% open would become 0% closed, which means it
can't move and we're back to having the trv bug
I suspect that 99% open and 0% closed would also cause an issue, which is
why I chose 98%/1%. I'll test 99/0 tomorrow. I am about to go out for
the evening now.
…On Mon, 10 Feb 2025 at 17:59, Jean-Marc Collin ***@***.***> wrote:
ugly is the word. What about setting the delta to 2 instead of 1
everywhere ?
Yo ucan change this into the 7.2.2.beta1 at ligne 1162 of underlyings.py:
Replace -1 by -2 and let me know:
closing_degree := max(self._max_opening_degree - 2 - self._percent_open, 0),
)
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBNMFPYVCVPIRXAGGZL2PDSG7AVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJSGQ4DSOI>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12124899@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hi Jean-Marc
99 open 0 closed seems to work as we would want. It switches between heat
and idle
…On Mon, 10 Feb 2025, 18:24 Bob Findlay, ***@***.***> wrote:
we can't do that because 100% open would become 0% closed, which means it
can't move and we're back to having the trv bug
I suspect that 99% open and 0% closed would also cause an issue, which is
why I chose 98%/1%. I'll test 99/0 tomorrow. I am about to go out for
the evening now.
On Mon, 10 Feb 2025 at 17:59, Jean-Marc Collin ***@***.***>
wrote:
> ugly is the word. What about setting the delta to 2 instead of 1
> everywhere ?
>
> Yo ucan change this into the 7.2.2.beta1 at ligne 1162 of underlyings.py:
> Replace -1 by -2 and let me know:
>
> closing_degree := max(self._max_opening_degree - 2 - self._percent_open, 0),
> )
>
> —
> Reply to this email directly, view it on GitHub
> <#880 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADZMGBNMFPYVCVPIRXAGGZL2PDSG7AVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJSGQ4DSOI>
> .
> You are receiving this because you were mentioned.Message ID:
> <jmcollin78/versatile_thermostat/repo-discussions/880/comments/12124899@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
Hello @doubledrat , Do you think I can publish the beta or do you to do some more test ? |
Beta Was this translation helpful? Give feedback.
-
no, because as it is, 100 open would give 0 closed, which would hit the bug perhaps the neatest way to do it would be to reduce the opening - open = max(0, open -1)
gives
|
Beta Was this translation helpful? Give feedback.
-
Yes f5 means it's not happy. It can't feel the valve pin resist or
something. It did that on some of my valves and I had to screw the trv
down really tight for the error to go away.
…On Wed, 12 Feb 2025, 19:55 Jean-Marc Collin, ***@***.***> wrote:
Hello @adrianotitta <https://github.com/adrianotitta> ,
I have receive the valve and put a ring around it :
IMG20250212204555.jpg (view on web)
<https://github.com/user-attachments/assets/69527af6-6b10-46ee-a9c3-f168da9a3db9>
Connect it to the TRV
IMG20250212204500.jpg (view on web)
<https://github.com/user-attachments/assets/d27e5207-af49-43c5-b635-2f06b6cdbddb>
Click on the button, Ad... and then F5 (which means, doesn't work I'm
right).
Any more ideas ?
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBMFS7XTRGPHR7ED6WD2PORL3AVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJXHEZTONA>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12179374@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Does the pin feel stiff when you press it? But it does move?
…On Wed, 12 Feb 2025, 19:55 Jean-Marc Collin, ***@***.***> wrote:
Hello @adrianotitta <https://github.com/adrianotitta> ,
I have receive the valve and put a ring around it :
IMG20250212204555.jpg (view on web)
<https://github.com/user-attachments/assets/69527af6-6b10-46ee-a9c3-f168da9a3db9>
Connect it to the TRV
IMG20250212204500.jpg (view on web)
<https://github.com/user-attachments/assets/d27e5207-af49-43c5-b635-2f06b6cdbddb>
Click on the button, Ad... and then F5 (which means, doesn't work I'm
right).
Any more ideas ?
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBMFS7XTRGPHR7ED6WD2PORL3AVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJXHEZTONA>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12179374@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Glad to hear it!
…On Wed, 12 Feb 2025, 20:09 Jean-Marc Collin, ***@***.***> wrote:
Oooh it is ok now. The ring was not totally inserted.
—
Reply to this email directly, view it on GitHub
<#880 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBNVAX25CW4RHZHSBE32POS7FAVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJXHE2DOOI>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12179479@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/jmcollin78/versatile_thermostat/releases/tag/7.2.2 |
Beta Was this translation helpful? Give feedback.
-
Great! Thank you very much for your efforts. Even though my Sonoff TRVZBs work perfectly with VT and my somewhat terrible ;) automation, I naturally prefer "out-of-the-box" solutions. What exactly has been changed now, and how should the Sonoffs be configured? Then I would adjust everything again and test the changes in the new version. |
Beta Was this translation helpful? Give feedback.
-
Alright so the VT state is always correct now? When sonoff still shows heating or idling when it should heat, VT solves it with the open/closing degrees? I have another automation which is triggered by the hvac state of sonoff for the heating pump. I need to switch the automation to the state of the VT entity now, right? |
Beta Was this translation helpful? Give feedback.
-
@jmcollin78 2 things from my side:
|
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't understand point 1, but point 2 is already a feature - look
at "follow underlying temp changes"
[image: image.png]
…On Mon, 17 Feb 2025 at 12:59, adrianotitta ***@***.***> wrote:
@jmcollin78 <https://github.com/jmcollin78> 2 things from my side:
1. The temperature offset entity will go out of control, but as it is
practically usuless with these enhancements, the configuration can be
skipped. I think you should reflect that in the documentation
<https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/self-regulation.md>
2. This is actually a feature request, but it could be good to make
(maybe through a specific option to be enabled) that the VTherm temperature
can also be set through the manual control in the valve.
—
Reply to this email directly, view it on GitHub
<#880 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZMGBL2YW54OYOI2QG2CM32QHMJNAVCNFSM6AAAAABWIEB3CSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRSGQ2TGMI>
.
You are receiving this because you were mentioned.Message ID:
<jmcollin78/versatile_thermostat/repo-discussions/880/comments/12224531@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hello @adrianotitta ,
Not in my case. If you think about the offset calibration it is on the contrary most stable at home: and @doubledrat is right, it is already an existing feature: https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/over-climate.md#follow-underlying-temperature-changes |
Beta Was this translation helpful? Give feedback.
J'ai adopté une approche différente. J'ai confirmé le bug où le Sonoff TRV peut rapporter "idle" même si la vanne est ouverte, par exemple :
Cependant, si l'on définit :
Il rapporte correctement l'état HVAC en fonction de si le TRV a atteint la température ou non.
J'ai modifié votre code pour prendre en compte :
Ouverture 100 (devient 98)
Fermeture 0 (devient 1)
Ouverture x (reste x)
Fermeture 100-x (devient 100-x-1)
Par exemple :