zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
737 stars 675 forks source link

[Device Support Request] Improving "TS0601" "_TZE200_b6wax7g0" TRV thermostatic radiator valve #1123

Closed Youpimatin closed 2 months ago

Youpimatin commented 2 years ago

Hello, (I didn't know where I should post, so feel free to merge with the relevant subject if there is one in particular, maybe in the discussions, I don't know.) I bought a dozen of these TRV (on Amazon.fr, Qiumi brand) to install in my house : https://zigbee.blakadder.com/Beca_BRT-100.html I chose them because I looked at the blackladder page and saw it was supported in ZHA (and Zigbee2MQTT) In reality it's not the case for all parameters (battery, child lock, window detection)

I used custom_zha_quirk ts0601_trv.py (dated 2021-09-22) "ts0601_trv.MoesHY368_Type1new"

There are 3 entities :

I didn't want to install Tuya app on my phone to check if these others parameters are supported, but if the user manual is correct, on the image shown, you can see :

On the valve, you can also see if it's open or closed (just a LED, it's binary), in reality I counted a minimum of 5 positions of the motor (maybe 0%, 25%, 50%, 75%, 100%), this would be really cool if the position was published ! (even more if we could force a position)

Other settings exists in the documentation, you can change or check them in the valve menus :

Pairing log :

