Zooz zen 30 expose leds to other switch state

Hello hive,
I'm trying to get the LED indicator of the Zen30 double switch to indicate status of a contact sensor on my garage door.

I want it to indicate red 100% when open, and green 40% when closed.

I know @jtp10181 has a great app which does this for the 5-button scene controller, but I can't find how to do the same thing on the Zen30.

Thanks in advance to all

There is a SetLED command if using my custom driver for the ZEN30.
That lets you change the color.

If you need to change the level also, you would need to use the Set Parameter command and give it the appropriate commands to change the brightness.

image

2 Likes

Yes, I see that, and I did play with it, but I don't see how to toggle the LED or change colors when the contact sensor changes state. In basic rules, or rule machine. Where do I tell the LED to go red upon opening of the garage door contact sensor, or green upon closing thereof and in which app / how?


In the Zen32 controller with your driver there is a parameter to allow scene control to the LEDs but I don't see that with the ZEN30

Scene control usually just means enabling the button events to come through from the device, that has nothing to do with the LED colors. For the ZEN32 or ZEN30 you would need to make the rule in RM and use custom actions to execute those custom commands on the driver.

Here is a rule I have to set the LED on a ZEN7x switch based on lock status. Very similar command as to what the ZEN30 has (but ZEN30 you have to specify if dimmer or relay as well).

So I am stuck here:


I don't see where to set LED modes?

The commands are on the dimmer parent device, not the relay child. You can specify to set it on the relay within the command.

So I backed out and select this:


And then I can get to here:

So which do I select, then if "string", I assume I need to use proper syntax?
If decimal to select which LED, I assume the relay button LED is 2?

Also what is the "meter" used for?

You give it the exact same settings as you would on the device page, it you mouse over the entry box names it shows you what types they are (for ENUM use string). For the ZEN30 you have to give it the Dimmer or Relay first, then the color. Use the string exactly as it is shown in the drop down menu on the device page.

The Meter option is to space out the commands if you select multiple devices, for one device it does not matter.

1 Like

OK, so I see in your example, you have ('Red') and ('Green') in parentheses and single quotes. I learned that the strings are enclosed and quoted by the app, but I think the additional parameters, 'Relay', and '30' or '100' (for brightness) must need to be entered individually, not as comma separated or comma-space separated values. They don't seem to work that way.

Also I don't understand your "private Boolean" entry's purpose, it may not be viable in my case.

I did choose to meter the commands since I am applying this to two ZEN30 devices. I will also want to use this for two additional ZEN32 5-button controllers as well, but I don't think it will fit in this RM app easily, I'll just do it as a separate RM app.

So it looks like I'm getting warmer, but it still is not changing the LEDs to green when closed, nor red when opened.

I entered each of the parameters independently, 'Relay' on both open and closed, 'red', and 'green', for open and closed, and the brightness as a number, 100 and 30 respectively.

In the devices "preferences" area I have set the LEDs to always on, No selection (which goes back to default), and off, but the RM app still won't change them.

Did you check the logs? Probably errors.
That command does not take a brightness on the ZEN30, look on the device page at the command, it only has two options.

Brightness would be a separate command, just try and get the color working first and then I can tell you how to do the brightness.

I don't think either of these are causing any related issues, but you're not using a private boolean or any timed actions, so you could remove both of those elements (in an effort to keep the rule as clean & lean as possible).

1 Like

Thanks for chiming in @hydro311 , and thank you @jtp10181 for your patience!

Currently cleaned up and working!! However it is throwing an error in the logs still.

I don't see what this error might be, I don't see anything unique on the close part of this and there are no rogue spaces or any other characters.

And as for the LED brightness, I'll see how it looks in the dark tonight, they are pretty small lights. I may not need to alter the brightness.

I think the setLED for the open is messed up somehow, you could try just removing and adding it back again now that you know what you are doing.

You have lofty aspirations for me... I like that! :joy: I'll give it a try

I again don't think this is hurting anything in this particular rule, but another optimization tip...

Get in the habit of closing out every IF statement with an END-IF -- there are times where not doing that can cause issues, so just always doing it keeps you covered.

For this rule here, it would just be one more END-IF at the very end.

1 Like

So, I'm moving on with more capabilities on this indicator - I am trying to add two more Zooz devices to accomplish the same thing. Two ZEN32 5-button controllers, with the enhanced drivers. I want to change the LEDs on button #3 of both of them.

I go through the same process as on the ZEN 30s which are working correctly, finding the 32s in both 'switches' and 'buttons', both of which include setLED as optional custom commands. I enter for the button to address "3" as a string, "Red" or "Green" (depending on open or closed) as a second parameter string, and get no joy with these errors in the log:

I try using 'Number' as the parameter type, but no change, still get the same error and no function.

I even tried swapping position of the strings just for grins. Do I need to enable the LEDs as child devices and choose those in this monitoring app?

Thanks again for your input, and @hydro311 , I did close the endif loop as you suggested.

On an aside - I also noticed this log entry whenever I manually change the LED color and brightness just to confirm it works. Are these log entries normal?


It is a decent chunk of data, but I don't see any value in it.

You have debug logging enabled, the process to change the LEDs is multiple commands. Although those logs like they are coming from a system driver? So which driver are you using exactly?

I have optimized the commands being sent on my forked version of the community driver. -- Hubitat-RMoRobert/drivers/zooz/zooz-zen32-scene-ctlr.groovy at master · jtp10181/Hubitat-RMoRobert · GitHub

My driver takes SetLED ( Number [LED number], String [color enum], Number [brightness])
The brightness is options on mine, if you dont want to change it.
You have to put the parameters in the exact same order as shown on the device page.

image image

Here's a working example from one of my rules for managing the LEDs on the Z32 I use to control my ceiling fan... I use green to indicate current set speed, blue to indicate the other available speeds (med or low), and red to indicate the button I use for off/reverse.

The main/big button (not used in this rule) is just on/off for the fan's light.