Queueing tasks

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
wetwired
Member
Posts: 85
Joined: Thu Jun 19, 2003 7:33 am

Queueing tasks

Post by wetwired »

I´m using the W800 to receive x10 signals from various remotes in the house. Sometimes a motion is detected and a task is triggered, if I try to send a signal from a remote to Housebot, to trigger another task at almost the same time, this task is not triggered.

Are tasks in Housebot queued or is a running task blocking all other tasks?
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Queueing tasks

Post by ScottBot »

wetwired wrote:Are tasks in Housebot queued or is a running task blocking all other tasks?
It depends. Two different tasks will run concurrently without blocking or queuing. However, if the SAME task is executed while it is currently running, the task is neither placed in a queue or blocked. It is simply not executed.

The reasons are to prevent infinite loops and to prevent doing something twice which was probably (in most cases anyway) only meant to be done once.
Scott
wetwired
Member
Posts: 85
Joined: Thu Jun 19, 2003 7:33 am

Post by wetwired »

Ok, but tasks aren´t triggered when I send multiple x10 commands to Housebot.
I´m using an if statement and the composite property of the W800 to trigger a task. Is this the correct way? Or is there a better way to use the W800?
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

There are two basic ways.

One way is to create a HouseBot X10 Device for each physical X10 device that exists. Then use Task conditions to test for various Power State changes. This is nice because the task would look something like "If Kitchen Light.Power State Equals On", which is somewhat self-documenting.

Another way is to use a Task to test the Composite Property of the X10 Controller. This is what you are doing and it *should* work OK. The benefit of this solution is that it involves less Devices and configuration. The downside is that it is less obvious what is happening. For example, looking at a task that says "If Controller.Composite Property Equals A;1;On" doesn't really tell you much unless you have memorized all of your X10 addresses.

Regardless of how you do it, it should trigger the Task (but not concurrently as mentioned before). Also, make sure that the 'Allow Same Value Change' checkbox IS selected on the Composite Property of the X10 Controller Device. If it isn't, then setting it to the same value won't cause the Task to execute.
Scott
Post Reply