Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Device Support Request] TS0601 Thermostat #1109

Closed
monstermuffin opened this issue Oct 28, 2021 · 128 comments
Closed

[Device Support Request] TS0601 Thermostat #1109

monstermuffin opened this issue Oct 28, 2021 · 128 comments

Comments

@monstermuffin
Copy link

monstermuffin commented Oct 28, 2021

Is your feature request related to a problem? Please describe.
I would like to use this thermostat with HASS via ZHA. When added via ZHA the device is added but no entities are created.

This is the thermostat I ordered: https://www.aliexpress.com/item/1005002960679997.html?

Describe the solution you'd like

Ideally all functions would be available, including creating/modifying the timers, however this can be done via HASS easily enough so at a minimum being able to turn on/off the heating and read the temperature value would allow for basic functionality.

Device signature:

"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, 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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0051",
      "in_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    }
  },
  "manufacturer": "_TZE200_ye5jkfsb",
  "model": "TS0601",
  "class": "zigpy.device.Device"
}

Logs after adding new:

[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [60, <Bool.false: 0>]
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=29 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377730>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=459>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377730, instantaneous_demand=459, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
New device 0x152c (b4:e3:f9:ff:fe:7c:92:3a) joined the network
[0x152c] Scheduling initialization
Tries remaining: 3
[0x152c] Requesting 'Node Descriptor'
Tries remaining: 2
[0x152c] Extending timeout for 0xae request
Device 0x152c (b4:e3:f9:ff:fe:7c:92:3a) joined the network
[0x152c] Scheduling initialization
[0x152c] Canceling old initialize call
Device 0x152c (b4:e3:f9:ff:fe:7c:92:3a) joined the network
[0x152c] Scheduling initialization
[0x152c] Canceling old initialize call
Received frame on uninitialized device <Device model=None manuf=None nwk=0x152C ieee=b4:e3:f9:ff:fe:7c:92:3a is_initialized=False> from ep 0 to ep 0, cluster 19: b'\x81,\x15:\x92|\xfe\xff\xf9\xe3\xb4\x8e'
[0x152c:zdo] ZDO request ZDOCmd.Device_annce: [0x152C, b4:e3:f9:ff:fe:7c:92:3a, 142]
Tries remaining: 3
[0x152c] Requesting 'Node Descriptor'
Tries remaining: 2
[0x152c] Extending timeout for 0xb0 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0x152C ieee=b4:e3:f9:ff:fe:7c:92:3a is_initialized=False> from ep 0 to ep 0, cluster 32770: b'\xb0\x00,\x15\x01@\x8e\x02\x10RR\x00\x00,R\x00\x00'
[0x152c] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, 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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)
[0x152c] Discovering endpoints
Tries remaining: 3
Received frame on uninitialized device <Device model=None manuf=None nwk=0x152C ieee=b4:e3:f9:ff:fe:7c:92:3a is_initialized=False> from ep 0 to ep 0, cluster 32773: b'\xb2\x00,\x15\x01\x01'
[0x152c] Discovered endpoints: [1]
[0x152c] Initializing endpoints [<Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
[0x152c:1] Discovering endpoint information
Tries remaining: 3
Received frame on uninitialized device <Device model=None manuf=None nwk=0x152C ieee=b4:e3:f9:ff:fe:7c:92:3a is_initialized=False> from ep 0 to ep 0, cluster 32772: b'\xb4\x00,\x15\x14\x01\x04\x01Q\x00\x01\x04\x00\x00\x04\x00\x05\x00\x00\xef\x02\x19\x00\n\x00'
[0x152c: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
[0x152c: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=182 command_id=Command.Read_Attributes_rsp>
[0x152c] Read model 'TS0601' and manufacturer '_TZE200_ye5jkfsb' from <Endpoint id=1 in=[basic:0x0000, groups:0x0004, scenes:0x0005, None:0xEF00] out=[ota:0x0019, time:0x000A] status=<Status.ZDO_INIT: 1>>
[0x152c] Discovered basic device information for <Device model='TS0601' manuf='_TZE200_ye5jkfsb' nwk=0x152C ieee=b4:e3:f9:ff:fe:7c:92:3a is_initialized=True>
Device is initialized <Device model='TS0601' manuf='_TZE200_ye5jkfsb' nwk=0x152C ieee=b4:e3:f9:ff:fe:7c:92:3a is_initialized=True>
Checking quirks for _TZE200_ye5jkfsb TS0601 (b4:e3:f9:ff:fe:7c:92:3a)
Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
Fail because endpoint list mismatch: {11, 13} {1}
Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
Fail because device_type mismatch on at least one endpoint
device - 0x152C:b4:e3:f9:ff:fe:7c:92:3a entering async_device_initialized - is_new_join: True
device - 0x152C:b4:e3:f9:ff:fe:7c:92:3a has joined the ZHA zigbee network
[0x152C](TS0601): started configuration
[0x152C:ZDO](TS0601): 'async_configure' stage succeeded
[0x152C:1:0x0000]: finished channel configuration
[0x152C:1:0x0019]: finished channel configuration
Error handling '_save_attribute' event with (b4:e3:f9:ff:fe:7c:92:3a, 1, 0, 4, '_TZE200_ye5jkfsb') params: FOREIGN KEY constraint failed
[0x152C:1:0x0000]: 'async_configure' stage succeeded
[0x152C:1:0x0019]: 'async_configure' stage succeeded
Error handling '_save_attribute' event with (b4:e3:f9:ff:fe:7c:92:3a, 1, 0, 5, 'TS0601') params: FOREIGN KEY constraint failed
[0x152C](TS0601): completed configuration
[0x152C](TS0601): stored in registry: ZhaDeviceEntry(name='_TZE200_ye5jkfsb TS0601', ieee='b4:e3:f9:ff:fe:7c:92:3a', last_seen=1635422629.705962)
[0x152C](TS0601): started initialization
[0x152C:ZDO](TS0601): 'async_initialize' stage succeeded
[0x152C:1:0x0000]: initializing channel: from_cache: False
[0x152C:1:0x0000]: finished channel configuration
[0x152C:1:0x0019]: initializing channel: from_cache: False
[0x152C:1:0x0019]: finished channel configuration
[0x152C:1:0x0000]: 'async_initialize' stage succeeded
[0x152C:1:0x0019]: 'async_initialize' stage succeeded
[0x152C](TS0601): power source: Mains
[0x152C](TS0601): completed initialization
[0x152c:zdo] ZDO request ZDOCmd.Node_Desc_req: [0x0000]
[0x152c:zdo] Unsupported ZDO request:ZDOCmd.Node_Desc_req
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=30 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377731>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=461>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377731, instantaneous_demand=461, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0x152c: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=37 command_id=Command.Read_Attributes>
[0x152c:1:0x000a] ZCL request 0x0000: [[7]]
[0x152c: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=38 command_id=36>
[0x152c:1:0xef00] Unknown cluster-specific command 36
[0x152c:1:0xef00] ZCL request 0x0024: b'\x00\x16'
[0x152c:1:0xef00] No handler for cluster command 36
[0x152c: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>
[0x152c:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=72>), Attribute(attrid=65506, value=<TypeValue type=uint8_t, value=31>), Attribute(attrid=65508, value=<TypeValue type=uint8_t, value=0>)]]
[0x152c:1:0x0000] Attribute report received: app_version=72, 65506=31, 65508=0
[0x152c: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=40 command_id=Command.Report_Attributes>
[0x152c:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=65503, value=<TypeValue type=CharacterString, value=�\
)�&\
)�'\
)�>)]]
[0x152c:1:0x0000] Attribute report received: 65503=�\
)�&\
)�'\
)�
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=31 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377732>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=461>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377732, instantaneous_demand=461, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0x3bf0: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=182 command_id=Command.Report_Attributes>
[0x3bf0:1:0x0405] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=6989>)]]
[0x3bf0:1:0x0405] Attribute report received: measured_value=6989
[0x5676: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=159 command_id=Command.Report_Attributes>
[0x5676:1:0x0405] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=3644>)]]
[0x5676:1:0x0405] Attribute report received: measured_value=3644
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=32 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377733>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=459>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377733, instantaneous_demand=459, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=33 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377734>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=458>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377734, instantaneous_demand=458, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0x152c: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=17>
[0x152c:1:0xef00] Unknown cluster-specific command 17
[0x152c:1:0xef00] ZCL request 0x0011: b'\x00\x17\x80'
[0x152c:1:0xef00] No handler for cluster command 17
[0x152c: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=17>
[0x152c:1:0xef00] Unknown cluster-specific command 17
[0x152c:1:0xef00] ZCL request 0x0011: b'\x00\x17\x80'
[0x152c:1:0xef00] No handler for cluster command 17
[0x152c: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=17>
[0x152c:1:0xef00] Unknown cluster-specific command 17
[0x152c:1:0xef00] ZCL request 0x0011: b'\x00\x17\x80'
[0x152c:1:0xef00] No handler for cluster command 17
[0x152c: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=17>
[0x152c:1:0xef00] Unknown cluster-specific command 17
[0x152c:1:0xef00] ZCL request 0x0011: b'\x00\x17\x80'
[0x152c:1:0xef00] No handler for cluster command 17
[0x152c: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=17>
[0x152c:1:0xef00] Unknown cluster-specific command 17
[0x152c:1:0xef00] ZCL request 0x0011: b'\x00\x17\x80'
[0x152c:1:0xef00] No handler for cluster command 17
[0x152c: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=42 command_id=36>
[0x152c:1:0xef00] Unknown cluster-specific command 36
[0x152c:1:0xef00] ZCL request 0x0024: b'\x00\x00'
[0x152c:1:0xef00] No handler for cluster command 36
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=34 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377735>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=456>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377735, instantaneous_demand=456, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0xd5a2:2:0x0702] 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>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377736>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=456>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377736, instantaneous_demand=456, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0x5676:1:0x0402] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=160 command_id=Command.Report_Attributes>
[0x5676:1:0x0402] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=int16s, value=1320>)]]
[0x5676:1:0x0402] Attribute report received: measured_value=1320
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=36 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377737>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=455>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377737, instantaneous_demand=455, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0xb87c: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=102 command_id=Command.Report_Attributes>
[0xb87c:1:0x0405] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=6995>)]]
[0xb87c:1:0x0405] Attribute report received: measured_value=6995
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=37 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377738>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=456>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377738, instantaneous_demand=456, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=38 command_id=Command.Report_Attributes>
[0xd5a2:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=377739>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=457>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd5a2:2:0x0702] Attribute report received: current_summ_delivered=377739, instantaneous_demand=457, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0x98d4: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=38 command_id=Command.Report_Attributes>
[0x98d4:1:0x0405] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint16_t, value=9282>)]]
[0x98d4:1:0x0405] Attribute report received: measured_value=9282

