[DRIVER] Universal Z-Wave Drivers (Switch/Dimmer)

I just tried to associate an ZEN04LR in Group 2 and it wouldn't take, ie, Pending Change won't go away.

edit: I also tried with a non LR..won't go away. I blanked out the field, hit Config, and it synced.

Oh duh.... you have it paired in LR mode. Associations do not work in Long Range (since there is no mesh). I have not updated the ZEN switch drivers yet to take that into consideration and hide the associations.

You can't do associations with LR?
I didn't know that.

Correct, there is no device <-> device communications in LR, only device to Hub.

2 Likes

It's almost as if we need to write an up-to-date Z-Wave and Z-Wave LR FAQ and put it somewhere on the board. Something that can (and should) point to authoritative resources but for the casual reader and Hubitat user has everything they need or may want to know in one spot.

This is sort of a case for the universal z-wave device driver. It just laid out what was available-no further human intervention required.

Also, I personally might like the more direct translation of the mfr's parameters-rather than dealing with, say, "smart bulb" settings, or whatever, which I don't use. Perhaps a tad ambiguous but... Just a personal preference, and I'm not even sure about that. :slight_smile:

I call those settings "Smart Bulb" because that's what Zooz usually calls them in their docs. If they call it something else on the device info then :person_shrugging:

I try to make the names and options align with the docs when it makes sense.

2 Likes

Couldn't get the buttons to report on the Universal driver, with the ZEN73LR.
Works fine on the Zen Advanced Switch device, with same parameter settings.

@jtp10181 I'm trying to use your driver for an UltraPro 59368 switch. I'm following your instructions, but I can't seem to get any of the parameters/preferences to update on the device. i.e. I have changed the LED color in the preference section and clicked save. No change at the switch. I tried clicking on configure to sync. I tried using the Set Parameter button under commands. No change at the switch. Seems like no matter what I do to change the parameters it just wont update the device. I see in the log when I try to use the Set Parameter command - setParameter ( number: 34, value: 2, size: 1 ) [null - LED Light Color] Can you provide any insight on what I might be doing wrong based on what I have presented? What other information can I provide?

You have to change led behavior, ie, always on, always off, on when switched on, or on when switched off.

Turn on debug logging, change the setting in the preferences section and hit save, post a screenshot of the logs.

What does syncStatus show in the states?

I've made an embarrassing rookie mistake. I wired the switch wrong. Everything works perfectly now!

2 Likes

@jtp10181

***I started to create an issue on GitHub but I was uncertain if my screenshots were going to go through or not.

My last post a little over a month ago, I admitted to a mistake I made wiring a switch. After wiring correctly, everything was working great until a week ago. I lost control of the Z-Wave dimmer switch (ultrapro 59372) through Alexa. Looking into it, I noticed the physical switch wasn't operating properly. So, I ordered a new one. I force removed the old one and installed the new switch. I set up and configured the new switch the same way (I believe) as the first switch. Clicked configure, it scanned and synced, refreshed the page and hit save. I did change the switch operation parameter from dimmer to switch. After all that, I go to operate the switch. Physical actions at the switch operate as should - on and off and the states change accordingly within hubitat. When operating the switch within hubitat (digitally as the log states) I am able to turn it on but not off. It seems after operating the switch digitally, the physical switch also doesn't operate properly. I would have to press up on the paddle for on (while the switch is still on) and then press down on the paddle in order to get the switch to turn off. I have tried the generic z-wave dimmer driver and it does work properly for on and off operations, but I don't have the ability to change the switch parameters with that driver. I write to you in hopes you can determine my problem. Here is what I can think of to send to you. Let me know if other information is needed to help diagnose. Thank you for your time to look at this for me!


image
image

Looks like in both cases for on and off, the driver thinks it is turning on.
Can you turn on the TRACE logging option, and then repeat the on and off commands from the device page? I need to see the raw report coming back from the device.

Also do you have the Supervised Commands option turned on or off? Have you tried it both ways?

I have not tried supervised commands until now. Didn't occur to me to try it because I didn't need it turned on when everything was good the first time. Same result with the switch. Here is the log with tracing:

I didn't want you to change the setting I was just asking which way it was set. It does not seem to like the supervised commands so you need to do that again with the supervised disabled.

Sorry about that. I'll do that this evening as I have left home. Thank you.

Here is the log with the supervised commands turned off.

I really like this universal driver. I'm using it for the basis of a couple of drivers because my devices have some special functions. (In particular, the Homeseer WX300--driver in Hubitat has a strange "feature" that was causing me problems, so I used your driver as a basis to do it "my way.")

Anyway, my groovy skills are nearly up to your (@jtp10181 ) level and there are a couple of things in your driver I just don't understand. I'm hoping you or someone else on this thread will take the time to explain them.

  1. I see how the configuration parameters are put on the driver page in a custom way based on what is actually on the device. However, the variable "configParams" in the preferences, and elsewhere in the driver, confuses me. Where does it get set? I can't find anywhere that the values for that variable are set to anything.
  2. In a similar way, I see the method "getConfigParams", but don't see anything in the code that calls it. I did a little tracing and it does, indeed, get called, but I cannot figure out how or where.

Are both of these some not-so-well defined features of groovy or Hubitat's implementation? Is this something about groovy I don't understand?

The reason for this is that I want to clean up the specific params for the WX300, but I don't really want to brute force it with a bunch of IF...THEN statements. I'm hoping I can hack into the way the params are stored in some smart way in the code, but how that works (per above) is very confusing.

Thanks for you guidance.

Its not actually a variable, it is a "get" function (aka getter). Basically you start a function with "get", like getSomeFunction and then you can use it like a variable someFunction. I am not an expert in this either, I inherited this from my original source material and liked how it was working so I have kept it that way.

You might be better off checking out my ZEN Switch/Dimmer. For those you pre-define all the params in a giant map and then they are dynamically presented in a similar way.

If you really want to use the Universal driver, you could just manually edit the data field that is saved on the device after scanning. That is where all the config info is read from. You could just copy and paste the JSON into a formatter, make edits, then put it back to a string. https://jsonformatter.org/ . You could then just force that in within the driver code or manually edit it using an app like this: [RELEASE] Custom Device Note v2

I have thought about making an export/import feature on the "Scanner" tool to basically do exactly this but there was not a lot of demand before. As this set becomes more popular I will look at expanding it.

1 Like