more G-Labs products

Author Topic: TESTING RELEASE  (Read 196260 times)

July 27, 2014, 10:03:02 PM
Reply #210

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I just realised that if I install HG on that windows box where AHP is currently, I can get a better diagnostic since it will tell me the raw PLC coming in as well as how HG interprets it.  I'll set that up and update the results when I see the next anomaly.

July 27, 2014, 10:50:07 PM
Reply #211

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Two comments.

1) I went to install the Windows version of r394 and both XP and 7 told me the file was corrupt.  I downloaded again and it was still corrupt.  I installed r374 from the previous folder.

2) I know how to access the mono output from Linux.  How do I get that info from windows?  homegenie.log doesn't contain the debug info needed to view X10 PLC traffic.

July 28, 2014, 08:25:05 AM
Reply #212

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene

besides the wizard script issue I can just tell that interactions with X10 are now slower. From pressing a button to  modules reacting takes longer than before. I have no methods to measure this exactly.

Will revert to the previous 402 build

Happy to test the next version


Regards
Jens

July 28, 2014, 12:43:02 PM
Reply #213

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
I am back on the first 402 build, in general this seems to respond faster, than the 402 you gave us for testing last.

Cheers
Jens

July 28, 2014, 12:59:59 PM
Reply #214

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Sorry guys,

I've had some problem with my internet connection. r402 was also having a bug that made it slower.
Please try r403 from testing folder.

Thanks!
g.

July 28, 2014, 01:50:48 PM
Reply #215

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene

I have done that and the separator is still the border


The separator looks again like initially, no extra UI settings

But 403 is fast again

Update: Please see the screenshot attached, sometimes the separator pops up with this UI during remove, sometimes w/o - regardless of the appearance it is always the border for the wizard script for group lights.

Regards
Jens
« Last Edit: July 28, 2014, 03:37:34 PM by Jens »

July 29, 2014, 02:57:26 PM
Reply #216

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Jens,

the bugs you reported should be fixed now.
r403 from testing folder is updated with these fixes.
If noone else reports other bugs, this release will be promoted from testing beta to public beta.

Cheers,
g.

July 29, 2014, 03:40:02 PM
Reply #217

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
i noticed a strange occurznce last night with the X10 transmit.  I have HG set up on my Raspi and now on my WinXP.  I sent ON commands for several modules consecutively (pressing ON on 4 or 5 modules within a couple seconds).  the second HG saw the commands and set it's modules to ON but only the first module turned on.  these were all the same HC, so it might be related to the same issue we've been working on.

July 29, 2014, 03:58:53 PM
Reply #218

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Ben,

if you send a sequence of x10 commands quickly, some of them will fail due to an insight limitation of the x10 protocol.
With the new XTenLib release, hg can now detect when a command failed (old releases couldn't acknowledge of that).
But xtenlib does not do anything when a command failed and don't even revet the status of the module (eg. if you turn on something but the command fails, the hg module will have Status.Level = 1 as if the command succeed).
I've been thinking of implementing a basic resend with a maximum number of 3 tries. Since the command timeout is set to 3 seconds, the maximum command execution time, when it fails, it will be 9 seconds.
Any suggestion is welcome.

Cheers,
g.



July 29, 2014, 04:47:47 PM
Reply #219

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If multiple devices send PLC commands at exactly the same time, the result will be a signal collision.  In this case, both commands will fail.  If multiple commands are issued by the same controller nearly consecutively, I would expect that the controller would send the first but either cache or not issue the second command.  I have not performed much experimentation on this, but have seen this a few times when issuing commands from an XPT wall switch/transmitter.

The thing that was odd here was in regards to the two HG machines (I'll call them HG1 and HG2).  HG1 sent A2 ON, A3 ON, A4 ON, A5 ON within a couple seconds (however long it took to press the buttons in the HG web interface.  HG1 showed that the lights were switched on, which makes sense since it only knows it issued the command and did not monitor anything nor receive a status from the modules (not available for most X10 equipment).  HG2 somehow knew that the command was issued and turned those modules to ON as well.  But, in reality the lights did not turn on.  Only the first module turned on and the others remained off.  So, either HG sent the command and the lights somehow ignored them or the two machines interacted via the network to communicate the module status.  I know HG can do this, but I didn't think it was enabled by default.

Either way, if 4-5 modules are toggled within 1-2 seconds, I would expect one of three things. 

1) Signal collision
2) Cached commands
3) Missed commands

