X10 Community Forum

🖥️ActiveHome Pro => ActiveHome Pro General => Topic started by: TomG on April 29, 2009, 01:55:31 AM

Title: AHP Reliability Tips and Tricks
Post by: TomG on April 29, 2009, 01:55:31 AM
I have used this forum for inspiration in the last couple of years such I thought I should give something back by posting some learnings I wish I knew when I started.
Here are some observations. Feel free to provide your thoughts.

It can be made to work! I ended up with a very elaborate set of macros using AHP that actually works 24x7 and I use almost all 256 available addresses with over 50+ switches, motion sensors, 5 cameras etc. AHP has undocumented limitations but there are reasonable workarounds for all.

Those are the workarounds:
(1) Speed and Waits in Macros
In my experience x10 and AHP can handle only up to 2 commands per second. If you have a setup that will generate more then this number or expects better perf then the commands will be dropped and the result is unpredictable. In macros avoid secvential commands or macros calling macros that do not have at least 1 sec wait between every 2 commands. If you have multiple motion sensors "overlapping" each other they will create a storm of commands causing others to be dropped. Be conscious of the volume of "traffic".
(2) Flags that are Used for Macros Set to Run on the PC vs Set to Run in the Interface.
Flags work reliable if they are used across macros that are either all of them run in the interface or all of them run on the PC. But if a macros that runs on the interface sets a flag and another one on the PC expects that flag it won't work reliable. There is some "replication" delay between passing the value of the flag from the interface to the PC (up to few seconds) that makes this not work. But on the other end the monitored house code devices work well even across the interface and the PC. So you can key your macros using a device that has the address on the monitored house code and works well.
(3) Calling a Macro from another Macro.
The most reliable method I found is to use an extra RF transceiver dedicated for this (e.g. on house code M). Whenever I want to call macro M3 for example I transmit RF M3 ON (using the RF commands) and the transceiver that will be plugged in close to the AHP box will send on the line an M3 ON. For some reasons I noticed the ghost devices sometimes do not work. With the RF method you need to send the RF command twice with a 1 sec delay in between. Do not ask why but with this method I got 100% reliability.
(4) Recording Video
You need to take the time to pick the right video codec (in the preferences/video section) that works for your computer. I could not make it work on Vista but it works well after tune up on WinXP. The best method to pick the codec : select one of the codecs in the combo box, ensure one camera is on (for some reasons the video preferences do not store the settings if no camera is on at the time) and select Tools/Video Function/Start Video Recording.  At this time watch the CPU utilization (in task manager) and you will see it go up to at least to 40%. Then stop the video recording. The important step is now : wait and see how long it takes for the CPU to get back down to 5% or less. If it takes more than few seconds pick another codec. The point is some codecs will starv your CPU and will hang AHP or your machine. I found for me the DivX driver (you can find it free on the internet) gets the CPU only up to 30% and back down to 3% in just 3 seconds.
(5) Macros with “If Else”
While the help says that the if else conditions will be evaluated in order and only the first one true will be executed I did not see that reliable in practice. I did see the 3rd else be executed when there was a 2nd one already true. The workaround is to ensure the conditions you set for all macros in the if else sequence are all exclusive. E.g have conditions like : (If Flag1=ON and Flag2=OFF) else if (Flag1=OFF and Flag2=ON) else if (Flag1=OFF and Flag2=OFF). In other words repeat all the flags you use for that chain of if else in all conditions.
(6) AHP Crashing
For me the AHP is crashing at least once per week. I could not find the pattern, it seems to be some race condition when it has to handle some macros while video recording it going on. It does cause a crash inside csrss too. But there is a workaround : I build a bat file that using utilities like tlist.exe, findstr.exe, tasklist.exe (downloadable from Microsoft.com) will “watch” every 6 minutes and if AHP is gone will restart it. Even better at restart AHP actually sends up a P16 ON and you can have a reset macro that will send you email the reset alse take care to turn off lights that might be left ON during the crash etc. I needed this monitoring .bat file since I’m using AHP to record videos in short 2 minute clips each time the sensors outside notice movement. Since I use this when I’m in vacation I wanted to be sure it will work over weeks at a time.
(7) Controlling AHP over Internet or Viewing your Cameras over Internet
I had no luck with MyHouse online but at the suggestions in this forum I found out LogmeIn.com that work very very well. It is free and you can logon securely and remotely to your home machine, see the videos etc.
(8.) Running Multiple Macros in Parallel
It does work. If you notice it does not it is more likely dues to (1) above where if traffic exceeds 2 commands per second some will be dropped.
(9) Motion Sensors and Rain
In my experience the motion sensors need to have a small cover put on top. I live in Seattle where it rains a lot. I saw this water shielding effect where is the sensor is covered by a film of water simple the RF signal looses so much power it won’t work. I made a nice small 4 inchesx4 inches “roof” on the sensor and it works like a charm. Or put the sensor in a location where it will not get wet.
(10) Line Noise
I did put all my UPS-es, phone chargers and the TV thru a filter. It did made a huge difference. Boosterlinc made little difference.
Also if needed get the XTB (search the forum), it is worth every penny. This is an “amplifier” that will boost up the signals from AHP. Do get also a passive phase coupler. I had (and still have it collecting dust) and active phase coupler and it cause some form of signal storm resulting into many StatusRequest signals being reflected across lines to the point where no useful signal be be sent and eventually causing havoc for AHP. The passive one works well.

