HomeGenie Forum

Development => Bug reporting => Topic started by: bkenobi on November 14, 2015, 07:13:57 PM

Title: HG 1.1 X10 PLC send broken
Post by: bkenobi on November 14, 2015, 07:13:57 PM
This is related to other comments I have made about X10 issues, but I now have some data to show the issue better.  I decided to put it in a new thread to not complicate the issue and to put it in the bug reporting sub forum where it should be.

The issue I have found is that with HG 1.0 (I tested both r478 and r491) X10 commands send correctly. However, with HG 1.1 (r498, r499, r500 tested) PLC commands do not cause the module to actuate immediately.  They do eventually actuate after a long delay.

I have log files for the exact same configuration and commands being sent on r478, r491, and r500.  It appears that the primary difference between these is that r500 is not reporting the CM15A responding with "55" though I don't know that it is or is not.

r478:
Code: [Select]
[09:18:23.073500] X10 < 04 6D
[09:18:23.499216] X10 > 55
[09:18:23.503255] X10 > COMMAND SUCCESSFUL
[09:18:23.508443] X10 < 06 62
[09:18:23.931232] X10 > 55
[09:18:23.935274] X10 > COMMAND SUCCESSFUL
2015-11-14T09:18:23.9413770-08:00 HomeAutomation.X10 A8 - Status.Level 1

r491:
Code: [Select]
2015-11-14T08:54:12.4950220-08:00 HomeGenie.System Console StdOut/StdErr redirect Console.Output X10 < 04 6D
2015-11-14T08:54:12.9120980-08:00 HomeGenie.System Console StdOut/StdErr redirect Console.Output X10 > 55
2015-11-14T08:54:12.9152820-08:00 HomeGenie.System Console StdOut/StdErr redirect Console.Output X10 > COMMAND SUCCESSFUL
2015-11-14T08:54:12.9199630-08:00 HomeGenie.System Console StdOut/StdErr redirect Console.Output X10 < 06 62
2015-11-14T08:54:13.3474480-08:00 HomeGenie.System Console StdOut/StdErr redirect Console.Output X10 > 55
2015-11-14T08:54:13.3509110-08:00 HomeGenie.System Console StdOut/StdErr redirect Console.Output X10 > COMMAND SUCCESSFUL
2015-11-14T08:54:13.3570690-08:00 HomeAutomation.X10 A8 - Status.Level 1

r500:
Code: [Select]
2015-11-14 09:34:14.0961 Debug 04-6D
2015-11-14 09:34:19.1007 Warn Previous command timed out, resending (1)
2015-11-14 09:34:19.1111 Debug 06-62
2015-11-14 09:34:24.1165 Warn Previous command timed out, resending (1)
2015-11-14 09:34:24.1291 Debug 55
2015-11-14 09:34:24.1319 Debug Command succesfull
2015-11-14 09:34:24.5538 Debug 55
2015-11-14 09:34:24.5566 Debug 00
2015-11-14 09:34:39.6614 Debug 04-6D
2015-11-14 09:34:40.0834 Debug 55
2015-11-14 09:34:40.0862 Debug Command succesfull

The peculiar thing is that when the script I'm running turns the module off, it executes immediately in r500.  The only real difference I can think of is that the above code is executed when an RF command comes in, so maybe that has something to do with it.

Code: [Select]
2015-11-14 09:34:40.0903 Debug 06-63
2015-11-14 09:34:40.5155 Debug 55
2015-11-14 09:34:40.5183 Debug Command succesfull
2015-11-14 09:34:40.5233 Info HomeAutomation.X10 A8 - Status.Level 0

I am also attaching the HG backup that I used to debug this issue.  To recreate the issue, simply restore the backup on a RPi (possibly other systems) with a CM15A attached.  Send "O2 ON" with either PLC or RF from a physical controller (anything other than HG).  With HG 1.0, a PLC "A8 ON" will be sent within 1 second.  With HG 1.1, a PLC "A8 ON" will be sent after 5-10 seconds due to timeouts.
Title: Re: HG 1.1 X10 PLC send broken
Post by: emerich on November 14, 2015, 07:33:22 PM
Hi,
I did a clean install on a Pi 2 (therefor shouldn't be a performance issue) and got the same kind of delay between detecting a motion from an x10 motion sensor. The command is reveived immediately and the code of the script is executed within the same second. But then it takes about 12 seconds to switch on the light (also X10). Also the update of the module is 12 seconds late.

br. Christian 
Title: Re: HG 1.1 X10 PLC send broken
Post by: bkenobi on November 14, 2015, 07:40:59 PM
I was updating the OP when you posted so I have now included a test.  However, if you see the same issue on RPi 2 then it's not just me.  Thanks for confirmation!
Title: Re: HG 1.1 X10 PLC send broken
Post by: bkenobi on November 17, 2015, 02:12:30 PM
Bug isolated and fix in work.  Tracked at:

https://github.com/genielabs/HomeGenie/issues/237
Title: Re: HG 1.1 X10 PLC send broken
Post by: emerich on November 17, 2015, 07:23:35 PM
 :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)

Great Job!!!!!

 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
Title: Re: HG 1.1 X10 PLC send broken
Post by: bkenobi on November 18, 2015, 07:07:01 PM
Looks like it's fixed:

http://www.homegenie.it/forum/index.php?topic=129.msg7500#msg7500 (http://www.homegenie.it/forum/index.php?topic=129.msg7500#msg7500)

I can't test now since my power's out, so if someone else could verify that would be helpful.
Title: Re: HG 1.1 X10 PLC send broken
Post by: bkenobi on November 22, 2015, 01:10:18 AM
My power was restored this morning and I just confirmed that r501 fixed the issue.