Insteon Health Test Tool app now available

Posted on
Sat Mar 29, 2014 12:13 pm
JohnS offline
Posts: 29
Joined: Mar 26, 2014

iHealth issue

This is my first post.
I am running iHeath 1.5 on a Mac Mini running OSX Maverick (10.9.2). I do have Indigo 6.0.11 on this system.

The html output show no useful timing data.

The terminal displays the following data;
Starting test pass # 1 of 10
Testing device # 1 of 49Use of uninitialized value $count_in in numeric eq (==) at ./insteon_heal th.pl line 234.
Testing device # 2 of 49Use of uninitialized value $count_in in numeric eq (==) at ./insteon_heal th.pl line 234.
....This continues for my 49 devices.

The Indigo log shows the following repeating error:
Unexpected command 02 62 (flushing)

Any help would be appreciated

Posted on
Mon Mar 31, 2014 10:15 am
matt (support) offline
Site Admin
User avatar
Posts: 19811
Joined: Jan 27, 2003
Location: Texas

Re: iHealth issue

I think those errors mean Indigo is still talking to the PowerLinc. You have to tell Indigo to disconnect (disable) the INSTEON interface, otherwise both Indigo and the iHealth script are trying to communicate with it at the same time.

Image

Posted on
Mon Mar 31, 2014 12:26 pm
JohnS offline
Posts: 29
Joined: Mar 26, 2014

Re: Insteon Health Test Tool app now available

Matt,
Thank you. You were right on. I thought that exiting out of Indigo before running iHealth would release the interface, apparently not.
Using your input, I disabled the interface in Indigo, kept Indigo running and ran iHealth. It ran successfully.

Posted on
Sat Jun 07, 2014 9:44 pm
bschollnick2 offline
Posts: 1324
Joined: Oct 17, 2004
Location: Rochester, Ny

Issues with Mavericks & iHealth?

Issues with Mavericks? I'm having very inconsistent issues with iHealth under Mavericks. I am seeing Sandbox errors in the log when I ask iHealth to rebuild the health device list.

Is anyone else seeing any issues? Is there a newer version than v1.5?

Matt, and Jay,

I was wondering, I don't see any method to send a RAW Insteon command via Python? I see what iHealth is doing, and if there's a direct way to send and receive raw insteon, I think there would be a way to create a native python implementation via either a plugin or directly into Indigo. (Pg 52 of Insteon developers guide 20070816a)

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Sun Jun 08, 2014 12:41 pm
matt (support) offline
Site Admin
User avatar
Posts: 19811
Joined: Jan 27, 2003
Location: Texas

Re: Insteon Health Test Tool app now available

You can send raw INSTEON commands from python. Here are some examples:

Code: Select all
reply = indigo.insteon.sendRaw("0A.B9.DC", [0x10, 0x00])

reply = indigo.insteon.sendRaw("0A.B9.DC", [0x10, 0x00], waitUntilAck=False)

reply = indigo.insteon.sendRawExtended("11.7B.2E", [0x2E, 0x00], waitForExtendedReply=True)
if reply.cmdSuccess:
   indigo.server.log("     backlight brightness: %d" % (reply.replyBytes[10],))
   indigo.server.log("button toggle mode bitmap: 0x%02X" % (reply.replyBytes[11],))
   indigo.server.log("     button states bitmap: 0x%02X" % (reply.replyBytes[12],))

setKeypadLedBrightness = [
   0x2E, 0x00,
   0x00,         # unused
   0x07,         # change LED backlight brightness
   0x11,         # brightness between 0x11 and 0x7F
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
]
for brightness in [0x07, 0x44, 0x66, 0x7F]:
   setKeypadLedBrightness[4] = brightness
   indigo.insteon.sendRawExtended("11.7B.2E", setKeypadLedBrightness)

It would be terrific to have a plugin based version of iHealth. I'm not sure how well timing the replies to the command will work, but it is definitely worth trying.

Image

Posted on
Sun Jun 08, 2014 1:25 pm
matt (support) offline
Site Admin
User avatar
Posts: 19811
Joined: Jan 27, 2003
Location: Texas

Re: Insteon Health Test Tool app now available

I've also updated the developer documentation for the raw commands.

Image

Posted on
Sun Jun 08, 2014 7:27 pm
bschollnick2 offline
Posts: 1324
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Insteon Health Test Tool app now available

matt (support) wrote:
You can send raw INSTEON commands from python. Here are some examples:
[/code]
It would be terrific to have a plugin based version of iHealth. I'm not sure how well timing the replies to the command will work, but it is definitely worth trying.


