Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: program help Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
brian
Newbie
Newbie


Joined: August 17 2007
Online Status: Offline
Posts: 5
Posted: August 17 2007 at 21:08 | IP Logged Quote brian

Hello, i am a newbie to power home, can yo please give me the code for a motion detection macro that will only be active between the hours of 2200 hours and an offset of 2 hours prior to [DAWN}. I would like to use the "Jump" command with an "IF" statement to skip the macro if the "now time" is not within the hours listed above. I have tried some statements like:    
if(now() > 22:00:00:00, or (relative time 02:00:00:00)< [dawn]))

Any help would be greatly appreciated!   Thanks In advance Brian.
Back to Top View brian's Profile Search for other posts by brian
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: August 17 2007 at 22:01 | IP Logged Quote TonyNo

Welcome!

I think this should work as the first line of your macro...

Code:
JUMP if( hour( now()) > 22 or now()< ph_getsuntime( today(), 3) , 1, 999)
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