[RELEASE] Sonoff TRVZB driver

Perfect! Logs not reporting anything unpleasant and the dashboard tile is working fine.
Thank you very much.

1 Like

Hi @kkossev thanks for developing this driver. I am using these TRV in my home. One issue I am facing is adding the devices to Google home. The Hubitat built in google app reports that the device is not compatible. As a workaround I created a virtual thermostat and use rule machine to update trv. Any idea what could prevent googl home integration. Thanks

2 Likes

error

java.lang.NumberFormatException: Character n is neither a decimal digit number, decimal point, nor "e" notation exponential mark. on line 4268 (method setHeatingSetpoint)

there appears to be an error in the method for setHeatingSetpoint that's suddenly occured after running for a few days.

EDIT: ok found the solution to this. The min and the max setpoints were empty (null). Needed to add some values to fix.

1 Like

What is your HE platform version?

was 2.4.0.145 now 2.4.0.146. C7 and C8

Thank you for the pointer, this should be an easy fix in a future driver update.

Hi there, just received and installed my first Sonoff TRV (and my first zigbee device as i've been 100% z-wave up till now) Installed the above driver and, after a bit of tinkering and configuring, it appears to work nicely.
I was concerned that the driver is over 4000 lines long. Is there a slimmed down version available? Or is this amount of code negligible relative to the HE eco-system?
thanks

Having had this device running for 24 hours, i notice it reports back to the HE every 0.1 degree Celsius change of temperature. With this amount of communication i suspect it will impact battery drain. Polling is set to 30min.
Is there any way to get it to report on a predetermined +/- temperature change?

i notice its always available. Any setpoint adjustment i make on HE is instantly reflected on the TRV (and vice-versa) as if the polling is every few seconds. I assume "polling" in this case refers to how often the device is communicated with in order to exchange data. A longer polling interval is more battery efficient but less updates, etc.

worth noting this is my first experience of a zigbee devices. Perhaps this is the norm? Please comment on this also.

This TRV device lacks a Zigbee command to configure the temperature reporting 'delta'. But this is common for all other models TRVs.

You can turn off the 30-minute polling interval if not needed for better looking graphs.

Thanks for your comments and support @kkossev
i have now disabled polling. Do i need to enable "advanced options" then hit "configure" in order for these changes to be applied to the device?

Forgive me for not understanding but It is not clear to me what the purpose of the "advanced options" switch in the driver preferences is. thanks

The 'Advanced Options' toggle allows users to hide or show preferences that are typically unnecessary to modify. In this case, the temperature polling preference does not require the 'Advanced Options' to be enabled.

Go to the Preferences tab:

1 .Set the temperature polling interval to 'Disabled'


2. Click on the Save button.

There is no 'Configure' button on this page. Clicking the 'Save' button sends the configured parameters to the device.

Do not click on the 'Configure' command in the 'Commands' tab.
image

I realize this is a bit confusing : clicking on the 'Save' button in the Preferences tab actually sends the changed parameters to the device, and in this driver, the 'Configure' button in the Commands tab is made more complicated if compared to the stock drivers.

Typically, clicking the 'Configure' command in the inbuilt is needed only once and only if the driver was manually changed for some reason. The configuration/initialization of the device is done automatically when it is paired to the hub. Many battery-powered devices accept configuration changes (the reporting intervals as an example) only when they are awake (motion detected or contact closed), other battery-powered devices will accept configuration only in a very short time period immediately after the pairing, so in these cases clicking on the 'Configure' does not have any effect.

(Updated)

thanks for the quick reply. I assumed that would be the purpose. However, i see no difference by switching the advanced switch. See here-



My screenshot also looks slightly different from yours. Have i perhaps got a different driver or is there a difference between the C7 and C8 versions?
mine says: Driver version 3.4.0 2024/10/05 7:01 PM (TRVZB SONOFF) (C-7 2.4.0.145)
thanks again

You are using the latest version of the driver, Currently, it can not be updated because of a bug in the latest HE platform version 2.4.0.x that hopefully will be fixed soon.

The 'Preferences' tab web page does not update immediately after you toggle an option. You need to click on the 'Save' button first, then the new options will be shown.

1 .Toggle the 'Advanced Options' to be enabled.
2. Click on the Save button.
3. The extra preferences ( such as Healthcheck Method*, Enable trace logging) will show up. Normally, it is not needed to change these 'advanced' parameters - that's why they are not visible by default.

If you make any changes in the Preferences - click the Save button at the end of the changes.

Got it. Great, thank you again, @kkossev

1 Like

The information i have obtained from the manufacturer of this Sonoff TRV valve tells me there is no PID control. This device is effectively either on or off so is unable to maintain an accurate temperature. Best available is +/- 1 degree. I am informed;

  1. The valve will be turned off when the ambient temperature is greater than or equal to the target temperature
  2. The valve will be turned on when the ambient temperature is less than the ambient temperature and by more than 1℃
    You can see this from the blue line. the grey line is the setpoint (x-axis lines are 2 hours)

Ironically, you can choose a setpoint to 0.1 degree resolution
Anyone got any workarounds or ways this device's performance can be improved?

I see on their website you can set how much the valve opens or closes by as a percentage. Could be useful to access this control.

1 Like

Yep, seems that the valve opening/closing degree parameters have been added starting from firmware version v1.1.4 :

Mine seems to be 1.1.05

I can try adding these settings in the next 1-2 weeks, although at this time, saving the driver code in Hubitat is still broken... : (

thanks, appreciate all your time and hard work done so far.

Given the valve's ability to open/close to a determined % amount, I cant any reason why the product developer could not integrate some proportional control, where the closer to the target temperature the smaller the valve opening amount.

I guess with some time and coding perhaps the driver could offer similar though appreciate its not a simple task.

A small % opening, i believe, could help maintain a more steady control instead of the few degrees +/- open/close back and forth as the unit swings around the setpoint. The downside being if reducing the values means the valve is never fully open or shut it will always allow some flow through the valve. For the time being i understand this is accessible with an ios app so i will investigate.

Is there some sort of magic I need to do to get this device to pair?
It just won't pair.
I get it to go into 'Ad' mode which it stays in for about 5 seconds then it drops out and displays F5.
I've factory reset and tried again.
No matter what I try, it just won't pair.

Try removing the batteries for a few minutes.

Still no joy I'm afraid.
Nothing I do works.
If anyone who has paired one of these would like to talk me through the pairing sequence (in case I've missed something obvious from the video) I would be most grateful.
Thanks.