Excellent. That gives me something to work with.

Worse case, the Survey plugin becomes a heck of a lot smarter.

My only concern is that I am unaware of any way to ask Indigo to "Pause" processing other tasks.

Here is something that might help, but would definitely be a feature request.

Add the concept of priority to Indigo's traffic.

  • Low
  • Medium
  • High
  • Idle

In this way, I could ask Indigo to only run a Traffic Scan when there is no traffic, and no scheduled activity within 2 minutes (e.g. IDLE Priority).

This would allow you to add a Quality of Service style queueing, for example, if someone requests a high priority item, it's popped to the top of the queue. Medium is inserted before any low priority traffic, etc.

Alternatively, some way to pause the Indigo traffic, except for traffic from a particular task, for up to xx seconds?

For example, I could have the plugin start the scan, and tell indigo, any traffic that is not "High" Priority will be delayed for 30 seconds while I scan. Then the plugin waits for another idle block, and rinse, lather and repeat until all devices have been processed.

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Mon Jun 09, 2014 12:47 am
berkinet offline
User avatar
Posts: 3400
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Insteon Health Test Tool app now available

I would think a re-write of the iHealth tool in Python would be a good thing. The PERL code for the current version was written by seanadams, who has not been very active recently, and I doubt he has much interest in maintaining it. Likewise, I created the GUI, AppleScript and shell code and can't really see taking things any further in this direction.

However, I do have trouble seeing this type of service being instantiated as a plugin. In order to run, Indigo's Insteon processing must be suspended. This essentially means a stop to the basic HA functionality. I think having it as a script, or separate executable as it is now, makes it clear that the user is stopping normal processing. Also, by running the script outside of Indigo there is much richer set of interactive GUI tools available. I guess it could be implemented as a Plugin command, with no actual plugin objects. But, that seems like a misuse of the interface, and kind of pointless.

So, my plea, should someone take this project on: Keep it simple and keep it in Python, with possible use of Python GUI extensions or Python/AppleSCript interface as necessary.

Posted on
Mon Jun 09, 2014 8:53 am
bschollnick2 offline
Posts: 1324
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Insteon Health Test Tool app now available

matt (support) wrote:
I've also updated the developer documentation for the raw commands.


Matt,

Just a quick question, does the sendRaw or sendRawExtended expose the message flags? The Hops Left, and Max Hops are very important for replicating this iHealth behavior.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Mon Jun 09, 2014 10:33 am
matt (support) offline
Site Admin
User avatar
Posts: 19811
Joined: Jan 27, 2003
Location: Texas

Re: Insteon Health Test Tool app now available

Priority queues is definitely on my wish list, but non-trivial to add (won't happen in the near future).

Adding a mechanism to tell Indigo to temporarily pause its processing/sending of commands might be doable, but I'll need to think about it some more.

Also consider that if it were a plugin it could run in the background daily. That is, instead of trying to create an instant report it could periodically test a single device (which would just take a few seconds). So it wouldn't have to pause the entire system for minutes. Instead it would just, every several minutes, pick the next device to test and test it, then update the report meta data for that device. It can even define Triggers for when a device's responsiveness drops below a certain threshold. Thus, the plugin could just do its thing monitoring the health in the background.

The sendRaw commands currently do not provide access to hop fields. Can you describe exactly how iHealth uses those? I'll consider adding them based on what it needs and how it uses them...

Image

Posted on
Mon Jun 09, 2014 5:35 pm
bschollnick2 offline
Posts: 1324
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Insteon Health Test Tool app now available

matt (support) wrote:
The sendRaw commands currently do not provide access to hop fields. Can you describe exactly how iHealth uses those? I'll consider adding them based on what it needs and how it uses them...


First of all, even without the ability to restrict the max hops, this is not a show stopper. All it does is increase the uncertainty in an diagnosis this tool can make.

I'm not quite sure if iHealth is actually writing the packet to constrain the number of hops, but being able to do so can be an important diagnostic tool.
Correction - iHealth is not using the actual hops, the *'s are based on the mean average of the response time.

Code: Select all
      $mean = $sum / $num;            # The average response time
      printf REPORT "%42s\t%3d\t%1.3f\t%1.3f\t%1.3f\t%1.3f\t%s\n", $report->{$address}->{devicename}, $num_success, $min, $mean, $max, $sd, ('*' x ($mean*20));


The issue is that I can generate a estimated response time for the device(s), but some devices are generating numbers that are significantly too high. From what I see in the developers guide, 633 ms should be the highest possible for an extended message with 3 hops, and an ack.

Method 1 -
I can take the actual time the signal took, and then using the guidelines that smart home gives us in the developers guide try to match it to the rough time that 3 hops would take. But I'm seeing a few signals in the 700+ ms time frame. That's above 3 hops. So obviously some resends are being factored in for that device. So time isn't a reliable indicator of the number of hops.

The timing for each hop varies depending on the Extended / Standard message length, and if an Ack is requested. I don't see any way in the indigo device database to tell if a device uses extended or standard message lengths, so I don't have a reliable method to decide on which set of timings I should be basing the hop timing on.

The main issue is that we can make estimations, but we can't verify the data behind the estimation.

If a device is taking 326 ms, is it because it's a Standard message with 2 hops, and an ACK (~300 ms)? Or is it an Extended message with 1 hop, an Ack, and 1 retry? Does this really matter? Well, maybe? The question is do we want this to be able to potentially diagnose potential signal path issues?

Method 2 -
The other way is to send a command, and set it to 0 hops max. If the signal is ack'd, then we know it's reaching a dual band RF device, or a extremely close device. If it's not ack'd, we increment the max hops, until the device ack's. Then we know how many hops away it is. Once we know how many hops away it is, we can compare the actual ack time, to the guidelines that Smarthome gives us. If it is significantly higher, than we can say that there is something funny with that signal path (e.g. multiple retries in addition to additional hops).

In addition, I don't see anyway to tell if a device uses extended or standard message sizes, so it's very hard to tell what timing I should be using for an hop.

Now while we still have the issue of the standard vs extended message length, the issue is fairly moot since we know the actual number of hops the signal took. Let's take the 326 ms example above.

We know it was 2 hops, and took 326 ms, we know that we requested ACKs. So is it Greater than 300 ms, but less than 400ms? Then it fits the profile for a standard message w/ack. Does it fit within 316ms and 475 ms? It also fit's the Extended cycle times.

But if we know it was 2 hops, and is 615 ms? We know there some signal interference, and/or issues with the signal path.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Wed Jun 11, 2014 9:23 am
bschollnick2 offline
Posts: 1324
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Insteon Health Test Tool app now available

Okay.

Here's the news! :shock:

I have a version ready for testing. At this point, I still have some work to do.

1) I have to add options for running different numbers of passes.
2) I may want to add additional data to the report.

But, at this point, I need additional suggestions.

Here is a link to a sample report.

Please note, I have only run 3 passes on this report, since it's for testing/sample purposes.

  • What other data might be helpful?
  • I could use feedback from Zwave users. Right now this version is Insteon only, but I'm curious if I might be able to make this work with Zwave.
  • I need real world feedback on this. I have tested it here, but I'd like some people to volunteer to test this on their Insteon networks.

Please contact me at Benjamin AT schollnick dot NET, if you are interested in testing this. Or if you are a zwave user volunteering to work with me to make this work on zwave.
(Or someone could donate a zwave device & transceiver, and I'd be happy to add this into the plugin. I simply need to test against it)

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Thu Jun 12, 2014 3:12 am
bschollnick2 offline
Posts: 1324
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Insteon Health Test Tool app now available

Matt,

I am looking at trying to leverage this to other platforms other than insteon, and I'm sorry to say I can't find the information that I need.

I can't seem to find any documentation in the wiki regarding the X10, and Zwave equivalent of indigo.insteon.sendStatusRequest?

But what I have found is indigo.device.statusRequest? I tried using it on both X10 and Zwave, and it seems to work. I just don't have any X10 devices that support a statusRequest. The code worked, but I suspect indigo.device.statusRequest honors the device's supportsStatusRequest state, since I didn't see the request in the log.

Is this an abstracted version of sendStatusRequest, that works cross platform? Is there any reason that I should not use it?

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Thu Jun 12, 2014 12:41 pm
matt (support) offline
Site Admin
User avatar
Posts: 19811
Joined: Jan 27, 2003
Location: Texas

Re: Insteon Health Test Tool app now available

Hi Benjamin,

I need to put some thought into the best way to do this. Give me a few days and I'll get back with you.

Image

Posted on
Fri Jun 13, 2014 10:58 am
bschollnick2 offline
Posts: 1324
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Insteon Health Test Tool app now available

matt (support) wrote:
Hi Benjamin,

I need to put some thought into the best way to do this. Give me a few days and I'll get back with you.


Just as a suggestion, if there is anyway you can expose Cheetah to the plugin, that would be great. Since this is not an IWS plugin, I have been forced to include it into the plugin. And Boy, I didn't realize how large it was until I bundled it in.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Who is online

Users browsing this forum: No registered users and 1 guest