[RELEASE] Sonoff TRVZB driver

I got this TRV a couple of months back but not installed it yet. I was just wondering what currently works? I just want a simple automation to turn on/off the TRV at certains times of the day.

Turning on/off, changing the heating setpoint, and periodically polling the temperatures should be working.
What does not work is the automatic reporting of the setpoint when changed locally from the knob, but as the driver can be configured to poll the TRV and refresh the attributes every 15 minutes, as an example, this should not be a big problem.

2 Likes

Great, that should be fine for me!

They're reduced to £26 on Amazon UK today if anyone needs more.

Hi.
I am using the kkossev driver for Sonoff TRV on Hunitat C7. The thermostat does not report the current temperatur on the knop. I have tried to follow all your recommendations, but no luck. Can you help?

Config from the log:
Badeværelse gulvvarme [txtEnable:true, logEnable:true, traceEnable:true, alwaysOn:false, advancedOptions:true, healthCheckMethod:2, healthCheckInterval:60, voltageToPercent:true, threeStateEnable:false, temperaturePollingInterval:300, minReportingTime:10, maxReportingTime:3600, forcedProfile:Sonoff TRVZB]

Hi @user7014 ,

Please wait for a week or two, I have recently resumed the work on this driver.

Beside the known problem that the set temperature does not update automatically in HE when changed from the knob, is setting the heatPoint working?

Also, if you click on the Refresh() button, is the heating setpoint updated?

As handling many different thermostats and TRVs in one common driver proved to be inefficient and difficult to troubleshoot, the Sonoff TRVZB thermostat is now supported in a separate, dedicated driver.

The correct link is :
https://raw.githubusercontent.com/kkossev/Hubitat/development/Drivers/Zigbee%20TRV/Sonoff_Zigbee_TRV_lib_included.groovy

I have also updated the information and the links on the top post. The current'Sonoff Zigbee TRV' driver version is 3.3.0 (2024-06-08).

1 Like

After spending a lot of time trying to find out why Sonoff TRVZB works with any other home automation hub (SmartThings, Z2M, etc,..), but not Hubitat - the reason was narrowed down to the HE hubs not responding to the Time cluster (0x000a) ReadAttributes (0x00) command :

Sonoff TRV can not sync its internal clock with the HE hub date and time and considers the pairing process incomplete.

This is how SmartThings V3 hub responds to the same command :


The same problem is observed with Namron (Sunricher) thermostat not syncing the date and time clock.

2 Likes

I have updated the driver to version '3.3.1' '2024/07/09 7:53 PM' - (dev.branch) TimeSync() magic :slight_smile:

After updating the driver, please click on the Configure button.
image

If the TimeSync() magic works in your environment, the Sonoff TRVZB should start to report automatically the changes in the temperature, heatingSetpoint and thermostatMode.

1 Like

If this is so different in HE from others, should the Hubitat staff not modify this behaviour to work as it does on other hubs to give us the best future-proof experience ? Thank you for the great work. I think that I have a TRVZB in my stock and never got it to work. I will retry it in the next days.

1 Like

The driver is now available for installation and updates via HPM.

If you have already installed it manually, try the instructions below:


Hi,
I have a problem with my thermostat.
I've tried everything, but somehow no information is transmitted that the temperature is too low and it actually needs to open the thermostat. The room always stays cold.
What do I need to change?
Thank you very much!

Why are you trying to use the 'Thermostat Controller' ? This app is not needed to control a TRV device...

Use the HE inbuilt 'Thermostat Scheduler' app instead.

Thank you.
However, I cannot integrate a temperature sensor in this mode. Correct?

You are correct. To use an external temperature sensor, you must use the Thermostat Controller. I am personally not using this app, so I don't have much experience with it.

The TRV built-in temperature sensor was working OK for me during the previous winter season.... Do you experience over or under-heating while using the TRV built-in temperature sensor?

All the TRVs have a built-in PID algorithm for keeping the room temperature. I suppose, that the "Thermostat Controller" app is confusing the internal regulation algorithms by changing the heating setpoint too frequently... :thinking:

Hey there!

I had one of these working with this driver and really liked their design so went and bought three more! They all connected fine, and I can set the set point and get the temperature with two of the new ones, but one of them is not playing.

It's connected to Hubitat fine, but the reported setpoint isn't correct. Sending a new setpoint does nothing on the TRV or in the UI. Changing the setpoint on the device works as it should but doesn't report in Hubitat. No amount of clicking configure or refreshing is helping this little guy :frowning: Reset and reconnected a couple of times and it seems the same :expressionless:

Any ideas?

I also notice that it's not reporting the battery level like the others

Current States

  • Status : clear
  • coolingSetpoint : 35.0
  • healthStatus : unknown
  • heatingSetpoint : 20.0
  • powerSource : battery
  • supportedThermostatFanModes : ["auto","circulate","on"]
  • supportedThermostatModes : ["off","auto","heat"]
  • temperature : 18.0
  • thermostatFanMode : auto
  • thermostatMode : heat
  • thermostatOperatingState : idle
  • thermostatSetpoint : 20.0
  • rtt : timeout

State Variables

  • deviceProfile : SONOFF_TRV
  • deviceType : Thermostat
  • lastTx : {cmdTime=1731868013272}
  • lastThermostatMode : heat
  • lastRx : {}
  • lastThermostatOperatingState : idle
  • stats : {cfgCtr=2, rxCtr=0, txCtr=80}
  • driverVersion : 3.4.0 2024/10/05 7:01 PM (TRVZB SONOFF) (C-5 2.3.9.184)
  • health : {checkCtr3=0, offlineCtr=0}
  • lastHeatingSetpoint : 20.0
  • states : {isRefresh=true, isDigital=false, isPing=false}

