ZHA quirk for Tuya smartplug TS011F Manufacturer _TZ3000_ew3ldmgx
See original GitHub issuePowerplug Energi readings failure.
This smartplug is supported in zigbee2mqtt. Is it possible to make a quirk for the ZHA integration?
I am using the Sonoff zigbee bridge with Tasmota firmware 9.4.0.5 Zigbee home automation integration. Home assistant core-2021.6.2 on a raspberry Pi 3B
Device: Tuya smartplug TS011F Manufacturer _TZ3000_ew3ldmgx Bought from AliExpress: https://www.aliexpress.com/item/1005002518243120.html?spm=a2g0o.productlist.0.0.3f432783uruwGI&algo_pvid=5bd5632d-703b-4be7-901a-72c026ee5ec4&algo_expid=5bd5632d-703b-4be7-901a-72c026ee5ec4-2&btsid=0b0a555416230851391935263ed3ec&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_
ZHA finds the power plug and the on/off functionality works. But the power readings doesn’t show up in the sensor Entities.
sensor.tz3000_ew3ldmgx_ts011f_507b8ffe_electrical_measurement (readings = 0W) sensor.tz3000_ew3ldmgx_ts011f_507b8ffe_smartenergy_metering (readings= UnKnown)
I have added a pdf file of the data from the power plug clusters and attributes and so on from zigbee.db and from .
Device signature:
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "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.0: 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": "0x010a", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0702", "0x0b04", "0xe000", "0xe001" ], "out_clusters": [ "0x000a", "0x0019" ] }, "242": { "profile_id": 41440, "device_type": "0x0061", "in_clusters": [], "out_clusters": [ "0x0021" ] } }, "manufacturer": "_TZ3000_ew3ldmgx", "model": "TS011F", "class": "zigpy.device.Device" }
I have no programming skills, so I hope that someone is able to help me and others with this power plug device.
Log information:
[0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x097e: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=179 command_id=Command.Read_Attributes_rsp> [0x8075: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=181 command_id=Command.Read_Attributes_rsp> Device 0x020b (84:71:27:ff:fe:8f:7b:50) joined the network [0x020b] Requesting 'Node Descriptor' Tries remaining: 2 [0x020b] Extending timeout for 0xb7 request Device 0x020b (84:71:27:ff:fe:8f:7b:50) joined the network Skip initialization for existing device 84:71:27:ff:fe:8f:7b:50 [0x020b:zdo] ZDO request ZDOCmd.Device_annce: [0x020B, 84:71:27:ff:fe:8f:7b:50, 142] [0x020b] Node Descriptor: NodeDescriptor(byte1=1, byte2=64, mac_capability_flags=142, 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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.Router: 1>, *user_descriptor_available=False) [0x020b] Discovering endpoints Tries remaining: 3 [0x020b] Discovered endpoints: [1, 242] [0x020b:1] Discovering endpoint information Tries remaining: 3 [0x020b:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=266, device_version=1, input_clusters=[0, 3, 4, 5, 6, 1794, 2820, 57344, 57345], output_clusters=[25, 10]) Unknown cluster 57344 Unknown cluster 57345 [0x020b: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=189 command_id=Command.Read_Attributes_rsp> [0x020b:1] Manufacturer: _TZ3000_ew3ldmgx [0x020b:1] Model: TS011F [0x020b:242] Discovering endpoint information Tries remaining: 3 [0x020b:242] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=242, profile=41440, device_type=97, device_version=0, input_clusters=[], output_clusters=[33]) Checking quirks for _TZ3000_ew3ldmgx TS011F (84:71:27:ff:fe:8f:7b:50) Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'> Fail because endpoint list mismatch: {232, 230} {1, 242} Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'> Fail because endpoint list mismatch: {232, 230} {1, 242} Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'> Fail because endpoint list mismatch: {1} {1, 242} Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'> Fail because endpoint list mismatch: {1} {1, 242} Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'> Fail because endpoint list mismatch: {1} {1, 242} Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'> Fail because endpoint list mismatch: {11, 13} {1, 242} Considering <class 'bellows.zigbee.application.EZSPCoordinator'> Fail because endpoint list mismatch: {1} {1, 242} device - 0x020B:84:71:27:ff:fe:8f:7b:50 entering async_device_initialized - is_new_join: True device - 0x020B:84:71:27:ff:fe:8f:7b:50 has joined the ZHA zigbee network [0x020B](TS011F): started configuration [0x020B:ZDO](TS011F): 'async_configure' stage succeeded [0x020B:1:0x0000]: finished channel configuration [0x020B:1:0x0006]: bound 'on_off' cluster: Status.SUCCESS [0x020B:1:0x0b04]: bound 'electrical_measurement' cluster: Status.SUCCESS [0x020B:1:0x0702]: bound 'smartenergy_metering' cluster: Status.SUCCESS [0x020b:zdo] ZDO request ZDOCmd.NWK_addr_req: [60:a4:23:ff:fe:1d:bd:43, 0, 0] [0x020b:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=199 command_id=Command.Configure_Reporting_rsp> [0x020b: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=201 command_id=Command.Configure_Reporting_rsp> [0x020B:1:0x0006]: reporting 'on_off' attr on 'on_off' cluster: 0/900/1: Result: '[[ConfigureReportingResponseRecord(status=0)]]' [0x020B:1:0x0006]: finished channel configuration [0x020b:1:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=203 command_id=Command.Configure_Reporting_rsp> [0x020B:1:0x0019]: finished channel configuration [0x020B:1:0x0b04]: reporting 'active_power' attr on 'electrical_measurement' cluster: 30/900/1: Result: '[[ConfigureReportingResponseRecord(status=0)]]' [0x020B:1:0x0b04]: finished channel configuration [0x020B:1:0x0702]: reporting 'instantaneous_demand' attr on 'smartenergy_metering' cluster: 30/900/1: Result: '[[ConfigureReportingResponseRecord(status=134, direction=0, attrid=1024)]]' [0x020b:1:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=206 command_id=Command.Read_Attributes_rsp> [0x020b:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=59 command_id=Command.Report_Attributes> [0x020b:1:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.false>)]] [0x020b:1:0x0006] Attribute report received: on_off=0 [0x020b: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=61 command_id=Command.Report_Attributes> [0x020b:1:0x0b04] ZCL request 0x000a: [[Attribute(attrid=1291, value=<TypeValue type=int16s, value=0>)]] [0x020b:1:0x0b04] Attribute report received: active_power=0 [0x020B:1:0x0702]: finished channel configuration [0x020B:1:0x0006]: 'async_configure' stage succeeded [0x020B:1:0x0b04]: 'async_configure' stage succeeded [0x020B:1:0x0000]: 'async_configure' stage succeeded [0x020B:1:0x0702]: 'async_configure' stage succeeded [0x020B:1:0x0019]: 'async_configure' stage succeeded [0x020B](TS011F): completed configuration [0x020B](TS011F): stored in registry: ZhaDeviceEntry(name='_TZ3000_ew3ldmgx TS011F', ieee='84:71:27:ff:fe:8f:7b:50', last_seen=1623770322.3041687) [0x020b:1:0x0003] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=208 command_id=Command.Default_Response> [0x020B:1:0x0003]: executed 'trigger_effect' command with args: '(2, 0)' kwargs: '{}' result: [64, <Status.UNSUP_CLUSTER_COMMAND: 129>] [0x020B](TS011F): started initialization [0x020B:ZDO](TS011F): 'async_initialize' stage succeeded [0x020B:1:0x0006]: initializing channel: from_cache: False [0x020B:1:0x0b04]: initializing channel: from_cache: False [0x020B:1:0x0000]: initializing channel: from_cache: False [0x020B:1:0x0000]: finished channel configuration [0x020B:1:0x0702]: initializing channel: from_cache: False [0x020b:zdo] ZDO request ZDOCmd.Node_Desc_req: [0x0000] [0x020b:zdo] Unsupported ZDO request:ZDOCmd.Node_Desc_req [0x020b:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=210 command_id=Command.Read_Attributes_rsp> [0x020B:1:0x0006]: finished channel configuration [0x020B:1:0x0019]: initializing channel: from_cache: False [0x020B:1:0x0019]: finished channel configuration [0x020b: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=212 command_id=Command.Read_Attributes_rsp> [0x020b:1:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=214 command_id=Command.Read_Attributes_rsp> [0x020b: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=216 command_id=Command.Read_Attributes_rsp> [0x020B:1:0x0b04]: finished channel configuration [0x020b:1:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=218 command_id=Command.Read_Attributes_rsp> [0x020B:1:0x0702]: finished channel configuration [0x020B:1:0x0006]: 'async_initialize' stage succeeded [0x020B:1:0x0b04]: 'async_initialize' stage succeeded [0x020B:1:0x0000]: 'async_initialize' stage succeeded [0x020B:1:0x0702]: 'async_initialize' stage succeeded [0x020B:1:0x0019]: 'async_initialize' stage succeeded [0x020B](TS011F): power source: Mains [0x020B](TS011F): completed initialization [0x020B:1:0x0006]: attempting to update onoff state - from cache: False [0x020b:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=220 command_id=Command.Read_Attributes_rsp> [0x020b: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=64 command_id=Command.Read_Attributes> [0x020b:1:0x000a] ZCL request 0x0000: [[7]] [0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x020B:1:0x0b04]: async_update [0x097e: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=223 command_id=Command.Read_Attributes_rsp> [0x8075: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=225 command_id=Command.Read_Attributes_rsp> [0x020b: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=227 command_id=Command.Read_Attributes_rsp> [0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x020B:1:0x0b04]: async_update [0x097e: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=229 command_id=Command.Read_Attributes_rsp> [0x8075: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=231 command_id=Command.Read_Attributes_rsp> [0x020b: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=233 command_id=Command.Read_Attributes_rsp> [0x8075:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=44 command_id=Command.Report_Attributes> [0x8075:1:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.false>)]] [0x8075:1:0x0006] Attribute report received: on_off=0 [0x097e: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=12 command_id=Command.Report_Attributes> [0x097e:1:0x0b04] ZCL request 0x000a: [[Attribute(attrid=1291, value=<TypeValue type=int16s, value=0>)]] [0x097e:1:0x0b04] Attribute report received: active_power=0 [0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x020B:1:0x0b04]: async_update [0x097e: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=235 command_id=Command.Read_Attributes_rsp> [0x8075: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=237 command_id=Command.Read_Attributes_rsp> [0x020b: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=239 command_id=Command.Read_Attributes_rsp>
[0x020b:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=103 command_id=Command.Default_Response> [0x020b:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=71 command_id=Command.Report_Attributes> [0x020b:1:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.true>)]] [0x020b:1:0x0006] Attribute report received: on_off=1 [0x020B:1:0x0006]: executed 'on' command with args: '()' kwargs: '{}' result: [1, <Status.SUCCESS: 0>] [0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x020B:1:0x0b04]: async_update [0x097e: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=105 command_id=Command.Read_Attributes_rsp> [0x8075: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=107 command_id=Command.Read_Attributes_rsp> [0x020b: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=109 command_id=Command.Read_Attributes_rsp> [0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x020B:1:0x0b04]: async_update [0x097e: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> [0x8075: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=113 command_id=Command.Read_Attributes_rsp> [0x020b: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=115 command_id=Command.Read_Attributes_rsp> [0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x020B:1:0x0b04]: async_update [0x097e: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=117 command_id=Command.Read_Attributes_rsp> [0x8075: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=119 command_id=Command.Read_Attributes_rsp> [0x020b: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=121 command_id=Command.Read_Attributes_rsp> [0x097E:1:0x0b04]: async_update [0x8075:1:0x0b04]: async_update [0x020B:1:0x0b04]: async_update [0x097e: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=123 command_id=Command.Read_Attributes_rsp> [0x8075: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=125 command_id=Command.Read_Attributes_rsp> [0x020b: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=127 command_id=Command.Read_Attributes_rsp>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:66 (35 by maintainers)
Top GitHub Comments
Ok 👍🏻 I have now posted the device signature. The PDF file f…… it up. 😯
If you guide me a little bit…
I’m from Belgium, Dutch speaking…