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

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

Hi Gary, sorry I missed replying to you.
I used the powerSource attribute as an indicator of the online/offline status of the battery-powered devices, before the time when I started to use the "Health Status" capability and the healthCheck attribute for this purpose. Now it is obsolete, but I keep it for backward compatibility with the previous drivers versions.

Has your TS0044 device started to report the battery percentage later?

Not yet, but im not sure i have the most up to date driver. Ill let yiu know later.

In the latest versions, the power cluster is not bound explicitly to the hub, and the battery level reporting is not explicitly configured also, because it is 99% sure for me this was the reason for some Tuya remotes rebooting itself periodically and draining the battery. There were at least 2 such reports here, and I have found later the same symptoms described in Z2M forum. All my TS004F and TS0044 devices report the battery percentage remaining each 4 hours, without the need to configure the reporting period. But other models/manufacturers may behave differently.

If the battery percentage (or battery voltage) is not reported automatically after pairing the device again to HE, the battery reporting interval can be configured manually :

The device must be paired again to HE after changing the battery reporting interval - I will add this as an additional instruction in the next driver version.

P.S.
Great work on Tasmota Sync - Universal Multi Sensor driver, hope I will use it very soon with an Athom smart plug!

As I noted here Request adding fingerprints for iAlarm/Meian devices - #2 by jlv, I have this SOS button. It has Model TS0215A and manufacturer _TZ3000_pkfazisv. I installed this driver and paired the device. The fingerprint matched and this driver was assigned... but it doesn't work. No button events are every reported.

The device comes up with 4 buttons. When I click Configure, I get this in the logs:

I see in the code where this is generated. There is no path in the code for model == "TS0215A". So I added this to avoid the error:

    else if (device.getDataValue("model") == "TS0215A") {
    	numberOfButtons = 1
        supportedValues = ["pushed"]
    }

It still doesn't report any events, and I see nothing else in the logs when I press the button.

Suggestions on how I can proceed?

1 Like

Have you paired the SOS button again to HE (after assigning this driver) ?

1 Like

I thought I had. But I just did again, and the device started working. THANK YOU.

1 Like