'rxCtr' stands for 'the number of the received Zigbee messages' and it is zero, i.e. nothing is received from this device after the initial pairing.

Try pairing it again close to your C-5 hub. It often helps to reboot the hub just before attempting the pairing.

1 Like

:ok_hand: amazing, that was all it was. Thanks you :pray:

1 Like

Thanks for the driver. I've just installed two Sonoff TRVZBs in bedrooms and I'm pleased they are a little quieter than the Aquara E1s that were there before. The Aquaras were linked to an Aquara hub but (obviously) the Sonoffs are now on my HE C8pro. The device attributes all look good and the Thermostat scheduler appears to be working.
What I can't get working is the dashboard tile - it shows with pink background, and unhappy emoticon and the three dots menu gives the message:
Missing Attributes: thermostatFanMode, supportedThermostatFanModes, supportedThermostatModes
Have you any suggestions please for how to get the dashboaed tile working?

1 Like

Also I notice some warnings in the logs. They appear on a 10-minuts cycle:
dev:472024-12-16 02:55:37.075 PMdebugBed 2 TRVZB Basic cluster: ZCLVersion = 08

dev:472024-12-16 02:55:37.073 PMdebugBed 2 TRVZB parse: descMap = [raw:3C4F0100000800002008, dni:3C4F, endpoint:01, cluster:0000, size:08, attrId:0000, encoding:20, command:0A, value:08, clusterInt:0, attrInt:0] description=read attr - raw: 3C4F0100000800002008, dni: 3C4F, endpoint: 01, cluster: 0000, size: 08, attrId: 0000, encoding: 20, command: 0A, value: 08

dev:472024-12-16 02:55:18.292 PMdebugBed 2 TRVZB thermostatOperatingState is idle (raw:0) (no change)

dev:472024-12-16 02:55:18.288 PMdebugBed 2 TRVZB thermostatMode is heat (raw:4) (no change)

dev:472024-12-16 02:55:18.285 PMinfoBed 2 TRVZB termostatRunningState is 2 (Debug logging is enabled)

dev:472024-12-16 02:55:18.283 PMdebugBed 2 TRVZB heatingSetpoint is 15.0 °C (raw:1500) (no change)

dev:472024-12-16 02:55:18.280 PMwarnBed 2 TRVZB parseThermostatClusterThermostat: received unknown Thermostat cluster (0x0201) attribute 0x0001 (value 07C6)

dev:472024-12-16 02:55:18.278 PMdebugBed 2 TRVZB temperature is 19.9 °C (raw:1990) (no change)

dev:472024-12-16 02:55:18.273 PMdebugBed 2 TRVZB parse: descMap = [raw:3C4F0102013E000029C60701008612000029DC051B000030021C00003004290000190000, dni:3C4F, endpoint:01, cluster:0201, size:3E, attrId:0000, encoding:29, command:01, value:07C6, clusterInt:513, attrInt:0, additionalAttrs:[[status:86, attrId:0001, attrInt:1], [value:05DC, encoding:29, attrId:0012, consumedBytes:5, attrInt:18], [value:02, encoding:30, attrId:001B, consumedBytes:4, attrInt:27], [value:04, encoding:30, attrId:001C, consumedBytes:4, attrInt:28], [value:0000, encoding:19, attrId:0029, consumedBytes:5, attrInt:41]]] description=read attr - raw: 3C4F0102013E000029C60701008612000029DC051B000030021C00003004290000190000, dni: 3C4F, endpoint: 01, cluster: 0201, size: 3E, attrId: 0000, encoding: 29, command: 01, value: C60701008612000029DC051B000030021C00003004290000190000

dev:472024-12-16 02:55:18.270 PMwarnBed 2 TRVZB Tuya Cluster 0201 unsupported attrId 0001

dev:472024-12-16 02:55:18.211 PMinfoBed 2 TRVZB battery is 100 %

dev:472024-12-16 02:55:18.208 PMdebugBed 2 TRVZB parse: descMap = [raw:3C4F0100010A210020C8, dni:3C4F, endpoint:01, cluster:0001, size:0A, attrId:0021, encoding:20, command:01, value:C8, clusterInt:1, attrInt:33] description=read attr - raw: 3C4F0100010A210020C8, dni: 3C4F, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: C8

dev:472024-12-16 02:55:17.020 PMdebugBed 2 TRVZB sendZigbeeCommands: sent cmd=[he raw 0x3C4F 1 0x01 0x0001 {10 00 00 21 00}, delay 200, he raw 0x3C4F 1 0x01 0x0201 {10 00 00 00 00 01 00 12 00 1B 00 1C 00 29 00}, delay 1500]

dev:472024-12-16 02:55:17.013 PMdebugBed 2 TRVZB refreshFromDeviceProfileList()

dev:472024-12-16 02:55:17.012 PMdebugBed 2 TRVZB autoPollThermostat()...

I hope you can tell me if the warnings are significant.
Thanks.

1 Like

I suppose that you have first paired the TRVZB as a 'Device', and this driver was installed/updated and manually assigned to the TRV later?

Select 'LOAD ALL DEFAULTS' from the Configure drop-down list commands and then click on the Configure button above :

This should fix the Missing Attributes: thermostatFanMode, supportedThermostatFanModes, supportedThermostatModes.

Edit: to fix the thermostatFanMode error - click on any Fan command - Fan On, Fan Auto, etc... I will add an explicit initialization of the fan mode in the next driver version. Although fans do not make sense with TRVs, the dashboards are expecting to have a value set from the driver.

1 Like