Additional context
N/A

@MattWestb
Copy link
Contributor

Its looks like one that is partly supported by one quirk that one user have doing.
#1015

You can try installing that quirk as local quirk and adding your device manufacturer and model ID in the signature and see if its working OK.

@monstermuffin
Copy link
Author

Its looks like one that is partly supported by one quirk that one user have doing. #1015

You can try installing that quirk as local quirk and adding your device manufacturer and model ID in the signature and see if its working OK.

Thanks, I did this and did a reconfigure and it did add a thermostat entity however this does not work with my device.

The status is not updated when changed either in HASS or on the device. Any button presses in the thermostat lovelace card does nothing, so unfortunately I don't think this quirk works for this device.

@MattWestb
Copy link
Contributor

Do ZHA loading the quirk (you is getting one thermostat on the device card) ?
If yes config debug for tiya quirks in HA config:

    zhaquirks: debug

restarting HA and then its stable take the power from the thermostat for one minute and putting it back.
If its doin thing "normal" (its one tuya) is sending all DPs its using to the system and you is getting it in the log like this:

2021-10-19 15:46:13 DEBUG (MainThread) [zhaquirks.tuya] [0xf64f:1:0xef00] Received value [0] for attribute 0x0402 (command 0x0001)
2021-10-19 15:46:13 DEBUG (MainThread) [zhaquirks.tuya] [0xf64f:1:0xef00] Received value [0] for attribute 0x0108 (command 0x0001)
2021-10-19 15:46:13 DEBUG (MainThread) [zhaquirks.tuya] [0xf64f:1:0xef00] Received value [0] for attribute 0x010a (command 0x0001)
2021-10-19 15:46:13 DEBUG (MainThread) [zhaquirks.tuya] [0xf64f:1:0xef00] Received value [0, 0, 0, 170] for attribute 0x0210 (command 0x0001)
2021-10-19 15:46:13 DEBUG (MainThread) [zhaquirks.tuya] [0xf64f:1:0xef00] Received value [0, 0, 0, 207] for attribute 0x0218 (command 0x0001)
2021-10-19 15:46:13 DEBUG (MainThread) [zhaquirks.tuya] [0xf64f:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x021b (command 0x0001)
2021-10-19 15:46:13 DEBUG (MainThread) [zhaquirks.tuya] [0xf64f:1:0xef00] Received value [0] for attribute 0x041f (command 0x0001)

That is all commands is using and can being used for making one working quirk for it.

@karel314
Copy link

karel314 commented Nov 6, 2021

@monstermuffin Did this work? I've got the same Thermostat so I'm very curious

@jacekk015
Copy link
Contributor

@monstermuffin @karel314 Someone need to enable debug mode in configuration.yaml and resend the pairing log. Without it we see nothing. We need some effort form the user to write 500 lines of code - you understand that.
So if someone is willing to help to make his device usable we are glad to hear from.

@monstermuffin
Copy link
Author

@monstermuffin Did this work? I've got the same Thermostat so I'm very curious

I have not no.

@monstermuffin @karel314 Someone need to enable debug mode in configuration.yaml and resend the pairing log. Without it we see nothing. We need some effort form the user to write 500 lines of code - you understand that. So if someone is willing to help to make his device usable we are glad to hear from.

I'm sure the pairing log in this first post was what was required but I can resend a new log no problems.

Should I leave the non-working ZHA quirk enabled for repairing or remove it?

@jacekk015
Copy link
Contributor

jacekk015 commented Nov 8, 2021

Should I leave the non-working ZHA quirk enabled for repairing or remove it?

Please leave it

Please also enable debug logging in configuration.yaml

logger:
  default: info
  logs:
    homeassistant.components.zha: debug
    zigpy: debug
    zhaquirks: debug

and the resend pairing log. But please take the log not from the pairing window, but from HA LOGS.
Just cut the timeframe from time before pairing and wait a little bit after pairing, since after pairing TRV still sends some data for 1-2 minutes. Paste logs here, or if it's too big then use https://pastebin.com/
There will be lots of junk text there but we can easily filter out that what we need.
We do the same here: #1123 (comment)

It should look lie this:

2021-11-07 18:24:11 DEBUG (MainThread) [zigpy.zcl] [0x186c:1:0xef00] ZCL request 0x0001: [Command(status=1, tsn=88, command_id=514, function=0, data=[4, 0, 0, 0, 20])]
2021-11-07 18:24:11 DEBUG (MainThread) [zhaquirks.tuya] [0x186c:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x0202 (command 0x0001)
2021-11-07 18:24:11 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x186C:1:0x0201]: Attribute report 'MoesThermostatNew'[occupied_heating_setpoint] = 2000

@monstermuffin
Copy link
Author

monstermuffin commented Nov 9, 2021

Should I leave the non-working ZHA quirk enabled for repairing or remove it?

Please leave it

Please also enable debug logging in configuration.yaml

logger:
  default: info
  logs:
    homeassistant.components.zha: debug
    zigpy: debug
    zhaquirks: debug

and the resend pairing log. But please take the log not from the pairing window, but from HA LOGS. Just cut the timeframe from time before pairing and wait a little bit after pairing, since after pairing TRV still sends some data for 1-2 minutes. Paste logs here, or if it's too big then use https://pastebin.com/ There will be lots of junk text there but we can easily filter out that what we need. We do the same here: #1123 (comment)

It should look lie this:

2021-11-07 18:24:11 DEBUG (MainThread) [zigpy.zcl] [0x186c:1:0xef00] ZCL request 0x0001: [Command(status=1, tsn=88, command_id=514, function=0, data=[4, 0, 0, 0, 20])]
2021-11-07 18:24:11 DEBUG (MainThread) [zhaquirks.tuya] [0x186c:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x0202 (command 0x0001)
2021-11-07 18:24:11 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x186C:1:0x0201]: Attribute report 'MoesThermostatNew'[occupied_heating_setpoint] = 2000

Thanks for your help, I've removed the device and readded using the logger settings you provided.

Here is the log output: https://paste.muffn.io/?3da32eb4a22ae629#FarV8cRE8gXzcuRrou2Csr53NLNvXBVTkexw7Nkfg4QW

@karel314 Might be worth you also doing one with your Thermostat?

EDIT: Added a better log with more time after adding the device.

@jacekk015
Copy link
Contributor

Actually that didn't help. There's actually no data from the Thermostat in the logs.
Last communication was:
2021-11-09 15:29:32 DEBUG (MainThread) [zigpy.zcl] [0xb20f:1:0xef00] No handler for cluster command 17
but that's only command for version or something like that.

There were totally no data after this.
Every Tuya device after pairing sends it's internal data
Maybe please wait a bit longer until you see something like:

2021-11-07 18:24:11 DEBUG (MainThread) [zigpy.zcl] [0x186c:1:0xef00] ZCL request 0x0001: [Command(status=1, tsn=88, command_id=514, function=0, data=[4, 0, 0, 0, 20])]

Or, if it has that function, make reset after pairing, or even take out and put in batteries.

@MattWestb
Copy link
Contributor

Looks only one zhaquirks.tuya request is being made:
2021-11-09 15:29:11 DEBUG (MainThread) [zhaquirks.tuya] [0xb20f:1:0xef00] Got set time request (command 0x0024)
Is the quirk loaded of the system ?
I was having problem yesterday that the device was rejoined after being retested and all was looking OK in the device signature but but the quirk was not loaded but ZHA was doing it after restart of HA but with 4 errors pointing at one not existing zha.device.
Was doing some manual cleaning of old records in the \.storage\ files and it was working OK

@monstermuffin
Copy link
Author

monstermuffin commented Nov 10, 2021

Actually that didn't help. There's actually no data from the Thermostat in the logs. Last communication was: 2021-11-09 15:29:32 DEBUG (MainThread) [zigpy.zcl] [0xb20f:1:0xef00] No handler for cluster command 17 but that's only command for version or something like that.

There were totally no data after this. Every Tuya device after pairing sends it's internal data Maybe please wait a bit longer until you see something like:

2021-11-07 18:24:11 DEBUG (MainThread) [zigpy.zcl] [0x186c:1:0xef00] ZCL request 0x0001: [Command(status=1, tsn=88, command_id=514, function=0, data=[4, 0, 0, 0, 20])]

Or, if it has that function, make reset after pairing, or even take out and put in batteries.

Thanks for all your help.

I just removed the device and readded it, I let it sit for a while during which time I power cycled it a fair few times (the device is mains powered.)

Doing a search for 0xb20f I couldn't really see much after the initial add, unfortunately, but you may be able to see more than me.

https://paste.muffn.io/?f0c01dc52d424164#Bd62Mg57WqXGLWkccMuGbsujLjovo85pLrBiqkXHwnPN

Looks only one zhaquirks.tuya request is being made: 2021-11-09 15:29:11 DEBUG (MainThread) [zhaquirks.tuya] [0xb20f:1:0xef00] Got set time request (command 0x0024) Is the quirk loaded of the system ? I was having problem yesterday that the device was rejoined after being retested and all was looking OK in the device signature but but the quirk was not loaded but ZHA was doing it after restart of HA but with 4 errors pointing at one not existing zha.device. Was doing some manual cleaning of old records in the \.storage\ files and it was working OK

I am almost certain it's being loaded, as without it I do not get any entities, and with it I get the entities but they just do nothing.

I can see the following lines in the log linked in this post too:

DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0402 (command 0x0002)

@jacekk015
Copy link
Contributor

After some text magic we got kinda unique 90 lines

2021-11-10 10:23:09 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=24 command_id=2&gt;
2021-11-10 10:23:09 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=7, command_id=257, function=0, data=[1, 0])]
2021-11-10 10:23:09 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0101 (command 0x0002)
2021-11-10 10:23:09 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=25 command_id=2&gt;
2021-11-10 10:23:09 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=7, command_id=1026, function=0, data=[1, 0])]
2021-11-10 10:23:09 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0402 (command 0x0002)
2021-11-10 10:23:09 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=26 command_id=2&gt;
2021-11-10 10:23:09 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=7, command_id=528, function=0, data=[4, 0, 0, 0, 27])]
2021-11-10 10:23:09 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 27] for attribute 0x0210 (command 0x0002)
2021-11-10 10:23:18 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True&gt; manufacturer=None tsn=28 command_id=36&gt;
2021-11-10 10:23:18 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0024: [[0, 9]]
2021-11-10 10:23:18 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Got set time request (command 0x0024)
2021-11-10 10:23:18 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=True is_reply=True disable_default_response=False&gt; manufacturer=4098 tsn=242 command_id=Command.Default_Response&gt;
2021-11-10 10:23:38 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=31 command_id=17&gt;
2021-11-10 10:23:38 WARNING (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] Unknown cluster-specific command 17
2021-11-10 10:23:38 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0011: b'\x00\n\x80'
2021-11-10 10:23:38 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] No handler for cluster command 17
2021-11-10 10:23:39 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=31 command_id=17&gt;
2021-11-10 10:23:39 WARNING (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] Unknown cluster-specific command 17
2021-11-10 10:23:39 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0011: b'\x00\n\x80'
2021-11-10 10:23:39 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] No handler for cluster command 17
2021-11-10 10:24:54 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=32 command_id=2&gt;
2021-11-10 10:24:54 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=2, command_id=257, function=0, data=[1, 1])]
2021-11-10 10:24:54 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0101 (command 0x0002)
2021-11-10 10:24:54 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=33 command_id=2&gt;
2021-11-10 10:24:54 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=2, command_id=1026, function=0, data=[1, 0])]
2021-11-10 10:24:54 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0402 (command 0x0002)
2021-11-10 10:25:04 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=1 command_id=2&gt;
2021-11-10 10:25:04 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=1, tsn=1, command_id=257, function=0, data=[1, 1])]
2021-11-10 10:25:04 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0101 (command 0x0002)
2021-11-10 10:25:04 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=2 command_id=2&gt;
2021-11-10 10:25:04 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=1, tsn=1, command_id=1026, function=0, data=[1, 0])]
2021-11-10 10:25:04 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0402 (command 0x0002)
2021-11-10 10:25:04 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=3 command_id=2&gt;
2021-11-10 10:25:04 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=1, tsn=85, command_id=528, function=0, data=[4, 0, 0, 0, 27])]
2021-11-10 10:25:04 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 27] for attribute 0x0210 (command 0x0002)
2021-11-10 10:25:08 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True&gt; manufacturer=None tsn=4 command_id=36&gt;
2021-11-10 10:25:08 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0024: [[0, 3]]
2021-11-10 10:25:08 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Got set time request (command 0x0024)
2021-11-10 10:25:08 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=True is_reply=True disable_default_response=False&gt; manufacturer=4098 tsn=10 command_id=Command.Default_Response&gt;
2021-11-10 10:25:13 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=5 command_id=2&gt;
2021-11-10 10:25:13 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=108, function=0, data=[24, 6, 0, 20, 8, 0, 15, 11, 30, 15, 12, 30, 15, 17, 0, 22, 22, 0, 15, 8, 0, 22, 23, 0, 15])]
2021-11-10 10:25:13 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [6, 0, 20, 8, 0, 15, 11, 30, 15, 12, 30, 15, 17, 0, 22, 22, 0, 15, 8, 0, 22, 23, 0, 15] for attribute 0x006c (command 0x0002)
2021-11-10 10:25:17 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=7 command_id=2&gt;
2021-11-10 10:25:17 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 17])]
2021-11-10 10:25:17 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 17] for attribute 0x0218 (command 0x0002)
2021-11-10 10:25:17 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=8 command_id=2&gt;
2021-11-10 10:25:17 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=1325, function=0, data=[1, 0])]
2021-11-10 10:25:17 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x052d (command 0x0002)
2021-11-10 10:25:28 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=9 command_id=17&gt;
2021-11-10 10:25:28 WARNING (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] Unknown cluster-specific command 17
2021-11-10 10:25:28 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0011: b'\x00\x05\x80'
2021-11-10 10:25:28 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] No handler for cluster command 17
2021-11-10 10:25:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=9 command_id=17&gt;
2021-11-10 10:25:29 WARNING (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] Unknown cluster-specific command 17
2021-11-10 10:25:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0011: b'\x00\x05\x80'
2021-11-10 10:25:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] No handler for cluster command 17
2021-11-10 10:26:34 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=10 command_id=2&gt;
2021-11-10 10:26:34 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 18])]
2021-11-10 10:26:34 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 18] for attribute 0x0218 (command 0x0002)
2021-11-10 10:26:50 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=11 command_id=2&gt;
2021-11-10 10:26:50 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 17])]
2021-11-10 10:26:50 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 17] for attribute 0x0218 (command 0x0002)
2021-11-10 10:27:05 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=13 command_id=2&gt;
2021-11-10 10:27:05 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 18])]
2021-11-10 10:27:05 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 18] for attribute 0x0218 (command 0x0002)
2021-11-10 10:27:21 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=14 command_id=2&gt;
2021-11-10 10:27:21 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 17])]
2021-11-10 10:27:21 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 17] for attribute 0x0218 (command 0x0002)
2021-11-10 10:27:52 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=16 command_id=2&gt;
2021-11-10 10:27:52 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 18])]
2021-11-10 10:27:52 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 18] for attribute 0x0218 (command 0x0002)
2021-11-10 10:28:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=17 command_id=2&gt;
2021-11-10 10:28:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=257, function=0, data=[1, 1])]
2021-11-10 10:28:29 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0101 (command 0x0002)
2021-11-10 10:28:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=18 command_id=2&gt;
2021-11-10 10:28:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=1026, function=0, data=[1, 0])]
2021-11-10 10:28:29 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0402 (command 0x0002)
2021-11-10 10:28:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=19 command_id=2&gt;
2021-11-10 10:28:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=528, function=0, data=[4, 0, 0, 0, 35])]
2021-11-10 10:28:29 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 35] for attribute 0x0210 (command 0x0002)
2021-11-10 10:28:42 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=20 command_id=2&gt;
2021-11-10 10:28:42 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 17])]
2021-11-10 10:28:42 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 17] for attribute 0x0218 (command 0x0002)
2021-11-10 10:28:58 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=21 command_id=2&gt;
2021-11-10 10:28:58 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=536, function=0, data=[4, 0, 0, 0, 18])]
2021-11-10 10:28:58 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 18] for attribute 0x0218 (command 0x0002)
2021-11-10 10:38:31 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL deserialize: &lt;ZCLHeader frame_control=&lt;FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False&gt; manufacturer=None tsn=25 command_id=2&gt;
2021-11-10 10:38:31 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=2, command_id=536, function=0, data=[4, 0, 0, 0, 19])]
2021-11-10 10:38:31 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 19] for attribute 0x0218 (command 0x0002)

