Tuya ZigBee "Smart Knob"

I recently brought the above device (This one specifically Tuya ZigBee Smart Knob Wireless Scene Switch Button Controller Battery Powered / | eBay) and am trying to figure out how to use it. I have been able to pair it with HA and shows up as:

I have searched the forum and found information about the TS004F and it has something called “quirks” (which I see is listed above), however I can’t seem to get it to do anything. I have clicked on Automations and it shows:

Not sure what the error is at the top, but creating an automation using any of the “Do something when…” doesn’t seem to make anything happen. I was expecting the device to have some Entities but all is lists is option to identify and the battery level.

I have looked into these “quirks” but have yet to find anything that explains what they are and how they work (still looking though!). Have found many saying they exist and to use them but as I don’t understand them, well, I am left confused! LOL

All I am really looking for at the moment is to have it so when I click on the knob it will turn a light on and off and rotating it will brighten/dim it. Apparently the knob should also have long and double press options as well, there are a couple of long but not double options listed above.

Still new to HA and am still learning some of the specific terminology used with certain devices. Most of my searches for TS004F have been talking about a 4 way switch or similar, so I am assuming this knob is using a modified version for the rotation?

Does anyone have any experience with these devices and know of any resources that I might learn more from as I have drawn a blank so far :frowning_face:

Hi, did you make any progress with this device?
I’m looking for rotary dial-type wireless controller too.

Currently no, I am presently looking into some addon called Zigbee2mqtt but without much success!

You can try this link.

what happens if you go to developer tools → events and subscribe to zha_event and use the knob?

Have you looked here: https://gist.github.com/blizzrdof77/c30c388ca5f4ce7ed72752296767417d


I got two of these and paired them and can’t seem to do anything with them. What could I be doing wrong?

These are not really supported in ZHA, you would need to move to Zigbee2MQTT. I just migrated to Zig2MQTT yesterday and it expanded what is sent to HA… I get toggle on button press, the rotation works, it shows “action rate” and “action step size”, and you can choose between “command” and “event”. I haven’t found a blueprint for it yet, so will have to make some time to see how these integrate into HA.

Edit… just tried rotation and it sends “brightness_up” and “brightness_down”… but pushed in and rotated sends “color_temp_up” and “color_temp_down”.

Regardless of issue also be sure to upgrade Zigbee Coordinator firmware before start troubleshooting.

There already looks to be a ZHA quirk handler for it in ZHA quirks library (ZHA Device Handlers), so suggest instead help improve ZHA by reporting bugs + assistant in troubleshooting the quirks, see:

https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling

and

https://github.com/zigpy/zha-device-handlers/issues

as well as information for more advanced users here:

https://github.com/zigpy/zha-device-handlers

PS: The reason why it works in Zigbee2MQTT is its community has fixed their converter = quirk for it.

Hi,
Just to report the knob works just fine with ZHA and a custom quirk ( the same quirk used for the tuya 4 gang switches): https://github.com/zigpy/zha-device-handlers/pull/969

The knob have two mode which i call the toggle and press mode.
You notify the device you change modes by doing a tripple press on the center button.
The toggle mode send:

  • Press
  • Long Press
  • Release on long press
  • Rotary step information: Left or Right and the step size

The event mode:

  • Single click
  • Double click
  • Long Press ( not tested )
  • Rotate right ( without step size )
  • Rotate left ( without step size )

Please note that the toggle mode, the step size trigger condition are hardcoded in the script and there is a small bug in ha that trigger the slow right rotate after a slow left rotate.
I’ll try to use this mode with event condition in the automation when i’ll figure how to compare the values ( greater or lower than )

Toggle mode with event condition automation:
Replace the device_ieee, unique_id and device_id

