more G-Labs products

Author Topic: TESTING RELEASE  (Read 196240 times)

April 03, 2014, 09:53:21 PM
Reply #30

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Would it be possible to add the X10 input/output and a time it occurs back into the next test version?  I'd like to spend some more time with the x10 timing like I was with r356.

April 03, 2014, 10:41:58 PM
Reply #31

Gene

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

replace the XTenLib.dll with this one.

Cheers,
g.

April 03, 2014, 10:55:31 PM
Reply #32

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Awesome, thanks!

April 04, 2014, 05:07:47 AM
Reply #33

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
It looks like the code outputs the same as r356 which is great.  I looked at the code and found a few couple locations that wrote data out in XTenManager.cs and added a time stamp output to them which seemed to work ok.  I was wondering if it would be possible to add this same type of code to the version you used to build the XTenLib.dll from earlier today?

This is what I added:
Code: [Select]
DateTime Timestamp = DateTime.Now;
string date = Timestamp.ToLocalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffzzz");
string logentrytxt = date + " " + ">>>>> " + Transceiver.ByteArrayToString(msg);
Console.WriteLine(logentrytxt);

This correctly outputs:
Quote
2014-04-03T19:58:21.5543550-07:00       >>>>>OUT C3

Obviously, this won't output all data that comes in/goes out.  It's pretty close, but would be nice if the data could be added to this data prefix.  I'll work with what I have here for now and hope you can provide a little more help.

April 04, 2014, 05:39:34 AM
Reply #34

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I tried using the same XTenLib.dll with HG sending the commands and it actually output more data.  When I send an X10 PLC from ActiveHome Pro, HG sees:
Code: [Select]
2014-04-03T20:08:32.1387840-07:00       >>>>>OUT C3
2014-04-03T20:08:32.5046660-07:00       HomeAutomation.X10      B6      -      Status.Level     1
2014-04-03T20:08:32.6442390-07:00       >>>>>OUT C3
2014-04-03T20:08:33.1495130-07:00       >>>>>OUT C3
2014-04-03T20:08:33.3617300-07:00       HomeAutomation.X10      A6      -      Status.Level     1
2014-04-03T20:08:33.6551680-07:00       >>>>>OUT C3

However, if I use HG as the switch->light controller:
Code: [Select]
2014-04-03T20:15:33.3295930-07:00       >>>>>OUT C3
2014-04-03T20:15:33.7463570-07:00       HomeAutomation.X10      B6      -      Status.Level     1
2014-04-03T20:15:33.8352980-07:00       >>>>>OUT C3
2014-04-03T20:15:33.9490800-07:00       HomeAutomation.X10      A6      -      Status.Level     1
2014-04-03T20:15:34.3407120-07:00       >>>>>OUT 04 69
2014-04-03T20:15:34.8458870-07:00       >>>>>OUT 06 62

The time for AHP to see and then respond to a command appears to be 1.223 to 1.234 seconds (not including the time for the initial transmission from the switch to AHP).  The time for HG appears to be 1.011 seconds consistently.  HOWEVER, this is does not include the time for PLC from the switch to HG or from HG to the light.  I think I'm understanding this correctly.  If so, AHP takes 1.3s + 0.7s = 2 seconds for this action.  HG takes 1.4s + 1.0s = 2.4s.  But, I'm seeing a bit longer so I guess this measurement isn't perfect.

April 04, 2014, 07:13:59 AM
Reply #35

Jens

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

now from Firefox, I get these event streams

GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396588220173 [HTTP/1.1 200 OK 10ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10030ms]
"event:{"Timestamp":"2014-04-04T05:10:22.21567Z","Domain":"HomeAutomation.PhilipsHue","Source":"1","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222215.67}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:22.31639Z","Domain":"HomeAutomation.PhilipsHue","Source":"2","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222316.39}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:22.417083Z","Domain":"HomeAutomation.PhilipsHue","Source":"3","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222417.083}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:22.518467Z","Domain":"HomeAutomation.PhilipsHue","Source":"4","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222518.467}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:22.619089Z","Domain":"HomeAutomation.PhilipsHue","Source":"5","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222619.0891}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:22.719761Z","Domain":"HomeAutomation.PhilipsHue","Source":"6","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222719.761}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:22.820577Z","Domain":"HomeAutomation.X10","Source":"A1","Description":"X10 Module","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222820.5769}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:22.921279Z","Domain":"HomeAutomation.X10","Source":"A10","Description":"X10 Module","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588222921.2791}" index.html:6253
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396588230172 [HTTP/1.1 200 OK 461ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10022ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396588240173 [HTTP/1.1 200 OK 10ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10022ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396588250173 [HTTP/1.1 200 OK 10ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10068ms]
"event:{"Timestamp":"2014-04-04T05:10:53.022439Z","Domain":"HomeAutomation.PhilipsHue","Source":"1","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253022.439}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:53.123108Z","Domain":"HomeAutomation.PhilipsHue","Source":"2","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253123.1079}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:53.223851Z","Domain":"HomeAutomation.PhilipsHue","Source":"3","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253223.8511}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:53.32454Z","Domain":"HomeAutomation.PhilipsHue","Source":"4","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253324.54}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:53.425255Z","Domain":"HomeAutomation.PhilipsHue","Source":"5","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253425.2549}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:53.526775Z","Domain":"HomeAutomation.PhilipsHue","Source":"6","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253526.7749}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:53.627626Z","Domain":"HomeAutomation.X10","Source":"A1","Description":"X10 Module","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253627.626}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:10:53.728697Z","Domain":"HomeAutomation.X10","Source":"A10","Description":"X10 Module","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396588253728.697}" index.html:6253
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396588260172 [HTTP/1.1 200 OK 11ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10023ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396588270172 [HTTP/1.1 200 OK 15ms]


It's the same than on iPad (and A5 is "yellow" and should not). I changed A5 to include a VM Value, as far as I can see this was the trigger to have A5 part of these events.

After going from Analyze to Control I have A5 grey (which is correct), the rotating waiting indicator pops up, I get these events

Module","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589369887.333}" index.html:6253
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396589370357 [HTTP/1.1 200 OK 10ms]
POST http://192.168.2.20/api/HomeAutomation.HomeGenie/Statistics/Global.TimeRange// [HTTP/1.1 200 OK 315ms]
POST http://192.168.2.20/api/HomeAutomation.HomeGenie/Statistics/Global.CounterTotal//Meter.Watts [HTTP/1.1 200 OK 969ms]
POST http://192.168.2.20/api/HomeAutomation.HomeGenie/Statistics/Parameter.StatsHour/Meter.Watts// [HTTP/1.1 200 OK 3878ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10257ms]
POST http://192.168.2.20/api/HomeAutomation.HomeGenie/Statistics/Parameter.Counter/Meter.Watts// [HTTP/1.1 200 OK 1129ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396589380622 [HTTP/1.1 200 OK 10ms]
POST http://192.168.2.20/api/HomeAutomation.HomeGenie/Automation/Macro.GetDelay/ [HTTP/1.1 200 OK 9ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Automation/Programs.List/1396589383394 [HTTP/1.1 200 OK 324ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Groups.List/Control/1396589385157 [HTTP/1.1 200 OK 403ms]
POST http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Modules.List/1396589386234 [HTTP/1.1 200 OK 1075ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Automation/Programs.List/1396589387961 [HTTP/1.1 200 OK 199ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396589390220 [HTTP/1.1 200 OK 9ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10023ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Config/Interfaces.List/1396589400144 [HTTP/1.1 200 OK 10ms]
GET http://192.168.2.20/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream/ [HTTP/1.1 200 OK 10033ms]
"event:{"Timestamp":"2014-04-04T05:30:00.223233Z","Domain":"HomeAutomation.PhilipsHue","Source":"1","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589400223.2329}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:00.323913Z","Domain":"HomeAutomation.PhilipsHue","Source":"2","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589400323.9131}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:00.424609Z","Domain":"HomeAutomation.PhilipsHue","Source":"3","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589400424.6089}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:00.525271Z","Domain":"HomeAutomation.PhilipsHue","Source":"4","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589400525.271}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:00.62592Z","Domain":"HomeAutomation.PhilipsHue","Source":"5","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589400625.92}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:00.72662Z","Domain":"HomeAutomation.PhilipsHue","Source":"6","Description":"","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589400726.62}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:00.827354Z","Domain":"HomeAutomation.X10","Source":"A1","Description":"X10 Module","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589400827.354}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:00.928079Z","Domain":"HomeAutomation.X10","Source":"A5","Description":"X10 Module","Property":"Meter.Watts","Value":"40","UnixTimestamp":1396589400928.0791}" index.html:6253
"event:{"Timestamp":"2014-04-04T05:30:01.028738Z","Domain":"HomeAutomation.X10","Source":"A10","Description":"X10 Module","Property":"Meter.Watts","Value":"0","UnixTimestamp":1396589401028.738}"