[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [60, <Bool.false: 0>]
[0xf01e] Delivery error for seq # 0x65, on endpoint id 0 cluster 0x0034: message send failure
Sending 'zdo_leave_req' failed: [0xf01e:0:0x0034]: Message send failure
Device 0xc7f4 (84:fd:27:ff:fe:a5:a9:fb) joined the network
[0xc7f4] Requesting 'Node Descriptor'
Tries remaining: 2
[0xc7f4] Extending timeout for 0x6a request
Device 0xc7f4 (84:fd:27:ff:fe:a5:a9:fb) joined the network
Skip initialization for existing device 84:fd:27:ff:fe:a5:a9:fb
Device 0xc7f4 (84:fd:27:ff:fe:a5:a9:fb) joined the network
Skip initialization for existing device 84:fd:27:ff:fe:a5:a9:fb
[0xc7f4:zdo] ZDO request ZDOCmd.Device_annce: [0xC7F4, 84:fd:27:ff:fe:a5:a9:fb, 128]
[0xc7f4] Node Descriptor: NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)
[0xc7f4] Discovering endpoints
Tries remaining: 3
[0xc7f4] Extending timeout for 0x6c request
[0xc7f4] Discovered endpoints: [1]
[0xc7f4:1] Discovering endpoint information
Tries remaining: 3
[0xc7f4] Extending timeout for 0x6e request
[0xc7f4: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])
Unknown cluster 61184
[0xc7f4] Extending timeout for 0x70 request
[0xc7f4:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=112 command_id=Command.Read_Attributes_rsp>
[0xc7f4:1] Manufacturer: _TZE200_b6wax7g0
[0xc7f4:1] Model: TS0601
Checking quirks for _TZE200_b6wax7g0 TS0601 (84:fd:27:ff:fe:a5:a9:fb)
Considering <class 'ts0601_trv.MoesHY368_Type1new'>
Found custom device replacement for 84:fd:27:ff:fe:a5:a9:fb: <class 'ts0601_trv.MoesHY368_Type1new'>
device - 0xC7F4:84:fd:27:ff:fe:a5:a9:fb entering async_device_initialized - is_new_join: True
device - 0xC7F4:84:fd:27:ff:fe:a5:a9:fb has joined the ZHA zigbee network
[0xC7F4](TS0601): started configuration
[0xC7F4:ZDO](TS0601): 'async_configure' stage succeeded
[0xC7F4:1:0x0201]: bound 'thermostat' cluster: Status.SUCCESS
[0xC7F4:1:0x0201]: attr reporting for '{'local_temp': (30, 900, 25), 'occupied_cooling_setpoint': (30, 900, 25), 'occupied_heating_setpoint': (30, 900, 25), 'unoccupied_cooling_setpoint': (30, 900, 25)}' on 'thermostat': ConfigureReportingResponseRecord(status=0)
[0xC7F4:1:0x0201]: attr reporting for '{'unoccupied_heating_setpoint': (30, 900, 25), 'running_mode': (30, 900, 25), 'running_state': (30, 900, 5), 'system_mode': (30, 900, 25)}' on 'thermostat': ConfigureReportingResponseRecord(status=0)
[0xC7F4:1:0x0201]: attr reporting for '{'occupancy': (30, 900, 1), 'pi_cooling_demand': (30, 900, 5), 'pi_heating_demand': (30, 900, 5)}' on 'thermostat': ConfigureReportingResponseRecord(status=0)
[0xC7F4:1:0x0201]: finished channel configuration
[0xC7F4:1:0x0006]: bound 'on_off' cluster: Status.SUCCESS
[0xC7F4:1:0x0006]: reporting 'on_off' attr on 'on_off' cluster: 0/900/1: Result: '[ConfigureReportingResponseRecord(status=0)]'
[0xC7F4:1:0x0000]: finished channel configuration
[0xC7F4:1:0x0001]: bound 'power' cluster: Status.SUCCESS
[0xC7F4:1:0x0001]: reporting 'battery_voltage' attr on 'power' cluster: 3600/10800/1: Result: '[ConfigureReportingResponseRecord(status=0)]'
[0xC7F4:1:0x0019]: finished channel configuration
[0xC7F4:1:0x0201]: 'async_configure' stage succeeded
[0xC7F4:1:0x0006]: 'async_configure' stage failed: 'ConfigureReportingResponseRecord' object is not subscriptable
[0xC7F4:1:0x0000]: 'async_configure' stage succeeded
[0xC7F4:1:0x0001]: 'async_configure' stage failed: 'ConfigureReportingResponseRecord' object is not subscriptable
[0xC7F4:1:0x0019]: 'async_configure' stage succeeded
[0xC7F4](TS0601): completed configuration
[0xC7F4](TS0601): stored in registry: ZhaDeviceEntry(name='_TZE200_b6wax7g0 TS0601', ieee='84:fd:27:ff:fe:a5:a9:fb', last_seen=1635928619.9460387)
[0xC7F4](TS0601): started initialization
[0xC7F4:ZDO](TS0601): 'async_initialize' stage succeeded
[0xC7F4:1:0x0201]: initializing channel: from_cache: False
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[system_mode] = SystemMode.Heat
[0xC7F4:1:0x0201]: read attributes: Success: {}. Failed: {'abs_min_heat_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'abs_max_heat_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'abs_min_cool_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'abs_max_cool_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>}
[0xC7F4:1:0x0201]: read attributes: Success: {}. Failed: {'max_cool_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'max_heat_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'min_cool_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'min_heat_setpoint_limit': <Status.UNSUPPORTED_ATTRIBUTE: 134>}
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[ctrl_seqe_of_oper] = ControlSequenceOfOperation.Heating_Only
[0xC7F4:1:0x0201]: read attributes: Success: {'ctrl_seqe_of_oper': <ControlSequenceOfOperation.Heating_Only: 2>}. Failed: {'local_temp': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'occupancy': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'occupied_cooling_setpoint': <Status.UNSUPPORTED_ATTRIBUTE: 134>}
[0xC7F4:1:0x0201]: read attributes: Success: {}. Failed: {'occupied_heating_setpoint': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'pi_cooling_demand': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'pi_heating_demand': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'running_mode': <Status.UNSUPPORTED_ATTRIBUTE: 134>}
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[system_mode] = SystemMode.Heat
[0xC7F4:1:0x0201]: read attributes: Success: {'system_mode': <SystemMode.Heat: 4>}. Failed: {'running_state': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'unoccupied_heating_setpoint': <Status.UNSUPPORTED_ATTRIBUTE: 134>, 'unoccupied_cooling_setpoint': <Status.UNSUPPORTED_ATTRIBUTE: 134>}
[0xC7F4:1:0x0201]: finished channel configuration
[0xC7F4:1:0x0006]: initializing channel: from_cache: False
[0xC7F4:1:0x0006]: finished channel configuration
[0xC7F4:1:0x0000]: initializing channel: from_cache: False
[0xC7F4:1:0x0000]: finished channel configuration
[0xC7F4:1:0x0001]: initializing channel: from_cache: False
[0xC7F4:1:0x0001]: finished channel configuration
[0xC7F4:1:0x0019]: initializing channel: from_cache: False
[0xC7F4:1:0x0019]: finished channel configuration
[0xC7F4:1:0x0201]: 'async_initialize' stage succeeded
[0xC7F4:1:0x0006]: 'async_initialize' stage succeeded
[0xC7F4:1:0x0000]: 'async_initialize' stage succeeded
[0xC7F4:1:0x0001]: 'async_initialize' stage succeeded
[0xC7F4:1:0x0019]: 'async_initialize' stage succeeded
[0xC7F4](TS0601): power source: Battery or Unknown
[0xC7F4](TS0601): completed initialization
[0xC7F4:1:0x0006]: attempting to update onoff state - from cache: True
[0xc7f4:zdo] ZDO request ZDOCmd.Node_Desc_req: [0x0000]
[0xc7f4:zdo] Unsupported ZDO request:ZDOCmd.Node_Desc_req
[0xc7f4:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=38 command_id=Command.Report_Attributes>
[0xc7f4:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=64>), Attribute(attrid=65506, value=<TypeValue type=uint8_t, value=31>), Attribute(attrid=65508, value=<TypeValue type=uint8_t, value=0>)]]
[0xc7f4:1:0x0000] Attribute report received: app_version=64, 65506=31, 65508=0
[0x6599:11:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=40 command_id=Command.Report_Attributes>
[0x6599:11:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=66>)]]
[0x6599:11:0x0000] Attribute report received: app_version=66
[0xc7f4:1:0x0000] 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>
[0xc7f4:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=65503, value=<TypeValue type=CharacterString, value=5)T)U)>)]]
[0xc7f4:1:0x0000] Attribute report received: 65503=5)T)U)
[0xc7f4:1:0x000a] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=False disable_default_response=False> manufacturer=None tsn=40 command_id=Command.Read_Attributes>
[0xc7f4:1:0x000a] ZCL request 0x0000: [[7]]
[0xc7f4: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=41 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=155, command_id=1025, function=0, data=[1, 1])]
[0xc7f4: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=42 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=156, command_id=514, function=0, data=[4, 0, 0, 0, 15])]
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[occupied_heating_setpoint] = 1500
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'occupied_heating_setpoint' = 1500 update
[0xc7f4: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=43 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=157, command_id=515, function=0, data=[4, 0, 0, 0, 180])]
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[local_temp] = 1800
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'local_temp' = 1800 update
[0xc7f4: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=44 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=158, command_id=260, function=0, data=[1, 0])]
[0xc7f4: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=45 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=159, command_id=517, function=0, data=[4, 0, 0, 0, 0])]
[0xc7f4: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=46 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=160, command_id=1031, function=0, data=[1, 1])]
[0xc7f4: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=47 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=161, command_id=264, function=0, data=[1, 0])]
[0xc7f4: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=48 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=162, command_id=1033, function=0, data=[1, 1])]
[0xc7f4: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=49 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=163, command_id=269, function=0, data=[1, 0])]
[0xc7f4: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=50 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=164, command_id=526, function=0, data=[4, 0, 0, 0, 58])]
[0xc7f4: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=51 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=165, command_id=101, function=0, data=[36, 6, 0, 40, 11, 30, 42, 13, 30, 44, 17, 30, 46, 6, 0, 48, 12, 0, 46, 14, 30, 44, 17, 30, 42, 6, 0, 38, 12, 30, 40, 14, 30, 42, 18, 30, 40])]
[0xc7f4: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=52 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=166, command_id=615, function=0, data=[4, 0, 0, 1, 44])]
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[max_heat_setpoint_limit] = 30000
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'max_heat_setpoint_limit' = 30000 update
[0xc7f4: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=53 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=167, command_id=616, function=0, data=[4, 0, 0, 0, 0])]
[0xc7f4: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=54 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=168, command_id=617, function=0, data=[4, 0, 0, 0, 0])]
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[boost_duration_seconds] = 0
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'boost_duration_seconds' = 0 update
[0xc7f4: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=55 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=169, command_id=362, function=0, data=[1, 0])]
[0xc7f4: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=56 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=170, command_id=619, function=0, data=[4, 0, 0, 0, 20])]
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[comfort_heating_setpoint] = 2000
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'comfort_heating_setpoint' = 2000 update
[0xae6a:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=97 command_id=Command.Report_Attributes>
[0xae6a:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=69>)]]
[0xae6a:1:0x0000] Attribute report received: app_version=69
[0xc7f4: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=57 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=171, command_id=620, function=0, data=[4, 0, 0, 0, 45])]
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[eco_heating_setpoint] = 4500
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'eco_heating_setpoint' = 4500 update
[0xc7f4: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=58 command_id=1>
[0xc7f4:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=172, command_id=621, function=0, data=[4, 0, 0, 0, 5])]
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[valve_open_percentage] = 5
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[running_mode] = RunningMode.Heat
[0xC7F4:1:0x0201]: Attribute report 'MoesThermostatNew'[running_state] = RunningState.Heat_State_On
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'valve_open_percentage' = 5 update
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'running_mode' = RunningMode.Heat update
climate.tze200_b6wax7g0_ts0601_fba9a5fe_thermostat: Attribute 'running_state' = RunningState.Heat_State_On update
[0xc7f4:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=59 command_id=36>
[0xc7f4:1:0xef00] ZCL request 0x0024: [[0, 155]]
[0xc7f4: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=135 command_id=Command.Default_Response>
[0x05a5:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=35 command_id=Command.Report_Attributes>
[0x05a5:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=69>)]]
[0x05a5:1:0x0000] Attribute report received: app_version=69
[0xc7f4: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=60 command_id=17>
[0xc7f4:1:0xef00] Unknown cluster-specific command 17
[0xc7f4:1:0xef00] ZCL request 0x0011: b'\x00\x9c@'
[0xc7f4:1:0xef00] No handler for cluster command 17
[0xc7f4: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=60 command_id=17>
[0xc7f4:1:0xef00] Unknown cluster-specific command 17
[0xc7f4:1:0xef00] ZCL request 0x0011: b'\x00\x9c@'
[0xc7f4:1:0xef00] No handler for cluster command 17
[0x8e5a:3:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=23 command_id=Command.Report_Attributes>
[0x8e5a:3:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.false>)]]
[0x8e5a:3:0x0006] Attribute report received: on_off=0
[0xeb95:11:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=80 command_id=Command.Report_Attributes>
[0xeb95:11:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.false>)]]
[0xeb95:11:0x0006] Attribute report received: on_off=0
[0xb2d6:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=120 command_id=Command.Report_Attributes>
[0xb2d6:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=69>)]]
[0xb2d6:1:0x0000] Attribute report received: app_version=69
[0xff60:11:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=126 command_id=Command.Report_Attributes>
[0xff60:11:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=66>)]]
[0xff60:11:0x0000] Attribute report received: app_version=66

