more G-Labs products

Author Topic: Insteon Hub Plug-in Support for Testing  (Read 6272 times)

November 27, 2014, 12:37:11 AM
Read 6272 times

hefferveisen

  • *
  • Information
  • Newbie
  • Posts: 6
Overview:
I have created c# user program that extends HomeGenie with support for the Insteon Hub . I already had the hub, and didn't want to buy a PLM.  I investigated leverging the FluentDwelling library that HG used for Insteon PLM support but found that library it too heavily targeted towards the serial/USB PLM protocol to make it usable for the Network HUB.  The HG Hub plug-in has been tested (minimally) on both Windows PC and RasberryPi.  Feedback, contributions, or requests are encouraged.

Instructions:
  • Make sure you already have the Insteon Hub setup and Installed.  To confirm you know the Hub IP addresss, username, port, etc, you should first connect to the Insteon Hub using your favorite web browser.   In my case, i use "http://192.168.1.2:25105/" but your IP and port # could vary.  The hub will request the username/password if needed.  The hub should present a response in your web browser as shown below.
Code: [Select]
INSTEON Hub Details
Alert 2.6 YF
PLM:9C
Firmware:4.8A Build Feb 08 2013
ID:AA.BB.CC
    • Import the InsteonHub Program to  the "Automation->DevicesAndThings" group
    • When you enable the InsteonHub program, be sure to edit the program options (Insteon Hub IP Address, Username, Password, and Port Address).  This is really critical, if the IP address, username, or password is not correct then HG wont be able to connect to the Hub.  Response time will be slow because the HTTP commands will timeout.  If things are not working please double check this.
    • By default the InsteonHub plug-in creates 5 virtual "light" modules.  If that's not enough for your needs, or if you want some dimmable modules, then you can edit the plugin code to suite your needs.
    • Create modules for each Insteon device (e.g., Light switch) in your home. Be sure to enter the InsteonID (e.g. AA.BB.CC) for each module

     
Known Issues:
  • Initial version only supports Insteon devices, but not X10.   I do plan to add support for X10 to the plug-in.  The Insteon Hub natively supports X10 devices and i still have a few X10 devices in my home.
  • I have only tested non-dimmable devices (off/on).   The plug-in includes code that should support dimming, but i have not been able to test as i don't have any dimmable Insteon devices in my home.
  • I have only tested with a few Insteon devices (wall switch, outdoor plug-in module, and micro switches).
    • Initial version *sends* commands to Insteon modules from HG, but it doesn't query the status of Insteon Modules.  So if you have Insteon micro switches hooked to a motions sensor (as i do), then you wont be able to have HG trigger a behavior when the motion sensor is triggered.  I plan to add support for queries later.
    [li]A static IP for the Hub is recommended.  If you use DNS to assign the Hub IP,  then you might need to update HG when your Hub IP is changed.
[/list]
« Last Edit: April 24, 2015, 02:08:07 AM by hefferveisen »

January 15, 2015, 03:40:48 PM
Reply #1

Norm258

  • *
  • Information
  • Newbie
  • Posts: 1
Just wanted to comment on this that I have downloaded this code and have it working.  A small hiccup is that after I imported I had to compile it to get it to work.  I'm new with HG so this wasn't obvious.

Norm

January 16, 2015, 04:13:52 AM
Reply #2

hefferveisen

  • *
  • Information
  • Newbie
  • Posts: 6
Hi Norm258,

Thanks for sharing.  Glad to hear the plug-in is working for you.  I have X10 support implemented; let me know if that is of interest or if you encounter any issues with the Insteon Hub plug-in.

April 12, 2015, 05:43:11 PM
Reply #3

rommer

  • *
  • Information
  • Newbie
  • Posts: 4
Your code works great for me as well. I have issues with HG's built-in support for the 2413U. After I get modules setup, after a time each one says undefined module. Sometimes restart fixes it other times not.

No such problems with your code. I'd like to check out the version with the X10 support.

Thanks again.

John

April 16, 2015, 02:42:02 AM
Reply #4

hefferveisen

  • *
  • Information
  • Newbie
  • Posts: 6
Posting an update to the Insteon Hub Plugin.  The update adds support for sending X10 commands from the Insteon Hub.  Only the X10 "on", "off", and "toggle" commands are supported.  No support for dimming commands.   

Similar to the Insteon fdevice support, it supports *sending* commands to X10 modules from HG, but it doesn't query the status of 10 Modules.

April 18, 2015, 07:09:36 PM
Reply #5

rommer

  • *
  • Information
  • Newbie
  • Posts: 4
Thanks! Works perfectly. I see you have some of the stuff to get dimming working in the code. I may try and mess around with your code if you don't mind. (In many many spare seconds left each day! :)

April 19, 2015, 03:33:12 AM
Reply #6

hefferveisen

  • *
  • Information
  • Newbie
  • Posts: 6
  If you have interest to add the dimming support, go for it.  Any contributions to the code are welcome.

April 22, 2015, 05:08:16 PM
Reply #7

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330

BestBuy in US has an Insteon Assurance kit on sale today for half price: normally $200, now $100

http://www.bestbuy.com/site/insteon-assurance-kit-white/5570313.p?id=1219139429149

This kit includes:
Hub
2 dimmer modules, leak sensor, motion sensor, open/close sensor
Cables, Ethernet cable
Mounting hardware/brackets, batteries, labels
Owner's manual


Does this HG Insteon Hub plugin support leak, motion, door sensors?

April 23, 2015, 04:56:20 AM
Reply #8

hefferveisen

  • *
  • Information
  • Newbie
  • Posts: 6
No, currently the HG plugin only supports *sending* commands to Insteon (and now X10) devices.  There is no support in the plugin to *receive* events or query the status of an Insteon Module.  This "query" capability is what you would need in order to Integrate the Motion, Leak, or Door sensors into HG.

Of course, you can still make use of those sensors to trigger automation using the hub, but you would unfortunately lack integration of those sensor events into HG automation.  In my home, i use a mix of Hub automation and HG automation and have not had the need for tighter integration via the plugin. 

In many ways i have found the Insteon Android app provides a nicer GUI than the HG Android app.  So for $100, it's not a bad deal for a complementary HA system, even if the Insteon and HG are not as well integrated as you might want.

April 24, 2015, 02:22:38 AM
Reply #9

hefferveisen

  • *
  • Information
  • Newbie
  • Posts: 6
I noticed the latest Insteon Hub is a different model (2245-222) compared to the original model (2242-222).   The product page has a table that compares the features of the new and original models.  Notably the latest Insteon Hub model removes X10 capability :(.   

I only have the original 2242-222 hub, so that's all i can test with.  It would be great is someone could report whether HG Plugin works with the 2245-222 Hub. 

April 10, 2016, 02:13:36 AM
Reply #10

rommer

  • *
  • Information
  • Newbie
  • Posts: 4
FWIW I got the dimming working for insteon devices.

February 18, 2017, 05:50:34 PM
Reply #11

revjohn

  • *
  • Information
  • Newbie
  • Posts: 1
How did you do It?  Can you share the code?

March 04, 2017, 09:20:40 PM
Reply #12

rommer

  • *
  • Information
  • Newbie
  • Posts: 4
case "Control.Level":
          // convert status.Level (0.0 to 1.0) to 2-digit hexadecimal Insteon level (00 to FF).
          string level = ((int)(double.Parse(parameter) / 100D * 255)).ToString("X"); // "X2"
          SendDirectCommand(hexID, CMD_OP_ON, level);
          Program.RaiseEvent(module, "Status.Level", (double.Parse(parameter) / 100D).ToString(), "Insteon Light Dim");
               
              break;