@monstermuffin
Copy link
Author

After some text magic we got kinda unique 90 lines

Excellent, I was hoping those lines would be helpful and was referencing the right device!

@jacekk015
Copy link
Contributor

I see that the user in Z2M used typical Moes code
Koenkk/zigbee2mqtt#9024 (reply in thread)

Please do some test:

  1. Switch between Manual/Auto mode and check in logs if you see changes in value like [0], [1] in 0x0101
2021-11-10 10:28:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=257, function=0, data=[1, 1])]
2021-11-10 10:28:29 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0101 (command 0x0002)
  1. Change temp set value and check attribute 0x0210
2021-11-10 10:23:09 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=7, command_id=528, function=0, data=[4, 0, 0, 0, 27])]
2021-11-10 10:23:09 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 27] for attribute 0x0210 (command 0x0002)

Try to debug yourself also a child lock. Enable/Disable and search for [0]/[1] as a return value.
That could confirm that Thermostat uses standard Moes numbers. Child lock attribute don't look properly.

@monstermuffin
Copy link
Author

Switching between AUTO and Manual:

2021-11-10 11:58:10 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=18, command_id=257, function=0, data=[1, 1])]
2021-11-10 11:58:10 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0101 (command 0x0002)
2021-11-10 11:58:10 DEBUG (MainThread) [zigpy.zcl] [0xcbef: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=2>

2021-11-10 11:56:51 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=18, command_id=257, function=0, data=[1, 1])]
2021-11-10 11:56:51 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0101 (command 0x0002)
2021-11-10 11:56:51 DEBUG (MainThread) [zigpy.zcl] [0xcbef: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=2>

Changing temp:

2021-11-10 11:59:27 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=18, command_id=528, function=0, data=[4, 0, 0, 0, 40])]
2021-11-10 11:59:27 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 40] for attribute 0x0210 (command 0x0002)
2021-11-10 11:59:27 DEBUG (MainThread) [zigpy.zcl] [0x5676: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=211 command_id=Command.Report_Attributes>

2021-11-10 12:00:11 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=19, command_id=528, function=0, data=[4, 0, 0, 0, 11])]
2021-11-10 12:00:11 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0, 0, 0, 11] for attribute 0x0210 (command 0x0002)
2021-11-10 12:00:12 DEBUG (MainThread) [zigpy.zcl] [0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=128 command_id=Command.Report_Attributes>

I actually have no idea how to engage the child lock, I've done it before by accident and not been able to remove it without a power cycle, so let me try and find the documentation and I will follow up with more logs on the child lock.

@monstermuffin
Copy link
Author

monstermuffin commented Nov 10, 2021

Child lock logs:

Setting child lock ON:

2021-11-10 12:07:18 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=20, command_id=296, function=0, data=[1, 1])]
2021-11-10 12:07:18 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0128 (command 0x0002)
2021-11-10 12:07:19 DEBUG (MainThread) [zigpy.zcl] [0xd5a2:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=195 command_id=Command.Report_Attributes>

Setting child lock OFF:

2021-11-10 12:08:29 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=20, command_id=296, function=0, data=[1, 0])]
2021-11-10 12:08:29 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0128 (command 0x0002)
2021-11-10 12:08:30 DEBUG (MainThread) [zigpy.zcl] [0x58fe: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=225 command_id=Command.Report_Attributes>

I think these are the right log lines based on the times I turned the lock on/off and your comments on what to look for.

@jacekk015
Copy link
Contributor

So we still have problem with LOGS.
I was assuming that ChildLock attribute must end on the 28, like above 0x0128.
But if you look carefully there's no 0x0128 in any of your logs above.

@monstermuffin
Copy link
Author

So we still have problem with LOGS. I was assuming that ChildLock attribute must end on the 28, like above 0x0128. But if you look carefully there's no 0x0128 in any of your logs above.

My child lock logs here use 0x0128? #1109 (comment)

Unless I'm missing something?

@monstermuffin
Copy link
Author

Also oddly enough I do not see a value change when switching modes, 0x0101 is always [1] with AUTO and Manaul modes when looking at 0x0101.

@jacekk015
Copy link
Contributor

jacekk015 commented Nov 10, 2021

Yep, but the logs above DOESN'T contain any 0x0128. So if we missing one, probably we are missing lot more.
0x0101 in my opinion should be responsible for MODE, maybe you need to wait few seconds for update

Just switch Manual/Auto and search what changes [0]/[1]

@monstermuffin
Copy link
Author

Yep, but the logs above DOESN'T contain any 0x0128. So if we missing one, probably we are missing lot more. 0x0101 in my opinion should be responsible for MODE, maybe you need to wait few seconds for update

Just switch Manual/Auto and search what changes [0]/[1]

Okay so I believe MODE is 0x0402

Manual:

021-11-10 12:27:25 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=24, command_id=1026, function=0, data=[1, 0])]
2021-11-10 12:27:25 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [0] for attribute 0x0402 (command 0x0002)