- id: '1654099239234'
  alias: Smart Knob Platine - Toggle Mode - Tourné à gauche lentement - With Event
  description: ''
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 84:ba:XX:XX:XX:XX:XX:XX
      unique_id: 84:ba:XX:XX:XX:XX:XX:XX:1:0x0008
      device_id: bcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  condition:
  - condition: template
    value_template: '{{ trigger.event.data.command == ''step'' }}'
  - condition: and
    conditions:
    - condition: template
      value_template: '{{ trigger.event.data.params.step_mode == 1 }}'
    - condition: and
      conditions:
      - condition: template
        value_template: '{{ trigger.event.data.params.step_size < 20 }}'
  action:
  - service: script.baisser_volume_denon
    data: {}
  mode: single
- id: '1654099894294'
  alias: Smart Knob Platine - Toggle Mode - Tourné à gauche rapidement- With Event
  description: ''
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 84:ba:XX:XX:XX:XX:XX:XX
      unique_id: 84:ba:XX:XX:XX:XX:XX:XX:1:0x0008
      device_id: bcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  condition:
  - condition: template
    value_template: '{{ trigger.event.data.command == ''step'' }}'
  - condition: and
    conditions:
    - condition: template
      value_template: '{{ trigger.event.data.params.step_mode == 1 }}'
    - condition: and
      conditions:
      - condition: template
        value_template: '{{ trigger.event.data.params.step_size >= 20 }}'
  action:
  - service: script.denon_baisser_volume_15_increment
    data: {}
  mode: single
- id: '1654099954630'
  alias: Smart Knob Platine - Toggle Mode - Tourné à droite lentement - With Event
  description: ''
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 84:ba:XX:XX:XX:XX:XX:XX
      unique_id: 84:ba:XX:XX:XX:XX:XX:XX:1:0x0008
      device_id: bcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  condition:
  - condition: template
    value_template: '{{ trigger.event.data.command == ''step'' }}'
  - condition: and
    conditions:
    - condition: template
      value_template: '{{ trigger.event.data.params.step_mode == 0 }}'
    - condition: and
      conditions:
      - condition: template
        value_template: '{{ trigger.event.data.params.step_size < 20 }}'
  action:
  - service: script.monter_volume_denon
    data: {}
  mode: single
- id: '1654100013061'
  alias: Smart Knob Platine - Toggle Mode - Tourné à droiterapidement- With Event
  description: ''
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 84:ba:XX:XX:XX:XX:XX:XX
      unique_id: 84:ba:XX:XX:XX:XX:XX:XX:1:0x0008
      device_id: bcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  condition:
  - condition: template
    value_template: '{{ trigger.event.data.command == ''step'' }}'
  - condition: and
    conditions:
    - condition: template
      value_template: '{{ trigger.event.data.params.step_mode == 0 }}'
    - condition: and
      conditions:
      - condition: template
        value_template: '{{ trigger.event.data.params.step_size >= 20 }}'
  action:
  - service: script.denon_monter_volume_15_increment
    data: {}
  mode: single

By the way,
This rotary button is kind of meh, because like every tuya device i own, i find it slugish and you always have to pause yourself between every action.
For exemple when you try to raise the volume rapidly by rotating the knob with fast turn motion or with a continuous turn motion(i understand this case can be hard to debounce), only the first one i sent until you pause for 0.5 sec.

Does anyone know another knob that would feel snappy ( can be zwave or zigbee )?

1 Like

The IKEA knob does not need 0.5 seconds at least.
You can’t go fast, but you rarely need to pause either.

Thanks i’ll give it a try

Just found it on aliexpress. So does it work properly with z2mqtt?

I also just found this knob and would like to know if it’s working directly with ZHA ?
I don’t want to install ZigbeeMQTT if I can avoid it.

Again, there already looks to be a ZHA quirk handler for it in ZHA quirks library (ZHA Device Handlers), so again suggest help improve ZHA by reporting bugs and assisting in troubleshooting the quirks, see:

https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling

and

https://github.com/zigpy/zha-device-handlers/issues

as well as information for more advanced users here:

https://github.com/zigpy/zha-device-handlers/blob/4956114628a2aee435776c5e286a8e97d4f3df53/README.md

https://github.com/zigpy/zha-device-handlers

PS: The reason why it works in Zigbee2MQTT is its community has fixed their converter = quirk for it.

