## Device
- Product name: Tuya ZigBee Smart Knob
- Manufacturer: _TZ3000_qj…a6nq5z
- Model identifier: TS004F
- Device type :
- Switch
- Dimmer
## Screenshots
### Basic

### Identify

### Groups

### On/Off

### Color Control
Huge list (50 items)
### Power Configuration

## Comments
I've followed the instractions that appear here https://github.com/dresden-elektronik/deconz-rest-plugin/issues/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