Low Level Controller Question

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
jreberry
Member
Posts: 24
Joined: Thu Jun 17, 2004 11:01 pm

Low Level Controller Question

Post by jreberry »

To begin, I’m at work right now, so please excuse any terminology mess-ups I make. I’m not sitting in front of my automation computer.



--Some Background Info About The Problem/Question--

For my setup I have 10 different motion detectors positioned throughout the house. Any individual motion detector (when triggered) will send up to 6 separate Low Level Controller commands to different lights. For example, Motion Detector 10 triggers…

LowLevelController1.CompositeCommand B;9;Bright;31

LowLevelController1.CompositeCommand B;7;Bright;31

LowLevelController1.CompositeCommand B;2;Bright;31

LowLevelController1.CompositeCommand B;8;Bright;31

LowLevelController1.CompositeCommand B;10;Bright;31

…in that order (along with some other commands that don’t matter for this question). If I walk through every room in the house one time the Low Level Controller might receive instructions to send out as many as 60 different commands. That’s a lot of commands!



I understand that in optimal conditions a single X10 command will take at least .5 second to transmit/execute. I can confirm with my setup that directly sending a single command from my computer will generate a response in less than a second from any of my lights (its a town home, and all one phase). I also understand that the CM11A delays after receiving a command (like from a Motion Sensor) before sending the command to the Computer. When a Motion Sensor is triggered I can verify that it takes about 2-5 seconds before the computer receives the command. That’s not very desirable, but I can deal with that.



--The Actual Problem/Question--

Ok, now (finally) for the question. The delay time that I’m having a problem with is in the Low Level Controller. It seems that as instructions are sent to it (by a trigger), the instructions are queued and a command is only executed once every 7-8 seconds until the queue is empty. Is there any way to speed this up? In the situation above, when I walk through the house and (potentially) set off 60 commands it should take from 30 seconds (if they take .5 seconds each to execute) to 60 seconds (if they take 1 seconds to execute). However, with the 7-8 second delay between commands from the Low Level Controller it actually ends up taking about 7 or 8 minutes to execute the entire queue. As you can imagine, the queue builds up much faster than they are executed, and quickly the house is out of control because there is a several hour long queue of commands executing every 7-8 seconds. By this time the house is not responding to anything new that is happening because the commands are just getting added to the end of the queue.



--Possible Solutions--

