Page 1 of 1

Auto off with override?

PostPosted: Mon Dec 12, 2005 9:54 am
by kyleputzier
I would like to be able to turn on a light via a switch and then have Indigo turn it back off 30 minutes later. If I press the ON part of the switch within that time, Indigo would then cancel the auto off action and the light would stay on indefinitely. Basically tap once for auto off and tap twice for stay on.
I've played around a little and haven't come up with a way to do this.
Any ideas?

Kyle

PostPosted: Mon Dec 12, 2005 5:24 pm
by dtich
if you are working with an insteon switch that supports double-taps, simply make two separate trigger actions, one that turns on w/ an auto-off for a single tap, and another that turns on w/ no auto-off with a double tap.

if you are working in x10, you'll need to do something like program a variable to be true if the light is on, false if off, etc, then you can have a trigger w/ a condition that says if 'the variable' is true (i.e. the light is already on) and the switch sends an on signal, turn off in 30 mins (or vice versa). i had done a few things like that to make additional logic controls out of a single command.

hope that made sense, i scribbled it quick. : )

PostPosted: Mon Dec 12, 2005 5:35 pm
by dtich
you may also have to run a script to 'remove delayed actions for [device or trigger]'... depends on how you are doing things : )

PostPosted: Mon Dec 19, 2005 9:38 am
by kyleputzier
I still haven't figured this out. What I need is an "and" in the Trigger Action's Condition section. An "Else would also work.

Kyle

PostPosted: Mon Dec 19, 2005 8:41 pm
by matt (support)
How about something like this:

Trigger Action "First On" -- Execute AppleScript:
   turn off "office lamp" in 30 * 60
   enable trigger action "Second On"
   disable trigger action "First On" for 30 * 60

Trigger Action "Second On" -- Execute AppleScript:
   remove delayed actions for device "office lamp"
   remove delayed trigger for first "First On"

Trigger Action "Off Received" -- Execute AppleScript:
   remove delayed actions for device "office lamp"
   remove delayed trigger for first "First On"
   disable trigger action "Second On"

Start by manually disabling Trigger Action "Second On" and having the device off. Not sure the above will work exactly, but it should give you a direction in which to go.

Matt