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

MOES Tuya ZigBee Smart Knob #6759

Closed
EduardoHerreraM opened this issue Feb 21, 2023 · 15 comments
Closed

MOES Tuya ZigBee Smart Knob #6759

EduardoHerreraM opened this issue Feb 21, 2023 · 15 comments

Comments

@EduardoHerreraM
Copy link

Device

  • Product name: Tuya ZigBee Smart Knob
  • Manufacturer: _TZ3000_qja6nq5z
  • Model identifier: TS004F
  • Device type :
    • Switch
    • Dimmer

Screenshots

Basic

imagen

Identify

imagen

Groups

imagen

On/Off

imagen

Color Control

Huge list (50 items)

Power Configuration

imagen

Comments

I've followed the instractions that appear here #6031.

I've modified the DDF, the current one is as follows:

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_qja6nq5z",
  "modelid": "TS004F",
  "vendor": "Tuya",
  "product": "Smart Knob",
  "sleeper": true,
  "status": "Gold",
  "path": "/devices/backup/tuya/_TZ3000_qja6nq5z_smart_knob.json",
  "subdevices": [
    {
      "type": "$TYPE_SWITCH",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x1000"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "refresh.interval": 7300,
          "read": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1
          },
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2"
          },
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/angle",
          "default": 0
        },
        {
          "name": "state/bri",
          "refresh.interval": 5,
          "read": {
            "fn": "none"
          },
          "parse": {
            "cl": "0x0008",
            "ep": 1,
            "fn": "zcl",
            "script": "_TZ3000_qja6nq5z_smart_knob_buttons.js"
          }
        },
        {
          "name": "state/buttonevent"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/on",
          "awake": true,
          "refresh.interval": 5,
          "read": {
            "fn": "none"
          },
          "parse": {
            "cl": "0x0006",
            "ep": 1,
            "fn": "zcl",
            "script": "_TZ3000_qja6nq5z_smart_knob_buttons.js"
          }
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0006"
    },
    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0008"
    },
    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0300"
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 300,
          "max": 600,
          "change": "0x00000001"
        }
      ]
    }
  ]
}

I don't have the original DDF as I didn't make a copy (whoops).

The logs shows this kind of logs:

[INFO] - No button map for: TS004F, broadcast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), command: TOGGLE (0x02), payload: None, zclSeq: 34
[INFO] - No button map for: TS004F, broadcast to: 0x0000, endpoint: 0x01, cluster: LEVEL_CONTROL (0x0008), command: STEP (0x02), payload: 010D0100, zclSeq: 35

Buttons mapping:

Mode ? (I don't know how to identify the mode)

  • Single Click -> cluster: ONOFF (0x0006), command: TOGGLE (0x02), payload: None
  • Double Click -> Nothing
  • Rotate Clockwise -> cluster: LEVEL_CONTROL (0x0008), command: STEP (0x02), payload: 000D0100
  • Rotate Counter-Clockwise -> cluster: LEVEL_CONTROL (0x0008), command: STEP (0x02), payload: 01190100
  • Push and Rotate Clockwise ->cluster: COLOR_CONTROL (0x0300), command: STEP_COLOR_TEMPERATURE (0x4C), payload: 01340002009900F401
  • Push and Rotate Counter-Clockwise -> cluster: COLOR_CONTROL (0x0300), command: STEP_COLOR_TEMPERATURE (0x4C), payload: 03560002009900F401

Mode ?

  • Single Click -> cluster: ONOFF (0x0006), command: LIDL (0xFD), payload: 00
  • Double Click -> cluster: ONOFF (0x0006), command: LIDL (0xFD), payload: 01
  • Rotate Clockwise -> cluster: ONOFF (0x0006), command: 0xFC, payload: 00
  • Rotate Counter-Clockwise -> cluster: ONOFF (0x0006), command: 0xFC, payload: 01
  • Push and Rotate Clockwise ->Nothing
  • Push and Rotate Counter-Clockwise -> Noting
@EduardoHerreraM EduardoHerreraM changed the title Device name MOES Tuya ZigBee Smart Knob Feb 21, 2023
@BabaIsYou
Copy link
Contributor

@EduardoHerreraM
Copy link
Author

I imagine that _TZ3000_qja6nq5z_smart_knob_buttons.js is the same than https://github.com/manup/deconz-rest-plugin/blob/2563c6666e0ebca11359942e506eebc4c130cc1c/devices/tuya/_TZ3000_4fjiwweb_smart_knob_buttons.js ?

Yes!! Sorry I didn't clarify that. Is the same, but renamed

@EduardoHerreraM
Copy link
Author

I tried using this DDF, still no luck:

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_qja6nq5z",
  "modelid": "TS004F",
  "product": "TS004F",
  "sleeper": false,
  "status": "Gold",
  "path": "/devices/tuya/_TZ3000_qja6nq5z_smart_knob.json",
  "subdevices": [
    {
      "type": "$TYPE_SWITCH",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x1000"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "default": 0
        },
        {
          "name": "config/group",
          "default": "auto"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/buttonevent",
          "description": "The last received button event."
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0006"
    },
    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0008"
    },
    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0300"
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 300,
          "max": 600,
          "change": "0x00000001"
        }
      ]
    }
  ]
}

