Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Trigger Timer during day 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: July 30 2008 at 16:10 | IP Logged Quote tbeckman

I currently have some light that turn off after a specified amount of minutes via a trigger to run a wait macro. I would like to only have this trigger run the macro during day light hours. Can someone help me with the Syntax that is needed at the end of the trigger line to control this? Thank you for your help.
Back to Top View tbeckman's Profile Search for other posts by tbeckman
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: July 30 2008 at 16:31 | IP Logged Quote BeachBum

You mean like IF (NOW() < RELATIVETIME( 00:00:00, [SUNSET] ) AND NOW() > RELATIVETIME( 00:00:00, [SUNRISE] ), 1, 0)

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
judetf
Senior Member
Senior Member


Joined: January 23 2008
Online Status: Offline
Posts: 234
Posted: August 02 2008 at 07:53 | IP Logged Quote judetf

When I have a trigger that I only want to run at certain times, I've been using timed events to turn them on and off. I've seen this alternate approach and understand how it works, but it raises a question for me.

Using this model (with Boolean control), technically the trigger is "firing" and processing; it's just not executing certain actions based on criteria that are not being met. But that means that PH is listening for the trigger event.

The approach I take means that the trigger is actually turned off, and therefore represents no additional load or processing requirements for PH or the Insteon network.

Does it matter? Is it worth even thinking about? Is the "cost" of leaving the trigger on and just using Boolean logic to decide whether or not to act a trivial impact on the system?

jtf
Back to Top View judetf's Profile Search for other posts by judetf
 
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: August 03 2008 at 01:57 | IP Logged Quote tbeckman

I am trying to use the code you gave in conjuction with another if statement... does this look right.

if([TEMP4]>3,1,0) and (NOW() < RELATIVETIME( 00:00:00, [SUNSET] ) AND NOW() > RELATIVETIME( 00:00:00, [SUNRISE] ), 1, 0)
Back to Top View tbeckman's Profile Search for other posts by tbeckman
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: August 03 2008 at 09:40 | IP Logged Quote BeachBum

How does this look

if([TEMP4]>3 and (NOW() < RELATIVETIME( 00:00:00, [SUNSET] ) AND NOW() > RELATIVETIME( 00:00:00, [SUNRISE] ), 1, 0))

Not knowing where TEMP4 will get its value from the Trigger should fire if the conditions are met.


judetf wrote:
Does it matter? Is it worth even thinking about? Is the "cost" of leaving the trigger on and just using Boolean logic to decide whether or not to act a trivial impact on the system?


One would think the overhead would be minuscule. Using Process Explorer I have seen virtually no system activity while PH was idle waiting.

Edited by BeachBum - August 03 2008 at 09:42


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 

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