Device signature :

{
  "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0301",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0201",
        "0x0204",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    }
  },
  "manufacturer": "_TZE200_b6wax7g0",
  "model": "TS0601",
  "class": "ts0601_trv.MoesHY368_Type1new"
}

I don't kow zigbee, and don't know how I can help, but here is the information I can get. I can test anything to get more information, or modified quirks ...

I don't mind if it breaks temporarily my house heating (I have only two of these valves installed for now)

MattWestb commented 2 years ago

No problem i have making one new here: climate_beca.zip Instruction: Unzip to HA configuration folder and use this command for copy it in to the HA container from docker CLI in your HA container:

cp /config/climate.py /usr/src/homeassistant/homeassistant/components/zha/climate.py

I have deleting the "_TZE200_b6wax7g0" from Moes and adding it to Beca type.

The "_TYST11_b6wax7g0" shall being deleted in the quirk in the future then its looks like Beca Smart is not releasing devices with different Zigbee mudules (like CN-Hysen is doing all the time).

MattWestb commented 2 years ago

Little thinking but then i dont have the device and is not doing the coding its more or less nonsense but little in and output of ideas:

MOES_T3_TEMP_CALIBRATION_ATTR: (A1), Is used by Moes devices for getting the device reporting more often then standard by sending one calibrating X every Y minutes from one automation (the TRV is lighting up then doing that so not good doing on one in the bedroom. Some TRV types dont have this function implanted)

MOES_T3_WINDOW_DETECT_ATTR: (A3), MOES_T3_WINDOW_DETECT_A2_ATTR: (A2), Also A4 window open countdown. Wold being nice in ZHA GUI to having the temperature and time and also the countdown.

MOES_T3_BOOST_TIME_ATTR: MOES_T3_BOOST_ATTR: MOES_T3_BOOST_COUNTDOWN_ATTR: The same as windows detection if its possible but i have only finding A7 = force heating with countdown.

MOES_T3_ECO_TEMP_ATTR: MOES_T3_ECO_MODE_ATTR: Can being nice setting the night temperature and only switching with commands in ZHA GUI or automation. Candidate for presets or one night version or manual / none ?

Nothing is very importing but nice as one upgrade later then having time and power doing little extra for the device. Most importing getting good working basic function for the device that is working OK for the user for every day use that the ground update is doing.

And i like all functions that is being implanted specially the valve opening state !!!

Great work done !!!

jacekk015 commented 2 years ago

All will be done.

Also A4 window open countdown. Wold being nice in ZHA GUI to having the temperature and time and also the countdown.

User didn't found any attribute for this.

Can being nice setting the night temperature and only switching with commands in ZHA GUI or automation. Candidate for presets or one night version or manual / none ?

I've planned to mix it to presets, seems there's an ECO mode there.

Most important. What's your decision??? We keep it in Moes as a Type3 or we create a new file with beca suffix??

MattWestb commented 2 years ago

Perhaps its only implanted in the TRV and dont have any DP for setting it from the host system.

The Moes type 3 was one hack for getting the TRV working then the setpoint temperature was not OK compared with the Moes quirk.

But then making one quirk for this device type its being one braking thing for user that have doing automation with the original quirk, so i think its better renaming it and saying its one new quirk and moving the devices to the new for getting it working OK then its have some broken functionality as Moes type. If in one new quirk or one new class for its type in the old its not so important for the function but i think its better changing the name to beca for showing its not one Moes TRV and need the new class for working OK.

My feeling is that the normal TRV quirk is being very large then all is inside (exude the Sas TRV) it shall being better making different files then all types is needing match code for working. But if doing one new quirk its also moderate making one working test for the quirk that is the problem i having for the moment then the test for thets0602_trv is made for my TRV and its braking the test then making changes or deleting it from the original quirk and its not allowed leaving not working code in the system.

So if putting it ints0601_trv you (hopefully) dont need doing test code and is lesser work but i dont knowing if its better for the system but its not my responsibility. On the other hand its not so large working moving device types to one new quirk file later but its make no sense doing work that you knowing its not working in the long run and must being redone very soon.

In the end is you that is doing the coding and the maintainer (you have experiences of them in the extra attribute request PR) have the last word how they like have it for getting PR merged and in the end its up to you and if you dont do the coding the system is getting no updates so its not good for our users that like have good supported device.

And its only 7.9° C outside so all TRV is very needed !!

jacekk015 commented 2 years ago

@Youpimatin Please retest newer version. The quirk was renamed to Beca, like we've agreed with @MattWestb , so you have to delete/move previous file from the folder. Remember to restart HA after copying. All things are implemented, so test it good, Eco and Boost mode are mapped to Presets, so if you choose Preset Boost, then Boost mode should be enabled. Same for Eco Preset. Boost countdown is also available as a read-only field. I assume it's in minutes, since time was set 300 seconds.

Preset should be available under those 3 dots, in Lovelace. Zrzut ekranu z 2021-11-17 21-07-08

So @MattWestb we can keep _TZE200_b6wax7g0 in Moes climate.py, Eco and Boost are implemented - other modes will be just ignored.

ts0601_trv_beca.py.zip

