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

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?

I connected the 3-gang button to HE.
It works very well.


Device pairing info

Manufacturer: _TYZB02_key8kk7r
Endpoint 01 application: 44
Endpoint 01 endpointId: 01
Endpoint 01 idAsInt: 1
Endpoint 01 inClusters: 0000,0001,0006
Endpoint 01 initialized: true
Endpoint 01 manufacturer: _TYZB02_key8kk7r
Endpoint 01 model: TS0043
Endpoint 01 outClusters: 0019
Endpoint 01 profileId: 0104
Endpoint 01 stage: 4
Endpoint 02 endpointId: 02
Endpoint 02 idAsInt: 2
Endpoint 02 inClusters: 0000,0001,0006
Endpoint 02 initialized: true
Endpoint 02 outClusters: 0019
Endpoint 02 profileId: 0104
Endpoint 02 stage: 4
Endpoint 03 endpointId: 03
Endpoint 03 idAsInt: 3
Endpoint 03 inClusters: 0000,0001,0006
Endpoint 03 initialized: true
Endpoint 03 outClusters: 0019
Endpoint 03 profileId: 0104
Endpoint 03 stage: 4
![photo_2023-02-07_19-40-42 666x500](upload://fHUGxHAZBMVtKyNjcb0SwwZLKbw.jpeg)
Summary

dev:6052023-02-15 02:30:31.532info3G Button button 3 was pushed

dev:6052023-02-15 02:30:31.529debug3G Button catchall descMap: [raw:catchall: 0104 0006 03 01 0040 00 14AD 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:03, destinationEndpoint:01, options:0040, messageType:00, dni:14AD, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:6052023-02-15 02:30:31.528debug3G Button description is catchall: 0104 0006 03 01 0040 00 14AD 01 00 0000 FD 00 00

dev:6052023-02-15 02:30:30.931info3G Button button 2 was pushed

dev:6052023-02-15 02:30:30.928debug3G Button catchall descMap: [raw:catchall: 0104 0006 02 01 0040 00 14AD 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:14AD, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:6052023-02-15 02:30:30.926debug3G Button description is catchall: 0104 0006 02 01 0040 00 14AD 01 00 0000 FD 00 00

dev:6052023-02-15 02:30:24.309info3G Button button 1 was pushed

dev:6052023-02-15 02:30:24.305debug3G Button catchall descMap: [raw:catchall: 0104 0006 01 01 0040 00 14AD 01 00 0000 FD 00 00, profileId:0104, clusterId:0006, clusterInt:6, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:14AD, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:FD, direction:00, data:[00]]

dev:6052023-02-15 02:30:24.303debug3G Button description is catchall: 0104 0006 01 01 0040 00 14AD 01 00 0000 FD 00 00

dev:6052023-02-15 02:30:11.003debug3G Button updated()

dev:6052023-02-15 02:29:47.365infoTuya Scene Switch TS004F batteryVoltage is 0.0 V

Show more...

1 Like

Hi All,
One of my Tuya Scene/Dimmer Switch TS004F button controllers is eating through batteries.
I purchased new Duracell CR/DL2430 coin batteries, used one on 1st March 23 and just after only 9 days, the new battery which measured 3.2volts is now dead (measuring around 2.89volts!).
The button controller basically flashes all buttons simultaneously when it deems the battery to be low. Anyone has any advice or experienced a similar issue?

This is a second report for a problem with the batteries. Flashing all LEDs means that the device re-joins the Zigbee network. Most probably this depletes the batteries…

I have an idea what of the latest updates of the driver may be the reason for this (the battery reporting configuration most likely), but today I don’t have access to a PC. Will prepare an update on Saturday.

The strange thing is that this problem affects only few of the TS004F model manufacturers, not all.

What are the manufacturer IDs of the TS004F that work fine and what is the manufacturer of the one which has problems with the batteries?

1 Like

Thanks for your reply and update.
It seems that all my button controller's have the same manufacturer ID, but only the currently offline device seems to be rapidly depleting the batteries.
I initially thought it was because I used a lower capacity battery, CR2032, then I bought the expensive and correct battery, CR2450, but it died in 9 days.
Also, not sure if it makes any difference, but I bought the devices from different suppliers; one from Amazon UK, and two from two different sellers at Aliexpress.

Also, could you please explain why some battery % is shown in green and some in black?
Thanks

For further clarity on the above. I forgot to mention that "all LEDs flash continuously" when the battery is deemed low.
Battery replacement dates:

  • Bathroom button controller batteries replaced on 24/02/23 - new CR2430 @3.2v, now measuring 2.91v after 15 days, not good.
  • Bedroom 3 button controller - died on 09/03/23 @2.89v, new CR2430 @3.2v installed on 01/03/2023, died after 9 days.
  • Living Room controller - most likely this is the one I purchased from Amazon UK, XUELILI brand, on 13/08/22, used smaller CR2032 batteries and seems to be still okay, battery currently measures at 3.0v!
    EDIT: I measured the above voltages using a multimeter, but software values seems okay.
Living room controller

image

Bathroom controller

image

1 Like

I will add statistics counters for the number of the Zigbee re-join messages, it will give us a clue what could be wrong.
Normally, a device should rejoin the Zigbee network only when the batteries are changed, or when the hub is switched off for longer time… probably.

2 Likes

@iEnam please update the driver (Import button from the HE driver editor) to version 2.6.3, 2023/03/11 8:17 PM.

I have added now 'Advanced Options' and a new preference 'Battery Reporting Interval'

Please make sure it is set to Default, and then repair the problematic scene switches again to HE. Don't delete the existing devices from HE, just pair them again. It may be a good idea to remove the battery for 1-2 minutes before the new pairing.

In the States Variables section (press F5 to refresh) there is a new reJoinCtr in the stats variable. This counter is increased every time the device falls off and rejoins again the HE zigbee network. In normal operations, this counter should stay as it is.

@dvdptr1 your device may be suffering from the same problem.

Update: this fix is not related in any way to the currently reported and discussed C-7/C-8 Zigbee devices rejoin issues. It is a very specific Tuya issue with some particular devices behaving weirdly when the Power cluster 0x0001 is bound and the battery percentage remaining reporting period is configured.

1 Like

Thank you for the quick update.
I have updated as per your instructions (re-paired twice, re-installed a new CR2032 battery earlier today @3.295v, currently measures @2.950v).

re-pairing

Current rejoin counter

bedroom 3 button details


1 Like

Also, please see below the current states for the two other devices.
(NB: I have not made any changes to these devices).

Bathroom button

Living room button - note: not sure why some stats are missing and this button had no issues

1 Like

Good morning,
Just checked the stats; no change for bedroom 3 and Living room, but interesting results for bathroom...

No change in stats


Bathroom - rejoined network 65 times!


1 Like

So the bathroom device obviously has problems..
Please pair it again to HE hub (without deleting it).

We will monitor it, the rejoinCtr should stop increasing.

1 Like

Thanks for your help.
I re-paired the bathroom device 8 hours ago and the rejoinCtr counter has stopped increasing :smile:
Could you please confirm what the default battery report interval is?

Bathroom device

Also, I re-paired the living room device and rejoinCtr counter increased by 1 :smile::

Living room device

Summary

Hi, I just updated the driver to the latest version and my attributes look like this.
image

Is that the expected display? powerSource : battery seems like an unexpected value for a handheld remote. I was rather expecting a battery percentage.

For reference I have the Moes TS0044F

But the driver itself is working great so not a big deal. Just looking for the cherry on top.

This is what mine shows. Yours pretty close minus health info. Then again, I never checked if mine is correct or not.

Web capture_20-3-2023_73634_192.168.1.51

The first post of this thread was updated with some more pictures and links to new models and types of Zigbee button controllers (mostly Tuya, but not only), that were added to his driver in the last months.

1 Like