I figured the Debug Logs enabled was the issue, I turned it on to see if there would be any other clues as to why this was not working.
The device driver I am using is the built-in "Zooz ZEN32 Scene Controller", I figured it was adequate since it has that "Set LED" block in the "Commands" section. I did exactly as the next line in my app which controls the ZEN30 devices' LEDs correctly. In reading your typed reply, do I need to include the word "Number"[3 in my case] rather than just the numeral 3 by itself (I tried to enter it exactly as the dropdown displayed it)?
Is your advanced driver in HPM?
@hydro311 That's awesome Chris! I used Jeff's advanced driver to use triple taps on a ZEN30 since I wanted to use the dimmer function on the fan-light. I needed to access the triple taps for high speed for my ceiling fan, it switches Shelly micro relays on the speed capacitor, works great! Hadn't considered a direction change option!
No my driver is not in HPM
Not sure if the system driver has the setting in it to disable the annoying button 5 LED flash every time you change a setting, if not you will probably want a custom driver so you can turn that off. Every LED change is a setting change and by default the large button LED will flash.
For the system driver, you can mouse over the input boxes to see what the types are. They are all ENUM, which should always be a string type. There are also 3 parameters, they are probably all 3 required on that driver.
Based on this section of the error, you need to send all 3 settings and it can be all 3 as strings, or number, string, number.
And then each time you run it, it will send all 3 commands to the device I think. This is optimized in my driver (possibly the other community one also) to only send the needed commands.
Working!

It appears the three parameters are indeed ALL required.
I am still getting a error in the logs, only on opening, "invalid number value in string" but all four devices are changing LED colors as expected.
Oddly, this same thing happened when I set these up on the ZEN30s the other day. I just deleted the segment and re-did it and it cleared the code, I will do the same again here
.
I really wish the logs were more granular as to which line is not conforming...
I think I may use your app, the idea of only sending necessary commands is appealing to me on many levels. I just installed it into my library, I'm assuming the syntax that I just corrected will remain the same, or will I need to tweak it for your improved driver?
I think it will work, if it complains you might need to change the led # to a number (if you have it as a string now). Also you can omit the brightness totally if you are not changing it, otherwise if you do send it but it does not change I think I coded the driver to only send the needed commands.
Updated - Working fine, now reports all three parameters updated in the logs. With the system driver, once it was working correctly, the only logs were state update text lines.
FYI: - - After changing the driver to yours, I saved the device and hit the "Configure" button as it seems many drivers require this. When I do that it does throw an error in the logs:
The two warning lines are also untrue, both debug and text logging are turned on in the device page
Save first, then run configure.
Yes that works? When I said Save I meant Save Prefs (not saving the device like when you switch drivers), to save the debug logging and any other settings. There is probably a setting that is not initialized resulting in that error. So adjust your settings, Save prefs, then after page reloads run configure (when first switching to new driver only).
Update: This is working great on all four switches! Thanks @jtp10181 and @hydro311 for your input!
Last detail to adjust is the WAF factor... brightness of the LED on the "closed" indication in the bedroom is too bright. I need to try to set it to the dimmest option when closed there, or else I will need to exclude the closed indication on that switch only.
Jeff I believe you said there is a way to set brightness, but will need more finessing for the ZEN30 relay button. Can you please advise?
Like the Zen32, the LED brightness options are 100%, 60% or 30%.
Assuming it works similarly to a Zen32, the LED brightness can be set by command -- in my screenshot up in post 20, my 4 actions are all calling for 30%.
I wish Zooz would give more options, but those 3 (or "always off') are all we got.
If you enter a value other than 100/60/30, it will just round up or down to the closet one of those options.
Relay brightness is parameter 6, and low is value of 2

You can set that via RM using the Set Parameter command like this:
(size can be omitted, it knows the size because its a define parameter)

Just send the same parameter values as numbers to "setParameter" from RM and it should work.
I went into the app and added the parameter for dim level as a number, "2", and it does not work.
The logs are set to trace and show this:
(Hope it is readable enough)
The indicator LEDs do not change at all, I can set them in the device parameters themselves, but the monitor app does not.
Again, I'm basing this from my experience with a Z32, but it should be the same for the Z30...
For the value highlighted below, I think that has to be 100, 60 or 30...
It's never occured to me to try entering the parametere value there. I'm basing my my 100/60/30 comment on a post buried somewhere in Robert's Z32 community driver thread, so perhaps I'm mis-remembering that.
I was wondering about that too, so I changed it to 30, with no joy. Also the error is thrown on the open action as well which I set to change to 100.
The ZEN32s are working great changing button #3 color and brightness, but the 30s are fighting me!
1 Like
I just now tried editing it to be a string, using 30, 30%, 100 and 100%, none worked, same error
@hydro311 the ZEN32 set LED is totally different from the ZEN30.
You have to use the Set Parameter command on the ZEN30, the brightness is not part of the setLED command. It would be a separate line in RM to set the brightness.
If you look at the commands on the device page they show you exactly what options they take, what order, etc... If you try something outside of that it will fail.
Look, ZEN32 command has 3 values, one is brightness

ZEN30 is totally different, it takes Dimmer or Relay, and the color. No brightness.

Its not a standardized command, I did it one way on the ZEN30, and the ZEN32 driver author did it a little differently.
I came to that conclusion just before you posted this, and I added another custom command to the app. it now looks like this:
The brightness parameters are 0=100%, 1=60% [default], and 2=30%
The line is "Set Parameter"-> number -> "6" -> add parameter-> 0 (for 100% when open), or 2 (for 30% when closed). This is still not working, but it is not throwing any errors in the log. I am confirming the LED level by viewing the device page, switching the state then refreshing the tab of the device page. The color is changing as expected, but not the brightness.
In experimenting, I just now found that going into the device using "Set parameter" no 6, level 2, is not working and the following error arises:
This is the settings I am using in the device page:

I also tried 06 for parameter #, 100 for level, and "bright" for level-which was wholly rejected as expected.
Apparently no one uses that function. Around line 686 replace the entire function in your code. I already have done this fix on a bunch of my drivers but had not pushed an update for the switches/dimmers pack yet.
The settings shown on the page will not change when using that command. It will show "1 Pending Change" until it has been changed back to your normal setting.
def setParameter(paramNum, value, size = null) {
paramNum = safeToInt(paramNum)
Map param = getParam(paramNum)
if (param && !size) { size = param.size }
if (paramNum == null || value == null || size == null) {
logWarn "Incomplete parameter list supplied..."
logWarn "Syntax: setParameter(paramNum, value, size)"
return
}
logDebug "setParameter ( number: $paramNum, value: $value, size: $size )" + (param ? " [${param.name} - ${param.title}]" : "")
return configSetGetCmd([num: paramNum, size: size], value as Integer)
}
1 Like
I've done a bit of Bacnet and Basic coding, so here's the code I have around 686:
Should I replace anything here or just insert into the line at or after line 686's close bracket?