MattWestb commented 2 years ago

Sounds great !! If not getting errors then HA is selecting wrong preset its OK but i think its looks nice have the right resets in the GIU and not some extra that is not working in your model.

I think its not so much work fixing the presets in the final version so if you have time i think its good doing it nice and clean and not letting leaving lose ends that is confusing users.

        Away = 0x00
        Schedule = 0x01 Delete ?
        Manual = 0x02
        Comfort = 0x03 Delete
        Eco = 0x04
        Boost = 0x05
        Complex = 0x06 Delete

and renumbering the presets then i dont knowing if ZHA is liking not having missing numbers. Only saying functions and number and i making on new version of climate.py.

And i think the Eco / Night mode is great for user to have :-)))

PS: i must looking if i can steeling more nice code ;-)))

For @Youpimatin Picture of selecting presets in ZHA TRV_ZHA02 :

Youpimatin commented 2 years ago

Here is what I have (entities renamed) : 1

I'll test further tomorrow, but I think there is a little bug with negative values for the temperature calibration : you cannot write a negative value from HA to the TRV, but if changed from the TRV, negative values are correctly reported.

2 :

MattWestb commented 2 years ago

Looks great @Youpimatin but you is missing the presets in ZHA. You is only having operating mode On/Off. Is you using the original (not patched) or the first patched climate.py ? With both you shall getting presets but more ones with the original one but some not used.

MattWestb commented 2 years ago

I have looking 3 times in the climate.py and i cant see any wrong compared with other TRVs added in it.

You can trying the one for MaxSmart and you shall getting the "normal" Moes TRV presets. SMclimate.zip

Copy it to the HA container as in the first instruction and restart HA and you shall getting some presets in the ZHA GUI.

Youpimatin commented 2 years ago

I'm using core-2021.6.6, with the original climate.py

As I use an older version of HA, can I update with your climate.py version without breaking something ?

jacekk015 commented 2 years ago

@Youpimatin

you cannot write a negative value from HA to the TRV, but if changed from the TRV, negative values are correctly reported.

Give me LOGS of that communication to/from TRV Look for attribute 0x0269

