Hi all!
New SmartThings user here. Wanted to run an idea by everybody to see if the idea was even possible. I have a Sighthound camera system, the SmartThings hub, and some GE Z-wave switches. Again, just starting out with HA.
Using IFTTT, I can turn on a SmartThings switch when a Sighthound rule is triggered. Very easy stuff and it works great. BUT… (always a “but” right?)
…I was hoping to play around with virtual switches and SmartApps to add some more functionally to the above HA. The issues I have with the above is:
- The light will come on even during the day (no point to that)
- The light stays on until manually turned off. Even if I can automate turning off the light, what if the light was already manually on? If already manually on, it should have to be manually turned off.
So what I would like it to do is, turn on the switch when the rule is triggered but…
- Only turn on the light at night (Sunset to Sunrise)…
- But only if the light is already off
(basically, if it is during the day or if the light is already on, do nothing)
- And if the light is turned on via this App, auto turn off the light after X minutes
(basically, if the light was already on, don’t auto-off it but auto-off the light if it was turned on via this Sighthound trigger)
I am not even sure if all the above would be possible with SmartThings(?) I came up with the below flow but I am sure my logic is wrong (or there is a better way to do it):
-
Using IFTTT = If Sighthound rule is triggered, then turn on SmartThings “virtual switch 01”
-
“Virtual switch 01” checks to see if it is between sunset and sunrise:
- if during the day, do nothing (exit out)
- if at night, run “already on?” SmartApp
-
The “already on?” SmartApp:
- If already on, do nothing (exit out)
- If off, call Virtual switch 02 (or maybe another SmartApp? See below)
-
“Virtual switch 02”
- turns on real switch(es)
-
A “lights auto off” smart app is associated to “virtual switch 02” that would turn off the real switch after X minutes.
Thoughts? Am I going down the correct path or am I way off?
Thanks!!
Ian