and A5 is "yellow " :-( but in reality still off.

Does it help?

Thanks
Jens
« Last Edit: April 04, 2014, 07:34:44 AM by Jens »

April 04, 2014, 07:48:21 AM
Reply #36

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
if I query /api/HomeAutomation.HomeGenie/Config/Modules.List/

I get for A5 the wrong value (so I think this is an independent issue from the browser/os)

{
           "Name": "Status.Level",
           "Description": "",
           "Value": "1",
           "UpdateTime": "2014-04-04 05:29:15Z",
           "ValueIncrement": "1",
           "LastValue": "0",
           "LastUpdateTime": "2014-04-04 05:29:15Z"

... and there's 2hrs difference (UTC?)

Cheers
Jens

April 04, 2014, 12:26:49 PM
Reply #37

Gene

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

It looks like the code outputs the same as r356 which is great.  I looked at the code and found a few couple locations that wrote

I actually changed it a little bit. Perhaps in the future I'll add common logging to the whole project, for now it's best if you change it to suite your tests.

x10 input:
https://github.com/genielabs/HomeGenie/blob/master/MIG/Support%20Libraries/XTenLib/XTenManager.cs#L374

x10 output:
https://github.com/genielabs/HomeGenie/blob/master/MIG/Support%20Libraries/XTenLib/XTenManager.cs#L649

and I'll also add a line after the Monitor.Enter:

https://github.com/genielabs/HomeGenie/blob/master/MIG/Support%20Libraries/XTenLib/XTenManager.cs#L652

If you cannot compile the code yourself send me these lines, I'll compile it for you.

Cheers,
g.

April 04, 2014, 12:33:02 PM
Reply #38

Gene

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

there must be some automation option/feature or program that is controlling A5.
Check the configuration.

g.

April 04, 2014, 01:59:04 PM
Reply #39

Gene

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

perhaps I found the problem. Are you using the "toggle" button to switch lights on/off?
There's actually a bug with the toggle functionality.
If so, try using the ON/OFF buttons istead. Tell me if that was the bug.

Cheers,
g.

April 04, 2014, 05:37:25 PM
Reply #40

pmowry911

  • *
  • Information
  • Newbie
  • Posts: 21
Hi Jens,

perhaps I found the problem. Are you using the "toggle" button to switch lights on/off?
There's actually a bug with the toggle functionality.
If so, try using the ON/OFF buttons istead. Tell me if that was the bug.

Cheers,
g.

Would this toggle bug happen to be the action happening twice?  If a light is on and I hit the toggle button it will turn off and back on, and vice versa.  This is the only bug I'm seeing after upgrading to 358 and mono to 3.2 (thanks again for the support and great application).

April 04, 2014, 06:40:32 PM
Reply #41

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
yes pmowry, toggle funcionality will be like performing twice when used in conjuction with any feature that changes the level (eg. level memory or energy saving mode).

g.




April 04, 2014, 07:49:22 PM
Reply #42

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
An update that fixes the issue can be downloaded here:

http://sourceforge.net/projects/homegenie/files/_updates/HomeGenie_1_00_beta_r358_359_update.zip/download

It can be automatically updated from Maintenance menu too, but it needs disabling logging before updating, due to a bug in the logger shutdown procedure (fixed also in this update).

Cheers,
g.

April 04, 2014, 08:34:05 PM
Reply #43

pmowry911

  • *
  • Information
  • Newbie
  • Posts: 21
An update that fixes the issue can be downloaded here:


You fix things to fast ;)  and thank you..

-Patrick

April 04, 2014, 09:36:16 PM
Reply #44

Jens

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

yes, I use the toggle button and ON/OFF. Just tried it now several times, if I only use ON/OFF the problem does not show up, if I use once toggle, the problem also shows up with ON/OFF afterwards.

I will try your fix by tomorrow

Thanks a lot
Cheers
Jens