0x0269 # Temperature compensation ( Received value [255, 255, 255, 255] for -1)
2021-11-07 18:31:13 DEBUG (MainThread) [zigpy.zcl] [0xef69:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=47, command_id=617, function=0, data=[4, 0, 0, 0, 0])]
2021-11-07 18:31:13 DEBUG (MainThread) [zhaquirks.tuya] [0xef69:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x0269 (command 0x0001)
moritan commented 2 years ago

Hello, i just buy three of this, so i give a try to your files. Capture3

Fisrt thing, i notice that my component is not exactly like the one in @Youpimatin screenshot i don't have the stop buton (only (En chauffe/Heat) Capture1

And i notice some bugs with the preset : None become Schechule on TRV IMG_20211118_103827

Away become manual IMG_20211118_103841

And schedule become Manual IMG_20211118_103800

If i change the preset on the TRV, Preset in HA is not update.

One more question the "Open window switch" does it activate/desactivate the fonctionality or does it reflet the window state ?

thanks for your help

MattWestb commented 2 years ago

I think you have doing the right for not braking ZHA completely !!!

The adding the presets is made after your HA was released in this commit https://github.com/home-assistant/core/commit/077131df1a087c41e222680f543f963ab219780c#diff-63ffb28983c6991ac75e65056f6beadb0ff772b9590fbe8bcbbc7020b0e16792. And some more system changes is being made after that = can being problem mixing the files. I think adding the line "_TZE200_b6wax7g0", in the file is the best and safest way if you dont like upgrading your HA. If doing it be careful of the indent and no extra charters then ZHA is not loading.

Instruction editing files in the HA docker continer https://github.com/zigpy/zha-device-handlers/discussions/693.

I have making one new (old) climate.py from the commit and is not having the newer fixes that can braking your ZHA. climateOld.zip

Youpimatin commented 2 years ago

Give me LOGS of that communication to/from TRV Look for attribute 0x0269

I'm not home for the moment, so I have no physical access to the TRVs, I'll check that tonight !

When using "SSH & Web Terminal" at "root" of the drive, command "find / -iname climate.py" does not return anything.

Also there is no "SRC" directory in "/USR" to perform the command "cp /config/climate.py /usr/src/homeassistant/homeassistant/components/zha/climate.py"

(My config is Home Assistant Core 2021.6.6 under Operations system v6.3 I think I can update OS to 6.6 without breaking anything, if it's the problem)

jacekk015 commented 2 years ago

@moritan

Fisrt thing, i notice that my component is not exactly like the one in @Youpimatin screenshot i don't have the stop buton (only (En chauffe/Heat)

Probably because you paired it with my code. TRV don't have OFF option and that's written in the code as a CONSTANT values:

    _CONSTANT_ATTRIBUTES = {
        0x001B: Thermostat.ControlSequenceOfOperation.Heating_Only,
        0x001C: Thermostat.SystemMode.Heat,
    }

And i notice some bugs with the preset : If i change the preset on the TRV, Preset in HA is not update.

Enable DEBUG logging[see above] and send me LOGS from HA of that communication.

One more question the "Open window switch" does it activate/desactivate the fonctionality or does it reflet the window state ?

There are two switches for Window detect, one for enabling that functionality, and second as an Alarm when TRV activates it. One of them is A2 in the TRV paper manual

moritan commented 2 years ago

When using "SSH & Web Terminal" at "root" of the drive, command "find / -iname climate.py" does not return anything.

On my instance i need to do "ssh homeassistant" to log on my server and next "docker exec -it homeassistant bash" to access home assistant filesystem. Hope it will help

MattWestb commented 2 years ago

@Youpimatin I think its the safes and eases way fixing it. It shall not being any braking changes if you is not having some strange local quirk that is not up to date.

jacekk015 commented 2 years ago

@Youpimatin If you're using HASSIO you need a Portainer first to Unhide HomeAssistant container

Youpimatin commented 2 years ago

Hum, OK, I know it's not very nice of me, but I am not ready to make these changes for the moment... (It's better that I know my limits, and for now I don't know anything of Docker and Portainer) I will have tested well, but I am a little afraid of breaking something, and the family would not be happy ! I beg your pardon guys, I hope you understand

That said, it's VERY COOL to see I'm not the only one doing the tests, and I hope someone can test the new climate.py (@moritan, if you "hear" me !)

(Oh, I looked at the changelog from OS v6.3 to OS v6.6, it's mainly linux kernel updates, so I don't think it's the problem, indeed it must be protected directories of the docker)

MattWestb commented 2 years ago

@Youpimatin You is one brave user but better not getting to much trouble then testing things and you have testing much functions that is now working that great !

I hope @moritan can doing the test with ZHA presets so we is knowing its working OK and can testing the function to and from the TRV and ZHA.

jacekk015 commented 2 years ago

@Youpimatin No need to say sorry. That's just a functionality. Sooner or later you should get it through official channel, of course if you'll do an update to newest version. From you I've only asked for logs of Calibration temp - I've used some code from Z2M, but it seems to not work properly. https://github.com/zigpy/zha-device-handlers/issues/1123#issuecomment-972706985

@moritan has presets working - I only wait for logs to repair the bug

Youpimatin commented 2 years ago

Give me LOGS of that communication to/from TRV Look for attribute 0x0269

I cannot give logs of setting temp compensation from TRV to HA, but I can from HA to TRV :

2021-11-18 12:15:13 DEBUG (MainThread) [zigpy.zcl] [0xab31: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=126 command_id=Command.Default_Response>
2021-11-18 12:15:13 DEBUG (MainThread) [zigpy.zcl] [0xab31: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=2 command_id=1>
2021-11-18 12:15:13 DEBUG (MainThread) [zigpy.zcl] [0xab31:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=126, command_id=617, function=0, data=[4, 0, 0, 0, 1])]
2021-11-18 12:15:13 DEBUG (MainThread) [zhaquirks.tuya] [0xab31:1:0xef00] Received value [0, 0, 0, 1] for attribute 0x0269 (command 0x0001)
2021-11-18 12:15:13 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xAB31:1:0x0201]: Attribute report 'BecaThermostat'[local_temperature_calibration] = 1
2021-11-18 12:15:13 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.salon3_thermostat: Attribute 'local_temperature_calibration' = 1 update
2021-11-18 12:15:13 DEBUG (MainThread) [zigpy.zcl] [0xab31: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=3 command_id=1>
2021-11-18 12:15:13 DEBUG (MainThread) [zigpy.zcl] [0xab31:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=127, command_id=1031, function=0, data=[1, 0])]
2021-11-18 12:15:13 DEBUG (MainThread) [zhaquirks.tuya] [0xab31:1:0xef00] Received value [0] for attribute 0x0407 (command 0x0001)
2021-11-18 12:15:15 DEBUG (MainThread) [zigpy.zcl] [0xab31: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=130 command_id=Command.Default_Response>
2021-11-18 12:15:15 DEBUG (MainThread) [zigpy.zcl] [0xab31: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=4 command_id=1>
2021-11-18 12:15:15 DEBUG (MainThread) [zigpy.zcl] [0xab31:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=130, command_id=617, function=0, data=[4, 0, 0, 0, 0])]
2021-11-18 12:15:15 DEBUG (MainThread) [zhaquirks.tuya] [0xab31:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x0269 (command 0x0001)
2021-11-18 12:15:15 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xAB31:1:0x0201]: Attribute report 'BecaThermostat'[local_temperature_calibration] = 0
2021-11-18 12:15:15 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.salon3_thermostat: Attribute 'local_temperature_calibration' = 0 update
2021-11-18 12:15:16 ERROR (MainThread) [zigpy.zcl] [0xab31:1:0xef00] int too big to convert
2021-11-18 12:15:18 ERROR (MainThread) [zigpy.zcl] [0xab31:1:0xef00] int too big to convert
2021-11-18 12:15:20 DEBUG (MainThread) [zigpy.zcl] [0x4132:11:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=108 command_id=Command.Report_Attributes>
2021-11-18 12:15:20 DEBUG (MainThread) [zigpy.zcl] [0x4132:11:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=66>)]]
2021-11-18 12:15:20 DEBUG (MainThread) [zigpy.zcl] [0x4132:11:0x0000] Attribute report received: app_version=66
2021-11-18 12:15:21 ERROR (MainThread) [zigpy.zcl] [0xab31:1:0xef00] int too big to convert
2021-11-18 12:15:21 DEBUG (MainThread) [zigpy.zcl] [0x8e5a:3:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=41 command_id=Command.Report_Attributes>
2021-11-18 12:15:21 DEBUG (MainThread) [zigpy.zcl] [0x8e5a:3:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.false>)]]
2021-11-18 12:15:21 DEBUG (MainThread) [zigpy.zcl] [0x8e5a:3:0x0006] Attribute report received: on_off=0
2021-11-18 12:15:24 DEBUG (MainThread) [zigpy.zcl] [0x3d44: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=60 command_id=1>
2021-11-18 12:15:24 DEBUG (MainThread) [zigpy.zcl] [0x3d44:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=203, command_id=616, function=0, data=[4, 0, 0, 0, 50])]
2021-11-18 12:15:24 DEBUG (MainThread) [zhaquirks.tuya] [0x3d44:1:0xef00] Received value [0, 0, 0, 50] for attribute 0x0268 (command 0x0001)
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3D44:1:0x0201]: Attribute report 'BecaThermostat'[running_mode] = RunningMode.Heat
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3D44:1:0x0201]: Attribute report 'BecaThermostat'[running_state] = RunningState.Heat_State_On
2021-11-18 12:15:24 DEBUG (MainThread) [zigpy.zcl] [0x3d44: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=60 command_id=1>
2021-11-18 12:15:24 DEBUG (MainThread) [zigpy.zcl] [0x3d44:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=203, command_id=616, function=0, data=[4, 0, 0, 0, 50])]
2021-11-18 12:15:24 DEBUG (MainThread) [zhaquirks.tuya] [0x3d44:1:0xef00] Received value [0, 0, 0, 50] for attribute 0x0268 (command 0x0001)
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3D44:1:0x0201]: Attribute report 'BecaThermostat'[running_mode] = RunningMode.Heat
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3D44:1:0x0201]: Attribute report 'BecaThermostat'[running_state] = RunningState.Heat_State_On
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.couloir_entree_thermostat: Attribute 'running_mode' = RunningMode.Heat update
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.couloir_entree_thermostat: Attribute 'running_state' = RunningState.Heat_State_On update
2021-11-18 12:15:24 DEBUG (MainThread) [zigpy.util] Duplicate 60 TSN
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.couloir_entree_thermostat: Attribute 'running_mode' = RunningMode.Heat update
2021-11-18 12:15:24 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.couloir_entree_thermostat: Attribute 'running_state' = RunningState.Heat_State_On update
2021-11-18 12:15:25 DEBUG (MainThread) [zigpy.zcl] [0x3d44: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=60 command_id=1>
2021-11-18 12:15:29 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Ciel', but will retry later. Error: [Errno 113] Connect call failed ('192.168.1.222', 8080)
2021-11-18 12:15:29 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Facade', but will retry later. Error: [Errno 113] Connect call failed ('192.168.1.221', 8080)
2021-11-18 12:15:30 ERROR (MainThread) [zigpy.zcl] [0xab31:1:0xef00] int too big to convert
2021-11-18 12:15:30 ERROR (MainThread) [zigpy.zcl] [0xab31:1:0xef00] int too big to convert
2021-11-18 12:15:31 DEBUG (MainThread) [zigpy.zcl] [0xab31: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=134 command_id=Command.Default_Response>
2021-11-18 12:15:32 DEBUG (MainThread) [zigpy.zcl] [0xab31: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=5 command_id=1>
2021-11-18 12:15:32 DEBUG (MainThread) [zigpy.zcl] [0xab31:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=134, command_id=617, function=0, data=[4, 0, 0, 0, 0])]
2021-11-18 12:15:32 DEBUG (MainThread) [zhaquirks.tuya] [0xab31:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x0269 (command 0x0001)

I set the compensation to 1 then 0, then in negative territory -1, -2, -3, -2, -1 then 0 Error when negative is "int too big to convert" (I don't know anything in python programming, is there signed/unsigned int ? how to cast ? what is the size of int, 32 bits ?)

iedex commented 2 years ago

Hi all and thanks for your work. I started to test this quirk and found an issue: If I change valve state value in HA, it remains with that value until I change something on TRV that modifies the valve state (if I change the target temp from HA that makes TRV valve state to change, this doesn't change in HA). If I don't change the valve state value in HA, it works ok in both cases (commands from TRV or from HA). Anyway, is there a reason why this is editable? Maybe a readonly sensor? If I can help with other tests, I'm glad to help. Thanks.

MattWestb commented 2 years ago

I think (= not knowing) valve state is only reported from the TRV and shall not being possible being set from ZHA and is shall being one read only sensor.

jacekk015 commented 2 years ago

Anyway, is there a reason why this is editable? Maybe a readonly sensor?

@iedex user wanna to test it. I don't have this TRV in hands so I can't test myself anything. Wanna play with it the try to change value in BecaManufCluster, in the cluster management, in the device. BTW for the rest - show some LOGS, picture, but enable DEBUG mode first. Of course after quirk was added HA restart is needed, best is to re-pair the device.

moritan commented 2 years ago

@moritan has presets working - I only wait for logs to repair the bug

Here is the after i test all the preset one by one. trv.log

It's a bulk file to give data now. I will try to make more readable/detailed log later.

iedex commented 2 years ago

For temp calibration bug with negative values, this changes fixed the problem for me:

        "local_temperature_calibration": (
            BECA_TEMP_CALIBRATION_ATTR,
            lambda value: round(value) if value >= 0 else round(0xFFFFFFFF + value + 1),
        ),

to:

        "local_temperature_calibration": (
            BECA_TEMP_CALIBRATION_ATTR,
            lambda value: round(value),
        ),

and:

            await BecaManufClusterSelf.endpoint.tuya_manufacturer.write_attributes(
                {
                    BECA_TEMP_CALIBRATION_ATTR: round(value)
                    if value >= 0
                    else round(0xFFFFFFFF + value + 1)
                },
                manufacturer=None,
            )

to:

            await BecaManufClusterSelf.endpoint.tuya_manufacturer.write_attributes(
                {
                    BECA_TEMP_CALIBRATION_ATTR: round(value)
                },
                manufacturer=None,
            )
jacekk015 commented 2 years ago

@iedex It will be corrected. I had in my mind that Zigpy Tuya makes some conversion with bits to values, but I didn't had possibility to test negative values. Code was borrowed from Z2M. So, it happens sometimes ;-)

jacekk015 commented 2 years ago

@moritan All seems to be OK

Are the logs TRV->HA or HA->TRV??

According to: 0x0401 # Mode (Received value 0:Manual / 1:Holiday / 2:Temporary Manual Mode / 3:Prog)

Away 1

2021-11-18 14:14:23 DEBUG (MainThread) [zigpy.zcl] [0xc600:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=74, command_id=1025, function=0, data=[1, 1])]
2021-11-18 14:14:23 DEBUG (MainThread) [zhaquirks.tuya] [0xc600:1:0xef00] Received value [1] for attribute 0x0401 (command 0x0001)
2021-11-18 14:14:23 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[programing_oper_mode] = ProgrammingOperationMode.Simple
2021-11-18 14:14:23 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[occupancy] = Occupancy.Unoccupied
2021-11-18 14:14:23 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[operation_preset] = Preset.Away
2021-11-18 14:14:24 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: wrote {'operation_preset': 0} attrs, Status: [[WriteAttributesStatusRecord(status=<Status.SUCCESS: 0>)]]

wrote {'operation_preset': 0} It's an Away for HA Preset - should be updated https://github.com/home-assistant/core/blob/dev/homeassistant/components/zha/climate.py#L647 Do you use newest software versions??

Manual 0

2021-11-18 14:14:31 DEBUG (MainThread) [zigpy.zcl] [0xc600:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=86, command_id=1025, function=0, data=[1, 0])]
2021-11-18 14:14:31 DEBUG (MainThread) [zhaquirks.tuya] [0xc600:1:0xef00] Received value [0] for attribute 0x0401 (command 0x0001)
2021-11-18 14:14:31 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[programing_oper_mode] = ProgrammingOperationMode.Simple
2021-11-18 14:14:31 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[occupancy] = Occupancy.Occupied
2021-11-18 14:14:31 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[operation_preset] = Preset.Manual
2021-11-18 14:14:31 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: wrote {'operation_preset': 2} attrs, Status: [[WriteAttributesStatusRecord(status=<Status.SUCCESS: 0>)]]

Schedule 3

2021-11-18 14:14:41 DEBUG (MainThread) [zigpy.zcl] [0xc600:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=114, command_id=1025, function=0, data=[1, 3])]
2021-11-18 14:14:41 DEBUG (MainThread) [zhaquirks.tuya] [0xc600:1:0xef00] Received value [3] for attribute 0x0401 (command 0x0001)
2021-11-18 14:14:41 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[programing_oper_mode] = ProgrammingOperationMode.Schedule_programming_mode
2021-11-18 14:14:41 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[occupancy] = Occupancy.Occupied
2021-11-18 14:14:41 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: Attribute report 'BecaThermostat'[operation_preset] = Preset.Schedule
2021-11-18 14:14:42 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xC600:1:0x0201]: wrote {'operation_preset': 1} attrs, Status: [[WriteAttributesStatusRecord(status=<Status.SUCCESS: 0>)]]
iedex commented 2 years ago

@jacekk015 , if it helps, TRV sends those values when changing modes: 1 for Manual 0 for Schedule 2 for Temporary manual (in Schedule) 3 for Away

jacekk015 commented 2 years ago

@iedex @Youpimatin We have two stories here: https://github.com/zigpy/zha-device-handlers/issues/1123#issuecomment-963656703

0x0401 : 0 : Manual Mode 1 : Holiday Mode 2 : Temporary Manual Mode (will return to Schedule mode at the next schedule time) 3 : Schedule Programming Mode (I don't know if other values are possible, these are the only ones i log when I change mode with the 'Home' button)

Someone[TRV owner] needs to clarify this.

Youpimatin commented 2 years ago

OK, I've done the test another time, and it seems I am WRONG, the good values are :

Schedule -> [0] for attribute 0x0401 Manual -> [1] for attribute 0x0401 Temp Manual -> [2] for attribute 0x0401 Holiday -> [3] for attribute 0x0401

So @iedex is right, I've got the same values (it seems I rotated the [0] [1] & [3] states the first time, before identifying [2])

Sorry @jacekk015 (fortunately the consequences are benign)

My unconscious must have known that I had done s..t that's why I didn't dare to test climate.py :D

iedex commented 2 years ago

I'm an owner, got that values from debug log, multiple tests. photo_2021-11-18_21-51-30

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0301",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0201",
        "0x0204",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0006"
      ],
      "out_clusters": []
    },
    "3": {
      "profile_id": 260,
      "device_type": "0x000d",
      "in_clusters": [
        "0x000d"
      ],
      "out_clusters": []
    },
    "4": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0006"
      ],
      "out_clusters": []
    },
    "5": {
      "profile_id": 260,
      "device_type": "0x000d",
      "in_clusters": [
        "0x000d"
      ],
      "out_clusters": []
    },
    "6": {
      "profile_id": 260,
      "device_type": "0x000d",
      "in_clusters": [
        "0x000d"
      ],
      "out_clusters": []
    },
    "7": {
      "profile_id": 260,
      "device_type": "0x000c",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": []
    },
    "8": {
      "profile_id": 260,
      "device_type": "0x000d",
      "in_clusters": [
        "0x000d"
      ],
      "out_clusters": []
    }
  },
  "manufacturer": "_TZE200_b6wax7g0",
  "model": "TS0601",
  "class": "ts0601_trv_beca.Beca"
}
iedex commented 2 years ago

