Page 2 of 2

Re: sunset/sunrise timed events

Posted: Tue Sep 23, 2008 8:39 am
by Osler
This is what I had been using:

Code: Select all

If System Time.TimeAndDate is Equal SUNSET_DATE_AND_TIME Then
Osler

Re: sunset/sunrise timed events

Posted: Tue Sep 23, 2008 12:19 pm
by sundodger
have changed it over on both. will let you know later on when it gets dark....

Re: sunset/sunrise timed events

Posted: Tue Sep 23, 2008 12:35 pm
by ScottBot
It should work if you put the System Time.TimeAndDate property first in the condition test.

It may not be explained clearly in the online help, but for each Task, HouseBot keeps a list of Properties that it is monitoring for changes. Whenever one of these Properties changes, it tests all of the conditions of the Task to see if it should execute it. For the Property list that it is watching, it generally uses the left value of the condition statements. So if you put something that's constant on the left side of the condition statement, the Task will probably not even get evaluated. I say probably because if there are other conditions in the task block (like ANDing or ORing conditions), the Task conditions may get evaluated more frequently due to another Property evaluated as the left part of a condition.

So:

Code: Select all

if ('System Time.Sunset Time' is Equal '9/22/2008 8:04 pm' ) Then
will only get evaluated/checked when the HouseBot updates the Sunset Time property value (at midnight).

However this:

Code: Select all

if ('System Time.TimeAndDate' is Equal '9/22/2008 8:04 pm' ) Then
will get evaluated/checked every time the TimeAndDate Property changes (every second).

Re: sunset/sunrise timed events

Posted: Tue Sep 23, 2008 3:18 pm
by sundodger
oh yeah. thanks to all. all ok insufficient data buffer error but task fired.
have figured out that i am definately having terminology issues. but am pig headed enough to keep at it.
my mistake was that i assumed that the set up task condition only needed one item to check (i kinda forgot the "is equal" box)
so i was refereing to sunset time in the top selection and the section after clicking the "select" box. so was refering to the same time twice.
again thanks to all for your time on to the next problem......