I need assistance creating a routine in ST. The door sensor is the trigger.
I will open and then close the door to the garage to turn on the light switch. When I return to the house I open and close the door and the light switches off. How do I structure the routine to accomplish this task?
How are you triggering the door to open? Are you doing it manually via a garage door opener? Do you want the Routine to trigger the door to open/close when you arrive/leave home? Are you using Location Modes to track whether you are home are not?
The challenge here is that opening/closing the door is not sufficient triggering/bounding conditions to determine whether to turn the light on or turn the light off since there is nothing to indicate whether you are leaving or coming home. In either case, the door will open and the door will close. You need something more like:
If “I’m Home” (pre-condition)
Garage door sensor opens
Then Turn on light
If “I’m Away” (pre-condition)
Garage door sensor opens
Then Turn off light
I have a door sensor on the door leading to our garage. My current routine will function just fine if we leave the door ajar. When the door is opened the ceiling light comes on via a smart switch. When we come back in and close the door the lights are turned off. The preference is to open the door and go into the garage and shut the door behind us. Currently when the door is closed the light will shut off. Hope you have a suggestion on how this routine should be structured.
What happens if a second person comes out while you’re still out? Or if you know you’re only going to be in the garage for a few seconds so you don’t close the door until you go back in the house? Or if you come out to the garage, then drive away?
I appreciate your attempt to assist me but your avalanche buried me for a while. It seems that I was making the process too complicated. My routine that I have now works fine as long as I leave the door ajar while we are in the garage.
I don’t have a perfect solution either. I might have to consider the other recommendation to add a motion sensor in the garage.
In our case, I have an open/close sensor on the door from the house to the garage. I also have a tilt/vibration sensor on the roll-up garage door.
The logic I have is if the interior door is opened and the light is off (precondition), turn on the garage light and set it to turn it off after 10 minutes.
Opening or closing the roll-up garage door will also turn the light off.
So if someone enters the garage to look for something or to get in the car to leave, the light will turn on for them. The light will stay on for other people coming into the garage. Then if we open the garage door to drive away, the light goes off.
This doesn’t handle the case of going back in the house. So far we have just trained the last person to open the door into the house and then either close the garage door (light goes off) or turn off the light manually. Also, if someone forgets, it will still turn off after 10 minutes.
If someone needs to work in the garage for longer than 10 minutes, they can go into the garage, then turn the light off and on. This will stop the 10 minute timer from turning off the light.
Sorry to bombard you with too much info. The basic issue with what you want to automate is that there is no way to tell the difference between opening/closing the door to go into the garage and opening/closing the door to go back into the house. There needs to be something to discern the difference or you have to make some assumptions about behavior, as in the example of closing the door a second time means the light should be turned off.
Other than your current solution, I agree with the other suggestions of adding a motion sensor in the garage to detect when someone is in the garage for determining when the light should be on/off.
Sorry to see you’ve deleted the Rule code that you suggested, as I was starting to look at it for a similar, but not identical situation I have.
I find that a community is all the stronger if there are many and varied contributions, which all go towards improving the knowledge base.
So, just to let you know that I for one found it interesting and am sorry you’ve taken it down.