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

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

Kudos to @kkossev. He made this work in a heartbeat! :muscle:t3::facepunch:t3:

For those running into issues with combinations of drivers installed in the custom section and through HPM a few things i learned;

  • remove drivers from the custom drivers section that are outdated or unused.
  • if HPM throws an error while updating a driver, just use the repair function (this was toooo obvious, but i missed it / did not try until pointed to it.
  • when removing a zigbee device, do so while the device is in exclusion mode if you know how to do that. Trust me, it makes your life easier by not having to do strange factory reset procedures :stuck_out_tongue_winking_eye:
1 Like

First, let me say THANK YOU for writing this Driver. The Tuya devices are very afforable, and I'm really looking forward to seeing how well they do!

I got the XUELILI version of the 4 button switch. I added the driver from the Hubitat Package manager, and it paired right out of the gate. It seems to have identified as a TS0044:

  • endpointId: 01
  • application: 42
  • manufacturer: _TZ3000_wkai4ga5
  • model: TS0044

Where it gets interesting is that it is reporting as a 3 button switch, but, as you can see from the current state, the driver does recognize button 4:

Current States

  • battery : 100
  • doubleTapped : 4
  • healthStatus : online
  • held : 4
  • numberOfButtons : 3
  • presence : present
  • pushed : 4
  • released : 1
  • voltage : 3.06

Is there some way to edit the "numberOfButtons" variable to change it to "4"? It looks like I can use this in Rule Machine, and Basic rules with no problem, but the Button Controller app won't let me set up actions for button 4 because it thinks it only has 3 buttons...

Hi @dvdptr1 ,

Please update to the latest version 2.6.1 (you can use the Import button within HE Drivers Code editor). Then click on the Configure button, and let e know if the numberOfButtons changes to 4
I have added some extra logging in this version.

And it may be a good idea to add in a future version a Preference for overwriting the automatic detection logic for the number of buttons. This will be useful, especially for new models, which fingerprints are not included in the driver.

Looks like that did the trick!

Current States

  • battery : 100
  • batteryVoltage : 3.0
  • doubleTapped : 4
  • healthStatus : online
  • held : 4
  • numberOfButtons : 4 <<<<<=========
  • pushed : 4
  • supportedButtonValues : ["pushed","double","held"]

Button Controller built in app now lets me add the 4th button too....

And as for having an option to override, with as many versions of these scene buttons are out there, and override might be a good idea... :slight_smile:

Thank you so much @kkossev !

I have a couple of these and they work well with the right driver. You basically get single press and double press events (long press is not useful) for each of the four buttons, so 8 unique events.

But if you use it with the button controller software you can use each click to cycle through a group of settings such as fan speed or bulb color and get a lot out of a single controller.

I would recommend.

3 Likes

Has anyone noticed that all 4 lights flash when it checks in/reports battery status?

I saw it flash and then looked at the log. It just showed this:

dev:17132023-02-05 04:06:47.238 PMinfoAV Control Pad battery is 100 %

dev:17132023-02-05 04:06:47.229 PMdebugAV Control Pad Event enter: [name:battery, value:100.0]

dev:17132023-02-05 04:06:47.225 PMdebugAV Control Pad description is read attr - raw: A02801000110210020C82000201E, dni: A028, endpoint: 01, cluster: 0001, size: 10, attrId: 0021, encoding: 20, command: 0A, value: C82000201E

dev:17132023-02-05 04:06:47.119 PMwarnAV Control Pad DID NOT PARSE MESSAGE for description : read attr - raw: A0280100001801002042E2FF201FE4FF2001, dni: A028, endpoint: 01, cluster: 0000, size: 18, attrId: 0001, encoding: 20, command: 0A, value: 42E2FF201FE4FF2001

dev:17132023-02-05 04:06:47.116 PMdebugAV Control Pad raw: descMap: [raw:A0280100001801002042E2FF201FE4FF2001, dni:A028, endpoint:01, cluster:0000, size:18, attrId:0001, encoding:20, command:0A, value:42, clusterInt:0, attrInt:1, additionalAttrs:[[value:1F, encoding:20, attrId:FFE2, consumedBytes:4, attrInt:65506], [value:01, encoding:20, attrId:FFE4, consumedBytes:4, attrInt:65508]]]

dev:17132023-02-05 04:06:47.110 PMdebugAV Control Pad description is read attr - raw: A0280100001801002042E2FF201FE4FF2001, dni: A028, endpoint: 01, cluster: 0000, size: 18, attrId: 0001, encoding: 20, command: 0A, value: 42E2FF201FE4FF2001

dev:17132023-02-05 04:06:41.968 PMdebugAV Control Pad received device announcement, Device network ID: A028

dev:17132023-02-05 04:06:41.965 PMdebugAV Control Pad catchall descMap: [raw:catchall: 0000 0013 00 00 0040 00 A028 00 00 0000 00 00 8128A0572B8DFEFF27FD8480, profileId:0000, clusterId:0013, clusterInt:19, sourceEndpoint:00, destinationEndpoint:00, options:0040, messageType:00, dni:A028, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[81, 28, A0, 57, 2B, 8D, FE, FF, 27, FD, 84, 80]]

dev:17132023-02-05 04:06:41.961 PMdebugAV Control Pad description is catchall: 0000 0013 00 00 0040 00 A028 00 00 0000 00 00 8128A0572B8DFEFF27FD8480

It's not a big deal, but, as it sits on a table next to the sofa, I'll notice the light flash out of the corner of my eye...

Based on the logs, it reports battery ever 12 minutes... at least when there is no other activity...

Hi @dvdptr1 ,

Your device LEDs are blinking. because it rejoins the HE Zigbee network periodically, which is not good...

For how long time you are using the device paired to HE? ( please post the manufacturer/model from the 'Data' section so that I can identify it). You can search the Past Logs page for "received device announcement" log message. How often you see it?