I hope this is useful.

TomG
Title: Re: AHP Reliability Tips and Tricks
Post by: Knightrider on April 29, 2009, 06:46:34 AM
It's very useful indeed. 
Thanks for taking the time to write a digest on "It Can Be Done".
+1 from me.
Title: Re: AHP Reliability Tips and Tricks
Post by: JMac on April 29, 2009, 09:28:51 AM
Thanks - although my system is trouble free (for the most part), you have stated a few strategies that will save (trouble-shooting) time for a lot of us.
Title: Re: AHP Reliability Tips and Tricks
Post by: solberg123 on April 29, 2009, 11:27:27 AM
I'm preparing to do an install in the next two weeks so this is very helpful for me. Can you elaborate on item 10? My apartment is small, 800 square feet or so, and I have lots of electronic stuff plugged in all over, tv's, computers, phone chargers, video game consoles, and the usual appliances. I'm concerned about the concentration of line noise in such a small environment. Should I just put filters on anything that's electronic, and plugged in? It's reassuring to know that filters were so beneficial for you, it makes me feel better about my project.

And for the rookie question of the day, what does UPS stand for?
Title: Re: AHP Reliability Tips and Tricks
Post by: steven r on April 29, 2009, 05:09:19 PM
....what does UPS stand for?
Uninterruptible Power Supply. APC (http://www.apc.com/index.cfm) is one of the better companies. <-- Click link

Much of today's electronics (e.g. Computers & entertainment systems) are sensitive to low or interrupted voltage. In the case of computers, open files can be corrupted if a computer suffers an unexpected loss off power. UPSs can help maintain a constant voltage should line voltage drop.

From an X10 stand point, however, they along with surge protectors can be major suckers of the X10 signal. By plugging them into filters, it eliminates or at lease substantially reduces their effect on the X10 signal. I have all (7+) UPSs in my house plugged into filters as well a dedicated battery charging station that is plugged into a filter. Phone chargers and laptops are also a common signal suckers.


Title: Re: AHP Reliability Tips and Tricks
Post by: TomG on April 29, 2009, 05:21:39 PM
This is what I did about the line noise - in that order. You might want to try the same steps:

1) Do nothing. There is good chance it will work with no need to any special filters, couplers.
2) Get 3 in-line filters (XPPF) you can find on ebay for about $5 each and use them to plug in your : computer+monitor, TV and the phone/ipod/camera battery chargers. You can put all charger on the same power strip and use just one filter for all. If the TV uses more then 500W or computer+monitor exceed 500W you will need the larger filter (the 10A one), also on ebay.
3) Get a passive phase coupler. The easy to use one is about $30 on ebay you plug your dryer (as in washer and dryer) thru it, since the dryer needs two phases. Or there are less expensive ones, but you need to cut wires, work at the panel etc.
4) Get the XTB from http://jvde.us. You plug your AHP device thru it and it improved dramatically the signal strength and quality of signals received by AHP.
5) You can get a whole house filter to isolate noise coming from others. You can also isolate all CFL-s using filters like 6287.

As starting point I would either do nothing or do 2) or 3) or both 2) and 3).

Tom
Title: Re: AHP Reliability Tips and Tricks
Post by: solberg123 on April 29, 2009, 06:23:01 PM
Awesome insight and information, great stuff. I really appreciate it.

