Help with turning off dimmer when light hits 1%

Hello all,

I installed GE dimmer switches throughout my vacation rental. They are paddle style. The issue I’m running into is that people don’t understand that by tapping the down on the paddle will turn off the light. Instead they hold the down on the paddle to turn off the light. This, of course, does not actually turn it off. It brings it to 1%. What I would like to do is have the switch automatically turn off if the light switch hits 1% (or like 5% or lower). Can anyone help me on how I would do this?

Thanks so much.

There are a few ways to skin this cat, but I would use the Program Logic Event Generator(PLEG). I’d setup a PLEG that tests to see if the HallSwitch is between 1-5% and if it has been in that range for more than 2 to 5 minutes, then switch the light off.

Input:
Device Property
MyHallLevel: HallSwitch LoadLevelStatus

Conditions
InTheZone: (MyHallLevel > 0 AND MyHallLevel < 6)
TurnOff: (InTheZone AND (InTheZone; NOW > 2)

Actions:
TurnOff : Turn HallSwitch Off

That was going to be my suggestion but Z-Waver beat me to it.

Ohhhh PLEG. This is a new thing for me. I’ve downloaded the Program Logic Event Generator and Program Logic Core. Once in there though… yeah… I’m gonna have to search in here for PLEG posts. Cause I understand the concept of what you are doing up there above but how to put this in PLEG isn’t as obvious. I was able to create the “Device Property” but when I get to the conditions I begin to get that GREEN feeling LOL

The GE switches don’t support instant status. So, you’ll have to rely on polling. Just create a scene that runs every 5-15 minutes (pick an interval that makes sense to you that won’t overload VERA) that polls the various switches. When the current DIM Level is found to be x% or lower, send a command to turn them off.

This is all done in LUA scripting.

PLEG Basics - An Introduction to the Program Logic Event Generator by @RexBeckett

Of course you could accomplish the same thing with Lua code, as @ember1205 points out. But, I think PLEG is more within reach fro most people, as compared to Lua programming. None the less: Conditional Scene Execution: Some Examples by @RexBeckett

Thanks peeps! I will check that manual out when I have some time and give it a go! I’ll keep you posted on how I do!

[quote=“ember1205, post:5, topic:196577”]The GE switches don’t support instant status. So, you’ll have to rely on polling. Just create a scene that runs every 5-15 minutes (pick an interval that makes sense to you that won’t overload VERA) that polls the various switches. When the current DIM Level is found to be x% or lower, send a command to turn them off.

This is all done in LUA scripting.[/quote]

I just installed one of the z-wave plus GE dimmers like this and it does support instant status. Every change made by pressing the paddles immediatly showed in the Vera dashboard. If he has the new one he can avoid the extra polling.

[quote=“Priest, post:8, topic:196577”][quote=“ember1205, post:5, topic:196577”]The GE switches don’t support instant status. So, you’ll have to rely on polling. Just create a scene that runs every 5-15 minutes (pick an interval that makes sense to you that won’t overload VERA) that polls the various switches. When the current DIM Level is found to be x% or lower, send a command to turn them off.

This is all done in LUA scripting.[/quote]

I just installed one of the z-wave plus GE dimmers like this and it does support instant status. Every change made by pressing the paddles immediatly showed in the Vera dashboard. If he has the new one he can avoid the extra polling.[/quote]

Nope. That isn’t instant status. You’re getting quick response because the switches do send a notification packet, and because the Vera is “directly adjacent” to your switch, it works a lot LIKE instant status. It isn’t 100% reliable, as you will discover at some point in the future if you’re using the operation of that switch to trigger other things to happen.

Cooper and Leviton have paid for the rights to use Instant Status in their switches, so those are the ones where you will find it (not ALL models, mind you).

Okay, good to know.

Everything in my house can communicate with my Vera3 (no antenna mod) directly. I dont have a little house, but the Vera is 3 feet below the floor joists on the wall in the basement and dead center of the house. I guess im lucky that I dont actually have to rely on the mesh for things to work.

I have not triggered events off of that switch status…since I just installed it night before last. It is good to know that I’ll need to be careful if I plan to in the future. I am using that type of trigger off of a couple enerwave dual relay switches and have only missed commands when Vera decides it wants to miss every command from everything. The rule then is to stop pushing buttons and flipping switches and let her sort her issues out. She usually catches up and does everything at once within about 5 minutes of the hiccup.

Ok I finally was able to try this and it looks like I’m having issues with the TurnOff under the conditions. The InTheZone seems to be going through but then it says the TurnOff is invalid. I’ve checked the spacing… the parenthesis etc and it all seems to be just as you have it.

In the action do I literally do nothing but select it and change the name and that’s it?

Thanks

[quote=“Z-Waver, post:2, topic:196577”]There are a few ways to skin this cat, but I would use the Program Logic Event Generator(PLEG). I’d setup a PLEG that tests to see if the HallSwitch is between 1-5% and if it has been in that range for more than 2 to 5 minutes, then switch the light off.

Input:
Device Property
MyHallLevel: HallSwitch LoadLevelStatus

Conditions
InTheZone: (MyHallLevel > 0 AND MyHallLevel < 6)
TurnOff: (InTheZone AND (InTheZone; NOW > 2)

Actions:
TurnOff : Turn HallSwitch Off[/quote]

Ok… Never mind… I GOT IT! Not sure exactly how that all happened so easily but this is what I did. I entered the input for each of my light switches (there are a good number) just like you had in your post here. However in the conditions I only entered the first one in your post… the In The Zone one for each switch. Then I went over to Action and for each switch I entered the device in the part down below and in the action I set the dimmer level at 0. Ran each one and then saved. Rebooted Vera and now… without having to poll or anything… whenever a light switch is brought down to 4% or less it just goes to the OFF (or zero) immediately. That is just brilliant! And I did it all from 5000 miles away. LOL

Thanks for your advice and input.

So update on this idea of turning the switches off at a low % of dim. This worked well in PLEG. I have a vacation rental with the GE dimmer switches. The guests don’t seem to understand them so instead of just hitting the paddle down to turn off the light a few people hold them until they dim down until they think it’s off. Leaving the dimmer at 1 - 4%. I was trying to combat the switch eventually burning out from constant on mode. Well it was a nice thought but what I’ve actually found over the course of the year is that the guest dims it to 1%, Pleg in Vera then turns it off. Unfortunately though the dimmer remembers the last setting and so when a guest hits the up on the paddle to turn the light on it goes up to that % it was last set at and then Pleg turns it off so it makes it look like the dimmer on is broken and you have to hold it up to get the full function to work again. So… right sentiment… not so right in actual practice.

If you update your PLEG routine that turns it off to ALSO set a value on the variable “LoadLevelLast” to 100, that would allow the switch to come back on at 100% brightness. I can’t guarantee that’s the variable name you’d need to use because I don’t have any of the GE Dimmers in use - mine are all Leviton. You can check the Advanced settings for the device and look at the Variables tab to find what it’s actually called on your switches.

I can’t vouch for your specific dimmers, but my Fibaro dimmers have a setting where I can control 1) Remembering the last dim level, or 2) Forcing a specific brightness each time they are turned on.

For a couple of mine I have them forcing 99% - both of them are typically turned on manually and needed at 99%, but for various circumstances their brightness will be automatically changed (eg my living room lights will automatically dim when we turn off our dining table light AND its evening, the vanity light near my kids rooms will automatically come on at 1% when we go to bed and turn off at sunrise… both are back to 99% when manually turned off and on or are turned on fresh). The others I have retaining their prior brightness level, as they automatically come on via motion sensor association - I still auto-control the brightness as necessary, but the lights always stay at that brightness until I say otherwise.

If you don’t have a setting for that then, as ember1205 suggested, just add in an extra step in your logic to bump up the brightness. I do similar with my auto-brightness controls for the sensor controlled lights… whenever I auto-change the brightness I then have to send an off command, as changing the brightness unfortunately also causes them to turn on.

Alternatively don’t even turn them off… just set 5% or lower to instantly jump back to 99%. Thus it’s never possible to get to an “off” brightness, it just loops back to full brightness. Thus they’ll then turn them off manually (and/or a timeout so if the lights are left on more than x hours they auto-turn off).

Disclaimer - I should add that my setup above DID work well until my Vera completely shat itself two weeks ago, so I’m talking theoretical as my home is pretty well screwed and all this stuff goes batsh#t

I’m not sure how to go about this. I’ve managed to reset my switch to turn off when it’s dimmed to 4% or lower. And when I hit the On button it does not come on because the last known set was 4% and it turns it off again. I’ve gone into the Action tab and have tried to add a second action from that device to set the “LoadLevelLast” to the desired % so that when you turn the light on again it will go to a set level but after picking the device for a second time in the “Select Device to Add to Current Interval” and then going to the action drop down to the right “LoadLevelLast” is not listed. Actually the commands in this list do not match at all the commands I got when I added the device to the “Device Input” tab.

I even tried adding a whole new Device Input just for “LoadLevelLast” and putting the same conditions on it and then go to the Action. Again the fields to choose from are completely different than the fields from the Device Input. I do not see a “LoadLevelLast” to set in the action drop down.

Is there anyone that could possibly help me with this? Write a script of code or something? All of my dimmers have “LoadLevelTarget”, “LoadLevelLast” and “LoadLevelStatus” in the variables under the advanced tab. The goal:

When the switch is dimmed to 4% or less the switch turns off and sets the “LoadLevelLast” to a desired % depending on the dimmer.

Thanks in advance to all the experienced ones out there.

Create a scene that is triggered by the light being turned off. There is no immediate or delayed action, but you will need it to run a piece of LUA code to set LoadLevelTarget and LoadLevelLast to some value (same for both) which will become the lighting level when they are turned back on again.

The LUA code will need to be something like (this is off the cuff, so no guarantees here):

luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1","LoadLevelTarget","XX","YY") luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1","LoadLevelLast","XX","YY")

XX should be the percentage you want to set the dim level to and YY would represent the ID of the specific device.

Also, be advised that turning the lights back on “right away” will possibly not work because of a delay in Vera polling the switch to find out it has been turned off. So, the resetting of the dim value may take a short bit to be populated to the switch.

[quote=“ember1205, post:18, topic:196577”]Create a scene that is triggered by the light being turned off. There is no immediate or delayed action, but you will need it to run a piece of LUA code to set LoadLevelTarget and LoadLevelLast to some value (same for both) which will become the lighting level when they are turned back on again.

The LUA code will need to be something like (this is off the cuff, so no guarantees here):

luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1","LoadLevelTarget","XX","YY") luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1","LoadLevelLast","XX","YY")

XX should be the percentage you want to set the dim level to and YY would represent the ID of the specific device.

Also, be advised that turning the lights back on “right away” will possibly not work because of a delay in Vera polling the switch to find out it has been turned off. So, the resetting of the dim value may take a short bit to be populated to the switch.[/quote]

Thanks for the suggestion. In a pinch it would be a solution. If I do that though then I do lose the function of the light switch that is enjoyed by those that understand how to turn the dimmer switches on and off. If you set your light to 75% you should be able to tap it to turn it off and then tap it to turn it back on at the same level you had it at. What I would rather do is make it an “if/then/AND” situation. If someone dims the light down to below 5% to “turn it off” I’m going to assume that they just don’t know how it functions so I’d like the possibility of IF the light is set to below 5% THEN turn the light off AND set the LoadLastLevel to XX. I can get the first part of that in PLEG by creating the IF below 5% then do the action. It’s just that the action in PLEG gives me the option of turning it off using “LoadLevelTarget” but it does not give me the option to of “LoadLevelLast” even though that is in the list when I create the Device Input.

Does your dimmer return wattage like Fibaro and Aeon devices?

If so turn your light down to the level you would like to trigger, say 5%, and check what Vera shows the wattage as (give it a while as power levels are generally only sent at intervals).

Then create scene, select your dimmer, and select “Energy usage goes below”. Key in your wattage from above.

Then you can enter your LUA code to be executed.