Closed joaoasilva closed 9 months ago
Please test it few days. In case of problems or questions write here. If all is OK we try to publish it so everyone will have support. @jamjam9 You're also welcome to tests.
Interview gets completed but device still on 'configuring' . No option to set device name.
logs ....
Log Details (WARNING) Logger: zigpy_znp.utils Source: custom_zha_quirks/ts0601_trv_rtitek.py:71 First occurred: 21:57:03 (1 occurrences) Last logged: 21:57:03
Caught an exception while executing callback Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/zigpy_znp/utils.py", line 138, in _resolve result = self.callback(response) File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 924, in on_zdo_tc_device_join self.handle_join( File "/usr/local/lib/python3.9/site-packages/zigpy/application.py", line 293, in handle_join dev.schedule_initialize() File "/usr/local/lib/python3.9/site-packages/zigpy/device.py", line 120, in schedule_initialize self._application.device_initialized(self) File "/usr/local/lib/python3.9/site-packages/zigpy/application.py", line 137, in device_initialized device = zigpy.quirks.get_device(device) File "/usr/local/lib/python3.9/site-packages/zigpy/quirks/init.py", line 44, in get_device return _DEVICE_REGISTRY.get_device(device) File "/usr/local/lib/python3.9/site-packages/zigpy/quirks/registry.py", line 148, in get_device device = candidate(device._application, device.ieee, device.nwk, device) File "/config/custom_zha_quirks/ts0601_trv_rtitek.py", line 728, in init super().init(*args, *kwargs) File "/usr/local/lib/python3.9/site-packages/zhaquirks/tuya/init.py", line 683, in init super().init(args, **kwargs) File "/usr/local/lib/python3.9/site-packages/zigpy/quirks/init.py", line 98, in init self.add_endpoint(endpoint_id, replace_device=replaces) File "/usr/local/lib/python3.9/site-packages/zigpy/quirks/init.py", line 113, in add_endpoint ep = custom_ep_type(self, endpoint_id, replacement_data, replace_device) File "/usr/local/lib/python3.9/site-packages/zigpy/quirks/init.py", line 137, in init cluster = c(self, is_server=True) File "/config/custom_zha_quirks/ts0601_trv_rtitek.py", line 71, in init self.endpoint.device.thermostat_onoff_bus.add_listener(self) AttributeError: 'Rti' object has no attribute 'thermostat_onoff_bus'
Some more logs from the second attempt at adding device.....
2021-11-30 22:00:01 INFO (MainThread) [zigpy_znp.zigbee.application] TC device join: ZDO.TCDevInd.Callback(SrcNwk=0xA2A4, SrcIEEE=50:32:5f:ff:fe:40:47:2f, ParentNwk=0xB79A)
2021-11-30 22:00:01 INFO (MainThread) [zigpy.application] Device 0xa2a4 (50:32:5f:ff:fe:40:47:2f) joined the network
2021-11-30 22:00:01 DEBUG (MainThread) [zigpy.application] Device 50:32:5f:ff:fe:40:47:2f changed id (0xa2a4 => 0xa2a4)
2021-11-30 22:00:01 DEBUG (MainThread) [zigpy.device] [0xa2a4] Skipping initialization, device is fully initialized
2021-11-30 22:00:01 DEBUG (MainThread) [zigpy.application] Device is initialized
@jamjam9 use never version
https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-982671444
Also have the version with the display (Salcar), for me the newer version did work. Setpoint and current temperature value look fine: Min max values work but are displayed multiplied by 10: Did not use the modified climate.py yet.
I think the wrong scaling is fast fixed by jacekk015 then hi is getting time looking on the code. Is the TRV reporting the local temperature every minute ? My Siter is doing only one time in the hour and cant being tricked ;-((
If it's possible copy the presets file to your HA docker container so you can trying the mode setting is working OK to and from the TRV and you can using the boos mode with the countdown..
Did you finding more information of the TRV (then its having 3 AA batteries the mass) ? Is it possible doing some setting in the TRV like the min and max setpoint temperature ? We dont knowing them for the moment also the local temperature correction min and max is not known.
If you can getting them it's easy fixing it in the code so the device is not getting problem then sending out of range data to it.
Is the valve position always 100% or do it dynamic updating then heating more or less ? I think the on/off switch is children clock, is it working both ways (local and in ZHA reporting OK for both in ZHA) ?
Brave user !!!
@laurius Could you test this version. Please also enable debug logging and in case of problems send them also. Min/Max temps are under attributes 0x020F and 0x0210:
RTI_MIN_TEMPERATURE_ATTR = 0x020F # minimum limit of temperature setting (decidegree)
RTI_MAX_TEMPERATURE_ATTR = 0x0210 # maximum limit of temperature setting (decidegree)
Local temperature is reported about every minute. The TRV has 3 batteries, the batterie level is reported in percent, looks correct to me. The valve is not always at 100% on the TRV display, the value displayed in output valve state is not the same. Changing the valve state does nothing on the TRV. The on_off button works for child lock, displays also correctly when changing on TRV. Will test the other things later after work. Thanks for making this work, thought i wouldn't be able to use those functions.
The valve % is made as one read / write sensor one but its cant being written (We was not getting the read only working OK in ZHA) so its looks being OK.
One quick question, i don't run a docker installation but Hassos on a raspberry pi. when i try:
cp /config/climate.py /usr/src/homeassistant/homeassistant/components/zha/climate.py
the path does not exist. Where do i need to copy it or should i create that path?
It was some years i was running native pi for HA but i cant remember where is hidden.
Try searching for climate.py
in the fie system and you is finding it.
Seems to connect . Has picked up many entities . However Icannot set target temperature appears to be locked at 2 degrees...
Correction , from lovelace, it is taking the value on the slider tooltip and dividing by 10
I need DEBUG logs. Each of you say something else about Min/Max temp and none show logs Look for symbols: 0x020F for min temp 0x0210 for max temp
I've thousands of lines in my log , this is what I see relating to the rtithermostat...
2021-12-01 21:21:00 DEBUG (MainThread) [zhaquirks.tuya] [0x4de5:1:0xef00] Received value [0, 0, 0, 5] for attribute 0x020f (command 0x0002)
2021-12-01 21:21:00 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x4DE5:1:0x0201]: Attribute report 'RtiThermostat'[min_heat_setpoint_limit] = 50
2021-12-01 21:21:00 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_2f4740fe_thermostat: Attribute 'min_heat_setpoint_limit' = 50 update
2021-12-01 21:21:01 DEBUG (MainThread) [zigpy.zcl] [0x4de5:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=
The device itself appears to have change mode. Before pairing the dial switch at the top changed the set temperature. Now it appears to show 3,2.5,2,1.5 etc... possibly this is the valve open state or not, just a guess.
Thanks for help so far.
@jamjam9 Min/Max corrected. Mode could change only if you click Fire Icon/Off Icon on Lovelace, you do not have corrections in HA so it would show you Presets. Wanna to DEBUG something then show logs - mode is symbol 0x0401 ts0601_trv_rtitek.py.zip
HA restart needed after file change!!
@jacekk015 tried the new quirk, min max values are displayed correctly in Lovelace but the range on TRV it self is limited to 1/10 of that. If manually changing on TRV it's limited to 3.5 instead of 35, changing setpoint via home assistant seems to be not possible since values below 5°C are not possible.
2021-12-02 00:15:30 DEBUG (MainThread) [zigpy.zcl] [0x85c3:1:0x0201] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=39 command_id=Command.Report_Attributes> 2021-12-02 00:15:30 DEBUG (MainThread) [zigpy.zcl] [0x85c3:1:0x0201] ZCL request 0x000a: [[Attribute(attrid=18, value=<TypeValue type=int16s, value=2000>)]] 2021-12-02 00:15:30 DEBUG (MainThread) [zigpy.zcl] [0x85c3:1:0x0201] Attribute report received: occupied_heating_setpoint=2000 2021-12-02 00:15:30 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x85C3:1:0x0201]: Attribute report 'Thermostat'[occupied_heating_setpoint] = 2000 2021-12-02 00:15:30 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.thermostat_schlafzimmer_553122fe_thermostat: Attribute 'occupied_heating_setpoint' = 2000 update 2021-12-02 00:15:59 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=100 command_id=1> 2021-12-02 00:15:59 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=230, command_id=515, function=0, data=[4, 0, 0, 0, 196])] 2021-12-02 00:15:59 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0xef00] Received value [0, 0, 0, 196] for attribute 0x0203 (command 0x0001) 2021-12-02 00:15:59 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: Attribute report 'RtiThermostat'[local_temp] = 1960 2021-12-02 00:15:59 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_734540fe_thermostat: Attribute 'local_temp' = 1960 update 2021-12-02 00:16:06 ERROR (SyncWorker_5) [homeassistant.components.influxdb] Cannot connect to InfluxDB due to 'HTTPConnectionPool(host='192.168.0.28', port=8086): Max retries exceeded with url: /write?db=homeassistant (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x63efd868>: Failed to establish a new connection: [Errno 111] Connection refused'))'. Please check that the provided connection details (host, port, etc.) are correct and that your InfluxDB server is running and accessible. Retrying in 60 seconds. 2021-12-02 00:16:18 ERROR (Thread-3) [homeassistant.components.mqtt] Unable to connect to the MQTT broker: Connection Refused: not authorised. 2021-12-02 00:16:18 WARNING (Thread-3) [homeassistant.components.mqtt] Disconnected from MQTT server core-mosquitto:1883 (5) 2021-12-02 00:16:30 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=101 command_id=1> 2021-12-02 00:16:30 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=231, command_id=515, function=0, data=[4, 0, 0, 0, 189])] 2021-12-02 00:16:30 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0xef00] Received value [0, 0, 0, 189] for attribute 0x0203 (command 0x0001) 2021-12-02 00:16:30 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: Attribute report 'RtiThermostat'[local_temp] = 1890 2021-12-02 00:16:30 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_734540fe_thermostat: Attribute 'local_temp' = 1890 update 2021-12-02 00:16:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1680875944] Received invalid command: shopping_list/items 2021-12-02 00:16:58 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1680875944] Received invalid command: shopping_list/items 2021-12-02 00:17:01 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=True is_reply=True disable_default_response=False> manufacturer=4098 tsn=32 command_id=Command.Default_Response> 2021-12-02 00:17:01 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x000b: [0, <Status.SUCCESS: 0>] 2021-12-02 00:17:01 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=102 command_id=2> 2021-12-02 00:17:01 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=232, command_id=528, function=0, data=[4, 0, 0, 0, 25])] 2021-12-02 00:17:01 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0xef00] Received value [0, 0, 0, 25] for attribute 0x0210 (command 0x0002) 2021-12-02 00:17:01 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: Attribute report 'RtiThermostat'[max_heat_setpoint_limit] = 2500 2021-12-02 00:17:01 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_734540fe_thermostat: Attribute 'max_heat_setpoint_limit' = 2500 update 2021-12-02 00:17:01 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=103 command_id=1> 2021-12-02 00:17:01 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=233, command_id=515, function=0, data=[4, 0, 0, 0, 198])] 2021-12-02 00:17:01 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0xef00] Received value [0, 0, 0, 198] for attribute 0x0203 (command 0x0001) 2021-12-02 00:17:01 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: Attribute report 'RtiThermostat'[local_temp] = 1980 2021-12-02 00:17:01 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_734540fe_thermostat: Attribute 'local_temp' = 1980 update 2021-12-02 00:17:03 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0x0201] Mapping standard occupied_heating_setpoint (0x0012) with value 1950 to custom {514: 195.0} 2021-12-02 00:17:03 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: wrote {'occupied_heating_setpoint': 1950} attrs, Status: [[WriteAttributesStatusRecord(status=<Status.SUCCESS: 0>)]] 2021-12-02 00:17:03 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=True is_reply=True disable_default_response=False> manufacturer=4098 tsn=36 command_id=Command.Default_Response> 2021-12-02 00:17:03 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x000b: [0, <Status.SUCCESS: 0>] 2021-12-02 00:17:03 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=104 command_id=2> 2021-12-02 00:17:03 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=234, command_id=514, function=0, data=[4, 0, 0, 0, 15])] 2021-12-02 00:17:03 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0xef00] Received value [0, 0, 0, 15] for attribute 0x0202 (command 0x0002) 2021-12-02 00:17:03 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: Attribute report 'RtiThermostat'[occupied_heating_setpoint] = 150 2021-12-02 00:17:03 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_734540fe_thermostat: Attribute 'occupied_heating_setpoint' = 150 update 2021-12-02 00:17:06 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=True is_reply=True disable_default_response=False> manufacturer=4098 tsn=39 command_id=Command.Default_Response> 2021-12-02 00:17:06 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x000b: [0, <Status.SUCCESS: 0>] 2021-12-02 00:17:06 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=105 command_id=2> 2021-12-02 00:17:06 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=235, command_id=528, function=0, data=[4, 0, 0, 0, 35])] 2021-12-02 00:17:06 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0xef00] Received value [0, 0, 0, 35] for attribute 0x0210 (command 0x0002) 2021-12-02 00:17:06 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: Attribute report 'RtiThermostat'[max_heat_setpoint_limit] = 3500 2021-12-02 00:17:06 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_734540fe_thermostat: Attribute 'max_heat_setpoint_limit' = 3500 update
Not possible if you use latest version from above. You've set max temp to 35, and it was mapped properly to 3500 - value that HA needs internally. Same must be doing with min_heat_setpoint_limit - you didn't include logs of setting min temp. There's need to be in the LOGS area of:
If you have any older quirk remove that from quirk folder. Restart HA, and maybe re-pair device.
2021-12-02 00:17:06 DEBUG (MainThread) [zigpy.zcl] [0x1181:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=235, command_id=528, function=0, data=[4, 0, 0, 0, 35])]
2021-12-02 00:17:06 DEBUG (MainThread) [zhaquirks.tuya] [0x1181:1:0xef00] Received value [0, 0, 0, 35] for attribute 0x0210 (command 0x0002)
2021-12-02 00:17:06 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1181:1:0x0201]: Attribute report 'RtiThermostat'[max_heat_setpoint_limit] = 3500
2021-12-02 00:17:06 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_734540fe_thermostat: Attribute 'max_heat_setpoint_limit' = 3500 update
[edit] There's a possibility that when you tested older version min_heat_setpoint_limit was set too low, but it was written that low to database. Now with proper quirk there's a glitch. Removing and adding device again should help.
Fractory reset, use the latest tewak file and re paired. lovelace reporting in the entity card correctly but the device only alows 1-3 degrees.
2021-12-02 00:09:57 DEBUG (MainThread) [zhaquirks.tuya] [0xda32:1:0xef00] Received value [0, 0, 0, 50] for attribute 0x020f (command 0x0001)
2021-12-02 00:09:57 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xDA32:1:0x0201]: Attribute report 'RtiThermostat'[min_heat_setpoint_limit] = 5000
2021-12-02 00:09:57 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.radstat2_temp: Attribute 'min_heat_setpoint_limit' = 5000 update
2021-12-02 00:09:57 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0xDA32), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=53, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK: 32>, Radius=30, Data=b'\x18\x35\x0B\x01\x00')
2021-12-02 00:09:57 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2021-12-02 00:09:57 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=53)
2021-12-02 00:09:57 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0xDA32, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=47, SecurityUse=<Bool.false: 0>, TimeStamp=309774, TSN=0, Data=b'\x09\x36\x01\x00\x3D\x10\x02\x00\x04\x00\x00\x01\x5E', MacSrcAddr=0xDB37, MsgResultRadius=28)
2021-12-02 00:09:57 DEBUG (MainThread) [zigpy.zcl] [0xda32:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=
@jamjam9 Take a good look at logs you sent here. You are sending different data in different time. Chceck which TRV data you're sending since we are going nowhere with this. Compare NWK of TRV 0xda32 or 0x4de5 After each pairing NWK is changing Max temp - same situation each time I got different data from you.
@jamjam9 Min temp - Received value [0, 0, 0, 50] https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-984176982
2021-12-02 00:09:57 DEBUG (MainThread) [zhaquirks.tuya] [0xda32:1:0xef00] Received value [0, 0, 0, 50] for attribute 0x020f (command 0x0001)
2021-12-02 00:09:57 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xDA32:1:0x0201]: Attribute report 'RtiThermostat'[min_heat_setpoint_limit] = 5000
2021-12-02 00:09:57 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.radstat2_temp: Attribute 'min_heat_setpoint_limit' = 5000 update
@jamjam9 - last time you've gave such logs - is that other TRV or what?? One TRV cant send one time 5 and second time 50 as a value Min temp - Received value [0, 0, 0, 5] https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-984100042
2021-12-01 21:21:00 DEBUG (MainThread) [zhaquirks.tuya] [0x4de5:1:0xef00] Received value [0, 0, 0, 5] for attribute 0x020f (command 0x0002)
2021-12-01 21:21:00 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x4DE5:1:0x0201]: Attribute report 'RtiThermostat'[min_heat_setpoint_limit] = 50
2021-12-01 21:21:00 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_2f4740fe_thermostat: Attribute 'min_heat_setpoint_limit' = 50 update
@joaoasilva gave: https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-974240517 Min temp - Received value [0, 0, 0, 50]
2021-11-19 16:43:39 DEBUG (MainThread) [zhaquirks.tuya] [0xeb37:1:0xef00] Received value [0, 0, 0, 50] for attribute 0x020f (command 0x0001)
@jamjam9 Max temp - Received value [0, 0, 0, 20] https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-984100042
2021-12-01 21:21:03 DEBUG (MainThread) [zhaquirks.tuya] [0x4de5:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x0210 (command 0x0002)
2021-12-01 21:21:03 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x4DE5:1:0x0201]: Attribute report 'RtiThermostat'[max_heat_setpoint_limit] = 200
2021-12-01 21:21:03 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_2f4740fe_thermostat: Attribute 'max_heat_setpoint_limit' = 200 update
@jamjam9 Max temp - Received value [0, 0, 1, 94] https://github.com/zigpy/zha-device-handlers/issues/1159
2021-12-02 00:09:57 DEBUG (MainThread) [zhaquirks.tuya] [0xda32:1:0xef00] Received value [0, 0, 1, 94] for attribute 0x0210 (command 0x0001)
2021-12-02 00:09:57 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xDA32:1:0x0201]: Attribute report 'RtiThermostat'[max_heat_setpoint_limit] = 35000
2021-12-02 00:09:57 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.radstat2_temp: Attribute 'max_heat_setpoint_limit' = 35000 update
I need to know for Min/Max if setting 5 degrees gave value: 5 or 50 I need to multiply it to 500, it can't be one time that other this. Check which TRV logs are you sending. Set on TRV and write which temp Max/Min you set and send the logs of that action. Better send 200 lines of logs than 2-3 lines cut in wrong place. I need a screenshot with TRV NWK or device signature
Thanks for feedback, I changed set point to 25 in lovelace entity card. I cleared the log , so what I got is just pasted below. I'm getting better at this I hope. Let me know if you need any further tests done.
2021-12-02 18:40:00 DEBUG (MainThread) [zigpy.zcl] [0xda32:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=
That's impossible. I only see that you've changed Max temp limit to 25 degrees max_heat_setpoint_limit
And room temp is 23,4 degrees. Nothing else can be seen by this cutted log. Is there any reason you share only 8 seconds of log??? I've asked many times to NOT cut the logs. Sometimes things happens 2 seconds later than you click or do something - it's Zigbee. Restart HA, wait a minute, switch temp from Lovelace view. Don't touch anything else from that TRV and paste whole logs. Even if there are 10 000 of lines. You can always put here a file or use https://pastebin.com/ service.
Full log from restart and set max temp to 20
OK great, I don't see problem here. Max range is set properly. Now please do set MIN TEMP slider, and move the Target temp to other setting - on Lovelace frontpage. Put here file with all logs. BTW Is everything works OK or do you have some problems?
You can confirm Min/Max settings in Developer Tools when you choose that TRV You will see there something like this:
hvac_modes:
- 'off'
- heat
min_temp: 0.5
max_temp: 29.5
current_temperature: 24
temperature: 21
hvac_action: idle
system_mode: '[4]/heat'
occupancy: 1
occupied_heating_setpoint: 2100
unoccupied_cooling_setpoint: 1300
friendly_name: Termostat pokój
supported_features: 1
I deleted the previous posts and will retest in a about an hour. Apologies.
Ok occupied_heating_setpoint should be 2000 for setted 20 degrees 200 is 2 degrees - that's why it changes back after TRV confirmation Tuya code internally divides all temps by 100 - that's a issue here. Need to look at it a bit.
Min/Max seems to be OK now
min_temp: 5
max_temp: 20
@jamjam9 you have not installing the climate.py
in your ZHA container so you don't have any presets in ZHA.
https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-982690206
@jamjam9 For retest switch to the file below - Target temp [occupied_heating_setpoint] should be OK now ts0601_trv_rtitek.py.zip
Play with the TRV, and HA. Give use info if something still doesn't work as it should.
@jamjam9 @joaoasilva Guys - could you post here a real photo of your TRVs??? I'm pretty sure that both of you have device with same ID _TZE200_a4bpgplm but different device version.
@joaoasilva has Target temps on attribute 0x0202 presented as a 3-digit value
2021-11-19 16:31:04 DEBUG (MainThread) [zhaquirks.tuya] [0xeb37:1:0xef00] Received value [0, 0, 0, 125] for attribute 0x0202 (command 0x0001)
2021-11-19 16:31:07 DEBUG (MainThread) [zhaquirks.tuya] [0xeb37:1:0xef00] Received value [0, 0, 0, 130] for attribute 0x0202 (command 0x0001)
2021-11-19 16:31:09 DEBUG (MainThread) [zhaquirks.tuya] [0xeb37:1:0xef00] Received value [0, 0, 0, 135] for attribute 0x0202 (command 0x0001)
2021-11-19 16:31:11 DEBUG (MainThread) [zhaquirks.tuya] [0xeb37:1:0xef00] Received value [0, 0, 0, 140] for attribute 0x0202 (command 0x0001)
@jamjam9 has Target temps on attribute 0x0202 presented as a 2-digit value
2021-12-01 21:21:03 DEBUG (MainThread) [zhaquirks.tuya] [0x4de5:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x0202 (command 0x0001)
2021-12-01 21:21:03 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x4DE5:1:0x0201]: Attribute report 'RtiThermostat'[occupied_heating_setpoint] = 200
2021-12-01 21:21:03 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_2f4740fe_thermostat: Attribute 'occupied_heating_setpoint' = 200 update
That's why we have a big mess here - it was never that before. If Chinese Tuya sent out different TRVs with same ID then that's insane.
@joaoasilva presented device with device_version=1
SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, input_clusters=[0, 4, 5, 61184], output_clusters=[25, 10])
https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-973237181
@jamjam9 could again remove and re-pair this device?? Put here whole logs of that pairing and a few minutes after. Maybe you have different device_version so I could use it in the code. If none someone of you will not be happy if the code goes to official HA version. Someone will need to still use custom quirk.
@laurius Please also test file above, and if possible put here a real photo of TRV You seem to have same version as jamjam9 has
Rit-Tek have doing 2 different hardware one with LED and one with color OLED display but they is having the same device IDs and only different model names on the label.
OEM / Brand | Model | Manufacturer Name | Model ID | ZHA Quirk | Request -- | -- | -- | -- | -- | -- Rti-Tek | TRV 601 | _TZE200_a4bpgplm | TS0601 | ☑️ RitT | 1159 Rti-Tek | TRV 602 | _TZE200_a4bpgplm | TS0601 | ☑️ RitT | 1159But tuya have not putting the name as attriíbute in the basic cluster.
Some tuya is having different app_version that can being red in the basic cluster as attribute app_version (id: 0x0001)
.
My Site TRV is having date_code (id: 0x0006) redebal and hw_version (id: 0x0003) The rest attribute is not usebal then its common used if all Zigbee devices.
tested setting temp ok. tried to change temp calibration but this didn't change anything, the temp reported appears high. The device still only displays 0-2 then 'ON'.
I also re paired and the new Nwk: 0x1afd
This is the device...
https://www.aliexpress.com/item/1005003172662104.html?spm=a2g0s.9042311.0.0.904f4c4d21yLTv
This is the Thermostat i got labeled by Salcar: https://www.amazon.de/SALCAR-Heizk%C3%B6rperthermostat-OLED-Display-Kompatibel-Programmierbarem/dp/B09BMYJM23?th=1
Will post the logs for the occupied heating change soon
This is the log from the repair
@joaoasilva Please put here also a file with FULL DEBUG pairing log + wait about 5 minutes after pairing. Put those logs here as a file. Your device seems to be "different"
I set the clusters attribute for min and max temp manually to see what the correct value on the TRV are. when setting it to 10000 and 35000 i got 10°C and 35°C on the TRV. In Home assistant developer view it shows: `hvac_modes:
@laurius LOGS are needed. I can't guess data from the top of my head. I know what it should be there. I need to know what TRV sends. You have two different working devices with same ID. Pairing log could help to find differences in some value about hardware version or something.
@jamjam9 we still have problem. Each time you send logs data are presented differently. In that post you gave logs https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-984931916 Your data looked like this
2021-12-02 19:20:49 DEBUG (MainThread) [zhaquirks.tuya] [0xda32:1:0xef00] Received value [0, 0, 0, 214] for attribute 0x0203 (command 0x0001)
2021-12-02 19:20:49 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xDA32:1:0x0201]: Attribute report 'RtiThermostat'[local_temp] = 2140
2021-12-02 19:20:49 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.radstat2_temp: Attribute 'local_temp' = 2140 update
local_temp which is room temp was presented as a [0, 0, 0, 214], so 214 * 10 = 2140, and HA reads it as a 21,4 degrees
Recent post https://github.com/zigpy/zha-device-handlers/issues/1159#issuecomment-985011913 presents something totally different data!
2021-12-02 21:17:47 DEBUG (MainThread) [zigpy.zcl] [0x1afd:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=173, command_id=515, function=0, data=[4, 0, 0, 1, 22])]
2021-12-02 21:17:47 DEBUG (MainThread) [zhaquirks.tuya] [0x1afd:1:0xef00] Received value [0, 0, 1, 22] for attribute 0x0203 (command 0x0001)
2021-12-02 21:17:47 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x1AFD:1:0x0201]: Attribute report 'RtiThermostat'[local_temp] = 2780
2021-12-02 21:17:47 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_2f4740fe_thermostat: Attribute 'local_temp' = 2780 update
local_temp is presented as a bytes [0, 0, 1, 22] 1256 + 22 = 278 10 = 2780, and HA reads it as a 27,8 degrees!!!!
I don't know what's going on but this it not normal. Do you have two TRVs of same type with same ID _TZE200_a4bpgplm ????! or few of them??
When I repaired it got new nwk id 0x1afd
pairing log.txt Repaired after that Nwk: 0xb01b: complete log.txt
I bought 4, only 1 is on the zigbee network. I've tried node red to set temp and it only works if I set in multiples of 5. , ie 15 or 20.
@jamjam9 OK but you see the problem. If your TRV sends one time a bytes, and then a value then there's no possibility to make it work. Re-pair this device. I'm curious if it again change the type of data sent. You can just check the logs for 0x0203 If theres a value like [0, 0, 1, 22] then those are bytes, not INT value
@jamjam9 and @joaoasilva has LED version @laurius has OLED version They are different in data presented, but same ID - that's a mess.
laurius
2021-12-02 23:13:14 INFO (MainThread) [zigpy.device] [0xb01b] Read model 'TS0601' and manufacturer '_TZE200_a4bpgplm' from <Endpoint id=1 in=[basic:0x0000, groups:0x0004, scenes:0x0005, None:0xEF00] out=[ota:0x0019, time:0x000A] status=<Status.ZDO_INIT: 1>>
2021-12-02 23:13:18 DEBUG (MainThread) [zigpy.zcl] [0xb01b:1:0x0000] Attribute report received: app_version=72, 65506=31, 65508=0
2021-12-02 23:13:14 INFO (MainThread) [zigpy.endpoint] [0xb01b:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, input_clusters=[0, 4, 5, 61184], output_clusters=[25, 10])
jamjam9
2021-12-02 21:12:15 INFO (MainThread) [zigpy.device] [0x1afd] Read model 'TS0601' and manufacturer '_TZE200_a4bpgplm' from <Endpoint id=1 in=[basic:0x0000, groups:0x0004, scenes:0x0005, None:0xEF00] out=[ota:0x0019, time:0x000A] status=<Status.ZDO_INIT: 1>>
2021-12-02 21:12:17 DEBUG (MainThread) [zigpy.zcl] [0x1afd:1:0x0000] Attribute report received: app_version=72, 65506=31, 65508=0
2021-12-02 21:12:14 INFO (MainThread) [zigpy.endpoint] [0x1afd:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, input_clusters=[0, 4, 5, 61184], output_clusters=[25, 10])
@MattWestb Maybe you know where to search for differences??? For me they are identical.
Removed device, restarted HA and paired device again. Nwk: 0x3ac5
2021-12-02 22:34:25 DEBUG (MainThread) [zhaquirks.tuya] [0x3ac5:1:0xef00] Received value [0, 0, 0, 232] for attribute 0x0203 (command 0x0001)
The problem with the high temp was someone was sitting up against stat. sorry.
This is the log when I set 15c with node red
2021-12-02 22:41:25 DEBUG (MainThread) [zhaquirks.tuya] [0x3ac5:1:0x0201] Mapping standard occupied_heating_setpoint (0x0012) with value 1500 to custom {514: 15.0}
2021-12-02 22:41:25 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3AC5:1:0x0201]: wrote {'occupied_heating_setpoint': 1500} attrs, Status: [[WriteAttributesStatusRecord(status=<Status.SUCCESS: 0>)]]
2021-12-02 22:41:25 DEBUG (MainThread) [zigpy.zcl] [0x3ac5:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=
And when I try 21 it sets it as 20.
2021-12-02 22:44:25 DEBUG (MainThread) [zigpy.zcl] [0x3ac5:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=208, command_id=514, function=0, data=[4, 0, 0, 0, 20])]
2021-12-02 22:44:25 DEBUG (MainThread) [zhaquirks.tuya] [0x3ac5:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x0202 (command 0x0002)
2021-12-02 22:44:25 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3AC5:1:0x0201]: Attribute report 'RtiThermostat'[occupied_heating_setpoint] = 2000
2021-12-02 22:44:25 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.radstat2_thermostat: Attribute 'occupied_heating_setpoint' = 2000 update
2021-12-02 22:44:31 DEBUG (MainThread) [zigpy.zcl] [0x3ac5:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=
full log attached also
And when I try 21 it sets it as 20.
That's because you have set your Max limit to 20 degrees 'RtiThermostat'[max_heat_setpoint_limit] = 2000 then you changed it to 25 degrees RtiThermostat'[max_heat_setpoint_limit] = 2500
2021-12-02 22:32:52 DEBUG (MainThread) [zhaquirks.tuya] [0x3ac5:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x0210 (command 0x0002)
2021-12-02 22:32:52 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3AC5:1:0x0201]: Attribute report 'RtiThermostat'[max_heat_setpoint_limit] = 2000
2021-12-02 22:32:52 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_2f4740fe_thermostat: Attribute 'max_heat_setpoint_limit' = 2000 update
2021-12-02 22:32:55 DEBUG (MainThread) [zigpy.zcl] [0x3ac5:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=True is_reply=True disable_default_response=False> manufacturer=4098 tsn=62 command_id=Command.Default_Response>
2021-12-02 22:32:55 DEBUG (MainThread) [zigpy.zcl] [0x3ac5:1:0xef00] ZCL request 0x000b: [0, <Status.SUCCESS: 0>]
2021-12-02 22:32:55 DEBUG (MainThread) [zigpy.zcl] [0x3ac5:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=17 command_id=2>
2021-12-02 22:32:55 DEBUG (MainThread) [zigpy.zcl] [0x3ac5:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=170, command_id=528, function=0, data=[4, 0, 0, 0, 25])]
2021-12-02 22:32:55 DEBUG (MainThread) [zhaquirks.tuya] [0x3ac5:1:0xef00] Received value [0, 0, 0, 25] for attribute 0x0210 (command 0x0002)
2021-12-02 22:32:55 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3AC5:1:0x0201]: Attribute report 'RtiThermostat'[max_heat_setpoint_limit] = 2500
2021-12-02 22:32:55 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_a4bpgplm_ts0601_2f4740fe_thermostat: Attribute 'max_heat_setpoint_limit' = 2500 update
So to sum all of this - does it work for you OK or we still have a problems with something?? Laurius will need to move to other topic, because those TRVs are different, even they share same ID
The LED display is called TRV 601 and with color OLED TRV 602 but is only "on the box". "Normal" tuya look using app version in tuya app for see if they need update.
From devic card > manage cluster > select basic cluster > select app_version (id: 0x0001)
and click "get zigbee attribute" and poting the red value for both TRV types.
Can also reading date_code
and hw_version
that can being different.
The problem is that both can using the same zigbee module with the same firmware and have different tuya MCU firmwares.
@jacekk015 some user was implanting reading the tuya MCU version in https://github.com/zigpy/zha-device-handlers/blob/e9b2c334382b3cfda3ab4cc2afe345d9de6eb918/zhaquirks/tuya/__init__.py#L35-L36 can you getting it working with your TRV and see if can being used getting real version of the MCU ?
tested setting temp ok. tried to change temp calibration but this didn't change anything, the temp reported appears high. The device still only displays 0-2 then 'ON'.
I also re paired and the new Nwk: 0x1afd
This is the device...
https://www.aliexpress.com/item/1005003172662104.html?spm=a2g0s.9042311.0.0.904f4c4d21yLTv
Sorry, I haven't been home to be able to test, I have the same as @jamjam9 at least visually. I'll try to grab the logs and past it here. Where can I get the MCU version? I've connected mine to Tuya and they're the latest version
This is what I get from tuya:
Modes: Auto111 is the schedule Manual is just normal mode, whatever you set the temperature ON opens the valve fully OFF closes the valve fully
Is your feature request related to a problem? Please describe. Bought this thermostat from AliExpress looking at this https://zigbee.blakadder.com/Haozee_TRV601.html that says it works with ZHA but it doesn't. It's possible to get the temperature and set but most of the stuff doesn't work.
Describe the solution you'd like For it to work ex: window status, schedule, turn on/off.
Someone already converted it successfully to work on HA but I don't understand how can I port that to ZHA here: https://github.com/Koenkk/zigbee-herdsman-converters/blob/245fc8273e3afac8d71ec196d0e3ae71e413cba9/lib/tuya.js#L426
Please help. Thanks