I have my TV and components on a single surge protector. Do I put the filter between the TV and the surge protector, or the surge protector and the receptacle.
Title: Re: AHP Reliability Tips and Tricks
Post by: steven r on April 29, 2009, 06:51:22 PM
...I have my TV and components on a single surge protector. Do I put the filter between the TV and the surge protector, or the surge protector and the receptacle.
Since the surge protector itself can be a surge protector, plug it into the filter and then plug the filter in the wall.
For most of my applications, I use 10A filters. Make sure you don't overload the filter and "let the magic smoke out". It's imposible to get all the "magic smoke" back in and they don't work without it.  ;)
Title: Re: AHP Reliability Tips and Tricks
Post by: solberg123 on April 29, 2009, 07:23:32 PM
To avoid the risk of letting the magic smoke out, would there be an advantage to using 20A filters? I see plenty of them on eBay.
Title: Re: AHP Reliability Tips and Tricks
Post by: dave w on April 29, 2009, 07:56:38 PM
Make sure you don't overload the filter and "let the magic smoke out".
"Magic smoke".    Wow, I'm on a level with David Copperfield and didn't know it.  :D
Title: Re: AHP Reliability Tips and Tricks
Post by: JeffVolp on April 30, 2009, 09:13:44 AM
To avoid the risk of letting the magic smoke out, would there be an advantage to using 20A filters? I see plenty of them on eBay.

The 20A XPF is a notch filter.  That is a narrow-band device that only removes noise or signal loading in the X10 frequency band.  It relies on the selectivity of the X10 modules to ignore out-of-band noise.

The XPPF is a low-pass filter that will also attenuate noise outside the X10 frequency band.  It is more effective in cleaning up noise on the powerline.

A low-pass filter is larger and more expensive to produce than a notch filter of similar current rating.  That is why the high current filters (and even the small Leviton 6287) are notch filters.

While the XPPF will handle a typical computer & monitor without a problem, it will get pretty warm and begin to stink when pushed hard.  I haven't seen any magic smoke come out though.

Jeff
Title: Re: AHP Reliability Tips and Tricks
Post by: solberg123 on April 30, 2009, 12:59:46 PM
I just checked and my dryer is connected to a standard wall outlet. I guess there's no need for a phase coupler?
Title: Re: AHP Reliability Tips and Tricks
Post by: dave w on April 30, 2009, 01:57:51 PM
I just checked and my dryer is connected to a standard wall outlet. I guess there's no need for a phase coupler?
No, it means you have a small 120V dryer and you can not use a "plug-in" phase coupler or "plug-in" repeater from Smarthome.com. You still probably have "Split Phase" power in your apartment. One way to confirm is to look at your HVAC breaker(s) on your panel. If the HVAC breaker occpies two slots, or is "double wide" you have two phases (split phase) in your apartment. Perhaps you could access the two phases at your air handler, but for safety and code you would need a sub-panel installed for the wire in coupler repeater. There is also the "capacitor in the stove outlet" fix, which you can find on this forum but would make the NEC code book burst into flames I don't recommend.
Title: Re: AHP Reliability Tips and Tricks
Post by: EL34 on August 28, 2009, 04:24:56 PM
Another Tip:
Instead of using AHP to log onto my home computer, I use remote desktop sharing to log onto my main server/X10 computer at home.

You have to know your IPaddress, and that can change if your router losses power.
I have a windows program that uploads my Ip to my web server every 30 minutes so I always know what my IP adress is by brwsing a file on my server.

Using remote desktop sharing lets you access everything on your compter, not just AHP.
Remote desktop sharing is free.
Title: Re: AHP Reliability Tips and Tricks
Post by: hpservertech on September 01, 2009, 02:31:02 PM
If you allow RDP (remote desktop) from the internet to your computer, you have guaranteed you will be hacked.  RDP is one of the top 10 open ports home users open up and is one of the top 10 hackers look for.  RDP is not secure and it has very many vulnerabilitiesin it.