Auto:

2021-11-10 12:28:18 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=24, command_id=1026, function=0, data=[1, 1])]
2021-11-10 12:28:18 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [1] for attribute 0x0402 (command 0x0002)

@jacekk015
Copy link
Contributor

https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_trv.py
Copy that file to quirk folder and add your model to ZonnsmartTV01_ZG class,
below line 1200

        MODELS_INFO: [
            ("_TZE200_e9ba97vf", "TS0601"),
            ("_TZE200_husqqvux", "TS0601"),
            ("_TZE200_ye5jkfsb", "TS0601"),
        ],

@monstermuffin
Copy link
Author

https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_trv.py Copy that file to quirk folder and add your model to ZonnsmartTV01_ZG class, below line 1200

        MODELS_INFO: [
            ("_TZE200_e9ba97vf", "TS0601"),
            ("_TZE200_husqqvux", "TS0601"),
            ("_TZE200_ye5jkfsb", "TS0601"),
        ],

Okay we seem to have some kind of functionality happening.

image

The temperature and target temperature is now being read, and the flame button does wake the device up.

Target temp/real temp seems to be divided by 10 for some reason which is screwing with some things, so 21c is showing as 2.1c, and the target temp is also doing the same.

I think I will need to modify the modes in the quirk too as the logs I showed do not align with the quirk, the mode button currently does nothing on that panel.

