Device driver function executes twice when called from RM or ABC button press

Hi @garyjmilne ,

The best approach in my opinion is that if Mike agrees and you send him this remote for checking and solving the core reason of the problem.

My driver was written for Tuya devices that are identified as TS004F model and it was not intended to handle TS0044 scene switches, that are supported from the inbuilt 'Tuya Zigbee Scene Switch', which works perfectly with TS0044 devices that were on the market....until this MOES remote.

TS004F driver 'debouncing' code is more of a workaround, rather than a solution of the problem with the duplicated packets that are send from some scene switches or remote controllers. As HE does not expose the sequential numbers of the packets on drivers level, the filtering is based on a time frame in which one and the same key press event is considered as duplicated. But even if the sequential numbers were available and were used for the same purpose, it would still remain a workaround. A permanent solution could be related to a change of HE Default Responses to some Zigbee commands (discussed here) - something that is above my Zigbee low-level protocol knowledge skills...:slight_smile:

Anyway, you could try this test version of the TS004F driver, I have included your device fingerprint and have also included it in the 'debouncing' workaround logic. After switching to this test driver code, you will need to re-pair it again to HE hub. Please let me know if there is any change.

2 Likes