The dev. branch version (link on the second post) is updated to 2.6.8
It allows configuring of the debounce timer. The hardcoded value was 1000ms, but it still can be low for some environments where the switch may communicate to the hub via one or more repeaters in unstable conditions.
Just noticing now the built in "Tuya Zigbee Scene Switch". seems to be working ok for me now. It you even mention in your notes to use it. I am not even sure how I got to use yours. Anyway, I needed one more fix to get your driver to work consistently with the TS0044. I put in a PR for the change.
As I don't have all the devices and can't always test the code changes, I usually first apply the new code to the development branch version only. So, the new 'Debouncing' wasn't available in the main branch version of the driver.
Today I merged the latest changes into the 'production' branch that is also pushed for an update via HPM.
Hubitat inbuilt "Tuya Zigbee Scene Switch" works fine with some of the Tuya TS0044 models.
Here Tuya made a big mess, using one and the same model name for two different devices types :
TS0044 scene switch - supports only singe, double and held (actually - released!) key presses. These devices will work with the HE inbuilt driver and do not need debouncing.
TS0044 scene switch and dimmer controller - has two operational modes, similar to TS004F models. In the 'dimmer' mode the device uses Zigbee Group broadcasts to control the linked Zigbee dimmers/bulbs in the same Zigbee group. These devices require the custom driver to be properly initialized in 'scene' mode. Some need the debouncing option enabled, some do not.
So, actually, the model TS0044 or TS004F does not determine what kind of device it is and how it will behave... What matters is the manufacturer Id, and there are too many different manufacturers ( this driver has the fingerprints of 11 different TS0044 manufacturers, for sure there are more).
Just as a data point, all my double taps stopped working with either version ver. 2.6.8 (or 2.6.7). Disabling the debouncing returned it to expected behaviour.
@kkossev,
I can confirm that I have the same button controller and experiencing delayed response to button presses. Disabling denouncing seems to fix the issue.
1 sec denouncing on another controller, Lightify, seems to be unaffected.
Hi @kkossev,
I have been using the TS004F Moes scene switches since April 2022.
They have worked fine until a few days ago. I see that the driver was updated and the debounce options are listed in the device.
If I set any debounce option the device will work once but if I press it again within 5 or 10 seconds it may or may not work. Multiple pushes of the same button don't toggle the device unless I wait longer or maybe push another button.
If I disable debounce I get multiple on/off signals.
Yes... working all, even long-press. Maybe i am misunderstanding the held-released behavior.
If i long-press, "held" works but "released" not working after releasing the button.
Thats how i think it should work or i am wrong?
I hadn't had an issue with my Tuya button for a long time but recently noticed it stopped working. I think the same issue was happening to me as I disabled debounce and it's working again.
FWIW here's what I was seeing in the logs when this wasn't working. I hadn't pressed the button in a while (10 mins or so)
Thank you for the info! Some of these devices behave really strange, for now I will keep the reverted-back version 2.6.9 (debouncing hardcoded for specific devices only), until I have the time to get to the bottom of the problem.
Thanks @kkossev for your dedicated work on the Hubitat device driver for my Mose Scene/Dimmer Switch TS004F. Your driver installed via HPM and allowed the Mose 4 button switch to pair to my HE Hub like a glove. Now I can begin to remove my legacy X10 switches.
Lastly - obligatory pair again the button to your C-8 hub (without deleting it).
The battery reporting configuration should take in effect after the repairing.