[RELEASE] Tuya Scene Switch TS004F driver (w/ healthStatus)

Mr Kossiev
The only issue with this driver that most of the times it only acts at the second push.
But this is still better than when it doulbed.

Thank You

Hi @zsolt.toth.39 ,
I will need some debug logs which include a period when a key was pushed, but not registered in HE.
Is the device used close to HE hub, or at a good distance that assumes it communicates through one or more repeaters?

dev:15682023-01-26 21:54:43.152info4 button scene button 4 was pushed

dev:15682023-01-26 21:54:43.149debug4 button scene catchall descMap: [raw:catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:04, destinationEndpoint:01, options:0040, messageType:00, dni:5341, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:15682023-01-26 21:54:43.148debug4 button scene description is catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00

dev:15682023-01-26 21:54:35.751debug4 button scene debouncing timer for button 4 expired.

dev:15682023-01-26 21:54:34.756debug4 button scene restarted debouncing timer 1000ms for button 4 (lastButtonNumber=4)

dev:15682023-01-26 21:54:34.725warn4 button scene ignored event for button 4 - still in the debouncing time period!

dev:15682023-01-26 21:54:34.723debug4 button scene catchall descMap: [raw:catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:04, destinationEndpoint:01, options:0040, messageType:00, dni:5341, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:15682023-01-26 21:54:34.721debug4 button scene description is catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00

dev:15682023-01-26 21:54:22.069info4 button scene button 4 was pushed

dev:15682023-01-26 21:54:22.066debug4 button scene catchall descMap: [raw:catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:04, destinationEndpoint:01, options:0040, messageType:00, dni:5341, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:15682023-01-26 21:54:22.064debug4 button scene description is catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00

dev:15682023-01-26 21:54:13.082debug4 button scene debouncing timer for button 4 expired.

dev:15682023-01-26 21:54:12.088debug4 button scene restarted debouncing timer 1000ms for button 4 (lastButtonNumber=4)

dev:15682023-01-26 21:54:12.062warn4 button scene ignored event for button 4 - still in the debouncing time period!

dev:15682023-01-26 21:54:12.059debug4 button scene catchall descMap: [raw:catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:04, destinationEndpoint:01, options:0040, messageType:00, dni:5341, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:15682023-01-26 21:54:12.058debug4 button scene description is catchall: 0104 0006 04 01 0040 00 5341 01 00 0000 FD 00 00

dev:15682023-01-26 21:52:06.589warn4 button scene DID NOT PARSE MESSAGE for description : read attr - raw: 53410100001CDFFF420A000000000C0000000011, dni: 5341, endpoint: 01, cluster: 0000, size: 1C, attrId: FFDF, encoding: 42, command: 0A, value: 0A000000000C0000000011

dev:15682023-01-26 21:52:06.587debug4 button scene raw: descMap: [raw:53410100001CDFFF420A000000000C0000000011, dni:5341, endpoint:01, cluster:0000, size:1C, attrId:FFDF, encoding:42, command:0A, value:, clusterInt:0, attrInt:65503]

dev:15682023-01-26 21:52:06.583debug4 button scene description is read attr - raw: 53410100001CDFFF420A000000000C0000000011, dni: 5341, endpoint: 01, cluster: 0000, size: 1C, attrId: FFDF, encoding: 42, command: 0A, value: 0A000000000C0000000011

dev:15682023-01-26 21:52:06.465debug4 button scene sendEvent [name:battery, value:100, unit:%, descriptionText:battery is 100 %, isStateChange:true, type:physical]

dev:15682023-01-26 21:52:06.463info4 button scene battery is 100 %

dev:15682023-01-26 21:52:06.462debug4 button scene Event enter: [name:battery, value:100.0]

dev:15682023-01-26 21:52:06.458debug4 button scene description is read attr - raw: 534101000110210020C82000201E, dni: 5341, endpoint: 01, cluster: 0001, size: 10, attrId: 0021, encoding: 20, command: 0A, value: C82000201E

dev:15682023-01-26 21:52:06.355warn4 button scene DID NOT PARSE MESSAGE for description : read attr - raw: 53410100001001002042E2FF201C, dni: 5341, endpoint: 01, cluster: 0000, size: 10, attrId: 0001, encoding: 20, command: 0A, value: 42E2FF201C

dev:15682023-01-26 21:52:06.353debug4 button scene raw: descMap: [raw:53410100001001002042E2FF201C, dni:5341, endpoint:01, cluster:0000, size:10, attrId:0001, encoding:20, command:0A, value:42, clusterInt:0, attrInt:1, additionalAttrs:[[value:1C, encoding:20, attrId:FFE2, consumedBytes:4, attrInt:65506]]]

dev:15682023-01-26 21:52:06.348debug4 button scene description is read attr - raw: 53410100001001002042E2FF201C, dni: 5341, endpoint: 01, cluster: 0000, size: 10, attrId: 0001, encoding: 20, command: 0A, value: 42E2FF201C

dev:15682023-01-26 21:52:06.223warn4 button scene DID NOT PARSE MESSAGE for description : read attr - raw: 534101000010010020FFE2FF201C, dni: 5341, endpoint: 01, cluster: 0000, size: 10, attrId: 0001, encoding: 20, command: 0A, value: FFE2FF201C

dev:15682023-01-26 21:52:06.221debug4 button scene raw: descMap: [raw:534101000010010020FFE2FF201C, dni:5341, endpoint:01, cluster:0000, size:10, attrId:0001, encoding:20, command:0A, value:FF, clusterInt:0, attrInt:1, additionalAttrs:[[value:1C, encoding:20, attrId:FFE2, consumedBytes:4, attrInt:65506]]]

dev:15682023-01-26 21:52:06.215debug4 button scene description is read attr - raw: 534101000010010020FFE2FF201C, dni: 5341, endpoint: 01, cluster: 0000, size: 10, attrId: 0001, encoding: 20, command: 0A, value: FFE2FF201C

dev:15682023-01-26 21:52:00.999debug4 button scene received device announcement, Device network ID: 5341

dev:15682023-01-26 21:52:00.995debug4 button scene catchall descMap: [raw:catchall: 0000 0013 00 00 0040 00 5341 00 00 0000 00 00 814153266CA1FEFF72025C80, profileId:0000, clusterId:0013, clusterInt:19, sourceEndpoint:00, destinationEndpoint:00, options:0040, messageType:00, dni:5341, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[81, 41, 53, 26, 6C, A1, FE, FF, 72, 02, 5C, 80]]

dev:15682023-01-26 21:52:00.992debug4 button scene description is catchall: 0000 0013 00 00 0040 00 5341 00 00 0000 00 00 814153266CA1FEFF72025C80

1 Like

This is not good :

May be due to an unstable Zigbee network ... The device disconnects and then re-joins the HE zigbee network.

Leave the debug logs on for 24 hours, then search for the 'announcement' keyword on the device logs page - how many times do you see this message?

1 Like

i dont use repeaters. the ikeas lately became unreachable

Also this problem may be related to the same issue..

Don't you have any mains-powered Zigbee devices? Typically Zigbee plugs/outlets .. ?

Parent child parameters
EzspGetParentChildParametersResponse [childCount=3, parentEui64=0000000000000000, parentNodeId=65535]

Child Data
No information for Child 0
child:[Mijia Button, 6CA9, type:EMBER_SLEEPY_END_DEVICE]
No information for Child 2

Neighbor Table Entry
[Bathroom strip, 096F], LQI:254, age:4, inCost:1, outCost:1
[Desk lamp, 19A3], LQI:253, age:3, inCost:3, outCost:1
[Under bed light, 6E87], LQI:255, age:4, inCost:1, outCost:1
[TV Backlight, 75FD], LQI:253, age:3, inCost:3, outCost:1
[bed light, CE89], LQI:254, age:4, inCost:1, outCost:1

Route Table Entry
status:Active, age:64, routeRecordState:0, concentratorType:None, [TV Backlight, 75FD] via [TV Backlight, 75FD]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Stairs Light, 981B] via [Under bed light, 6E87]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Garden Light Strip, 5247] via [Desk lamp, 19A3]
status:Active, age:64, routeRecordState:0, concentratorType:None, [LUMI Bedroom, A7B4] via [Desk lamp, 19A3]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Hallway light, EE7A] via [bed light, CE89]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Bathroom , AAA5] via [Bathroom strip, 096F]
status:Active, age:64, routeRecordState:0, concentratorType:None, [LUMI illuminance 2, 88D0] via [TV Backlight, 75FD]
status:Active, age:64, routeRecordState:0, concentratorType:None, [LUMI illuminance, 4D30] via [bed light, CE89]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Mijia Humidity, 655B] via [bed light, CE89]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Bedroom motion, DF08] via [bed light, CE89]
status:Unused
all the are working without a hitch

