Sync button LEDs to On/Off status on Zooz Zen32 Scene controller

I have a Zooz Zen32 (switch, plus 4 scene buttons) that feature LEDs on the buttons, and I wanted the LEDs to show the on/off status of the device group controlled by that button. I wanted this to work whether the scene was triggered on or off by the button, by the dashboard or by a timer rule. The following Rule Machine code did the trick:


The Zooz website had specific directions for making the "setLED" line in the code.
https://www.support.getzooz.com/kb/article/602-how-to-program-your-zen32-scene-controller-on-hubitat/

2 Likes

I have a very similar rule, shows me the state of my outdoor seasonal lights. With the updated firmware you can do the same thing with the Indicator command, which does not change the actual settings on the device, it just temporarily sets the LED to a new state using the indicator command class (I wrote the code for the community driver). Using setLED may actually be more reliable in some cases.

image

1 Like

I have a rule that makes all of the LEDs red on the switches at Front Door and Back Door (plus turning an RGB Bulb red in the Front Entry) when alarm is armed. I can't tell you how many times that has stopped me from opening Back Door to let the dogs out without disarming alarm. Causing the alarm to go off at 5:30am is not good for WAF.

1 Like

Nice that's a good one. I don't have an alarm but I have my Laundry/mud room and Master Bedroom switch LED Red if any doors are unlocked and Green when all secure. Prevents the "is the XYZ door locked" question when I go to bed.

One issue with this I've encountered -- I have a rule that updates the LEDs as things change, and found that firing setLED commands at the switch too quickly will occasionally cause the switch to reboot.

If you are only changing the on/off state have you tried using the indicator commands instead? Those should be safer, as it does not change an actual setting on the device. If you are changing the color then you have to use setLED.

If you do need setLED, the community driver actually sets the state, color and brightness every time you run the command. On the fork driver I created, it only sets what you specify, so if you only send the color then it only sets the color setting. May help slightly. https://github.com/jtp10181/Hubitat-RMoRobert/blob/master/drivers/zooz/zooz-zen32-scene-ctlr.groovy

2 Likes

Guys, thanks for the responses and insights. Some thoughts...
(1) I shouldn't be surprised that others had already developed essentially the same rule I listed above.
(2) jtp: I'm fairly new at this, so I've never updated a device firmware, nor have I installed a community driver. Just to keep my live simple, if I can accomplish what I want to do using just vanilla Habitat, then I tend to take that route. Sort of respecting "better is the enemy of good enough" if I can get away with it.
(3)msbishop: The trigger on my rule would typically run only twice a day, during timed on and off events. I've checked the log to confirm that. I haven't experienced any resets of the Zen32 as far as I can tell.
(4) stephen... Great idea! My wife and I routinely set off our alarm, even though we have to unlock the door to do so. Food for thought...

Good stuff! I have found so many uses for these LED indicators on the zen 32.

Some examples…

I use them to tell me the current operating mode of my thermostat including if my thermostat is presently overridden from its expected state as it relates to Hub mode.

I use them to tell me the status of my garage door.

I use them to let me know if I left any lights on in the guest bedrooms. This is always helpful because I don’t want any automations to turn those off as guests might be staying. I can push that button on the Zen32 to turn off all those lights and change the LED status color.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.