Executing task at specified time using remote

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Zei
Member
Posts: 25
Joined: Tue Feb 10, 2004 3:21 am
Location: Finland

Executing task at specified time using remote

Post by Zei »

Hi,



I have created a script that slowly raises the lighting level in my bedroom. Then I created a task to execute it. I made a condition (using System Time Device) that checks if system time = e.g. 7am.



How can I make Housebot to read this 7am property from my label or textbox in my PPC remote. Right now I can only select the time property from Housebot software using task window.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Unfortunately, Task conditions can only compare Property values to "static" values/times.



What you can do is to setup the Task to execute every minute and have the Script where you do the lighting determine if it is time to run. For the condition in the Task, test the System Time.Time Without Seconds property to NOT EQUAL a time (the time that you select would be a time that you would never want to happen... like 3 in the morning). This will cause the Task to execute the script every minute. In the script, you can then use the GetPropertyValue of the value you are setting in the SW Remote and test to see if it should run or not.
Scott
Zei
Member
Posts: 25
Joined: Tue Feb 10, 2004 3:21 am
Location: Finland

Post by Zei »

Hmmm, thanks for an interesting and prompt answer :) I guess this will solve my problem and I also hope that I'm not going to have a lot of things I would like to do the same thing, because in that case the solution would be very interesting


ScottBot wrote:Unfortunately, Task conditions can only compare Property values to "static" values/times.
I guess this will be my feature request :)
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Zei wrote:I guess this will be my feature request :)
And it's a good one. I've had it on the list for some time. Seems like it should already be there...
Scott
Zei
Member
Posts: 25
Joined: Tue Feb 10, 2004 3:21 am
Location: Finland

Post by Zei »

ScottBot wrote:GetPropertyValue of the value you are setting in the SW Remote


Do you mean that I can get value of e.g. property edit control in SW, using script?



Something like:

If (GetPropertyValue("SomethingHere") = SystemTime.TimeAndDate) Then

...run script





What goes in "SomethingHere" and in this case do I need to have SW running or where does HB save the value I'm configuring?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

First you would need to add a Property (by right mouse clicking on a Device) for the time value that is set by the SW Remote. If there's a Device that you can somewhat associate it with, add it to that, otherwise, create a Null Device and add it to that. When adding the Property, select one of the stock "User Definable Time" Property values. Give it a name (like Test Time, for this example).



Then in the script, you would do something like:

Code: Select all

if (GetPropertyValue( "System Time.Time Without Seconds" ) = GetPropertyValue( "Your Device.Test Time" )) Then
... run script
Endif
Scott
Post Reply