My temporary fix for this is to put a long delay at the end of each task. For example, a Motion Sensor might trigger Task 1 that turns on a few lights, also triggers a 5 minute Sleep Timer, and then has a 4 minute 40 second delay. This helps because while you are moving around in the room the trigger isn’t constantly being activated and sending the commands over and over again to the Low Level Controller. At most, it only sends the commands every 4 minutes and 40 seconds, with a 20 second buffer to re-trigger the lights before they all turn off. I guess this works (although I've only had about 5 minutes to test this today before I left for work) but there has to be a better way. --A trouble shooting side note to this temporary fix is to mention that I used to have this exact same setup (without the new delay “fix”) when I was using On and Off commands instead of Dim and Bright commands. Even without the new delay “fix”, the computer previously managed to output all the commands just fine. This tells me that I’m not sending out too many commands (because it kept up fine before), but instead that the Low Level Controller is in fact the bottleneck.--



Is it possible to send Bright commands to multiple house codes in one command? It might help to send a single command like…

LowLevelController1.CompositeCommand B;9,7,2,8,10;Bright;31

…I’ve tried this with no luck, but thought maybe someone knew a different formatting that would work. If so, this would reduce the amount of commands sent.



Would it help (or even be possible) to make more than 1 Low Level Controller? Since the 7-8 second delay is the root of the problem, maybe making a separate Low Level Controller to be used with each light would work better? Then the Task would look something like…

LowLevelController9.CompositeCommand B;9;Bright;31

LowLevelController7.CompositeCommand B;7;Bright;31

LowLevelController2.CompositeCommand B;2;Bright;31

LowLevelController8.CompositeCommand B;8;Bright;31

LowLevelController10.CompositeCommand B;10;Bright;31

…would that work? I’m at work right now and haven’t been able to experiment with this yet.



To summarize where I have isolated my delay times to…

Motion Detector to CM11A is .5 to 1 second

CM11A to Computer is 2 to 5 seconds

A single command from the Computer through the CM11A to a light switch is .5 to 1 second

Delay between queue’d commands on the Low Level Controller is 7 to 8 seconds. <== This is what I need to find a solution for.



I’ve only been X10’ing for about a week, so I’m a newbie, but I’m trying to pick it up as fast as possible. There might be something obvious that I'm missing. How would you solve this problem? Any ideas would be a big help.



I’m very impressed with the product so far,

--Jon
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Low Level Controller Question

Post by ScottBot »

Jon,



One thing that would help the timing is to use a W800 instead of X10 RF Receiver for the motion detectors. I switched to the W800 and it significantly sped things up. With the W800, as soon as the motion detector is tripped, HouseBot knows about it. You remove the X10 delay plus the CM11a delay.


jreberry wrote:... the instructions are queued and a command is only executed once every 7-8 seconds until the queue is empty. Is there any way to speed this up?
This really does seem like a long delay. There aren't any programmatic delays induced by the Device or Hardware Interface. All X10 Devices that use the interface will be serialized, so creating more Devices won't help. My CM11 takes about 2 (sometimes 3) seconds to send a command. I have a USB PowerLinc that I use in my home that will send one per second.

If you want to send me a trace, maybe there's some info in it that may point to a problem. To generate a trace file:
  1. Select the Hardware Interface from the Tree View.
  2. Click on the 'Hardware Module Type' button at the top of the Interface Property list.
  3. Click on the 'Enabled' checkbox to turn on tracing.
  4. Try and use the interface again. This should generate data in the log file.
  5. Turn the tracing off by clearing the 'Enabled' checkbox set previously.
  6. Send the trace file (InterfaceTrace.*.csv) to me at '[email protected]'. The file can be found in the HouseBot\Logs directory.
Is it possible to send Bright commands to multiple house codes in one command? It might help to send a single command like…
LowLevelController1.CompositeCommand B;9,7,2,8,10;Bright;31
…I’ve tried this with no luck, but thought maybe someone knew a different formatting that would work. If so, this would reduce the amount of commands sent.
You can 'kinda' do this with the Controller Device, but it's a pain. For example, if I send "B;7", then "B;5", the "B;3;Bright;5" It will send a "Bright 5" to B 3, 5, and 7. The pain is that you have to include the full command on the last one. You could probably do it in a script, but it's difficult to do it in a Task.
Would it help (or even be possible) to make more than 1 Low Level Controller? Since the 7-8 second delay is the root of the problem, maybe making a separate Low Level Controller to be used with each light would work better? Then the Task would look something like…
LowLevelController9.CompositeCommand B;9;Bright;31
LowLevelController7.CompositeCommand B;7;Bright;31
LowLevelController2.CompositeCommand B;2;Bright;31
LowLevelController8.CompositeCommand B;8;Bright;31
LowLevelController10.CompositeCommand B;10;Bright;31
…would that work?
Nope. Since the bottleneck is the Hardware Interface, it doesn't really matter if the commands are sent from one or multiple.
I’ve only been X10’ing for about a week, so I’m a newbie, but I’m trying to pick it up as fast as possible. There might be something obvious that I'm missing. How would you solve this problem? Any ideas would be a big help.
Welcome to X10. :wink: As you are quickly finding out, one of its problems is the speed. I recently was doing something similar in my home. I hit a wireless keypad which instantly sends the command to HB via W800. Then a Task would execute that would set the dim level of about four lights for different 'scenes'. The delay with X10 was very noticeable. I recently changed the X10 switches to Z-Wave switches and now all lights go to their proper dim level instantly.
Scott
jreberry
Member
Posts: 24
Joined: Thu Jun 17, 2004 11:01 pm

thanks again

Post by jreberry »

Another thorough answer to all of my questions. I've been reading through these forums a LOT and I can't get over how many questions you personally respond to. And a lot of them are redundant (I should point a finger at myself for this too). I hope all your hard work and attention to your product’s customers is being noticed at Meedio.



I'm off to shop for a W800.



Thanks again,

--Jon
jreberry
Member
Posts: 24
Joined: Thu Jun 17, 2004 11:01 pm

new toys

Post by jreberry »

On your recommendation, I ordered both a W800RF32 and a PowerLink USB device. They'll both be here in a few days.



Do I need any Plugins to make those devices work with Housebot?



--Jon
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: new toys

Post by ScottBot »

jreberry wrote:Do I need any Plugins to make those devices work with Housebot?
Yes. You can find them both attached to this post.

I think you'll be happier with the performance of the PowerLinc and W800.
Scott
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

I just noticed something. If I'm not mistaken doing a Bright;31 will send out 31 bright commands. It is not like sending out a preset dim which will only sends out 1 command.



A string a 31 bright commands will execute much faster than say 31 on or off commands because of the way the x-10 protocol works but it will still take about 5 or so seconds to send.



Eric
jreberry
Member
Posts: 24
Joined: Thu Jun 17, 2004 11:01 pm

Bright;31

Post by jreberry »

Thanks for the reply Eric. I was unaware that “Bright;31” sent out 31 different commands. I had just assumed that it was one command. It usually takes about one second for the light to go from "off" to full bright when I send “Bright;31”, so it seems to be sending the commands pretty quickly. My problem is the delay before the command is actually sent (if at all). I think the power lines are to congested with motion detector "on" and "off" commands from the two of us and the cat moving around the house. I'm hoping the W800RF32 will eliminate this problem by sending all the motion detector signals straight to the computer and not through the power lines. Currently, if I have the Low Level Controller report to the error log, the error log is swamped with housecode “A” and “C” commands (all of my motion detectors). The lights are all on housecode “B” and I rarely see one of these go through.



I just received both the PowerLink and W800RF32 in the mail today, and hopfully I'll get a chance to hook them both up later tonight (crossing my fingers).



Can anyone confirm that “Bright;31” is sending 31 different commands?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Bright;31

Post by ScottBot »

jreberry wrote:Can anyone confirm that “Bright;31” is sending 31 different commands?
It does, but they go much faster than sending individual commands (as Eric said).



If your switches support preset dim or Leviton dim, you can get the switch to the correct dim/bright level with a single command.
Scott
jreberry
Member
Posts: 24
Joined: Thu Jun 17, 2004 11:01 pm

yes!

Post by jreberry »

I received my two new products today, hooked them up, and voila! Almost everything works perfect. The only problem that I'm still having is that the lights in the bedroom don't respond very often. I've isolated it to a computer in that room "eating" the signal. I've ordered two noise filters to fix that problem (the extra filter is for the HTPC downstairs. It's not causing any problems right now, but I decided to buy two and be preventative). The rest of the house works without a hitch. When I walk into any room in the house the lights in the room (and a buffer zone of 1 room around) all dim up... later if no signals have been received they dim down. Dang this is cool. Thanks Scott!



--Jon
Post Reply