How many bytes are Params 1-4 for setConfigParameter?

I’m trying everything in an effort to find a way to keep the virtual instant on (Button 1 Push) for a Red Series dimmer but yet get a 1 second fade out when I turn it off (Button 1 Held) with a C7 Hubitat hub. I have Params 1, 3 and 4 set to 0 and 51 turned on. That gives me the instant on I want but I can’t figure out anyway to get it to fade out when I use the paddle to turn the switch off. I’ve tried all kinds of rules but they all are ignored and the light turns off almost immediately.*

I was thinking of using setConfigParameter to set Param 4 (Ramp speed from the switch) to 1 as part of a rule when I turn on the switch. I had been trying to set Param 4 to 1 as part of a Button 1 Held rule, but I think having Param 4 at 0 turns the light off before any fade or setLevel, setConfigParam, etc. runs. So, my new idea is to use setConfigParameter to set Parm 4 to 1 when I turn it on so it will be in place when I then turn the switch off later. (Am I correct that the setting should “stick” at 1 once I changed it with setConfigParameter as part of the Button 1 Pushed rule?). I would then create a 2nd rule that would setConfigParameter back to 0 then Button 1 is pushed resetting it for the next time the light is on.

However, I’ve seen that the byte values in the pamphlet that comes with the switches isn’t always correct. Does anyone know definitely what I should use for the 3rd value? (And if this idea would work at all?)

Does anyone have any other ideas on how to achieve this?

Stuart

@Eric_Inovelli
@EricM_Inovelli
@bcopeland

First, if anyone is curious, it may be helpful to link to the Hubitat discussion to see things you’ve already tried (hi again! :smiley:): Different On/Off ramp speeds with Inovelli Red Series Dimmers, LZW31-SN, Firmware 1.48 - Apps - Hubitat

To directly answer the question here, the only typos I’m aware of in the manual is that parameter 13 for the regular LED color is 2 bytes (the original manual said 1 byte; it may still; I don’t know). All the parameters you should need for your particular request (1-4) should be 1 byte.

This particular approach isn’t one I had considered before, but if it works, it would be interesting/neat. If you only want to respond to physical events, your rule based on button events should work. If you want to respond to digital on/off events as well, then a trigger of “switch on” or “switch off” would work for both. You are correct that the parameter value should stick until you change it (either manually or via the device page).

A different question would be why the “duration” parameter of the setLevel(level, duration) command does not work for you, since using that instead of off() or on() should give you the ability to specify the transition time in that manner. I have almost all of mine controlling smart bulbs, so I don’t have a good way to test this myself, but maybe Inovelli will have some ideas as to how their devices respond to this since it looks like it’s just sending a standard Z-Wave switchMutliLevelSet including any duration if specified.

I believe its because he still has Local Control enabled. That means a physical button event at the switch is going to take local action AND send a button event. With Params 3-4 at 0, the local control is going to do instant on/off AND trigger the rule. The rule fires, but the switch has already been set on or off locally so the rule to fade does nothing (can’t fade to off if already off)

With Local Control disabled I think it will do what he wants. I did a quick test and seems to work for me. I posted more details as a reply to the other thread

1 Like

Eureka! It worked!!! I had to do it in Rule Machine as a Basic Button rule wouldn’t let me put in zero as a “number”. I had to put it in as a string, and then it wouldn’t let me add the third parameter. Seems like a definite bug in Hubitat’s Basic Button app (which I’ll post over there. But I digress).

So for my switch I have Params 1-4 set to 0, 3, 0, 0. I have 51 set to Yes, Disable Delay. (I don’t do multi-taps from this switch and want the fastest possible on time).

I then created a rule for 1 Pushed that setConfigParameter to 4, 1, 1. (Param 4, 1 second, 1 Byte). Param 4 is the physical ramp speed. That sets the ramp speed to 1 second giving my 1 pushed dimming rule time to run.

I then created a 1 Pushed rule that dimmed the light to 0 over 1 second and then setConfigParameter to 4, 0, 1. (Param 4, 0 seconds, 1 Byte). That reset Param 4, the physical ramp speed to 0 seconds so when I turn it on again it will be as fast as possible.

Just for a test I added before the 1 Pushed setConfigParameter an action to “dim” the light to 100% over 0 seconds. I did that as I like to have the config/“favorite” button 7 Pushed, set the light to a low level and then I want to get it back to 100% by just pushing the paddle up (i.e. a 1 pushed) without having to turn it off first (because I also set the turn on defaults, Params 9 and 10, to 99). I went right over to the light in about 5 seconds and when I first tried it, it took about a second to come up to 100%. But after I did a 7 push to dim them to the low level and then a 1 pushed it started acting virtually instantly. After that even if I turned the lights off with a 1 push it acts virtually instantly to come on while the 1 held (down paddle one time) does do a second fade out. I don’t know if it just took a bit for the rule to take effect or not, but it’s working now. So I did it! I now have different Ramp On/Ramp Off times!! Woo hoo! Maybe I should go around like Kesuke Miyagi from the Karate Kid, Ramp On, Ramp Off. Ramp On, Ramp Off.

But I do think I found 1 caveat: In trying to show to my family I was doing the on/off very quickly and it wasn’t working right at all. However, if I waited about 5-10 seconds between turning the lights on or off it worked. I therefore think it does take several seconds for the setConfigParameter to get to Hubitat and then take effect.

Here is what my Rule Machine screen shot looked like before I added the 100% “fade” on:

and after with the 100% fade on in 0 seconds and 7 pushed dimming them to 45% in 0 seconds:

Here are Params 1-12:

And Param 51:

@EricM_Inovelli
@Eric_Inovelli
@Eric_Inovelli

1 Like