Different ramp speeds for on/off? LZW31 and LZW31-SN

Hi,

Is there a way to set up different ramp speeds for on vs off from the physical switch?

I like having on set to 0 - nice and quick, but would like off to be set to 1 or 2 - to give a nice little fade as you’re exiting the room.

Any quick and dirty ways to edit the DTH to make this happen?

IDEA: simply set the ramp speed for the zwave parameter (I think that’s parameter3) to 1, and then set the physical ramp speed parameter (I think that’s parameter4) to 0, and then add the appropriate code to use parameter3’s setting when issuing an off command (instead of parameter4’s setting) when using the physical paddle. I poked around in the code for a but, but it wasn’t obvious on how to accomplish that.

Suggestions welcome.

Ugly but it might work-

Set the ramp speed for Z-Wave commands to be zero. Set the ramp speed for local commands to be 2/3/whatever.
Now make an event- when the top paddle is tapped once, set the dimmer to 100%. As that’s a z-wave command it should happen instantly.

Of course this requires a hub that will react fast enough, smart things won’t be if the event is cloud based.

Maybe I’m missing something here, but the on/off switches don’t support a ramp rate because it’s not a dimmer. @Chris is mentioning dimmer, but @jallen202020 is mentioning on/off series.

Just to confirm @jallen202020, you have the LZW30 series product right? Or we talking about smart bulbs?

Cross-posted

@harjms This post is tagged lzw31-sn, so I’m thinking the OP is referring to a dimmer as a switch. The cross-post is to a LZW31-SN thread as well.

From the switch’s settings, both the ramp rate and the dimming speed get set for On and Off at the same time, unfortunately.

2 Likes

correct - LZW31-SN

Yes I know they get set that way from the settings, but looking for ideas on a code mod to the actual device handler…I know it’s possible, just don’t have the outright programming chops to do it, so hoping for someone more familiar with that side of things to point me in the right direction.

@Bry - Ahhhh…I didn’t see that on mobile.

Could you setup down button pressed once as a rule to dim from present level to “Off” over 2-3 seconds from Smart Things?

Just thinking out loud . . . @Chris and @harjms are both saying do it using scene functionality. I think the problem is that is you want if you want it to be done as a single-tap, then you lose standard dimmer on-off functionality directly from the switch, because you can’t use a single tap down for to run the scene if the switch is physically controlling the load. The switch would turn the light off before the scene would run.

A double-tap down would work, though. @jallen202020, does it have to be a single tap down or would a double-tap down suffice?

No, any manual intervention to get it to work and it’s not worth it. Sours user experience. If there were a way to set ramp speeds for on and off to different integers, that’s the only way it would be acceptable…nice to have, but not critical…I do think it makes the lighting seem ultra elegant if you were able to do it this way, so maybe for something down the road in the product roadmap :slight_smile:

@jallen202020 - Definitely worth putting in a request.

1 Like

Moved this over to the Wishlist.

2 Likes

@jallen202020 Are you using SmartThings? I see you referencing the “DTH” so that is what I am guessing.

In Hubitat you can use rule machine and the custom command “setConfigParameter” to change the ramp rate when the switch is turned on vs turned off.

2020-10-01: Adding custom command setConfigParameter(number, value, size) to be able to easily
set parameters from Rule Machine.   

Something could be added to SmartThings but you would have to use something like WebCoRE to set it up.

1 Like

In Hubitat you can use rule machine and the custom command “setConfigParameter” to change the ramp rate when the switch is turned on vs turned off.

Could you please show such a rule such that 1 pushed sets it to 0 so it is instant on, but 1 held sets it to say 1 or 2 so we would get a bit of a fade out.
@EricM_Inovelli
@Eric_Inovelli

Thanks,

Stuart

It sounds like you are looking for the different speeds specified with parameters 1-4.

Ramp rate set to 0 and dimming speed set to 1 or 2.

Thank you for responding.

I think I found a fairly easy way to pretty much get the desired effect. I’m using Hubitat with my Red Dimmers, LZW31-SNs, so I don’t know how this works with other switches, bulbs or hubs. That said, the workaround came to me when I just found out that setting the Fade (dim) time in a Rule for a dimmer setting overrides whatever was set in the device’s settings. (But as you’ll see below, I don’t think a Dim rule overrides a Ramp setting).