Some modules may work, but overlapping signals might occur depending on the controller.  If the controller is not polite, it will kill all transmissions.  If it is polite, it will wait for the line to clear before issuing a command.  It may cache commands and send them or it may just ignore some and send the first and one of the others.

July 29, 2014, 07:04:11 PM
Reply #220

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi ben,

I added handling of message errors and resend.
Tested it by using two X10 controllers (CM11 and CM15) on two different machines.
It seems to work.
The test I made is launching the same macro simultaneously on the two machines.
I'm attacching the example macro too.
If you download r403 again you'll get this optimization for testing.
Let me know the results of your testing and your considerations about it.

Code: [Select]


Timings from CM15 machine:

[19:05:25.903342] X10 < 04 E5
2014-07-29T19:05:26.2023770+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie.Automation/1000/1406653528427  HTTP    POST
[19:05:26.410761] X10 > 55
[19:05:26.418266] X10 > COMMAND SUCCESSFUL
[19:05:26.463500] X10 < 06 E2
2014-07-29T19:05:26.5197380+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Automation/Programs.List/1406653528744     HTTP    GET
[19:05:26.972789] X10 > 55
[19:05:26.980250] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:27.0252760+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:27.051515] X10 < 04 E5
2014-07-29T19:05:27.2639510+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Interfaces.List/1406653529481       HTTP    GET
[19:05:27.567005] X10 > 55
[19:05:27.574254] X10 > COMMAND SUCCESSFUL
[19:05:27.624291] X10 < 06 E3
[19:05:28.130279] X10 > 55
[19:05:28.137686] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:28.1851970+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:28.226472] X10 < 04 E5
[19:05:28.732714] X10 > 55
[19:05:28.740110] X10 > COMMAND SUCCESSFUL
[19:05:28.792660] X10 < 06 E2
[19:05:29.303316] X10 > 55
[19:05:29.310475] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:29.3582430+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:29.384053] X10 < 04 E5
[19:05:29.896604] X10 > 55
[19:05:29.903919] X10 > COMMAND SUCCESSFUL
[19:05:29.944286] X10 < 06 E3
2014-07-29T19:05:30.1918180+02:00       HomeAutomation.HomeGenie.Automation     35      Automation Program      Program.Status  Running
2014-07-29T19:05:30.2169580+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie.Automation/35/1406653532440    HTTP    POST
2014-07-29T19:05:30.2490980+02:00       HomeAutomation.HomeGenie.Automation     35      Automation Program      Program.Status  Idle
[19:05:30.450769] X10 > 55
[19:05:30.458222] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:30.5070280+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:30.542647] X10 < 04 E5
2014-07-29T19:05:30.7181960+02:00       HomeAutomation.PhilipsHue       1       -       Meter.Watts     0
2014-07-29T19:05:30.8315840+02:00       HomeAutomation.PhilipsHue       2       -       Meter.Watts     0
2014-07-29T19:05:30.9622920+02:00       HomeAutomation.PhilipsHue       3       -       Meter.Watts     0
[19:05:31.052975] X10 > 55
[19:05:31.059955] X10 > COMMAND SUCCESSFUL
[19:05:31.103953] X10 < 06 E2
2014-07-29T19:05:31.2236390+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie.Automation/35/1406653533448    HTTP    POST
[19:05:31.613965] X10 > 55
[19:05:31.620915] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:31.6648720+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:31.691750] X10 < 04 E5
[19:05:32.207637] X10 > 55
[19:05:32.218580] X10 > COMMAND SUCCESSFUL
[19:05:32.252146] X10 < 06 E3
[19:05:32.765902] X10 > 55
[19:05:32.773240] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:32.8125220+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:32.849226] X10 < 04 E5
[19:05:33.351473] X10 > 55
[19:05:33.359191] X10 > COMMAND SUCCESSFUL
[19:05:33.411822] X10 < 06 E2
[19:05:33.921816] X10 > 55
[19:05:33.929206] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:33.9781990+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:34.004198] X10 < 04 E5
[19:05:34.515609] X10 > 55
[19:05:34.522871] X10 > COMMAND SUCCESSFUL
[19:05:34.572698] X10 < 06 E3
[19:05:35.085957] X10 > 55
[19:05:35.093187] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:35.1331090+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:35.168341] X10 < 04 E5
2014-07-29T19:05:35.2300260+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/      HTTP    GET
[19:05:35.672448] X10 > 55
[19:05:35.679786] X10 > COMMAND SUCCESSFUL
[19:05:35.732484] X10 < 06 E2
[19:05:36.243042] X10 > 55
[19:05:36.250380] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:36.2956010+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:36.323289] X10 < 04 E5
[19:05:36.831513] X10 > 55
[19:05:36.839131] X10 > COMMAND SUCCESSFUL
[19:05:36.890140] X10 < 06 E3
2014-07-29T19:05:37.2763070+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Interfaces.List/1406653539496       HTTP    GET
[19:05:37.401416] X10 > 55
[19:05:37.408919] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:37.4515490+02:00       HomeAutomation.X10      B7      -       Status.Level    0