Also added the following button_maps.json

{
	"buttons": {
        "S_BUTTON_1": 1000,
        "S_BUTTON_2": 2000,
        "S_BUTTON_3": 3000,
        "S_BUTTON_4": 4000,
        "S_BUTTON_5": 5000,
        "S_BUTTON_6": 6000,
        "S_BUTTON_7": 7000,
        "S_BUTTON_8": 8000,
        "S_BUTTON_9": 9000,
        "S_BUTTON_10": 10000,
        "S_BUTTON_11": 11000,
        "S_BUTTON_12": 12000,
        "S_BUTTON_13": 13000,
        "S_BUTTON_14": 14000,
        "S_BUTTON_15": 15000,
        "S_BUTTON_16": 16000,
        "S_BUTTON_17": 17000,
        "S_BUTTON_18": 18000,
        "S_BUTTON_19": 19000,
        "S_BUTTON_20": 20000,
        "S_BUTTON_21": 21000,
        "S_BUTTON_22": 22000,
        "S_BUTTON_23": 23000,
        "S_BUTTON_24": 24000,
        "S_BUTTON_25": 25000,
        "S_BUTTON_26": 26000,
        "S_BUTTON_27": 27000
	},
	"buttonActions": {
        "S_BUTTON_ACTION_INITIAL_PRESS": 0,
        "S_BUTTON_ACTION_HOLD": 1,
        "S_BUTTON_ACTION_SHORT_RELEASED": 2,
        "S_BUTTON_ACTION_LONG_RELEASED": 3,
        "S_BUTTON_ACTION_DOUBLE_PRESS": 4,
        "S_BUTTON_ACTION_TREBLE_PRESS": 5,
        "S_BUTTON_ACTION_QUADRUPLE_PRESS": 6,
        "S_BUTTON_ACTION_SHAKE": 7,
        "S_BUTTON_ACTION_DROP": 8,
        "S_BUTTON_ACTION_TILT": 9,
        "S_BUTTON_ACTION_MANY_PRESS": 10,
        "S_BUTTON_ACTION_ROTATE_CLOCKWISE": 30,
        "S_BUTTON_ACTION_ROTATE_COUNTER_CLOCKWISE": 31
	},
	"clusters": {
        "BASIC": 0,
        "SCENES": 5,
        "ONOFF": 6,
        "LEVEL_CONTROL": 8,
        "MULTISTATE_INPUT": 18,
        "DOOR_LOCK": 257,
        "WINDOW_COVERING": 258,
        "COLOR_CONTROL": 768,
        "IAS_ZONE": 1280,
        "IAS_ACE": 1281,
        "SENGLED": 64528,
        "XIAOMI": 64704,
        "ADUROLIGHT": 64716,
        "XIAOYAN": 64716
	},
	"commands": {
        "DOOR_LOCK": {
            "ATTRIBUTE_REPORT": 10
        },
        "SCENES": {
            "ADD_SCENE": 0,
            "VIEW_SCENE": 1,
            "REMOVE_SCENE": 2,
            "STORE_SCENE": 4,
            "RECALL_SCENE": 5,
            "IKEA_STEP_CT": 7,
            "IKEA_MOVE_CT": 8,
            "IKEA_STOP_CT": 9
        },
        "ONOFF": {
            "ATTRIBUTE_REPORT": 10,
            "OFF": 0,
            "ON": 1,
            "TOGGLE": 2,
            "OFF_WITH_EFFECT": 64,
            "ON_WITH_TIMED_OFF": 66,
            "LIDL": 253
        },
        "LEVEL_CONTROL": {
            "MOVE_TO_LEVEL": 0,
            "MOVE": 1,
            "STEP": 2,
            "STOP": 3,
            "MOVE_TO_LEVEL_WITH_ON_OFF": 4,
            "MOVE_WITH_ON_OFF": 5,
            "STEP_WITH_ON_OFF": 6,
            "STOP_WITH_ON_OFF": 7
        },
        "WINDOW_COVERING": {
            "OPEN": 0,
            "CLOSE": 1,
            "STOP": 2,
            "GOTO_LIFT_PCT": 5,
            "GOTO_TILT_PCT": 8
        },
        "COLOR_CONTROL": {
            "MOVE_HUE": 1,
            "STEP_HUE": 2,
            "MOVE_TO_SATURATION": 3,
            "MOVE_TO_COLOR": 7,
            "MOVE_TO_COLOR_TEMPERATURE": 10,
            "STOP_MOVE_STEP": 71,
            "MOVE_COLOR_TEMPERATURE": 75,
            "STEP_COLOR_TEMPERATURE": 76
        },
        "IAS_ACE": {
            "ARM": 0,
            "EMERGENCY": 2,
            "STATUS_CHANGE": 0
        },
        "IAS_ZONE": {
            "STATUS_CHANGE": 0
        },
        "MULTISTATE_INPUT": {
            "ATTRIBUTE_REPORT": 10
        },
        "SENGLED": {
            "COMMAND_0": 0
        },
        "XIAOMI": {
            "ATTRIBUTE_REPORT": 10
        },
        "ADUROLIGHT": {
            "COMMAND_0": 0
        },
        "XIAOYAN": {
            "COMMAND_0": 0,
            "ATTRIBUTE_REPORT": 10,
            "COMMAND_20": 20
        }
	},
	"maps": {
        "TuyaSmartKnob": {
            "vendor": "Tuya",
            "doc": "Smart Knob",
            "modelids": ["_TZ3000_qja6nq5z"],
            "map": [
                [1, "0x01", "ONOFF", "TOGGLE", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "Toggle"],
                [1, "0x01", "ONOFF", "0xfd", "0", "S_BUTTON_1", "S_BUTTON_ACTION_DOUBLE_PRESS", "Double"],
                [1, "0x01", "LEVEL_CONTROL", "STEP", "0", "S_BUTTON_2", "S_BUTTON_ACTION_SHORT_RELEASED", "Level Clockwise"],
                [1, "0x01", "LEVEL_CONTROL", "STEP", "1", "S_BUTTON_3", "S_BUTTON_ACTION_SHORT_RELEASED", "Level Anticlockwise"],
                [1, "0x01", "COLOR_CONTROL", "STEP_COLOR_TEMPERATURE", "1", "S_BUTTON_4", "S_BUTTON_ACTION_SHORT_RELEASED", "Color Clockwise"],
                [1, "0x01", "COLOR_CONTROL", "STEP_COLOR_TEMPERATURE", "3", "S_BUTTON_5", "S_BUTTON_ACTION_SHORT_RELEASED", "Color Anticlockwise"]
            ]
        }
    }
}