This is some great progress though thank you so much for your help so far!

@jacekk015
Copy link
Contributor

Ok. So you still need a modified quirk. But most of the attributes shares same numbers

@jacekk015
Copy link
Contributor

@monstermuffin How the status of your Thermostat? If you don't have it working we could now take care of that device.

@monstermuffin
Copy link
Author

@monstermuffin How the status of your Thermostat? If you don't have it working we could now take care of that device.

Hey, I have been rather busy recently so it's not gotten any further from where we got last time, so it's not working as of yet.

@jacekk015
Copy link
Contributor

I'll try to write some code then. Will get back with dev version

@jacekk015
Copy link
Contributor

jacekk015 commented Dec 1, 2021

@monstermuffin put that file below in the quirk folder.
In case you didn't enable it, do that first in configuration.yaml
#1061 (comment)
After quirk is added to folder and on every newer version you need to restart HA.
Best would be to re-pair device[only this time], wait 2-3 minutes and send all logs with that quirk enabled.
Also in case of problems logs are welcomed.

ts0601_thermostat_avatto.py.zip

@monstermuffin
Copy link
Author

monstermuffin commented Dec 2, 2021

@jacekk015 thanks again for all your help.

I removed the device, added the quirk, restarted and readded the device and now have different behaviour:

I get entities as follows:

number.tze200_ye5jkfsb_ts0601_3a927cfe_analog_output_temperature_calibration - This silder appears to change the 'real temp' on the thermostat. Slider is very odd.

switch.tze200_ye5jkfsb_ts0601_3a927cfe_on_off - This enables/disables the child lock.

climate.tze200_ye5jkfsb_ts0601_3a927cfe_thermostat - Seems to be what the target temp is but this does not work, always reading '0.2'.

sensor.tze200_ye5jkfsb_ts0601_3a927cfe_thermostat_hvac_action - This stays 'off' regardless of what is pressed on the thermostat, or if the thermostat is set to higher/lower than current temp.

Here is a big log file: https://paste.muffn.io/?add92e04b795497c#FU6GrENForqFBsUbHz82pYTEaqVDwcqhhm3Sj5EFs9nu

When changing the setpoint on the thermostat, these appear to be the relevant log lines:

2021-12-02 16:40:15 DEBUG (MainThread) [zigpy.zcl] [0x3fcd:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=7, command_id=528, function=0, data=[4, 0, 0, 0, 18])]
2021-12-02 16:40:15 DEBUG (MainThread) [zhaquirks.tuya] [0x3fcd:1:0xef00] Received value [0, 0, 0, 18] for attribute 0x0210 (command 0x0002)
2021-12-02 16:40:15 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3FCD:1:0x0201]: Attribute report 'AvattoThermostat'[occupied_heating_setpoint] = 18
2021-12-02 16:40:15 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x3FCD:1:0x0201]: Attribute report 'AvattoThermostat'[occupied_heating_setpoint] = 18
2021-12-02 16:40:15 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_ye5jkfsb_ts0601_3a927cfe_thermostat: Attribute 'occupied_heating_setpoint' = 18 update
2021-12-02 16:40:15 DEBUG (MainThread) [homeassistant.components.zha.entity] climate.tze200_ye5jkfsb_ts0601_3a927cfe_thermostat: Attribute 'occupied_heating_setpoint' = 18 update

@jacekk015
Copy link
Contributor

jacekk015 commented Dec 2, 2021

@monstermuffin Nice job!
Temps are missing correct multiplier - corrected below - upload and test. Restart always needed. No need to repair
ts0601_thermostat_avatto.py.zip

Will write some findings in a moment.

In the logs I've found few attributes that Zigbee2Mqtt didn't present, but your device presents them - symbols:

  1. Some unknown on/off switch or sensor - attribute 0x0424 - maybe heating status??
2021-12-02 16:07:25 DEBUG (MainThread) [zigpy.zcl] [0x3fcd:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=208, command_id=1060, function=0, data=[1, 1])]
2021-12-02 16:07:25 DEBUG (MainThread) [zhaquirks.tuya] [0x3fcd:1:0xef00] Received value [1] for attribute 0x0424 (command 0x0002)

It changed here -> Received value[0] from [1]:

2021-12-02 16:15:09 DEBUG (MainThread) [zigpy.zcl] [0x3fcd:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=2, command_id=1060, function=0, data=[1, 0])]
2021-12-02 16:15:09 DEBUG (MainThread) [zhaquirks.tuya] [0x3fcd:1:0xef00] Received value [0] for attribute 0x0424 (command 0x0002)

Here again [1]

2021-12-02 16:32:14 DEBUG (MainThread) [zigpy.zcl] [0x3fcd:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=6, command_id=1060, function=0, data=[1, 1])]
2021-12-02 16:32:14 DEBUG (MainThread) [zhaquirks.tuya] [0x3fcd:1:0xef00] Received value [1] for attribute 0x0424 (command 0x0002)
  1. Some unknown on/off switch or sensor - attribute 0x052d
2021-12-02 16:07:25 DEBUG (MainThread) [zigpy.zcl] [0x3fcd:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=208, command_id=1325, function=0, data=[1, 0])]
2021-12-02 16:07:25 DEBUG (MainThread) [zhaquirks.tuya] [0x3fcd:1:0xef00] Received value [0] for attribute 0x052d (command 0x0002)
  1. Probably schedule settings - attribute 0x006c
2021-12-02 15:58:44 DEBUG (MainThread) [zigpy.zcl] [0xcbef:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=8, command_id=108, function=0, data=[24, 6, 0, 20, 8, 0, 15, 11, 30, 15, 12, 30, 15, 17, 0, 22, 22, 0, 15, 8, 0, 22, 23, 0, 15])]
2021-12-02 15:58:44 DEBUG (MainThread) [zhaquirks.tuya] [0xcbef:1:0xef00] Received value [6, 0, 20, 8, 0, 15, 11, 30, 15, 12, 30, 15, 17, 0, 22, 22, 0, 15, 8, 0, 22, 23, 0, 15] for attribute 0x006c (command 0x0002)

Maybe you can play some switches/options and check logs for changing values.
There always be line like:
Received value xxx for attribute 0x052d

[edit]

sensor.tze200_ye5jkfsb_ts0601_3a927cfe_thermostat_hvac_action - This stays 'off' regardless of what is pressed on the thermostat, or if the thermostat is set to higher/lower than current temp.

Didn't touch it right now. If we find some attribute, above, that Thermostat sends we can use it to signal that.
Without it all we can do is to make it changes when set temp > room temp - but it always is a workaround - I do that for my own TRV's - they don't have status attribute if they start to heat.

@jacekk015
Copy link
Contributor

@ssalorinne HVAC action state is based on the attribute 0x0424