g.
« Last Edit: July 29, 2014, 07:08:31 PM by Gene »

July 29, 2014, 07:25:45 PM
Reply #221

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I'll give this a try after work.  Two questions.

1) How did you run both macros at the same time?  Did you just select "run" on both machines at the same time or did you have an automated method (run at a certain time)?

2) I can get the debug output from the Raspi, but I won't be able to get this data from the Windows XP machine.  I haven't found out a way to get to the Mono Console in Windows so I can only see what's written to the log file.

July 29, 2014, 07:29:23 PM
Reply #222

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Ben,

sorry for flooding here =) I also re-enabled the house code optimization.
If currently addressed housecode is the same it won't resend the house code but only the unit number.
So now it's even faster (500-600ms a command), see the new log:

Code: [Select]

[19:05:25.903342] X10 < 04 E5
2014-07-29T19:05:26.2023770+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie.Automation/1000/1406653528427  HTTP    POST
[19:05:26.410761] X10 > 55
[19:05:26.418266] X10 > COMMAND SUCCESSFUL
[19:05:26.463500] X10 < 06 E2
2014-07-29T19:05:26.5197380+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Automation/Programs.List/1406653528744     HTTP    GET
[19:05:26.972789] X10 > 55
[19:05:26.980250] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:27.0252760+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:27.051515] X10 < 04 E5
2014-07-29T19:05:27.2639510+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Interfaces.List/1406653529481       HTTP    GET
[19:05:27.567005] X10 > 55
[19:05:27.574254] X10 > COMMAND SUCCESSFUL
[19:05:27.624291] X10 < 06 E3
[19:05:28.130279] X10 > 55
[19:05:28.137686] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:28.1851970+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:28.226472] X10 < 04 E5
[19:05:28.732714] X10 > 55
[19:05:28.740110] X10 > COMMAND SUCCESSFUL
[19:05:28.792660] X10 < 06 E2
[19:05:29.303316] X10 > 55
[19:05:29.310475] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:29.3582430+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:29.384053] X10 < 04 E5
[19:05:29.896604] X10 > 55
[19:05:29.903919] X10 > COMMAND SUCCESSFUL
[19:05:29.944286] X10 < 06 E3
2014-07-29T19:05:30.1918180+02:00       HomeAutomation.HomeGenie.Automation     35      Automation Program      Program.Status  Running
2014-07-29T19:05:30.2169580+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie.Automation/35/1406653532440    HTTP    POST
2014-07-29T19:05:30.2490980+02:00       HomeAutomation.HomeGenie.Automation     35      Automation Program      Program.Status  Idle
[19:05:30.450769] X10 > 55
[19:05:30.458222] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:30.5070280+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:30.542647] X10 < 04 E5
2014-07-29T19:05:30.7181960+02:00       HomeAutomation.PhilipsHue       1       -       Meter.Watts     0
2014-07-29T19:05:30.8315840+02:00       HomeAutomation.PhilipsHue       2       -       Meter.Watts     0
2014-07-29T19:05:30.9622920+02:00       HomeAutomation.PhilipsHue       3       -       Meter.Watts     0
[19:05:31.052975] X10 > 55
[19:05:31.059955] X10 > COMMAND SUCCESSFUL
[19:05:31.103953] X10 < 06 E2
2014-07-29T19:05:31.2236390+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie.Automation/35/1406653533448    HTTP    POST
[19:05:31.613965] X10 > 55
[19:05:31.620915] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:31.6648720+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:31.691750] X10 < 04 E5
[19:05:32.207637] X10 > 55
[19:05:32.218580] X10 > COMMAND SUCCESSFUL
[19:05:32.252146] X10 < 06 E3
[19:05:32.765902] X10 > 55
[19:05:32.773240] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:32.8125220+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:32.849226] X10 < 04 E5
[19:05:33.351473] X10 > 55
[19:05:33.359191] X10 > COMMAND SUCCESSFUL
[19:05:33.411822] X10 < 06 E2
[19:05:33.921816] X10 > 55
[19:05:33.929206] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:33.9781990+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:34.004198] X10 < 04 E5
[19:05:34.515609] X10 > 55
[19:05:34.522871] X10 > COMMAND SUCCESSFUL
[19:05:34.572698] X10 < 06 E3
[19:05:35.085957] X10 > 55
[19:05:35.093187] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:35.1331090+02:00       HomeAutomation.X10      B7      -       Status.Level    0
[19:05:35.168341] X10 < 04 E5
2014-07-29T19:05:35.2300260+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/      HTTP    GET
[19:05:35.672448] X10 > 55
[19:05:35.679786] X10 > COMMAND SUCCESSFUL
[19:05:35.732484] X10 < 06 E2
[19:05:36.243042] X10 > 55
[19:05:36.250380] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:36.2956010+02:00       HomeAutomation.X10      B7      -       Status.Level    1
[19:05:36.323289] X10 < 04 E5
[19:05:36.831513] X10 > 55
[19:05:36.839131] X10 > COMMAND SUCCESSFUL
[19:05:36.890140] X10 < 06 E3
2014-07-29T19:05:37.2763070+02:00       MIG.Gateways.WebServiceGateway  192.168.0.6     api/HomeAutomation.HomeGenie/Config/Interfaces.List/1406653539496       HTTP    GET
[19:05:37.401416] X10 > 55
[19:05:37.408919] X10 > COMMAND SUCCESSFUL
2014-07-29T19:05:37.4515490+02:00       HomeAutomation.X10      B7      -       Status.Level    0

....


I'm also attacching a new test script with some dimming commands too.

g.

July 29, 2014, 07:31:04 PM
Reply #223

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
I did run manually on both machines to simulate some collisions.

You can get the debug output on windows too.

1) Run a command prompt as administrator
2) cd the homegenie program files folder
3) type: "HomeGenie.exe" and press enter to run hg

g.

I'll give this a try after work.  Two questions.

1) How did you run both macros at the same time?  Did you just select "run" on both machines at the same time or did you have an automated method (run at a certain time)?

2) I can get the debug output from the Raspi, but I won't be able to get this data from the Windows XP machine.  I haven't found out a way to get to the Mono Console in Windows so I can only see what's written to the log file.

July 29, 2014, 09:07:42 PM
Reply #224

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene,

what shall I say, the bug is still there.

I upgrade to the new r403 and imported my 402 config as backup - hope that is not causing problems.

The group has
- group lights on
- group lights off
- separator
- x10 light
- five hue lights
- separator
- three x10 shutter
- separator
- upnp media


deleting the first separator makes the wizard script working, creating a new separator results in a non working wizard script.


How can I help further?

thanks
regards
Jens