Hi,
Like i posted some days ago, it does not work out of the box with ZHA, you have to use a custom quirk. it’s not as dreadful as it sound, you just have to add a file at a certain place in your configuration (How to setup local ZHA quirks).

I just tested the ikea symfonisk volume knob and overall i’m more pleased with it than the tuya device.

If i can just give a piece of advice, you’d better avoid any tuya device. They are a pain. I own a light bulb, a 4 buttons remote, the smart knob and some smart plug. And every time there is a something that is a deal breaker when you use them and make them a waste of your money.
They can be troublesome to install/recognize because you have to use custom quirks, but i saw worse zigbee devices in this aspect.

It’s just that they are workish…
The bulb: Slow as *** but not that big deal if you accept a little delay and it’s the least infuriating device in my book.
The 4 button remotes: Slow, press debounce too long and sometimes the presses are not registred ( not an issue with the communication, but rather with the build quality ). You can live with it, but the miss click are really annoying
The smart knob: Slow and ridiculous debounce time. Making it nearly unusable to smootlhy tune the volume or dim a light
The smart plug: They works just fine, except they randomly turn off, killing the connected equipment without any user input due to what seems to be a firmware problem ( i was not really pleased when i woke up one morning with my nas shut down improperly and my network cabinet shut down too )

Regards

Edit: I forgot that i own tuya humidity/temperature sensor. Those are safe, not the best calibrated temp sensor, but nothing that can’t be offseted with HA.

1 Like

The reason why ZHA Device Handlers (a.k.a. a quirks) are sometimes needed i explained in the ZHA docs here → https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling

Summery in relevant technical layman’s terms;

Most Zigbee devices with Chinese brands are either made by Tuya or Aqara/Xiaomi and both of those manufacturers are infamous for making device firmware for those products that do not strictly follow Zigbee specification standards, in fact, deviating from standard attributes and values (as well as standard Zigbee clusters) will break practically all Zigbee solutions until they implement custom workarounds for each and every individual device that does not follow the standards of the set specifications, and manufacturers keep releasing new devices so to developers of any third-party Zigbee solutions that did not make that non-standard device it is like a never-ending game of playing catch-up in order to implement a new custom workaround for each new such device that is found in the wild.

To make things a little bit easier such workarounds for individual devices in different Zigbee solutions are implemented in the same way so much can be reused via shared device handlers that deal with conversions of non-standard quirks and deviations from the official specification standards set by the Zigbee Alliance.

Therefore each brand new device needs parsing and translation to convert the messages so are presented as virtual device representations that actually do follow the Zigbee specification standards. That is when someone needs to write a custom “quirk” (sometimes also referred to as a “converter”).

Device handlers/converters parse and translate/convert any non-standard Zigbee attribute(s) and value(s) or other deviating quirks into standard Zigbee attribute(s) and value(s) which then the ZHA integration can understand.

By the way, unlike some proprietary Zigbee solutions such as for example Tuya or Aqara/Xiaomi own Zigbee gateways the ZHA integration implementation and its zigpy dependency has been designed to follow the official Zigbee specification standard and therefore all devices that actually do follow the Zigbee specification standard should just work out-of-the-box without the need of any custom device handlers.

PS: Zigbee2MQTT also require Zigbee Device Handlers but they call them " zigbee-herdsman converters":

https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html

https://github.com/Koenkk/zigbee-herdsman-converters/tree/master/

Sorry to resurrect this somewhat-old post, but this is the main result when searching for these knobs within HA, so…

I bought a couple of these, and I’m having a hard time figuring out how to properly configure them in HA. To my understanding, the only way to make physical buttons trigger actions inside HA is to create a bunch of automations, for each one of the triggers, right? (gosh, HA needs to create “automation categories” for us to group those ASAP).

Besides that, most of these triggers don’t have clear meaning, and are disconnected from the events fired as seen in Dev Tools > Events > Listen. Thus, I’ve opened a new GH issue to request some renaming / clarification. Here’s what I could gather about these little knobs: [Device Support Request] Clarify Tuya smart knob (TS004F) automation events · Issue #1808 · zigpy/zha-device-handlers · GitHub