[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

I have this working in Hubitat, and homekit enabled is on but I dont see it in HomeKit - any pointers? I mean its not showing up in the Home app

I am not sure if momentary buttons are supported in HomeKit…?

Do you have any other buttons shown on Apple Home?

If yes - please let me know which driver that button is using, I will compare and hopefully find the difference.

There seems to be some discussion here on virtual buttons, have to try to see if it works https://community.hubitat.com`Preformatted text`/t/virtual-button-in-homekit-bug/110359/25

Something strange in my setup - I removed Hubitat and added it again in Homekit and it was on the list. Its kinda weird, when you go look in the devices connected to the hubitat it's not in the list. And finding it is hard.

Anyway the good part of the story is that it works perfectly - single click, double click and long press are all visible in the Home app and can be programmed there

1 Like

Hello all,

I'm on the hunt for a battery-operated Smart Knob Scene Switch Dimmer that supports single, double, and long presses, plus rotation—basically, all the fancy moves! My goal is to set up Webcore pistons that respond to interactions, bringing some automation magic to my wife’s home office (so she can have total control... or at least of the lights, music, etc.). This would sit on her desk, so something compact and stylish in white would be ideal!

I checked out the Tuya ZigBee Smart Knob mentioned in the first post, but unfortunately, the links seem to have wandered off. I’ve spotted quite a few options on AliExpress, but I’m not sure which ones have available drivers that actually work with Hubitat. @kkossev, any chance you have something related with the great drivers you’ve written in the past?

Any suggestions (or tales of smart knob success) would be greatly appreciated!

Many AliExpress (and Amazon) sellers change the products that they sell frequently, so keeping the links on the top page is not easy. I will try to check and update them when I have the time.

These buttons / scene switched / rotary knobs are relatively easy to support, so even in a case you get a newer device, it won't be a big effort to add it to this driver.

If you are in doubt, post the link to the AE press, and I will try to check if it is possible to guess what is the model/manufacturer of this device. The prices are pretty low, so I think it is not a big risk to order just one and try it.

Keep in mind that the user experience with these rotary knobs is not so great. They look good, but the long press is really long (more than 4 seconds!), there is no button release event (only a long press event), and there is about a 1-second delay between the events when rotating the knob... Not a perfect device, in my opinion.

You can also check the IKEA buttons and dimmers.

4 Likes

Thank you so much for sharing these device links! Your guidance and driver support have truly rekindled my enthusiasm for home automation—it makes all the difference in choosing the right devices for my setup.

I also really appreciate your offer to add support for new devices. It’s incredibly helpful to know that even if I come across something new, you’d be able to integrate it into the driver without much trouble.

The pricing on AliExpress has definitely made it easier to build out my home automation collection, and your heads-up about the functionality of the rotary knobs is much appreciated.

I’ll also take a closer look at the IKEA buttons and dimmers, even though I had some initial hesitation due to earlier reports of stability issues along with limited availability at my local IKEA Canada.

Thanks again for all your support and insights—they’re invaluable!

1 Like

Hi, I bought a couple of Loratap remotes from AliExpress and was wondering if there's some other tips/tricks I can try to get it to work.

I have this driver installed via HPM. HE detects the remotes very fast and seems to identify them just fine. But, nothing happens when I press a button (nothing in logs either, device has debug mode enabled)

I read about removing the battery and trying again very close to the hub but that didn't seem to do anything. Also, FWIW re-inserting the battery doesn't seem to put the remote into pairing mode. I have to hold a button down for 10 seconds to do that.


image
image

I also copied the logs while initializing if it helps: dev:17102024-12-21 09:41:45.919 AMinfotuya 1 received device announcement, Devic - Pastebin.com

Hi,

The pairing was not successful - the device changes its DNA on every pairing attempt.

The device responds to the commands sent to it for a short time (about 5 seconds as seen in the logs), before it leaves the Zigbee network.

If your hub is C-8, then use the Double Luck voodoo to pair the remotes.

that worked - thanks!

Is there an option that the button light will stay on so i can know which button i pressed last?
I'm talking about the TS004F.

No, there is no such an option - the battery would be depleted quickly if an LED is constantly on.

You can search at AE for mains-powered scene switches; these have LEDs that can be permanently lit when the switch is on or when it is off.

Another (more expensive) solution could be this :

Thank you!
It looks great and i already ordered one.

I also wanted to add a button to the "disable button". Is it poasible to add another button number or i can only insert one button per field?
If so, i will just have to set another rule but i wanted to ask if there is a shortcut.

Thanks,

It seems like the Room Lighting app allows to specify only one button per device at the '...disable turning one when pushed.' settings.

A possible workaround could be to create a virtual button and then use the HE Mirror app. Or, if the Mirror app does not work - use RM5 to simulate a button 'pressed' event of the virtual button, when the real device button was pressed.

Ok, i'll give it try.
I appreciate all your help!

1 Like

Hello? kkossev
"Switch-type button" among Sihas products in Korea
I want to use (SBM-300-ZB)
I can't find the right driver.
Can you check the driver?