[Device Support Request] TS004F Tuya Smart Knob
See original GitHub issueI recently got this Tuya Smart Knob: Ali
Pairing works and the Quirks for TS004F is applied, but only the battery cluster works, others don’t appear. Here is the pairing log:
Device 0x27a3 (54:0f:57:ff:fe:2e:3c:5f) joined the network
Device 54:0f:57:ff:fe:2e:3c:5f changed id (0x27a3 => 0x27a3)
[0x27a3] Scheduling initialization
Tries remaining: 3
[0x27a3] Requesting 'Node Descriptor'
Tries remaining: 2
[0x27a3] Extending timeout for 0x2e request
Device 0x27a3 (54:0f:57:ff:fe:2e:3c:5f) joined the network
[0x27a3] Scheduling initialization
[0x27a3] Canceling old initialize call
Tries remaining: 3
[0x27a3] Requesting 'Node Descriptor'
Tries remaining: 2
[0x27a3] Extending timeout for 0x2f request
Device 0x27a3 (54:0f:57:ff:fe:2e:3c:5f) joined the network
[0x27a3] Scheduling initialization
[0x27a3] Canceling old initialize call
Received frame on uninitialized device <Device model=None manuf=None nwk=0x27A3 ieee=54:0f:57:ff:fe:2e:3c:5f is_initialized=False> from ep 0 to ep 0, cluster ZDOCmd.Device_annce: b'\xFF\xA3\x27\x5F\x3C\x2E\xFE\xFF\x57\x0F\x54\x80'
[0x27a3:zdo] ZDO request ZDOCmd.Device_annce: [0x27A3, 54:0f:57:ff:fe:2e:3c:5f, 128]
Tries remaining: 3
[0x27a3] Requesting 'Node Descriptor'
Tries remaining: 2
[0x27a3] Extending timeout for 0x30 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0x27A3 ieee=54:0f:57:ff:fe:2e:3c:5f is_initialized=False> from ep 0 to ep 0, cluster ZDOCmd.Node_Desc_rsp: b'\x30\x00\xA3\x27\x02\x40\x80\x02\x10\x52\x52\x00\x00\x2C\x52\x00\x00'
[0x27a3] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)
[0x27a3] Discovering endpoints
Tries remaining: 3
[0x27a3] Extending timeout for 0x31 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0x27A3 ieee=54:0f:57:ff:fe:2e:3c:5f is_initialized=False> from ep 0 to ep 0, cluster ZDOCmd.Active_EP_rsp: b'\x31\x00\xA3\x27\x01\x01'
[0x27a3] Discovered endpoints: [1]
[0x27a3] Initializing endpoints [<Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
[0x27a3:1] Discovering endpoint information
Tries remaining: 3
[0x27a3] Extending timeout for 0x32 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0x27A3 ieee=54:0f:57:ff:fe:2e:3c:5f is_initialized=False> from ep 0 to ep 0, cluster ZDOCmd.Simple_Desc_rsp: b'\x32\x00\xA3\x27\x24\x01\x04\x01\x04\x01\x01\x06\x00\x00\x01\x00\x03\x00\x04\x00\x06\x00\x00\x10\x08\x19\x00\x0A\x00\x03\x00\x04\x00\x05\x00\x06\x00\x08\x00\x00\x10'
[0x27a3:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 1, 3, 4, 6, 4096], output_clusters=[25, 10, 3, 4, 5, 6, 8, 4096])
[0x27a3] Extending timeout for 0x33 request
[0x27a3: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=51 command_id=Command.Read_Attributes_rsp>
[0x27a3] Read model 'TS004F' and manufacturer '_TZ3000_4fjiwweb' from <Endpoint id=1 in=[basic:0x0000, power:0x0001, identify:0x0003, groups:0x0004, on_off:0x0006, lightlink:0x1000] out=[ota:0x0019, time:0x000A, identify:0x0003, groups:0x0004, scenes:0x0005, on_off:0x0006, level:0x0008, lightlink:0x1000] status=<Status.ZDO_INIT: 1>>
[0x27a3] Discovered basic device information for <Device model='TS004F' manuf='_TZ3000_4fjiwweb' nwk=0x27A3 ieee=54:0f:57:ff:fe:2e:3c:5f is_initialized=True>
Device is initialized <Device model='TS004F' manuf='_TZ3000_4fjiwweb' nwk=0x27A3 ieee=54:0f:57:ff:fe:2e:3c:5f is_initialized=True>
Checking quirks for _TZ3000_4fjiwweb TS004F (54:0f:57:ff:fe:2e:3c:5f)
Considering <class 'zhaquirks.tuya.ts004f.TuyaSmartRemote004F'>
Found custom device replacement for 54:0f:57:ff:fe:2e:3c:5f: <class 'zhaquirks.tuya.ts004f.TuyaSmartRemote004F'>
device - 0x27A3:54:0f:57:ff:fe:2e:3c:5f entering async_device_initialized - is_new_join: True
device - 0x27A3:54:0f:57:ff:fe:2e:3c:5f has joined the ZHA zigbee network
[0x27A3](TS004F): started configuration
[0x27A3:ZDO](TS004F): 'async_configure' stage succeeded
[0x27a3] Extending timeout for 0x34 request
[0x27a3] Extending timeout for 0x35 request
[0x27A3:1:0x0000]: finished channel configuration
[0x27a3] Extending timeout for 0x36 request
Error handling '_save_attribute' event with (54:0f:57:ff:fe:2e:3c:5f, 1, 0, 4, '_TZ3000_4fjiwweb') params: FOREIGN KEY constraint failed
Error handling '_save_attribute' event with (54:0f:57:ff:fe:2e:3c:5f, 1, 0, 5, 'TS004F') params: FOREIGN KEY constraint failed
[0x27a3:1:0x1000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=53 command_id=Command.Default_Response>
[0x27a3] Extending timeout for 0x37 request
[0x27A3:1:0x0001]: bound 'power' cluster: Status.SUCCESS
[0x27a3] Extending timeout for 0x38 request
[0x27A3:1:0x0008]: bound 'level' cluster: Status.SUCCESS
[0x27A3:1:0x0008]: finished channel configuration
[0x27A3:1:0x0019]: finished channel configuration
[0x27a3] Extending timeout for 0x39 request
[0x27A3:1:0x0006]: bound 'on_off' cluster: Status.SUCCESS
[0x27A3:1:0x0006]: finished channel configuration
[0x27A3:1:0x0005]: bound 'scenes' cluster: Status.SUCCESS
[0x27A3:1:0x0005]: finished channel configuration
[0x27a3:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=56 command_id=Command.Configure_Reporting_rsp>
[0x27A3:1:0x0001]: Successfully configured reporting for '{'battery_voltage': (3600, 10800, 1), 'battery_percentage_remaining': (3600, 10800, 1)}' on 'power' cluster: [ConfigureReportingResponseRecord(status=0)]
[0x27A3:1:0x0001]: finished channel configuration
[0x27A3:1:0x0001]: 'async_configure' stage succeeded
[0x27A3:1:0x1000]: 'async_configure' stage failed: not enough values to unpack (expected 3, got 2)
[0x27A3:1:0x0000]: 'async_configure' stage succeeded
[0x27A3:1:0x0008]: 'async_configure' stage succeeded
[0x27A3:1:0x0006]: 'async_configure' stage succeeded
[0x27A3:1:0x0019]: 'async_configure' stage succeeded
[0x27A3:1:0x0005]: 'async_configure' stage succeeded
[0x27A3](TS004F): completed configuration
[0x27A3](TS004F): stored in registry: ZhaDeviceEntry(name='_TZ3000_4fjiwweb TS004F', ieee='54:0f:57:ff:fe:2e:3c:5f', last_seen=1643823108.9565244)
[0x27a3] Extending timeout for 0x3a request
[0x27a3: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=58 command_id=Command.Default_Response>
[0x27A3:1:0x0003]: executed 'trigger_effect' command with args: '(2, 0)' kwargs: '{}' result: [64, <Status.UNSUP_CLUSTER_COMMAND: 129>]
[0x27A3](TS004F): started initialization
[0x27A3:ZDO](TS004F): 'async_initialize' stage succeeded
[0x27A3:1:0x0001]: initializing channel: from_cache: False
[0x27a3] Extending timeout for 0x3b request
[0x27A3:1:0x1000]: initializing channel: from_cache: False
[0x27A3:1:0x1000]: finished channel initialization
[0x27A3:1:0x0000]: initializing channel: from_cache: False
[0x27A3:1:0x0000]: finished channel initialization
[0x27A3:1:0x0008]: initializing channel: from_cache: False
[0x27A3:1:0x0008]: finished channel initialization
[0x27A3:1:0x0006]: initializing channel: from_cache: False
[0x27A3:1:0x0006]: finished channel initialization
[0x27A3:1:0x0019]: initializing channel: from_cache: False
[0x27A3:1:0x0019]: finished channel initialization
[0x27A3:1:0x0005]: initializing channel: from_cache: False
[0x27A3:1:0x0005]: finished channel initialization
[0x27a3:1:0x0001] 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.Read_Attributes_rsp>
[0x27a3] Extending timeout for 0x3c request
[0x27a3:1:0x0001] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=60 command_id=Command.Read_Attributes_rsp>
[0x27A3:1:0x0001]: finished channel initialization
[0x27A3:1:0x0001]: 'async_initialize' stage succeeded
[0x27A3:1:0x1000]: 'async_initialize' stage succeeded
[0x27A3:1:0x0000]: 'async_initialize' stage succeeded
[0x27A3:1:0x0008]: 'async_initialize' stage succeeded
[0x27A3:1:0x0006]: 'async_initialize' stage succeeded
[0x27A3:1:0x0019]: 'async_initialize' stage succeeded
[0x27A3:1:0x0005]: 'async_initialize' stage succeeded
[0x27A3](TS004F): power source: Battery or Unknown
[0x27A3](TS004F): completed initialization
Probably has something to do with these two warnings:
Logger: zigpy_znp.api
Source: /usr/local/lib/python3.9/site-packages/zigpy_znp/api.py:700
First occurred: 18:20:10 (2 occurrences)
Last logged: 18:31:44
Received an unhandled command: ZDO.NodeDescRsp.Callback(Src=0x2553, Status=<Status.SUCCESS: 0>, NWK=0x2553, NodeDescriptor=NullableNodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False))
Received an unhandled command: ZDO.NodeDescRsp.Callback(Src=0x27A3, Status=<Status.SUCCESS: 0>, NWK=0x27A3, NodeDescriptor=NullableNodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False))
Logger: homeassistant.components.zha.core.channels.base
Source: components/zha/core/channels/base.py:428
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 18:20:14 (3 occurrences)
Last logged: 18:31:48
[0x2553:1:0x1000]: 'async_configure' stage failed: not enough values to unpack (expected 3, got 2)
[0x2553:1:0x1000]: Couldn't get list of groups: Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>
[0x27A3:1:0x1000]: 'async_configure' stage failed: not enough values to unpack (expected 3, got 2)
Issue Analytics
- State:
- Created 2 years ago
- Comments:96 (87 by maintainers)
Top Results From Across the Web
Tuya ZigBee "Smart Knob" - Home Assistant Community
I have searched the forum and found information about the TS004F and it has something called “quirks” (which I see is listed above), ......
Read more >[RELEASE] Tuya Scene Switch TS004F driver
The recommended way to install the driver is Hubitat Package Manager (HPM). Search for "Tuya Scene Switch TS004F" or by tag "Zigbee".
Read more >Help with ts004f (tuya dimming knob) integration - Reddit
Remove zha then install zigbee2mqtt. Re pair all your devices. Edit scripts and automations.. Then your weekend is over. Take your time planning ......
Read more >Will the Tuya Smart Knob work? - Devices & Integrations
Hi all, So in all the confusion I'm just wondering what will work and what won't in terms of zigbee devices. @JDRoberts directed...
Read more >ZigBee Smart Scene Switch, Tuya Wireless Knob ... - Amazon.ca
ZigBee Smart Scene Switch, Tuya Wireless Knob Scene Switch Button Controller, Automation Scenario for Tuya Devices, Battery Powered, Require Gateway ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MattWestb I changed the automation triggers and toggling works now:
But I can’t get the brightness controll running, but I found out the meaning of the three parameters:
ARGS: [x1, x2, x3]
x1 = Direction, 0 = clockwise, 1 = anticlockwise x2 = Dimmvalue:x3 = rotation speed, 1 = slow, 2 = middle, 3 = fast
Everything works as expected in 2022.9.0. Thank you!