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

Hi @kkossev

I have the follow Scene buttons (The 3 one)
image

  • endpointId: 01
  • application: 41
  • inClusters: 0006,0001,0006,0000
  • manufacturer: _TZ3000_famkxci2
  • model: TS0043
  • outClusters: 0019,000A
  • softwareBuild:
  • tuyaVersion: 1.0.1

State Variables

  • stats : {rxCtr=99, txCtr=0, rejoinCtr=2}
  • driverVersion : 2.7.2 2024/05/06 11:24 PM
  • lastButtonNumber : 2
  • notPresentCounter : 5
  • comment : Works with Tuya TS004F TS0041 TS0042 TS0043 TS0044 TS0046 TS0601, icasa, Konke, Sonoff

Looking at the

Current States

  • healthStatus : offline
  • numberOfButtons : 3
  • powerSource : battery
  • pushed : 2
  • released : 1
  • supportedButtonValues : ["pushed","double","held"]

I don't see any State reporting the Battery %. Is this possible to add?

Thanks for the great work you do.

Was this driver selected automatically when you paired the scene button for the first time?
The battery percentage remaining should be reported....

I first loaded the drivers via HPM and then paired the buttons. The drivers were automatically picked up during the pairing process. Is there something I should try to get the battery percentage to appear?

Edit
I also noticed that the healthStatus shows offline, but both buttons are working fine.

Edit 2

Additionally, I noticed this:

Shouldn't it say TS0043? I can't seem to find a way to change this like in some of your other drivers that offer a picklist.

Shouldn't it say TS0043? I can't seem to find a way to change this like in some of your other drivers that offer a picklist.

Edit 3

I paired again using the existing device and the states did update but no battery % per say.

image

1 Like

Strangely, this device is reporting the battery voltage (2.9 Volts) instead of the battery percentage remaining.

Enable the 'Advanced Options' and then configure the Battery Reporting interval :

Click on the 'Save Preferences' at the same time when you press one of the buttons on the device. This is needed to wake up the device and make it accept the configuration commands.

Battery configuration does not always work with all different devices, when trying to make it this way. If you still do not see battery %, pair the remote again to your hib (without deleting it). If battery % reporting is supported, the commands are usually accepted during the pairing process.

Always refresh the HE device web page (F5 for most of the browsers) before looking at the State Variables and often the Current States. The State Variables (and sometimes also the Current States) are not always automatically updated.

No, 'Tuya Scene Switch TS004F' is the driver's name, and it doesn't change regardless of the device model.

But probably you meant that the 'Device Name' is not set automatically to 'Tuya Scene Switch TS004F' ? On your screenshot, the device name is set automatically by HE to 'Device', which usually means that this custom driver was not automatically picked up during the first pairing.

Try explicitly setting the battery reporting in the Advanced options, and let's see whether this device starts reporting the percentage, too.

That did it. Thanks, great work!

image

1 Like