[BETA] [RELEASE] Heltun Touch Panel Switch driver optimised for low latency

This is my first driver, and it's for the Heltun Touch Panel Switch:

Heltun Touch Panel Switch driver for Hubitat on github

I would appreciate a code review as it's the first time I've written a driver or written any Groovy. Driver best practices are pretty thin on the ground.

Key highlights

  • Low latency - latency is less than 600ms between clicking a button and triggering an automation. I originally assumed I'd need to include a feature to configure association groups in my driver but I am happy with the responsiveness of two-way and three-way lights and more complex light automation.
  • All end-points are exposed - the driver exposes both the button and the relay end-points. This allows a button to be decoupled from its relay and the two controlled separately.
1 Like

Hi Keith,

I've started playing around with your driver. Great work - got me further than the built-in driver.

A couple of issues.

1 - I don't seem to have access to the relay. Just the button device, Installed the code for the relay but nothing shows up. On a four button panel should I have 8 component devices (I only have four).

2 - Relay control source - I only have one option which is gateway. Is this intentional - should there be more options (I'd like to keep the relay tied to button state).

Are you planning to continue development of this?

Cheers, T

Have just pushed a fix.

When I last tidied up the code I made a breaking change that stopped the relays form appearing.

You'll have to update the code then click "clear state" and then "configure" to get them to show up.

Tested and working perfectly. Thanks very much.

These are lovely little switches and your code is exactly what I needed. If there is anything I can do to specifically beta test them let me know.

Glad the code has been useful to you. I have 27 of these switches which makes for a reasonable amount of testing through everyday use. The one thing that isn't tested so well is how they recover after a power cut or a breaker flipping off/on. The Heltun switches themselves don't report back to the hub on powering up, so I have added a check (see state check interval in the config) that forces Hubitat to sync its state with the switches every so often (the default is every two hours).

I have to admit - I had a bit of a sense of humour failure last week with zwave and Hubitat in general. Just had so many issues with lag and reliability for lighting. I got these Heltun to try something new - a way to give users some feedback on button status - but it was even worse than before. I don't think this has anything to do with your drivers. The issue was one I have seen more generally with all my lighting automations.

For now I have taken the Heltun switches out of play and wired my lights to totally avoid the hub and any kind of zwave processing. They are basically dumb digital switches now but at least my lights work without any lag.

Download the Hubitat app