Dont think you have anything important on your computer?  doesn't matter.  Worse can happen, like being suied by the MPAA for filesharing, which a hacker can install, then download whatever he wants and it will look like you did it.
Title: Re: AHP Reliability Tips and Tricks
Post by: steven r on September 01, 2009, 05:43:45 PM
...RDP is not secure and it has very many vulnerabilitiesin it...
They could use logmein (https://secure.logmein.com/home.asp?hp=5). It's pretty secure and the basic free features are all you need. Several of us here use it.
Title: Re: AHP Reliability Tips and Tricks
Post by: EL34 on September 07, 2009, 09:12:31 PM
Never had a problem with RDP.

You would not be able to find my system with the standard RDP port, which by the way can be changed to something other than 3389

You do know that you can change the port to some port other than 3389?

Besides, my firewall does not answer pings, so you would never be able to find my system.

Hackers will go for easy entrance, which means people who use the standard port of 3389
Title: Re: AHP Reliability Tips and Tricks
Post by: Tracy_X10 on October 26, 2009, 10:07:08 PM
I'm interested in how you created a batch file for number 6.  Would you be willing to share the file?  I have sporadic crashing problems as well, and it would be extremely nice to have it automatically restarted.  I'm not very good at batch files yet, so I'd like to see the code you used to make it work, if possible.  Thanks.
Title: Re: AHP Reliability Tips and Tricks
Post by: captainjerky on April 01, 2010, 11:11:39 AM
Could anyone out there elaborate on how to write a batch file like TomG did?  My AHP crashes all the time, and while I hope to someday fix all that, a batch file that restarts upon a crash would be a great stopgap!

Thanks to anyone who can help!

Ryan
Title: Re: AHP Reliability Tips and Tricks
Post by: Mel99 on April 01, 2010, 11:49:06 AM
Dang!

During 30+ years working with computers and 20 years tech support, I had never heard of Magic Smoke until I read this thread today.  I had to look it up.  Now I feel that my life has been missing something for some time.   :'

Dang!
Title: Re: AHP Reliability Tips and Tricks
Post by: dave w on April 01, 2010, 11:58:47 AM
Mel99,
I don't think it is "Magic" smoke, which is probably why you have not heard of it.

It is the entrapped smoke that all manufacturers put in components during manufacture and can be coaxed out under certain conditions. Some people (such as I) have a highly developed ability to coax a component to release....its a skill.
Title: Re: AHP Reliability Tips and Tricks
Post by: Mel99 on April 01, 2010, 12:22:09 PM
Not being in on the joke yet, I found the following on Wikipedia -

Magic smoke (also called factory smoke, mysterious blue smoke, bluish smoke or simply blue smoke) refers to smoke produced by malfunctioning electronic circuits. The origins of the magic smoke have become a running in-joke that started among electrical engineers and technicians before it was more recently adopted by computer programmers. The actual origin is the black plastic epoxy material that is used to package most common semiconductor devices such as transistors and integrated circuits. When it burns, it produces smoke that is blue in color.

Wikipedia then goes on the discuss the running joke involved, including the 'smoke test', which I have heard about, just not the phrase 'Magic Smoke'...

I also am somewhat skilled in creating what I now know to be Magic Smoke, which is sometimes accompanied a tingling, buzzing feeling in one, or more, of my fingers.
Title: Re: AHP Reliability Tips and Tricks
Post by: jeffdharlan on April 01, 2010, 01:04:16 PM
I gave a Helpful in this one.  Shame the wiki doesn't have more entries like this.  I could care less how much a device weighs, but knowing the ins-and-outs from someone who toiled away hours is priceless.  Keep up the good work!

 #:)
Title: Re: AHP Reliability Tips and Tricks
Post by: david on November 13, 2010, 03:37:20 PM
The phase coupler fixed 99% of our problems. Now if the whole system can run faster so commands don't have to be run twice, three times, or more to get them to work.
Title: Re: AHP Reliability Tips and Tricks
Post by: B's_Place on March 08, 2012, 10:31:03 PM
   This has __GOT__ to be the best POST / THREAD I have ever ran across on the AHP Forums :)+.    Had I have seen such a thread, I would have written the *@(U(_*@# programs myself and never embarked on the long painful task of developing the numerous workarounds that I have had to develop like TOM G has.     I am a retired computer programmer who probably wrote 200,000 lines of code in various languages during my career and I have NEVER seen such a poor excuse for published / marketed software being sold to the public.   You CAN get it to work, but you best be VERY sharp if you expect to get more out of it than simply turning on one light by setting one motion detector to the same house and unit code.   

     I have seriously considered a Class Action lawsuit against the marketers of this crap on behalf of every purchaser that purchased it based upon the video showing a "burglar" walking around the house with AHP cameras following his every movement - something that can absolutely NEVER be done with AHP with its SLOW processing of alarms and ("smart") macros!      And if I have a material burglary loss because the ("smart" macros) fail to trigger video recording (as is frequently fails to do according to the log files), that is almost a certainty!

    I do however _thank_ TOM G for taking the time to share his successes #:).   Lord knows, we need them !!!!

    After about 5 years of *@!*$()#ing with AHP/IWATCH/SMART MACROS, I have a system (working? somewhat?) as a "security" system at my weekend "lakehouse" home at a nearby Lake.  It NOW consists of a Dedicated 3.2 Ghz Dell computer w / 2 GB ram, 500 gig drive running Windows 7 Ultimate,  APC backup, 3 pan-tilt cameras outdoors (enclosed in my own custom made weatherproof enclosures) & 1 indoor pan-tilt camera, 4 MS16A outdoor motion sensors (protected from the rain) and 2 inside motion detectors, CM15A, 13 unit codes assigned and about 30 ("dumb") macros marketed as "smart macros", - using about 7 phantom switches to trigger serial macro actions to create "subroutine" type functions under alarm conditions.

     TOM G is right about everything reacting SLOW as molasses.    Raccoons, Deer, Fox and Stray cats trigger most alarms, but VERY SELDOM do I see ANYTHING in the field of view.    Occasionally I see the "critter" leaving the premises - and I can tell you the Deer damn sure ain't moving fast when no one is there.   They are grazing and still meander almost completely out of the field of camera view before the MS16A senses motion, triggers a macro, sets the active camera to THAT zone, turns on a flood light - IF the nighttime flag is set, starts video recording, and the horizontal video sync stabilizes enough to bet recognizable video.    This is ALL ridiculous in this day and age of cheap ram and blazing fast computers.   Even written in BASIC, I can't imagine what AHP is doing to gobble up so much time before electronically reacting. 

    Yea, it blows up (frequently) and randomly "drops" macro actions (confirmed by comparing the Activity Log file against the Stored Video files).     It's USUALLY when there is a RASH of activity - which is particularly troubling / irritating.    Consequently, instead of a BAT file timer solution that TOM G is using, I am using an expensive Windows program (WinAutomation) to load and run programs to text me on my cell phone IMMEDIATELY.    Then I log onto the system from my (Android) cell phone with a wonderful app from  XtraLogixc" called "Remote Desktop" with which I can see WHAT'S going on up there and restart AHP.    I agree with another poster that RDP is not very secure.  But I haven't been able to change the port number on the Android App, so I have identified all the Sprint NET Blocks and allow RDP through the firewall from those NET BLOCKS - and of course use a complex sign-on and password.

    YEA, you can get it to work, but you best have a couple of master or doctorate degrees (in electrical, electronic and mechanical engineering to start with) and it will help if you have extensive experience in Ham Radio and programming.    Then, if you are retired, have fairly substantial economic resources and have lots of time on your hands (or tinkering is your hobby), you can get AHP and a bunch of X10 modules to do productive work for you.

    One thing I can say works VERY WELL for me.    The X10 controls are solid in the quiet, remote environment where my application is located.    I Don't know what kind of interference would be encountered in a municipal setting.    The CM15A works well (except RF), though I ran several new dedicated electrical circuits from the house breaker panel to new outlets where X10 controls are located for flood lights / yard lights / Hot Water Heater / and the HVAC system.     The "Timers" in all the AHP modules work VERY RELIABLY AND VERY WELL -- as long as AHP keeps running --.   You can create very flexable timers and it is neat to make the place look active when no one is there.   It's neat to have the Hot Water Heater and A/C unit come on before I get there.   All these modules can be reliably controlled via the cell phone / Xtralogic's Remote Destop app.      But as for My-HOUSE, I have NEVER got it to work worth a @*(#*(.  I just gave UP.
And the RF on the CM15A sucks.    The advertised "Up to 100 feet" is a myth - a lie - actually a "deceptive trade practice" under Texas Law.    It's really more like 12 to 15 feet unless you do the antenna mod on the CM15A like I am fixing to do.

     Thanks TOM G for a great post.    Such a good USER'S MANUAL is much needed.
Title: Re: AHP Reliability Tips and Tricks
Post by: tgibbs99 on March 12, 2012, 11:26:42 PM
OK, so the AHP software is crap, and can be made to work if you use multiple workarounds.

How can we fix it?

Can X-10 make it open source? Please?

And what is X-10 doing about it?  When is the next update scheduled?

Is someone willing to write a simple program in c++ or Linux that we can begin to actually use?

Thanks.

Tim G.
Title: Re: AHP Reliability Tips and Tricks
Post by: localuser on April 03, 2012, 01:11:46 AM
Can X-10 make it open source? Please?

There are already several open source projects that work with the cm15 and cm11 modules.    I am using MOCHAD with my system.   

I don't think that they will ever open-source the project because that would certainly take away the reveune with licensing software sales. 
Title: Re: AHP Reliability Tips and Tricks
Post by: Brian H on April 03, 2012, 06:55:24 AM
tgibbs99; We are a User to User Forum. So anything on updates or fixes from X10 is information we don't have.

Another Open Source Automation Software for many interfaces and automation protocols.
http://forums.x10.com/index.php?PHPSESSID=2chqi8foql670tldn3nauvoap6&topic=26313.0
Title: Re: AHP Reliability Tips and Tricks
Post by: dave w on August 24, 2017, 08:49:55 PM
Im going to prove it
I must have been asleep. Prove what?