smartthings and swann outlets and gledopto usb lightstrips

1 Like

You have Zigbee bulbs acting as repeaters.

Are these powered on all the time?

What model/make are they (the devices in the 'Neighbor Table Entry' section) ?
Some Zigbee bulbs are known to be very bad repeaters, causing problems for the rest of the Zigbee devices.

EDIT just read your second post - so these are not lights, but outlets ?

bathroom strip - gledopto usb
desk lamp - smarttings outlet
underbed light - tuya usb strip
tv backlight - tuya usb strip
bedlight - swann outlet

and there is one sengled classic bulb , but as far as i know they dont work as repeater

Rest of my lights are on hue hub witch cocohue integration

i removed the ikea usb repeaters the fell off as well . they are not in.

This issue is definitely related to your Zigbee mesh health, so I propose to continue the troubleshooting here : Ikea repeaters not working any more

version 2.6.0 was pushed for update via HPM. It adds the new 'healthStatus' attribute, which can be used to determine whether the device is online or offline to HE hub.

3 Likes

Updated the driver from the developer branch. Noticed i had done that for 2.5.1 already but the driver was never adopted by the scene controller, its still on 2.5.0

Same now for 2.60, is there a way to force the device to start using the new driver?

Kkossev wrote
Important: Due to the Tuya specific initialization that these devices require, these scene switches must be obligatory re-paired to HE hub in order to work properly.