This is for schedule program on TRV:

2021-11-18 22:20:36 DEBUG (MainThread) [zigpy.zcl] [0xe9e8:1:0x0405] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=48 command_id=Command.Report_Attributes>
2021-11-18 22:20:36 DEBUG (MainThread) [zigpy.zcl] [0xe9e8:1:0x0405] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=5491>)]]
2021-11-18 22:20:36 DEBUG (MainThread) [zigpy.zcl] [0xe9e8:1:0x0405] Attribute report received: measured_value=5491
2021-11-18 22:20:39 DEBUG (MainThread) [zigpy.zcl] [0xfb96: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=99 command_id=1>
2021-11-18 22:20:39 DEBUG (MainThread) [zigpy.zcl] [0xfb96:1:0xef00] ZCL request 0x0001: [Command(status=2, tsn=175, command_id=101, function=0, data=[36, 6, 0, 40, 11, 30, 42, 13, 30, 44, 17, 30, 46, 6, 0, 48, 12, 0, 46, 14, 30, 44, 17, 30, 42, 6, 0, 38, 12, 30, 40, 14, 30, 42, 18, 30, 40])]
2021-11-18 22:20:39 DEBUG (MainThread) [zhaquirks.tuya] [0xfb96:1:0xef00] Received value [6, 0, 40, 11, 30, 42, 13, 30, 44, 17, 30, 46, 6, 0, 48, 12, 0, 46, 14, 30, 44, 17, 30, 42, 6, 0, 38, 12, 30, 40, 14, 30, 42, 18, 30, 40] for attribute 0x0065 (command 0x0001)

6, 0, 40, 11, 30, 42, 13, 30, 44, 17, 30, 46 -> Mon-Fr. 6, 0, 48, 12, 0, 46, 14, 30, 44, 17, 30, 42 -> Sa 6, 0, 38, 12, 30, 40, 14, 30, 42, 18, 30, 40 -> Su Hour, Min, Temp*2 x 4 periods From TRV manual, default values: program

jacekk015 commented 2 years ago

Relax guys. That's only a few lines of code. Here's newest version with changed code, also calibration temp was changed. ts0601_trv_beca.py.zip

As for Schedule - I don't touch this till ZHA in HA will get support for some Scheduler or just Datetime component. Creating over 100 entities is a waste of time, and not usable from GUI perspective. [edit] Without Schedule of course, I think that all possible functions are covered?

Youpimatin commented 2 years ago

Nice... going to test this revision !

I 'think' the valve opening is read only (I see no effect when I change the value on HA)

could these folowing two registers be useful ? 0x026c # Max target temp ( Received value [0, 0, 0, 35] ) 0x026d # Min target temp (Received value [0, 0, 0, 5])

MattWestb commented 2 years ago

@Youpimatin the max and min is doing the limit in ZHA TRV card then its normal min 7 and max 30. I dont know if Beca can doing the same but if its wrong in ZHA then the trv can bad behaving. The valve status (opening) shall being read only or you is getting problem sending junk to the TRV.

I hope some with code experience is doing one tuya TRV Schedule card for soing all of this setting nice in the GUI and not on cluster level.

The "Moes" is possible doing on cluster but it is one large PITA.

jacekk015 commented 2 years ago

I 'think' the valve opening is read only (I see no effect when I change the value on HA)

So we should change it to readonly field - it's no sense to leave it like that.

could these folowing two registers be useful ? 0x026c # Max target temp ( Received value [0, 0, 0, 35] ) 0x026d # Min target temp (Received value [0, 0, 0, 5])

They are used internally readonly. They set min/max range for HA Thermostat. If you really need it I can make an entities form them, but to be honest - will you play with that values in reality?

Youpimatin commented 2 years ago

Negative values OK for the temperature compensation !

To be honest I don't know if there could be a use case... can we add them as "disabled by default" like in tasmota integration ? I mean it 'could' be useful for somebody... personnaly I don't think I'll use them.. but I'm not alone

jacekk015 commented 2 years ago

Here you go:

Youpimatin commented 2 years ago

Already! OK, I've just tested this one. Min and Max are working nicely ! I just saw that you can go up to 45°C for max (15-35°C specified in the manual) so you can't go over 35°C for the max from HA control, but you can go up to 45°C from the TRV menu (and the line under the value becomes red in HA from 36°C to 45°C) (but who in the world heats up his house to 45°C ? ok... who can do more can do less)

just a little... ahem... I tried to re-pair two times, but... there is no more entity for the valve opening :

BECA

(PS: and for min and max, I just wanted to open the discussion, but it works !)

jacekk015 commented 2 years ago

Changed to 45 max ;-) Valve opening became AnalogInput and should be available as a readonly field, same as Boost Countdown time Do you have a Boost Countdown time field?? You can check in Cluster Management if you have clusters: BecaValveState, BecaBoostCountdown

