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

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

The device doesn't seem to report released events, and I still only get pushed events even after I updated the code I added to

supportedValues = ["pushed", "double", "held", "released"]

Here the problem is that some of the TS0215A devices are single button devices, but other manufacturers TS0215A are 4-button controllers... :frowning: I will temporary add TS0215A as a single button device (thank you for detecting the bug!), but I should add a customizable number of buttons in the next driver version.

If you enable the debug logs, do you see anything sent from the device when you hold the button for more than 3 seconds and then release it?

This is used in an event to declare what are the possible button operations, and the attribute value is used from some apps ( the Button Controller as example) to alter the app UI, depending on the possible button events... But if the device does not send these, nothing will happen..

I will research on what this button is capable of later.

1 Like

Nothing. I've been running with debug logs all along.

In Home Assistant this button produces only one action (named 'emergency' in Z2M).

So the supportedValues for the SOS device should be only 'pushed' in Hubitat.

Update: added in the dev. branch version 2.6.5 2023-05-01 - TS0215A _TZ3000_pkfazisv iAlarm (Meian) SOS button fingerprint correction; number of buttons and supportedValues correction for SOS buttons;

1 Like

This is what mine reports.
image

I am pretty up to date.

def version() { "2.6.4" }
def timeStamp() {"2023/04/27 5:29 PM"}

I understand your point about re-pairing the remotes but to be honest I have had great battery life out of them as they will go completely dormant and rarely wake-up until a button press.
image

I have a spare one that I will try pairing with the new driver and see what happens with that one.

So if I understand correctly, the remotes are working just fine, the only issue that I see is that the healthStatus is reported as offline - and that is because the periodic battery reporting is disabled (not configured) and the remotes have not been used for a long time?

@kkossev Just stopping in to say thank you very much for your driver. Working well for me.

I had an Aeotec Quad Wallmote go bad recently and see that a replacement was $70. I decided to give the Tuya Scene Switch TS004F being sold on Amazon ($25) a try and I have to say I like it a lot better than the Wallmote. If I continue to have success with it, I plan to order several more from Alibaba ($13).

Thanks again for your hard work on this driver!

1 Like

FYI Just added a brand new remote of the same kind and with the most recent driver it shows battery voltage but not an estimate of battery level. After enabling the advanced option and turning on battery reporting it does report battery level.

Thank you.

1 Like

Dear Krassimir

Would you be able to add this device to your driver please?
Thank you for your efforts




@zsolt.toth.39 unfortunately, this Lidl remote can not work with Hubitat. It uses Zigbee Inbound Group messaging.

You can pair it to Home Assistant ZHA or Zigbee2MQTT, and then bring the button events to Hubitat using the Home Assistant Device Bridge

Thank you very much for enlightening me :slightly_smiling_face:

If you want to experiment, I think that it is still possible to use this Lidl remote in Hubitat :

  • Manually assign a Generic Zigbee Dimmer driver to the remote
  • Create a Group in HE apps - select this remote and one or more Zigbee bulbs
  • Make sure the 'Enable Zigbee Group Messaging' option is turned on.
  • Before clicking on the 'DONE' button, press the remote button to wake up this sleepy device.

Hubitat should send commands to add both the Zigbee bulb and the Zigbee remote in a new common Zigbee group. If the Lidl remote was awake at the time when the Zigbee group was created and accepted the AddGroup command, then you should be able to switch the bulb on and off and even to control the bulb brightness directly from the remote! Directly means that Hubitat hub is not involved at all, you should be able to control the bulb even if the HE hub is switched off!

The disadvantage is that the state of the Zigbee bulb (on/off, brightness level) may not be reflected back to Hubitat.