Events are shown in HA as stated in #6031, but not really usefull, I don't know how to take advante of those events.

@github-actions
Copy link

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Mar 26, 2023
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

@github-actions github-actions bot closed this as completed Apr 3, 2023
@harrydaws
Copy link

hi i just bought this and have the same problem. have you managed to figure it out?

@EduardoHerreraM
Copy link
Author

hi i just bought this and have the same problem. have you managed to figure it out?

Stoped using deconz. I'm using zigbee2mqtt instead :)

@harrydaws
Copy link

do you recommend switching and how long did it take you

@spudje
Copy link

spudje commented Jul 24, 2023

Would love to see this thing natively supported as well. Deconz is starting to lag behind to other Zigbee stacks. Not really looking forward to migrate to something else, with the amount of devices I have.

@LukeDefeo
Copy link

I just added this device and I don't see any events coming through in deconz_events in home assistant

@coyote9999
Copy link

I'm also starting to wonder why Deconz doesn't support such great devices as this Knob, and also why there is no response to device requests

@Mimiix
Copy link
Collaborator

Mimiix commented Dec 15, 2023

I'm also starting to wonder why Deconz doesn't support such great devices as this Knob, and also why there is no response to device requests

Because those are done by volunteers :)

Happy to re open. Perhaps @Smanar wants to help out?

@Mimiix Mimiix reopened this Dec 15, 2023
@Smanar
Copy link
Collaborator

Smanar commented Dec 15, 2023

It seem the DDF is partially working #6759 (comment)

There is a similar one here #6242

@github-actions github-actions bot removed the stale label Dec 16, 2023
Copy link

github-actions bot commented Jan 7, 2024

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Jan 7, 2024
Copy link

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

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

No branches or pull requests

8 participants