Insteon integration

Nobody should buy the Insteon HomeKit compatible hub. The only person that I know who owns one, hates it and doesn’t use it. Adding Homebridge to your network with the Insteonlocal plugin for Homebridge will expose Insteon dimmers, switches, outlets and plug-in modules connected to the 2245-222 (Non-HomeKit compatible) hub, allowing local control of those Insteon devices. So even if Insteon’s cloud instance is offline again, those Insteon devices will still be controllable, and their status will update in HomeKit. Tie that together with HomeKit automation, and you can keep the status of virtual switches in Hubitat in sync with the Insteon devices. So even if your ISP’s connection to the internet drops off-line, you don’t lose control or status of Insteon devices in either Hubitat or HomeKit.

1 Like

Sorry -

I assumed to get HomeKit to work I needed the HomeKit hub.... so the only issue is no ability to dim?

I use some macros for various Plex scenes like - if after 6pm and plex starts a movie, dim cans to 10%

I just looked closer at the readme in his repo as I hadn’t been there in a while. Looks like he’s also supporting leak sensors and ioLinc now too, which is great news. I need to update my plugin and play with the new features next week.

“Implements local control of Insteon devices including switches, dimmers, scenes, iolincs (configured as a garage door), motion sensors, and leak sensors via Homebridge”

[Edit] Live dimming works from HomeKit, but (in the version I have anyway), it’s slow to update because it has to periodically poll the Insteon hub.

Can you point me to a document on what I need to do to install what you did?

.

I can try to pull together a few links quickly, but it’s my wife’s birthday, so I don’t have time today to pull together step by step. But I am willing to do that. I may have done it already. I’ll have to look around. I’m guilty of repeating myself sometimes and not remembering. :stuck_out_tongue_winking_eye:

Please - NO rush.

I won't even have the hub until Wednesday and i won't be able to start working I'm it for a week after that

[Update] This is an old concept for connection of Insteon. There wasn’t any better at the time, but there is a much better way now using web sockets - [Release] All NEW Insteon web socket driver

Previous method. Please use the updated drivers and stand-alone Insteon Server

Too late. :wink:

I was already putting something together for you. It's fairly complete. Just no screen shots of HomeKit automations, but that's not too hard to figure out.

Hubitat <> Homebridge <> Insteon setup

Basics you need:

  1. Homebridge:

RPi is the most popular way, but I had an old Macbook laptop available. I prefer it because of the greater processing power vs an RPi for Homebridge, plus it's very simple to use the built-in screen sharing from my other Mac to access it. You need one that will run at least El Capitan 10.11, as you'll need to install XCode for Node.js

Note

If the Mac you’re using can’t go beyond MacOS 10.11, then you’re going to need to download Xcode 8.2.1, since you must have Mac OS 10.12 Sierra or higher to run later versions of Xcode.

Additional Important Note

If you choose to use an old Mac laptop like I did, you need a way to keep it awake if you don't want to add an external monitor to it.

Keeping a Mac laptop awake when the lid is closed

While an old Mac laptop is a convenient choice for a Node.js server, it’s not convenient to have to keep the lid open all the time when there isn’t an external monitor attached. MacOS has no built-in means to accomplish this task, so you’ll need an app called InsomniaX. You can find the installer here.

As this app is no longer under development, your mileage may vary. I do recommend you at least install the patch for a security vulnerability that was discovered. More details and instructions are found here.

Known Issues

InsomniaX has a convenient setting in the preferences to disable lid sleep automatically when on AC. Unfortunately I found this setting does not always function correctly, so if you open your Mac laptop to make a modification to the Node.js server, and you also remove the power adapter, you’ll want to attached the power adapter, then quit and restart InsomniaX before closing the lid again.

InsomniaX

  1. The Insteonlocal plugin for Homebridge

config.js example for the Insteonlocal Homebridge plugin

