I got the TS004F model working for all 4 buttons each with short press, double press and long press working with some small edits to the TS0044’s XML file (OH-INF\thing\tuya\ts0044.xml) and by mapping tuya_ts0044,modelId=TS004F in discovery.txt. I just edited the org.openhab.binding.zigbee-3.4.0-SNAPSHOT.jar file using 7-zip for now - will try to get proper changes into GitHub soon.
The edits to ts0044.xml are setting the button1-4 endpoints all to be 1 (rather than 1-4) which I’m not sure is a weird solution or not because this is my first encounter with Zigbee bindings - I suspect maybe the device configuration is a bit odd - I’ll put the node and fingerprint diagnostics below. To me it looks like all the button events are being sent to output clusters defined on endpoints 1-4 depending on which button is pressed which may be the opposite to how it was done with TS0044.
I read some posts about TS004F saying you needed to use a Tuya Zigbee gateway and the Smart Life app to switch it from dimmer mode to scene mode but you can just hold top right and bottom right buttons for about 10 seconds to switch modes. I think (but am not sure) the sequence of getting it into the right mode was:
- Stop openHAB (I am using 3.4.0-SNAPSHOT).
- Make edits below to discovery.txt and OH-INF\thing\tuya\ts0044.xml on org.openhab.binding.zigbee-3.4.0-SNAPSHOT.jar using 7-zip and put it in the OPENHAB addons folder.
- Start openHAB.
- Hold bottom left button for about 10 secs to put device in pairing mode.
- Start Zigbee pairing.
- If it comes up as “Unknown Zigbee…” or similar stop pairing and press buttons if device did not automatically come out of pairing mode when you stopped the scan. Start pairing again and it should come up as something similar to “_TZ3000_xabckq1v…”. Wait a few mins and occasionally press buttons to keep device awake until it comes into ONLINE state and then wait maybe 5 mins to be on the safe side.
- Press and hold the top right and bottom right buttons for about 10 seconds to switch to scene mode (dimmer is supposed to be default).
- Press the buttons and look for entries similar to the following in OPENHAB/userdata/logs/events.log file:
2022-10-27 22:45:27.121 [INFO ] [openhab.event.ChannelTriggeredEvent ] - zigbee:tuya_ts0044:f8e02ab2a8:5c0272fffe24a55b:button2 triggered SHORT_PRESSED
2022-10-27 22:45:44.964 [INFO ] [openhab.event.ChannelTriggeredEvent ] - zigbee:tuya_ts0044:f8e02ab2a8:5c0272fffe24a55b:button1 triggered DOUBLE_PRESSED
2022-10-27 22:46:26.720 [INFO ] [openhab.event.ChannelTriggeredEvent ] - zigbee:tuya_ts0044:f8e02ab2a8:5c0272fffe24a55b:button3 triggered LONG_PRESSED
If you don’t see them switch the mode by holding the buttons and try again. I removed the device and restarted OpenHAB a few times while experimenting - not sure if that was necessary or not but worth a try if you don’t see anything in the events.log.
Changes OH-INF\thing\tuya\ts0044.xml (just set from 2-4 to 1 in buttons1-4):
<channel id="button1" typeId="tuya_button">
<label>Button 1</label>
<properties>
<property name="zigbee_endpoint">1</property>
</properties>
</channel>
<channel id="button2" typeId="tuya_button">
<label>Button 2</label>
<properties>
<property name="zigbee_endpoint">1</property>
</properties>
</channel>
<channel id="button3" typeId="tuya_button">
<label>Button 3</label>
<properties>
<property name="zigbee_endpoint">1</property>
</properties>
</channel>
<channel id="button4" typeId="tuya_button">
<label>Button 4</label>
<properties>
<property name="zigbee_endpoint">1</property>
</properties>
</channel>
Add this to the end of discovery.txt:
tuya_ts0044,modelId=TS004F
Zigbee nodes output:
openhab> zigbee nodes
Network Addr IEEE Address Logical Type State EP Profile Device Type Manufacturer Model
46141 B43D 60A423FFFE952209 END_DEVICE ONLINE 1 ZIGBEE_HOME_AUTOMATION DIMMER_SWITCH _TZ3000_xabckq1v TS004F
2 ZIGBEE_HOME_AUTOMATION ON_OFF_SWITCH
3 ZIGBEE_HOME_AUTOMATION ON_OFF_SWITCH
4 ZIGBEE_HOME_AUTOMATION ON_OFF_SWITCH
Zigbee fingerprint output:
openhab> zigbee fingerprint 46141
|>| Node Descriptor
| |> Logical Type END_DEVICE
| |> MAC Capabilities [REDUCED_FUNCTION_DEVICE]
| |> Stack Compliance 22
| |> Server Capabilities []
| |> Buffer Size 82
| |> Incoming Transfer Size 82
| |> Outgoing Transfer Size 82
|
|>| Power Descriptor
| |> Available Power Sources [MAINS]
| |> Current Power Source MAINS
| |> Current Power Mode RECEIVER_ON_IDLE
| |> Power Level FULL
|
|>| ZDO
| |> ManagementBindRequest TIMEOUT
| |> IeeeAddressRequest SUCCESS
| |> ManagementLqiRequest TIMEOUT
| |> ManagementRoutingRequest TIMEOUT
|
|>| Basic Information
| |> Generic Device Class
| |> Generic Device Type
| |> Manufacturer Name
| |> Model Indentifier
| |> Product Code
| |> Product URL
| |> Date Code
| |> Application Version
| |> Software Build ID
| |> Hardware Version
| |> Zcl Version
| |> Stack Version
| |
| |>| Endpoint 1
| | |> Profile 0104 ZIGBEE_HOME_AUTOMATION
| | |> Device Type 0104 DIMMER_SWITCH
| | |> Device Version 1
| | |
| | |>| Input Clusters
| | | |
| | | |>| Cluster 0000 Basic
| | | | |> Type Server [Input]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
| | | |
| | | |>| Cluster 0001 Power Configuration
| | | | |> Type Server [Input]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0003 Identify
| | | | |> Type Server [Input]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0004 Groups
| | | | |> Type Server [Input]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0006 On/Off
| | | | |> Type Server [Input]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
| | | |
| | | |>| Cluster 1000
| | | | |> Type Server [Input]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | |
| | |>| Output Clusters
| | | |
| | | |>| Cluster 0003 Identify
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0004 Groups
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0005 Scenes
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0006 On/Off
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FATAL_ERROR
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
| | | |
| | | |>| Cluster 0008 Level Control
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
| | | |
| | | |>| Cluster 000A Time
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0019 Ota Upgrade
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
| | | |
| | | |>| Cluster 1000
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |> Unsupported locally
| |
| |>| Endpoint 2
| | |> Profile 0104 ZIGBEE_HOME_AUTOMATION
| | |> Device Type 0000 ON_OFF_SWITCH
| | |> Device Version 0
| | |
| | |>| Input Clusters
| | |
| | |>| Output Clusters
| | | |
| | | |>| Cluster 0006 On/Off
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
| |
| |>| Endpoint 3
| | |> Profile 0104 ZIGBEE_HOME_AUTOMATION
| | |> Device Type 0000 ON_OFF_SWITCH
| | |> Device Version 0
| | |
| | |>| Input Clusters
| | |
| | |>| Output Clusters
| | | |
| | | |>| Cluster 0006 On/Off
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
| |
| |>| Endpoint 4
| | |> Profile 0104 ZIGBEE_HOME_AUTOMATION
| | |> Device Type 0000 ON_OFF_SWITCH
| | |> Device Version 0
| | |
| | |>| Input Clusters
| | |
| | |>| Output Clusters
| | | |
| | | |>| Cluster 0006 On/Off
| | | | |> Type Client [Output]
| | | | |> Manufacturer Spec. No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> FAILURE
| | | | |
| | | | |>| Attribute Values
| | | | | |> FAILURE
Logging that gave me some clues (this was from after edit discovery.txt but before editing ts0044.xml):
Top Left
Short Press:
2022-10-27 21:00:02.871 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=104, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/1, cluster=0006, TID=6F, commandIdentifier=253, statusCode=SUCCESS]]
Double Press:
2022-10-27 21:00:44.982 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=103, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/1, cluster=0006, TID=70, commandIdentifier=253, statusCode=SUCCESS]]
Long Press:
2022-10-27 21:01:48.321 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=106, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/1, cluster=0006, TID=71, commandIdentifier=253, statusCode=SUCCESS]]
Top Right
Short Press:
2022-10-27 20:40:54.044 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Incoming message from node B43D did not translate to command
2022-10-27 20:40:54.149 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=106, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/2, cluster=0006, TID=5E, commandIdentifier=253, statusCode=FAILURE]]
Double Press:
2022-10-27 20:43:58.514 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=106, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/2, cluster=0006, TID=64, commandIdentifier=253, statusCode=FAILURE]]
Long Press
2022-10-27 20:45:03.054 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=107, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/2, cluster=0006, TID=65, commandIdentifier=253, statusCode=FAILURE]]
Bottom Left
Short Press:
2022-10-27 20:48:37.326 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=102, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/3, cluster=0006, TID=66, commandIdentifier=253, statusCode=FAILURE]]
Double Press:
2022-10-27 20:49:40.959 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=105, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/3, cluster=0006, TID=68, commandIdentifier=253, statusCode=FAILURE]]
Long Press:
2022-10-27 20:51:44.129 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=105, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/3, cluster=0006, TID=6A, commandIdentifier=253, statusCode=FAILURE]]
Bottom Right
Short Press:
2022-10-27 20:53:15.510 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=106, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/4, cluster=0006, TID=6B, commandIdentifier=253, statusCode=FAILURE]]
Double Press:
2022-10-27 20:55:47.142 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=108, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/4, cluster=0006, TID=6D, commandIdentifier=253, statusCode=FAILURE]]
Long Press:
2022-10-27 20:57:18.965 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=60A423FFFE952209 queueTime=107, state=COMPLETE, sendCnt=1, command=DefaultResponse [On/Off: 0000/0 → B43D/4, cluster=0006, TID=6E, commandIdentifier=253, statusCode=FAILURE]]