slevittmd Posted September 22, 2017 Share Posted September 22, 2017 I’d like to make an entry scene that activates when I come in to the house at night. I was planning to have the door opening trigger the scene (through contact sensor on the alarm, which was integrated). However, only want it to happen when I come home, not when leaving, and only at night. I’m thinking the best way to make that happen is to activate the scene after a garage door opens. Something along the lines of if garage door 2 opened within the past 5 minutes, and if the time is more than sunset+30 minutes, then when garage entry door is opened, activate entry scene. However, not sure the language I’d need to make that happen. Thanks! Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
sonic30101 Posted September 22, 2017 Share Posted September 22, 2017 Make a timer agent that runs when the garage door opens for 5 minutes Then when the door contact opens> use a conditional if the timer is running> if sunset> turn on desired scene Link to comment Share on other sites More sharing options...
slevittmd Posted September 22, 2017 Author Share Posted September 22, 2017 Make a timer agent that runs when the garage door opens for 5 minutes Then when the door contact opens> use a conditional if the timer is running> if sunset> turn on desired scene Thank you! Sounds like that would work. How do you put two if’s in there though? I haven’t done much programming with conditionals. Would it just be the two if statements in a row? Any nesting? Is there any good guide on how to program using conditionals? Like what needs to be nested? Where/when you need to insert stops? Etc? Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
sonic30101 Posted September 22, 2017 Share Posted September 22, 2017 nesting the if within the if. I currently do something similar when coming in from the garage vs leaving based on garage door status vs kitchen motion status Link to comment Share on other sites More sharing options...
sonic30101 Posted September 22, 2017 Share Posted September 22, 2017 I made all my doors/sensors change a variable value then i have all my programing for occupancy in there so i can look at it all in 1 place which was easier for me to work with Link to comment Share on other sites More sharing options...
AJ_ Posted September 22, 2017 Share Posted September 22, 2017 Not that I have done this yet but it may be easier with IFTTT and/or including your security system in to the mix. If your security system is armed and garage door opens, you are coming home. Link to comment Share on other sites More sharing options...
sonic30101 Posted September 22, 2017 Share Posted September 22, 2017 I use that as well but that works for when you come home but mostly for AV stuff, the above is specifically for coming and going for all users including guests. Always more than 1 way to skin the cat When you say hey google im home The delay then the wifes part overrides my music playing in case we both are arriving Link to comment Share on other sites More sharing options...
Cyknight Posted September 22, 2017 Share Posted September 22, 2017 Note that when using security systems, depending on the system and/or driver - the 'armed' state may not be reported until the entry/exit delay is finished (which would make it useless for the scenario described). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.