Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: timed execution Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
k2zs
Senior Member
Senior Member
Avatar

Joined: October 22 2009
Location: United States
Online Status: Offline
Posts: 113
Posted: April 12 2011 at 15:27 | IP Logged Quote k2zs

Hello all,

I would like to shut off lights after an extended period of time. I have a trigger set that starts a macro with a "wait" time and it works. For now (just testing) I have it set for 1 min but when I put it into production I would like the time to be 1 hour.

I don't think having a macro wait for 3600 seconds would be a good idea, what other options would I have?

Thanks all,
Scott

__________________
Scott, K2ZS
Home Automation Ideas
Back to Top View k2zs's Profile Search for other posts by k2zs Visit k2zs's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: April 12 2011 at 16:28 | IP Logged Quote dhoward

Scott,

There's nothing wrong with having a macro wait for extended periods of time. Its not actually "waiting" per se, but has its complete state "exported" and saved into the database with the time for it to be "awakened" run against the macro wait timer. It works in this way essentially like a timed event (it doesnt consume any resources or memory).

However, if you prefer, you can always use the ph_createtimedevent1 function to create a timed event in the future for when you'd like the lights turned off.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
k2zs
Senior Member
Senior Member
Avatar

Joined: October 22 2009
Location: United States
Online Status: Offline
Posts: 113
Posted: April 12 2011 at 22:10 | IP Logged Quote k2zs

Thanks Dave...

Long time, How've you been? It's been a while since I've written any formulas for power home, been emersed in other languages, but I was surprised at how quickly it all came back...

Thanks for a great piece of software ;)

Scott

__________________
Scott, K2ZS
Home Automation Ideas
Back to Top View k2zs's Profile Search for other posts by k2zs Visit k2zs'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