Turn Off Lights that were Turned on by Door Sensor But not closed


(Patrick Musselman) #1

So here is the scenario. In my entryway I have a closet that does not have a light inside however there is a light outside of the closet. So I installed a door sensor in the closet and set the light to come on when the door is opened and have it turn off when the door is closed. Well, I have a 14 year son whose idea of closing a door is not really the same as the rest of the world. Training issue, I know. Is it possible to have the ability to turn off the light after x minutes if the door sensor still remains open? I think I might need a virtual switch to accomplish what I need to do but thought I would ask the experts first. Thanks! -Pat


(Eric R) #2

No need for a virtual switch. You could use the “Power Allowance” SmartApp in the “Green Living” category. It turns off a light after X minutes of being turned on.


(Patrick Musselman) #3

Thanks I will give that a try.


(Patrick Musselman) #4

Well I gave this a try and it worked. However, the power allowance turns the light off after two minutes and this seems to work for all triggers , if they are manual or from another trigger. Is it possible to only have the light switch use the power allowance for the closet only and if so how?


Simplerulebuilder - now private
(Patrick Musselman) #5

I figured this out. I am using the @JoeC Web based rules engine to make this work with Power Allowance to only turn off when the Closet Door Sensor is tripped.

  1. Created a Simulated Switch.
  2. Set the door sensor to turn on the light.
  3. Tied a Light Turn On Open/Close smart app to the Simulated Switch that when the closet opens it turns on the Simulated Switch. (Note: I confused the hell out of myself with the Light Turn On Open/Close smart app because after you create smart app then go back into it to view from the device tile you really cannot tell that it is switching on the Simulated Switch.)
  4. Using @JoeC Web based rules engine I created a rule to turn on the light using the Simulated Switch as the trigger for AutoOn. I am using the AutoOn to validate that the light is turn off before turning it on. I did this in the event that if someone had manually turned the light on or if the light was turn on my another smartapp if was not turned off in step 5.
  5. Using @JoeC Web based rules engine I created a rule to turn off the light using the Simulated Switch as the trigger for AutoOff.
  6. Then I applied the Power Allowance smart app to the Simulated Switch so that after 2 minutes it turns the light off by engaging the AutoOff from @JoeC Web based rules engine.

Using this method does not force me to accept that the Power Allowance smart app will turn the light off after 2 minutes for all activities for the light switch, only for the simulated switch.

I am sure this is nothing new to the great minds in this community but I wanted to document for others and myself later on. I will still be scratching my head when I look at this a week from now. LOL. Also, if anyone has a more efficient way of performing this task please let me know.

-Pat


(Patrick Musselman) #6

Ok I came home tonight to a free house so I thought I would start to extreme test my solution tonight. Everything went as planned except for on minor and odd detail. So when someone switches on the Entryway light comes on as it should. I have the Power Allowance app set to off in 7 minutes. But it looks like it took 11 minutes. Odd. Maybe just a delay in updating but I will test again tomorrow. Any thoughts. And this maybe out of left field but does the power allowance app account for all the scheduled power off actions in any events for that device. For example in addition to the 7 minutes in my power allowance, my simulated switch that is tied to the Entryway switch and it has an auto power off after 2 minutes (not by power allowance). Since my simulated switch has 2 smartapps (auto-on & auto-off) thus giving 4 minutes for each step in the event for a total of 11 minutes. I know it is out there but just a little free thought. I think I am going to grab a bit to eat and enjoy a movie. Thanks!