AVATTO_HEAT_STATE_ATTR = 0x0424  # [0] heating icon on [1] heating icon off

Thermostat has some icon to show on/off state of heating.
Please steer the temp so that the Thermostat icon will switch state on and off, and post the logs of that time.
It's possible that Beok has other attribute or doesn't send that state.
Logs will tell. If the icon is switching it should send something to HA.

BTW you have very low LQI [Link Quality] - that Thermostat is probably far from other device/router or controller.

@RobDaPraia
Copy link

@jacekk015

Regarding the question of the device not setting the date/time automatically, I have pasted the debug log here: https://pastebin.com/ua1CBqaP

The device has name climate.zolder_rob_avatto_thermostat, the log is just before the re-pairing until a couple of minutes after the re-pairing

@RobDaPraia
Copy link

@jacekk015

Regarding the question from @ssalorinne about the icon to show on/off state of heating..

here is debug log, I changed temperature several times from 10 to 26 to 10 and the heating icon shows/disappeared
https://pastebin.com/qxmNFcUg

@jacekk015
Copy link
Contributor

jacekk015 commented Jan 18, 2023

@RobDaPraia
Regarding the question of the device not setting the date/time automatically...
TRV never asked for time. There's no sign of 0x24 command sent from TRV -> ZHA.
If device doesn't ask - ZHA doesn't force to send it.
Device needs to ask first, but...

I've added, in quirk below, EnchantedDevice class.
That's a hack for some devices to make them ask for date/time update.
If that's the reason it should work - otherwise there's nothing we can do about it.
[edit]
Use file from post below

@jacekk015
Copy link
Contributor

@RobDaPraia @ssalorinne
Heres update quirk with above mentioned changes and also corrected heat state for BEOK.
BEOK keeps state under 0x0403 attribute.
ts0601_thermostat_avatto.py.zip

@RobDaPraia
Copy link

@jacekk015

Thanks for the update. Unfortunate it sems that the datetime doesn't get adjusted. Then we have to stick to manual update.

I did the following:

Install the new ts0601_thermostat_avatto.py
rebooted HA
On the thermstat adjust the datetime to incorrect time
Re-paired the device
Waited several minutes, but no change in time

Anyway, thanks for the update

@RobDaPraia
Copy link

RobDaPraia commented Jan 19, 2023

@jacekk015

It seems that the Heating/Idle is inverted?
Note: you can not change this thermostat from heating to cooling, like for heater or airco control

When I set the target to a lower temperature, the thermostat changed to heating
image

Then setting the target to a higher temperature, the thermostat changed to idle
image

@ssalorinne
Copy link

ssalorinne commented Jan 19, 2023

Unfortunately for me the latest version does not seem to work at all. The device pairs succesfully, but nothing works.
Screenshot 2023-01-19 at 15 34 05

Screenshot 2023-01-19 at 15 35 56

Pairing starts at 15:31 after which I try to change values and turn on the childlock. Also note that the default value for the calibration is back to NaN.
home-assistant_2023-01-19T13-42-42.655Z.log

The only remaining issue I had with the previous version was that the heating status was shown as always on if the thermostat was on. On my other devices it shows heating (with the flame icon) when the relay is actually turned to the on position. For automations it would help if this can be corrected.
Happy to provide additional logs if that is of use.
Thanks for the continued effort!

@jacekk015
Copy link
Contributor

@ssalorinne
I see again "UNSUP_MANUF_CLUSTER_COMMAND".
I've changed code according to programmers preferences to use NoManufacturerCluster class instead of manual code.
Will revert this back to my code.

BTW How it's possible to not work if same TRV on that code works for @RobDaPraia ??

@MattWestb
Copy link
Contributor

I have seen its version of this device and i hope they is having the same firmware version on the MCU.
@jacekk015 do you knowing the command / DP for reading the version of the MCU ?

@jacekk015
Copy link
Contributor

@MattWestb
They have same app_version: 70 - Basic cluster -> app_version

2023-01-14 16:11:54.315 DEBUG (MainThread) [zigpy.zcl] [0x2FAF:1:0x0000] Attribute report received: app_version=70, 0xFFE2=54, 0xFFE4=0

ssalorinne has device_version = 1
RobDaPraia - I don't know - his logs show that he didn't remove device first, so there was no FULL initialization process. Not all data are presented in the logs.

2023-01-19 15:33:12.995 INFO (MainThread) [zigpy.endpoint] [0x6172:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10])

@MattWestb
Copy link
Contributor

That is the version of the Zibee module.
The command is here:

TUYA_MCU_VERSION_REQ = 0x10
TUYA_MCU_VERSION_RSP = 0x11

And one function is here:
class MCUVersionRsp(t.Struct):

I dont knowing how its working but some have getting the version from the MCU.

@jacekk015
Copy link
Contributor

@RobDaPraia
For date/time sync you need to remove device first from HA.
Only then you have FULL initialization process.

For Heating/Idle is inverted - corrected in the file below.
AVATTO model has this inverted[yay!]

@ssalorinne
The only remaining issue I had with the previous version was that the heating status was shown as always on if the thermostat was on. On my other devices it shows heating (with the flame icon) when the relay is actually turned to the on position. For automations it would help if this can be corrected.
Happy to provide additional logs if that is of use.

Lets clarify this.
system_mode in HA -> flame/off icon -> device is on or off - not heating
hvac_mode -> device is heating or idle

AVATTO users gave me specific attribute to make it on/off
AVATTO_SYSTEM_MODE_ATTR = 0x0101 # device [0] off [1] on
BEOK has same attribute - I see that in Z2M implementation.
So when you disable the device, by button, the flame will be disabled.
Same when you click Off icon on Thermostat card.
HVAC implementation comes actually from air conditioner.
Look how aircon card look like:
image
So you see - flame is not for heating state - but MODE instead. Thermostat can only heat.
With quirk below you have properly working heat state sensor like: Heating/Idle
You can use that easily.
image

Corrected quirk below:
ts0601_thermostat_avatto.py.zip

@RobDaPraia
Copy link

@jacekk015 Thanks

Didn't know I had to remove the device, ok, now I did the following, see attached log

  • Removed the thermostat
  • updated the ts0601_thermostat_avatto.py
  • restarted HA
  • Zigbee add device/thermostat pairing mode

At this moment the thermostat did not work in HA. But after I switched off/switched the thermostat device, the thermostat started to work in HA

It seems that thermostat in HA is working correctly:

  • Switch is for child lock on/off
  • Thermostat Operation: Heat/Off switches on/off the device
  • Higher target temperature (fire icon on device): HVAC action heating
  • Lower temperature (no fire icon on device): HVAC action idle

Unfortunately, datetime is not set, so have to do that manually once

https://pastebin.com/4kPwEqQs

@RobDaPraia
Copy link

@jacekk015