If you have old HA version there's possibility that you don't have those functionality. I always do updates, so I work always on newest HA, HASSIO, Supervisor versions.

ts0601_trv_beca.py.zip

MattWestb commented 2 years ago

I think hi is having to old ZHA for have all attribute saved in Zigbee.db. You can look on development tools and state and see all what is reported all cluster if having one updated ZHA. Sitewell TRV:

climate.tyst11_trv_thermostatTYST11 TRV thermostat | heat | hvac_modes: heat min_temp: 5 max_temp: 30 preset_modes: none, away, schedule current_temperature: 23.6 temperature: 23 hvac_action: idle preset_mode: none system_mode: [4]/heat occupancy: 1 occupied_heating_setpoint: 2300 unoccupied_cooling_setpoint: 2200 friendly_name: TYST11 TRV thermostat supported_features: 17 -- | -- | --
Youpimatin commented 2 years ago

@jacekk015 : If it's only because my version of HA is outdated, no problem, it will work for the rest of the world (I'll keep your previous revision, or have to dig in and modify it myself) Boost Countdown time setting is the first entity, with 300s, but if you think of a Boost Countdown updating while it is in boost mode.... I don't have this one as an entity.

Manage clusters :

clusters1

clusters2

@MattWestb : I thought of that possibility... 10 entities max maybe...