In the device itself I set Params 1, 2, 3 and 4 to 0, 3, 0 and 1.*

I then created a rule for Button 1 Pushed for each switch (i.e. to turn it on with the usual upwards push of the paddle) as a Dimmer command setting the % to 100 and the Fade (dim) to 0. When I first tried it, I was setting 1, 3 and 4 to 0 and creating a rule for Button 1 Held (off) to fade to 0 over 1 second. That didn’t work unless I set the Param Disable Local Control to Yes inside of each device (the Disable Local Control parameter doesn’t have a # yet). I’m not sure why this is as I thought setting the rule to have Button 1 Pushed fade the light to zero over 1 second would have overridden Params 1, 3 and 4. Turning off physical control of the switch was unsatisfactory as that then messed up dimming it from the switch. (I found one kludge using button 8 and 6 events but it was far from elegant).

However, with the 1-4 settings of 0, 3, 0 and 1 I then turned Physical control of the device back on (i.e. I set Disable Local Control to “No”), and deleted the rule for Button 1 Held. This seems to be working much better than having to turn physical control off.

This seems about as fast as I can turn it on** and still have a different fade out rate without having to create a child device or trying to guess how to use setConfigParameter.***

BTW, I did get one weird thing happening: To test the speed I pushed both buttons on at the same time. This caused either the switches and/or Hubitat to get confused and they stopped responding to commands at the switch. I turned then on and off with Alexa and they are working again. I don’t know if it matter that the 2 switches are right next to each other in a 2 gang box.

Stuart

  • BTW, I set Param 2 to 3 so that I could dim up/down from the switch because I found that if I set Param 2 to 0 the dimming happened so fast that I couldn’t see the change and react fast enough to get a desired level.

** With the understanding there is the default 700 ms delay as I do want to have a double and triple click rule for these switches. If not, I could have used Param 51, Disable Physical On/Off Delay, to turn the switch on/off even faster. I haven’t tried using Param 50 because I don’t know what the default is and once set I don’t see any way to pick to reset it.

*** The printed instructions that came with the LZW31-SNs seem to have 1&2 and 3&4 reversed. Likewise, I understand from reading some of the threads that some of the byte values for the parameters are wrong so I’m leery of trying to use setConfigParameter. However, I can also imagine what a pain it is to get the instruction sheet reprinted, so an insert with those corrections (and any others needed) would certainly be appreciated and/or having the Wiki update on a more timely basis.

So the more I get experienced with Hubitat rules and the parameters the more I’m wondering why the following didn’t work:

  1. I set Params 1-4 as 0, 3, 0, 0

  2. I set Param 51 to Yes

  3. I created a rule for 1 Held to dim the lights to 0 over 2 seconds.

Even with Param 51 set to yes, it says we can create a rule/scene for 1 Held:

So this rule should still have worked:

When I turned the switch on and off it reacted instantly, ignoring the 1 Held rule. Any ideas why?

@EricM_Inovelli
@Eric_Inovelli
@bcopeland

Can you let me know what you’re trying to do again? Sorry, these posts are starting to blend together and I’m all out of caffeine :frowning:

What you need is a Boston Cooler, says an alum of Vernor Elementary/Jr. High.

I am trying to get the “instant on” effect (hence Params 1, 3, and 4 at 0 and 51 to Yes) yet get a 1 second fade out. (BTW, I used 2 seconds above to make the effect obvious if it was going to work. I also looked at a Hubitat Rule to fade out over time, but that is in terms of minutes and doesn’t seem capable of handling seconds).

Since the info says that even with 51 set to Yes I can still create a scene for 1 held my rule to fade to 0 over 2 seconds should have done that with the light at 100%. Instead, the rule is ignored and I’m getting the virtual instant off.

I did post something earlier that worked - to a degree - by setting Param 4 to 1 and then using a 1 pushed to go to 100% at 0 seconds. However, even with 51 set and my 1 pushed rule, it still takes about a second + for the light to come on to 100%. My other attempt was to disable physical control, set 1, 3, and 4 to 0 and 51 to yes, but then I lost dimming by the paddle. (I’m still struggling to figure out how to simulate dimming using Params 6 and 8, but they are labeled in contradictory fashion in places and I’m not getting satisfactory results with my experiments to do that yet. But that is another story - though if solved could be a solution here too).

I was born about 20 min from there!

Ok, since I don’t have a Boston Cooler, you’ll have to bear with me here.

There are two things going on that I kind of want to separate if you don’t mind.

The delay from scene control

Parameter 51 = 700ms delay or No Delay

The adjustments that can be made from ramp rate or dinner speed

Parameter 1 = Dimming Speed (when you hold up or down the dimmer - the speed at which it changes)

Parameter 3 = Ramp Rate (the amount of time the switch takes to ramp the bulb from off to on)


If you leave P51 on (ie: 700ms delay is active) and you set 1 and 3 to 0, there will be a 700ms delay between when you push the button to when it turns on.

If you set P51 to off (ie: get rid of the 700ms delay), and P1 and P3 to 0, it should mimic an on/off switch that is instant.

I don’t think it’s possible to split the on vs off ramp rate and dim speed even with scene control.

But just so I’m understanding correctly, you’d like to have the switches ramp rate (ie: single tap up or down) to be instant (ie: it goes from 0 to x instantly), but fade off, correct?

Sorry if I’m completely misunderstanding.

It did take me a little while to get a feel for dimmer speed vs. ramp speed, but I feel I now understand the difference. Yes. The ultimate goal is to have them come on virtually instantly (i.e. Param 51 On and params 1, 3 and 4 set to 0), but to have them fade off over 1 second.

I’ve done a few experiments with rules, params 1-4, 51 and enabling/disabling the physical switch. If I disable the physical button then a rule for 1 pushed to go to 100% at 0 seconds turns on the lights in about 1second.* I also created a rule for 1 held to dim to 0% in 1 second and that took about 1 1/2 seconds. So that worked in the sense that the on and off times were different, but the 1 pushed rule to “dim” (turn on) to 100% in 0 seconds took about 1 second. I found that turning Param 51 on or off did not effect that. (Which I’m assuming is because the physical switch was turned off).

I then tried to go another route. I first deleted the 1 pushed rule. After that I turned the physical switch back on (i.e. I set Disable Physical Switch to No) and then created a rule to delay a 1 Held by 1 second, but that rule was ignored. Setting Param 51 made no difference to that rule doing anything. i.e. if I had Param 51 on, on/off was virtually instantaneous and with 51 off it added the 700 ms back in. but in either case the on/off times where identical. So I have no idea when a rule delaying 1 held by 1 second would ever actually do that.

Here is my 1 Held 1 second delay rule:

So while there seems to be rules to control the dim rate I can’t figure out how to control the ramp rate. I had tried several experiments with setConfigParameter for Parm 4 (ramp rate from the switch), but none of them seemed to do anything (that is setting the params to 0 and setConfigParameter to 1 or vice versa of setting the params to 1 and trying to use setConfigParameter to set them to 0).

In going through some other threads I saw this in post 170 of Firmware v1.52 (Beta):

Feb 11

  • The current version of the HA zwavejs integration does not support the changing of config parameters (I believe the feature is coming soon though). Currently, the only way to change config parameters is to use websockets (which I am not too familiar with) or with something like zwavejs2mqtt
  • The delay is not adjustable via the config button at this time.
  • A config file with the latest beta features is currently not available. I think there are a few people working on it though.

So that may very well answer why the setConfigParameter and setLevel aren’t working when I put them into Hubitat Rules.

Final, BTW, does Param 50 change the 700 ms rate? I’ve been afraid to set it as there is no way to clear it once it is set. Is the default for Param 50 700 ms?

Stuart

*I know my times are not exact due to my reaction time of starting and stopping the stopwatch when I see them turn on or off, but I get pretty consistent results over multiple tests, so the relative times are pretty accurate, i.e. how much of an extra delay I get and what is the initial delay in turning them on or off.

Eureka! It worked!!! I had to do it in Hubitat’s Rule Machine as a Basic Button rule wouldn’t let me put in zero as a “number” for the second parameter. 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’ve posted 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 off 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

3 Likes