Author |
|
tbeckman Senior Member
Joined: December 30 2007 Location: United States
Online Status: Offline Posts: 149
|
Posted: July 30 2008 at 16:10 | IP Logged
|
|
|
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 |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 30 2008 at 16:31 | IP Logged
|
|
|
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 |
|
|
judetf Senior Member
Joined: January 23 2008
Online Status: Offline Posts: 234
|
Posted: August 02 2008 at 07:53 | IP Logged
|
|
|
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 |
|
|
tbeckman Senior Member
Joined: December 30 2007 Location: United States
Online Status: Offline Posts: 149
|
Posted: August 03 2008 at 01:57 | IP Logged
|
|
|
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 |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: August 03 2008 at 09:40 | IP Logged
|
|
|
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 |
|
|