sunset/sunrise timed events

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: sunset/sunrise timed events

Post by Osler »

This is what I had been using:

Code: Select all

If System Time.TimeAndDate is Equal SUNSET_DATE_AND_TIME Then
Osler
sundodger
Member
Posts: 80
Joined: Thu Sep 11, 2008 11:17 am

Re: sunset/sunrise timed events

Post by sundodger »

have changed it over on both. will let you know later on when it gets dark....
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: sunset/sunrise timed events

Post 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).
Scott
sundodger
Member
Posts: 80
Joined: Thu Sep 11, 2008 11:17 am

Re: sunset/sunrise timed events

Post 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......
Post Reply