{
"platform": "InsteonLocal",
"name": "Insteon Local Platform",
"user": "[Insteon hub username]",
"pass": "[Insteon hub password]",
"host": "192.168.0.20",
"port": "25105",
"model": "2245",
"refresh": "600",
"use_express": "false",
"server_port": "3000",
"devices": [
{
"name": "Kitchen Light",
"deviceID": "36Y057",
"dimmable": "no",
"deviceType": "lightbulb"
},
{
"name": "Table Lamp",
"deviceID": "2461GF",
"dimmable": "yes",
"deviceType": "lightbulb"
},
{
"name": "Toilet",
"deviceID": "411G87",
"deviceType": "leaksensor"
},
{
"name": "Front Door",
"deviceID": "2YYY89",
"deviceType": "motionsensor"
}

  1. @tonesto7 's port of @pdlovelace 's Homebridge driver for Hubitat and the Homebrige plugin for Hubitat

config.js example for the Hubitat Homebridge plugin

{
  "platform": "Hubitat",
  "name": "Hubitat",
  "app_url": "http://192.168.0.25/apps/api/180/", <- This is generated by the Hubitat Hombridge driver
  "access_token": "[Generated by the Hubitat Homebridge driver]",
  "polling_seconds": 1,
  "update_method": "direct",
  "direct_ip": "192.168.0.25",
  "direct_port": 8005
}
  1. Either an Apple TV 4 (does not have to be the 4K version) with the latest version of tvOS or an iPad that can run the latest version of iOS. For whatever reason, an spare iPhone that can run the latest iOS isn't allowed. Has to be iPad or Apple TV 4 .

Basic setup:

a - Once you have your Insteon controllable in HomeKit, you probably will want to put all your devices into rooms to make building automations easier.

b - Create virtual switches or virtual dimmers (depending on your requirement) in Hubitat. For example, to keep the names similar for easier identification in HomeKit, I just created virtual switches with the prefix HE (e.g. HE Table Lamp, HE Kitchen, HE Floor Lamp, etc.)

c - For momentary switches, where you just need a trigger, create a Hubitat Rule Machine rule to turn the switch off after 1 second. You cannot use virtual buttons unfortunately, they won't appear in HomeKit. You have to use virtual switches.

d - Select the virtual switches or virtual dimmers in the Hubitat Homebridge driver so they will appear in HomeKit

e - Create four automations per device in HomeKit. If you want a dimmable light to turn on to a set level, use virtual dimmers and set the ON level needed when you create the two way automations. Yes, this is a painful way to do it and keep them straight in HomeKit, but you only have to do it once and you can backup your HomeKit configuration in Homebridge. Just backup the "accessories" directory and the "persist" directory. Also backup your config.js file.

e1 - When [Insteon device name] turns ON, then HE [Insteon device name] should turn ON
e2 - When [Insteon device name] turns OFF, then HE [Insteon device name] should turn OFF
e3 - When HE [Insteon device name] turns ON, then [Insteon device name] should turn ON
e4 - When HE [Insteon device name] turns OFF, then [Insteon device name] should turn OFF

Scene setup:

Although it's possible to use Insteon scenes within the insteonlocal Homebridge plugin, it's easier to use HomeKit scenes. You can simply create a momentary virtual switch in Hubitat (e.g. Turns off in 1 second with a RM rule), publish that to Homebridge, and then create a HomeKit automation to link it to a HomeKit scene. That makes it easy to tie together your Insteon devices, with your devices connected directly to Hubitat. You can then use that momentary virtual switch in a Hubitat Scene, in Alexa, with a button, in a RM rule, etc.

[EDITS]

1. I found that version 0.3.3 of "homebridge-platform-Insteonlocal" with the option to use Local Express Server, will slow everything down immensely or will cause Homebridge devices in HomeKit not to refresh. This may be because I don't have express server configured, but once I added "use_express": "no" to the config.js file, homebridge again functioned as expected.

2. I also updated my config.js example for insteonlocal to include example for a leak sensor and a motion sensor. Door/Window/Contact sensors are also now supported. I have an ioLinc, but it's not in use at the moment and so I haven't tested it.

3. Under "Basic Setup", I corrected step C to include specifically momentary virtual switches, not every virtual switch.

4. Under "Basic Setup", I added to step E to include notes about turning lights on to specific levels.

5. Added Scene Setup section, with notes about triggering scenes with virtual switches.

6. Conf.json example for Insteonlocal was updated with new suggested values

"refresh": "600",
"use_express": "false",

2 Likes

level[quote="SmartHomePrimer, post:18, topic:707, full:true"]

[Edit] Live dimming works from HomeKit, but (in the version I have anyway), it’s slow to update because it has to periodically poll the Insteon hub.
[/quote]

Does the dimming state report to hubitat at some point?

My current use is to control the dimmer via alexa, or to control it manually in ST

Unfortunately, no. The only way to sync Hubitat is via HomeKit automations. So you can trigger a scene in Insteon (outside of homebridge) and that can sync via HomeKit automation to a specific dim level on a virtual dimmer, but only one.

So for example, I have my Table Lamp in our living room turning on at sunset via an Insteon scene. Could do it in Hubitat, but I just have not yet. In Hubitat, I created a virtual dimmer for it. Insteon turns it on to 75%, so in the HomeKit automation to keep it in sync with Hubitat, I have it setting "HE Table Lamp" to 75% when "Table Lamp" turns on, and the second of four HomeKit automations for that lamp say that when "HE Table Lamp" turns on, then "Table Lamp" should be set to 75%.

If this is not done, then Insteon will turn the light on to a set level, but then HomeKit will turn it up to 100% within a second. So the obvious disadvantage to this whole method is if you want to have multiple levels controllable by voice, you will have to keep the Insteon skill for Alexa, enabled. Lights will always turn on to the value set in the HomeKit Automation between the real insteon device and the HE virtual dimmer, but once it's on, they can still be dimmed to any level via the Insteon app or via the Insteon Alexa Skill.

If, like me you have grown tired of Alexa saying "Sorry, the Insteon Hub that the device [Insteon Device] is connected to isn't responding", and you remove the Insteon Skill, then you can only setup elaborate Routines to trigger virtual switches, that in turn trigger HomeKit scenes. :weary:
If it's just a few, like "Turn on Movie Time" to dim the lights or something like that, it shouldn't be that big of a deal.

Belive me, I love that I can control my Insteon devices locally this way, but if there was an Insteon driver for Hubitat that controlled it locally, I'd drop this method in a heartbeat. It's cumbersome to configure iniitally. Also, if you make changes to the switch types (as in changing from Switch to Dimmer) or you rename them in Hubitat, HomeKit automatically disables the automation, and only the real devices remain in two half completed automations. :angry: It make sense that they do this, because they would cease to work anyway under those circumstances, but it's an example of Apple overthinking things for the lowest common denominator, and it forces you to rebuild, instead of just being able to repair what you know will need repairing.

Sigh.... maybe I should just rip out my 10 insteon switches and put in Lutron

I guess you could do that. If you already have the Lutron Caséta SmartBridge Pro. Otherwise, you're looking at $550 US for 10 Caséta switches, plus the work to put them in. Maybe more if you're in an older house and need the type that work without a neutral wire. If you don't have the SmartBridge, then you'll have to buy that too. That's available in a kit with dimmer and a pico for around $140 US.

If you have an old laptop that can run Homebride or a Rasberry Pi 3, then an Apple TV 4 can be picked up for around $100 on ebay. You get the benefit of the newer Apple TV, you get control over your Insteon devices, and then maybe we'll have a solution for Insteon directly from Hubitat at some point.

I'd personally keep your Insteon investment. It's a good system, and reliable. Just doesn't have the most reliable cloud service. Not as bad as ST or Wink, but not as good as Philips or Lutron.

Fair point.

Maybe that driver for ST can be modded at some point.

I have an unRaid server so I can run a VM of rPI.

I just love How it works so well in ST

Post updated under [Edits] to include notation about newly added support for Insteon Door/Window/Contact sensors by the "homebridge-platform-insteonlocal" plugin. The icon shows as a door w/ open & closed indications (not listed under HomeKit sensors).

Note: In the current version (0.3.3-L) upon initial setup, you will need to cycle the Insteon contact sensors four times to get them to respond normally in HomeKit. This only needs to be done once. It may be needed for additional Insteon contact sensors as well, but I only have one to test with.

I wanted to tell anyone with Insteon that there is an additional path to Insteon control from Hubitat, which does not require so much effort.

[Caveat] This does not allow you to know the state of the device from Hubitat. You will know the state of the virtual switch, but commands will simply be sent to the device.

To do this, you need a node.js server, google assistant-relay, and the driver that @ogiewon ported to Hubitat and added these handy additions to allow control via google assistant without speaking.

Once you have google assistant relay running, you can control Insteon or ISY connected devices (any device that Google Assistant currently supports for that matter), by simply creating a virtual switch and a RM rule. This will result in turning on the switch to send the silent command to google assistant, and the turning off of the virtual switch to send the off command.

Again, you're not going to have synchronized control from HE, and you won't be able to use it for Insteon sensors. Only way I know at the moment to do that is with Homebridge and HomeKit automations.

this is another good way to do it, I still may try to get the ST one working as it did everything I need and I have a Linux server at the house so I can run anything local.

There both an advantage and a few disadvantages to the ST method. The advantage being that you are in sync, but the disadvantages are you rely on the cloud (same as above) and your response may be slow as a result. The best solution will be local control from Hubitat. I hope we see that at some point. When you remove the cloud reliance from Insteon, it's a very reliable system. One issue I have with my Homebridge setup is the HomeKit automations themselves don't always stay in sync, but when they do, it works nicely as a locally controlled system.

What's nice about the above is you can at least turn on/off lights if you have an ISY hub, and you would need my full Homebridge setup otherwise. The node server for Google Assistant is much easier to setup as long as you have either a computer to run it on or a Rasberry Pi 3 with keyboard and monitor attached (I tried VNC on a Pi Zero W with zero success).

Just wanted to revisit this and let you know there is now two more ways to connect Hubitat to Insteon devices. If you have a lot of Insteon sensors and devices like keypads, then you may wish to stick with a hybrid of homebridge/HomeKit/Virtual Switch and this driver that @cwwilson08 created out of a modified HTTP Momentary switch driver the @ogiewon wrote. It uses the Express Server which is part of Insteonlocal.

If you just want to control Insteon dimmers, switches and relays, then this latest driver that @cwwilson08 ported from ST. It controls directly via the Insteon PLM so hubs are supported too. Word of warning though, the Insteonlocal plugin and the direct PLM driver cannot be active at the same time, or you'll get an error when the direct driver tries to refresh status and you will not get the status update.

1 Like

Thanks for the update - I will be trying out @cwwilson08 driver

1 Like

Please let us know if you encounter any issues or something we missed.