Page 1 of 1

Executing task at specified time using remote

Posted: Wed Dec 29, 2004 2:33 am
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.

Posted: Wed Dec 29, 2004 12:28 pm
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.

Posted: Thu Dec 30, 2004 1:14 am
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 :)

Posted: Thu Dec 30, 2004 12:27 pm
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...

Posted: Fri Jan 14, 2005 11:52 am
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?

Posted: Fri Jan 14, 2005 12:08 pm
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