jacekk015 commented 2 years ago

Boost Countdown time setting is the first entity, with 300s

No - that's a Countdown time setting. There's another read-only field which shows time in minutes from Boost time set to zero.

moesSboostHeatingCountdown: 5,
0x0205 ( [0, 0, 0, 0] / [0, 0, 0, 5] )
2021-11-07 18:31:17 DEBUG (MainThread) [zigpy.zcl] [0xef69:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=52, command_id=517, function=0, data=[4, 0, 0, 0, 0])]
2021-11-07 18:31:17 DEBUG (MainThread) [zhaquirks.tuya] [0xef69:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x0205 (command 0x0001)
iedex commented 2 years ago

Super :-)

Now, I'll try to find more info about next issue: If I set a temp on TRV that will change the valve state, the TRV sends a lot of data, including the new valve state:

[0x548f: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=59 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=108, command_id=515, function=0, data=[4, 0, 0, 0, 230])]
[0x548F:1:0x0201]: Attribute report 'BecaThermostat'[local_temp] = 2300
climate.tze200_b6wax7g0_ts0601_0576a6fe_thermostat: Attribute 'local_temp' = 2300 update
[0x548f: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=60 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=109, command_id=526, function=0, data=[4, 0, 0, 0, 97])]
[0x548f: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=61 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=109, command_id=514, function=0, data=[4, 0, 0, 0, 28])]
[0x548F:1:0x0201]: Attribute report 'BecaThermostat'[occupied_heating_setpoint] = 2800
climate.tze200_b6wax7g0_ts0601_0576a6fe_thermostat: Attribute 'occupied_heating_setpoint' = 2800 update
[0x548f: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=62 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=110, command_id=517, function=0, data=[4, 0, 0, 0, 0])]
[0x548f: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=63 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=111, command_id=526, function=0, data=[4, 0, 0, 0, 94])]
[0x548f: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=64 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=112, command_id=1033, function=0, data=[1, 1])]
[0x548f: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=65 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=113, command_id=260, function=0, data=[1, 0])]
[0x548f: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=66 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=113, command_id=1031, function=0, data=[1, 0])]
[0x548f: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=67 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=114, command_id=616, function=0, data=[4, 0, 0, 0, 100])]
[0x548F:1:0x0201]: Attribute report 'BecaThermostat'[running_mode] = RunningMode.Heat
[0x548F:1:0x0201]: Attribute report 'BecaThermostat'[running_state] = RunningState.Heat_State_On
climate.tze200_b6wax7g0_ts0601_0576a6fe_thermostat: Attribute 'running_mode' = RunningMode.Heat update
climate.tze200_b6wax7g0_ts0601_0576a6fe_thermostat: Attribute 'running_state' = RunningState.Heat_State_On update
[0x29BB:1:0x0b04]: async_update
[0x29bb:1:0x0b04] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=111 command_id=Command.Read_Attributes_rsp>
[0x548f: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=68 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=114, command_id=514, function=0, data=[4, 0, 0, 0, 28])]
[0x548F:1:0x0201]: Attribute report 'BecaThermostat'[occupied_heating_setpoint] = 2800
climate.tze200_b6wax7g0_ts0601_0576a6fe_thermostat: Attribute 'occupied_heating_setpoint' = 2800 update
[0x548f: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=69 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=115, command_id=517, function=0, data=[4, 0, 0, 0, 0])]
[0x548f: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=70 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=116, command_id=526, function=0, data=[4, 0, 0, 0, 91])]
[0x548f: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=71 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=117, command_id=1033, function=0, data=[1, 1])]
[0x548f: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=72 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=118, command_id=260, function=0, data=[1, 0])]

If I do the same from HA, no valve state from TRV :-(

[0x29BB:1:0x0b04]: async_update
[0x29bb:1:0x0b04] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=147 command_id=Command.Read_Attributes_rsp>
[0x548F:1:0x0201]: wrote {'occupied_heating_setpoint': 1600} attrs, Status: [[WriteAttributesStatusRecord(status=<Status.SUCCESS: 0>)]]
[0x548f: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=148 command_id=Command.Default_Response>
[0x548f:1:0xef00] ZCL request 0x000b: [0, <Status.SUCCESS: 0>]
[0x548f: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=86 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=148, command_id=514, function=0, data=[4, 0, 0, 0, 16])]
[0x548F:1:0x0201]: Attribute report 'BecaThermostat'[occupied_heating_setpoint] = 1600
climate.tze200_b6wax7g0_ts0601_0576a6fe_thermostat: Attribute 'occupied_heating_setpoint' = 1600 update
[0x548f: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=87 command_id=1>
[0x548f:1:0xef00] ZCL request 0x0001: [Command(status=0, tsn=149, command_id=1031, function=0, data=[1, 1])]

I'm thinking... there's need to send another command to TRV, to send an update? Or the ForceValveState that I see in quirks, have anything to do with this?

MattWestb commented 2 years ago

It looks like all cluster with AnalogInput class is not making any entry in ZHA is it implanted or broken ? Or is needing getting some data to being "populated" ?

jacekk015 commented 2 years ago

It's supported under sensor.py https://github.com/home-assistant/core/blob/master/homeassistant/components/zha/sensor.py#L212

jacekk015 commented 2 years ago

But that STRICT MATCH could be a problem @STRICT_MATCH(channel_names=CHANNEL_ANALOG_INPUT, manufacturers="Digi")

MattWestb commented 2 years ago

Yes im looking on that but do you getting some sensor in ZHA if you is adding one in your device ? @Youpimatin dont have any of these class in the last screen shut and it shall working for him if ZHA is doing all OK.