Page 1 of 1

Delayed X10 command with a twist

Posted: Fri Dec 12, 2003 11:17 pm
by ClaudeT
Hi,



First of all, let me say that I've played with lots of X10 programs in the last while, and I settled on yours because it did what I needed and has the flexibility to do what I expect to need in the future. I think you should be accepting donations for your work - I'm offering!



Anyways, I seem to have got a basic system doing what I want, except for this one item...



I have a motion detector in the laundry room which is to control a light in there. The light should turn on when there is motion detected - no problem, I've got that handled 8) .

It should also turn off about 1 minute after motion is last detected. Using a simple delay would implement an off signal at a set delay after motion is first detected - not what I want. I don't want the poor slob doing the laundry left in the dark 1 minute after he arrives - I want the light turned off 1 minute after he's finished.

(I realize that this functionality is built into some X10 motions sensors directly, but I want to bypass that so I don't have to do the damn programming of the motion sensor delay using those little buttons in arcane combinations each time I want to adjust it or change the batteries)



I attempted to do this by adding a property "Last triggered" to the X10 Transmitter device I named "Laundry Motion" and then creating a task that assigned the current date and time to the property when the power state of the transmitter went on.

The problem is that there seems to be no way to create a condition like "Laundry Motion.Last Triggered + 1 minute = Current Date and Time"



Suggestions or other approaches appreciated.

Posted: Sat Dec 13, 2003 5:53 pm
by MediaStorm
More commands for handling motion would be useful...



In the mean time, here are a couple of approaches that might work..



Use a delayed turn off time of say 1 minute... Every time motion is detected push this value out again which essentially keeps things working until movement is stopped and the timer expires.



The other approach is to use VBScript or create a plugin to do the same thing. There is an excellent plug-in for HomeSeer called DooMotion that has some nice motion handling features. A version of DooMotion or something similar would be an excellent addition to HouseBot.

Posted: Mon Dec 15, 2003 4:48 pm
by ClaudeT
MediaStorm wrote:Use a delayed turn off time of say 1 minute... Every time motion is detected push this value out again which essentially keeps things working until movement is stopped and the timer expires.


This is what I think I am currently trying to implement. How do I track the motion time? I can't find a way to store the "current time" into my custom property for that purpose. Every time I try to use "System Time" properties or CURRENT_DATE_AND_TIME in a task, it ends up resolving to the date/time that I edit the action, not the time that the task executes. Is this a limitation of HouseBot, or of my understanding of it?



Keep in mind I'm new with HouseBot :?



Claude.

Posted: Mon Dec 15, 2003 8:29 pm
by ScottBot
Claude,



You should be able to do this with a couple of Tasks and a Sleep Timer Device. However, I've just detected a problem with setting the timer timeout value in a Task (which is what you need to do). A new release of HouseBot should be out later this week with the fix in it.



Generally, what you want to do is:
  1. Create a Sleep Timer Device.
  2. Create a Task that has a condition that will test your Motion Detector ON state. The Task will then turn the light On, set the timeout value of the Sleep timer (to 1 minute for example) and then set the Running Property of the Sleep Timer to Yes.
  3. Create another Task that has a condition that will test the Sleep Timer Running Property for a No value. When the condition is met, turn the light Off.
I might add this example as an FAQ with a sample configuration to demonstrate it. It's a common thing to do, and not entirely obvious how to do it with Housebot.



Scott

Posted: Wed Dec 17, 2003 9:35 am
by ClaudeT
Hey, look at all the cool stuff here in the software devices list. I didn't see those :oops:.



Thanks for pointing that out.

If I understand you properly, the timer will reset as long as I keep storing a time. Once the time stops being stored, it will run down and trigger the task waiting for it.



Thanks!

Posted: Wed Dec 17, 2003 9:46 am
by ScottBot
ClaudeT wrote:the timer will reset as long as I keep storing a time. Once the time stops being stored, it will run down and trigger the task waiting for it.
That is correct. The problem is that in the current version there is a bug in the Task configuration UI that doesn't allow you to set the new timeout value as needed. You could do it from a Script Device (another one of your hidden Software Devices), but that's a bit more work.



I should have an update out Thursday or Friday that will fix this. I have also updated the Sleep Timer Device to reset if the Running Property is reset to 'Yes' while running.



Scott

Posted: Fri Dec 26, 2003 1:52 pm
by ClaudeT
Using the new 1.63 program and the layout you described (two tasks), this works just as needed.

Thanks!