Some screenshot of the card with heating/idle/off, seems good

image

image

image

@jacekk015
Copy link
Contributor

@RobDaPraia Looks good.

Magic packet for date/time sync was sent on initialization process:

2023-01-20 10:31:09.745 DEBUG (MainThread) [zigpy.zcl] [0x2F0F:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4, 0, 1, 5, 7, 65534])

Thermostat just doesn't respond to that, and also don't ask for time sync.
So manual setting is mandatory.

If you're happy with results remember to disable DEBUG level logging.
Otherwise you will have log size of 100MB or more after week.

@MattWestb
Copy link
Contributor

MattWestb commented Jan 21, 2023

Was looking in the current quirk and is 2 devices that looks working better with this quirk 2ekuz3dz and ye5jkfsb but is one new white version u9bfwha0 that we is not knowing if its compatible and i have pining the user that was adding it and hopefully getting yes or no.
Also need to knowing if the original aoclfnxz Beca Smart BHT-002 is working with this updated quirk.

If not getting feedback we is leaving the u9bfwha0 and aoclfnxz in the old quirk.

Great work done !!

@jacekk015
Copy link
Contributor

jacekk015 commented Jan 21, 2023

Z2M uses same code for those TRV's
https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/devices/moes.js#L98

        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aoclfnxz'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_ztvwu4nk'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_5toc8efa'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_ye5jkfsb'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_u9bfwha0'}],
        model: 'BHT-002-GCLZB',
        vendor: 'Moes',
        description: 'Moes BHT series Thermostat',

And also have other for _TZE200_2ekuz3dz
https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/devices/tuya.js#L3209

        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_2ekuz3dz'}],
        model: 'X5H-GB-B',
        vendor: 'TuYa',
        description: 'Wall-mount thermostat',

Becasue they are 80-90% compatible [I mean attributes] I made it in just one quirk.
There are some exceptions in the quirk for _TZE200_2ekuz3dz

@MattWestb
Copy link
Contributor

MattWestb commented Jan 21, 2023

The original Becca is your first from Z2M and we is only having the first one.
Avatto is

            {modelID: 'TS0601', manufacturerName: '_TZE200_aoclfnxz'
            {modelID: 'TS0601', manufacturerName: '_TZE200_ztvwu4nk'
            {modelID: 'TS0601', manufacturerName: '_TZE200_5toc8efa'
            {modelID: 'TS0601', manufacturerName: '_TZE200_ye5jkfsb'
            {modelID: 'TS0601', manufacturerName: '_TZE200_u9bfwha0'

and one is having device class with ZGPP endpoing but i think all other is without.

Edit:
Its only one that is not fitting in '_TZE200_2ekuz3dz' and '_TZE200_znzs7yaw' and the last have one own quirk.

@jacekk015
Copy link
Contributor

If you are sure about this I can add them to the quirk.

@MattWestb
Copy link
Contributor

Z2M Avatto from https://github.com/Koenkk/zigbee-herdsman-converters/blob/29f1f442e981db8d5138cde930387d5fc4c52454/devices/moes.js#L98-L105

        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aoclfnxz'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_ztvwu4nk'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_5toc8efa'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_ye5jkfsb'},
            {modelID: 'TS0601', manufacturerName: '_TZE200_u9bfwha0'}],
        model: 'BHT-002-GCLZB',
        vendor: 'Moes',
        description: 'Moes BHT series Thermostat',

You have one with ZGPP OK.
The _TZE200_2ekuz3dz and _TZE200_znzs7yaw i think we must lasting for the moment for not braking all things in one PR / change.

@JonasEnstrom80
Copy link
Contributor

JonasEnstrom80 commented Jan 21, 2023

@RobDaPraia For date/time sync you need to remove device first from HA. Only then you have FULL initialization process.

For Heating/Idle is inverted - corrected in the file below. AVATTO model has this inverted[yay!]

@ssalorinne The only remaining issue I had with the previous version was that the heating status was shown as always on if the thermostat was on. On my other devices it shows heating (with the flame icon) when the relay is actually turned to the on position. For automations it would help if this can be corrected. Happy to provide additional logs if that is of use.

Lets clarify this. system_mode in HA -> flame/off icon -> device is on or off - not heating hvac_mode -> device is heating or idle

AVATTO users gave me specific attribute to make it on/off AVATTO_SYSTEM_MODE_ATTR = 0x0101 # device [0] off [1] on BEOK has same attribute - I see that in Z2M implementation. So when you disable the device, by button, the flame will be disabled. Same when you click Off icon on Thermostat card. HVAC implementation comes actually from air conditioner. Look how aircon card look like: image So you see - flame is not for heating state - but MODE instead. Thermostat can only heat. With quirk below you have properly working heat state sensor like: Heating/Idle You can use that easily. image

Corrected quirk below: ts0601_thermostat_avatto.py.zip

Hi! I have tested this quirk with my _TZE200_u9bfwha0. Added my device id to the Avatto section, Beok did not work at all.

Most things seem to work.
Setting temperature - OK
Setting thermostat mode - OK
Temperature compensation - OK
HVAC action - OK
Reading temperature - OKish, reading is 10x to high
Child lock switch - OK, works but is just named switch in HA

image

@jacekk015
Copy link
Contributor

@JonasEnstrom80 Enable debug logging. Restart HA. Remove device. Pair like new one. Wait still up to 10 minutes. Post HA logs as a file. Don't cut anything from logs.

@JonasEnstrom80
Copy link
Contributor

Here are my loggs.

Found 1 more issue.
When setting temperature in HA only whole degree is set on thermostat. It's possible to select half degree in HA thermostat card but it is rounded when sent to thermostat. On thermostat control panel it is possible to set half degrees. Not a big issue for me anyway.

home-assistant.log.zip

@jacekk015
Copy link
Contributor

@JonasEnstrom80 It's not a bug, not in the quirk.
Chinese engineers forgot to send data with more precision:

2023-01-21 22:21:02.759 DEBUG (MainThread) [zigpy.zcl] [0x2FDA:1:0xef00] Received command 0x01 (TSN 17): get_data(param=Command(status=1, tsn=173, command_id=528, function=0, data=[4, 0, 0, 0, 18]))
2023-01-21 22:21:02.760 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x2FDA:1:0x0201]: Attribute report 'AvattoThermostat'[occupied_heating_setpoint] = 1800

Maybe you can set half degree on the Thermostat, but that half is missing in transmission to HA.

Even when you sent it from HA:
HA -> Thm sends 18.5
Thm -> HA confirms back temp, and then we have 18 only
HA changes control panel to 18 degrees.

@jacekk015
Copy link
Contributor

@JonasEnstrom80
For the room temp - check corrected quirk below.
ts0601_thermostat_avatto.py.zip

@JonasEnstrom80
Copy link
Contributor

Room temp reading is working as it should now. Thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants