Author Topic: Help with turning off dimmer when light hits 1%  (Read 1944 times)

Offline Greybeardvacationrental

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +1/-0
Help with turning off dimmer when light hits 1%
« on: June 24, 2017, 03:43:59 am »
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.

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4437
  • Karma: +247/-120
Re: Help with turning off dimmer when light hits 1%
« Reply #1 on: June 24, 2017, 05:18:44 pm »
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


Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1259
  • Karma: +31/-32
Re: Help with turning off dimmer when light hits 1%
« Reply #2 on: June 24, 2017, 05:25:54 pm »
That was going to be my suggestion but Z-Waver beat me to it.
Vera 3, 1.7.1030, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb

Offline Greybeardvacationrental

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +1/-0
Re: Help with turning off dimmer when light hits 1%
« Reply #3 on: June 26, 2017, 09:40:00 pm »
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

Offline ember1205

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +5/-21
Re: Help with turning off dimmer when light hits 1%
« Reply #4 on: June 26, 2017, 11:24:53 pm »
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.

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4437
  • Karma: +247/-120
Re: Help with turning off dimmer when light hits 1%
« Reply #5 on: June 27, 2017, 07:03:08 am »
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

Offline Greybeardvacationrental

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +1/-0
Re: Help with turning off dimmer when light hits 1%
« Reply #6 on: June 29, 2017, 01:15:42 am »
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! 

Offline Priest

  • Full Member
  • ***
  • Posts: 223
  • Karma: +9/-0
Re: Help with turning off dimmer when light hits 1%
« Reply #7 on: July 05, 2017, 11:09:26 am »
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.

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.

Offline ember1205

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +5/-21
Re: Help with turning off dimmer when light hits 1%
« Reply #8 on: July 05, 2017, 11:17:11 am »
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.

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.

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).

Offline Priest

  • Full Member
  • ***
  • Posts: 223
  • Karma: +9/-0
Re: Help with turning off dimmer when light hits 1%
« Reply #9 on: July 05, 2017, 11:30:11 am »
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.

Offline Greybeardvacationrental

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +1/-0
Re: Help with turning off dimmer when light hits 1%
« Reply #10 on: July 22, 2017, 02:51:32 pm »
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


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

Offline Greybeardvacationrental

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +1/-0
Re: Help with turning off dimmer when light hits 1%
« Reply #11 on: July 22, 2017, 05:34:57 pm »
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. 

Offline Greybeardvacationrental

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +1/-0
Re: Help with turning off dimmer when light hits 1%
« Reply #12 on: May 26, 2018, 01:01:27 pm »
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. 

Offline ember1205

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +5/-21
Re: Help with turning off dimmer when light hits 1%
« Reply #13 on: May 26, 2018, 03:04:31 pm »
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.

Offline Tillsy

  • Full Member
  • ***
  • Posts: 206
  • Karma: +9/-3
Re: Help with turning off dimmer when light hits 1%
« Reply #14 on: May 28, 2018, 12:32:37 am »
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.

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