So i need to re-pair it?

Check in the Drivers Code web page if you don’t have multiple instances of the same driver. So you are updating one instance via HPM , but your actual devices are using other instance of the same driver, same driver name. This happened once to me and was a pain to find and fix.

I removed the developer code and double checked the Tuya Scene Controller was installed through HPM. Ugh this thing is a PITA to get to work…

Edit:

  • fingerprint profileId: 0104
  • endpointId: 01
  • application: 43
  • inClusters: 0001,0006,E000,0000
  • manufacturer: _TZ3000_mh9px7cq
  • model: TS0044
  • outClusters: 0019,000A

Seems im slowly making progress

Is this a 4 button scene switch, or a 4 button remote?

Yes, you need to pair it with this driver being automatically selected. Otherwise these will not work, they are one of the most weird Tuya devices.

Whats in a name, is the MoesGo 4 button device
image

Ok, delete it from HE, and pair it again as a new device. Is the TS004F driver selected automatically?

While pairing as a new device, there will appear a link ‘more info’. Please copy everything from this pop up window before you continue with setting up the device name.

2 Likes

@kkossev, Thanks for adding the new "healthStatus" attribute, all working great :smile:
Are you planning to add to all your drivers, including motion sensors?

Tuya Remote Control TS004F

Tuya Scene/Dimmer Switch TS004F

2 Likes