Author |
|
tbeckman Senior Member
Joined: December 30 2007 Location: United States
Online Status: Offline Posts: 149
|
Posted: December 31 2007 at 12:07 | IP Logged
|
|
|
I currently have about 7 insteon closets in my house that I have put into a group. Every 10 minutes, I run a macro to turn the closet lights off. However, I would like to be able to individually watch for when the closet light is turned on and start a timer to turn it off in ten minutes. Can anyone help me with this? Thanks.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 01 2008 at 11:14 | IP Logged
|
|
|
How are the lights turned on? SwitchLincs?
The simple way may be like this...
Create a macro called Closet Off:
10 JUMP if( ph_ismacrowaiting("CLOSET OFF") > 0, 1, 3)
20 FORMULA ph_extendmacrowait("CLOSET OFF", 300, 0)
30 JUMP 999
40 WAIT 600
50 Insteon Group Your Group Name OFF
Then set up an Insteon trigger that calls this macro. This is the tricky part. You may be able to use a Device Change trigger for ANY device and your closet light group number. I don't have any SwitchLincs grouped to check this.
The next step up would be to track each light for the ten minute time.
|
Back to Top |
|
|
tbeckman Senior Member
Joined: December 30 2007 Location: United States
Online Status: Offline Posts: 149
|
Posted: January 02 2008 at 23:48 | IP Logged
|
|
|
WOW.. it worked... thank you so much.
Now do you know of anyway to copy and past a macro so I don't have to enter this for every timed switch.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 03 2008 at 07:32 | IP Logged
|
|
|
You can use that one macro for all the lights unless you want to track each light individually. Again, the trick is in the trigger(s).
As far as copying goes, go to the top-level Macro section in the PH Explorer, right-click on the macro you want to copy in the right-hand pane, select Duplicate, then rename the copied macro.
|
Back to Top |
|
|
tbeckman Senior Member
Joined: December 30 2007 Location: United States
Online Status: Offline Posts: 149
|
Posted: January 03 2008 at 15:45 | IP Logged
|
|
|
I decided to make this macro for every light in the house that I wanted to be a timer. However, I decided to stretch my abilities and add to the macro to give a warning when the light is getting ready to turn off by flashing it once a minute before it sends and off command.
Well, I added the following:
Wait 3
Insteon ON
Wait 10
Insteon OFF
I found out all that did was retrigger macro to run again and I ended up making a never ending loop. Any ideas of how I can do this without making it a loop? Thanks.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 03 2008 at 20:59 | IP Logged
|
|
|
What does your trigger and macro look like?
|
Back to Top |
|
|
tbeckman Senior Member
Joined: December 30 2007 Location: United States
Online Status: Offline Posts: 149
|
Posted: January 03 2008 at 23:24 | IP Logged
|
|
|
Looks like this:
10 JUMP if( ph_ismacrowaiting("CLOSET OFF") > 0, 1, 3)
20 FORMULA ph_extendmacrowait("CLOSET OFF", 300, 0)
30 JUMP 999
40 WAIT 600
50 Insteon CLOSET LIGHT OFF
60 WAIT 3
70 Insteon ON
80 WAIT 60
90 Insteon OFF
My trigger basically whats for a light switch to turn on and then calls this macro.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 04 2008 at 07:49 | IP Logged
|
|
|
Line 20 should have not been there. This will no longer retrigger...
10 JUMP if( ph_ismacrowaiting("CLOSET OFF") > 0, 999, 1)
20 WAIT 600
30 Insteon CLOSET LIGHT OFF
40 WAIT 3
50 Insteon ON
60 WAIT 60
70 Insteon OFF
|
Back to Top |
|
|