Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Watching and Turning Off Closet Lights Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: December 31 2007 at 12:07 | IP Logged Quote tbeckman

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 View tbeckman's Profile Search for other posts by tbeckman
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 01 2008 at 11:14 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: January 02 2008 at 23:48 | IP Logged Quote tbeckman

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 View tbeckman's Profile Search for other posts by tbeckman
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 03 2008 at 07:32 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: January 03 2008 at 15:45 | IP Logged Quote tbeckman

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 View tbeckman's Profile Search for other posts by tbeckman
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 03 2008 at 20:59 | IP Logged Quote TonyNo

What does your trigger and macro look like?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: January 03 2008 at 23:24 | IP Logged Quote tbeckman

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 View tbeckman's Profile Search for other posts by tbeckman
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 04 2008 at 07:49 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum