So this one...
homebridge-platform-insteonlocal
Is the only one you're going to get anywhere with Keypads and Sensors at the moment. Chris and I are going to see if it's possible to get sensor input, but I'm not able to look at that until mid January. Also, Scott Kuester said...
"Battery powered devices such as the leak sensor and open/close sensors go to sleep to save battery and only wake up to update status on a defined interval or as an event occurs. If you’re lucky, you might catch the device while its awake, but 99% of the time the status call won’t work because the device is asleep. For something like this, you need a persistent connection and code like the event listener in the homebridge plugin that triggers action on those events."
Also there's an issue that at the moment, there's no way to get HomeKit feedback into Hubitat unless you create a HomeKit automation between a HomeKit sensor (which is what the Insteon sensors would be essentially) and a virtual switch from Hubitat published in HomeKit via the Homebridge Hubitat app written by @tonesto7. Then you would need to also have either an iPad that can run the latest OS and dedicat it to being a hub for HomeKit automations, or an Apple TV 4 or later works as a HomeKit automation hub. HomeKit automations are not all that reliable in my experience. I'm using HomeKit automations for geolocation with HE right now and that works great, but I've stopped using them for other purposes.
So all we can do at the moment is control switches or dimmers. I was also able to control an I/O Linc, but only the relay. Same issue with the sensors. No input. Maybe we can do more, but I don't want to get your hopes up on the sensors and keypads.
How many door/window sensors do you have? Would replacement with Zigbee or Z-Wave sensors be feasible? I don't have an option for you for Insteaon Keypads and I don't own one, Which keypad or keypads do you have? I might be able to borrow one, but it would take some time to get to that.
As far as installation, if you're going to run the full Homebridge so you can use the Insteonlocal plugin, then you should install Raspbian not Noobs. I can't remember why, but do recall for some reason it made things more difficult.
Raspberry Pi setup
You can either run the Raspberry PI headless, you can get a keyboard and connect it to a monitor, or you can install TightVNC Server and remote into it. Headless is more challenging, but only for initial setup. After that, you really don't have to touch it.
If you're going to run the RPi headless, then you need to enable SSH which is simple.
-
After imaging Raspian to the SD card, navigate to the boot directory of the SD Card and create a blank file. To do this, at the prompt > just type sudo touch ssh. Another way is to download ATOM text editor. It will be able to navigate to the boot directory of the SD card and then you can just make a new file with nothing in it and save it to the boot directory with the name ssh
-
Eject the card and boot it up in the Pi. Type SSH pi@ and then enter. The default password is raspberry, but you should change this.
-
Once you're logged in, change the password with passwd
-
Type sudo raspi-config at the prompt and you can setup the rest, and If you're going to setup the WiFi, you can do that here as well. I wasn't able to setup WiFi on a RPi Zero W using the raspbian configuration utility, so if it doesn't work you'll have to eject the card and make wpa_supplicant file. Also easy, but try the configuration utility with a RPi 3b+ first.
-
After those are setup, you need to update with sudo apt-get update
Homebridge and Insteonlocal setup
If you're going to do the Homebridge install, it will install node.js for you. Just follow these instructions.
It should only be necessary to type sudo npm install -g homebridge
- After install, at the prompt, type homebridge to see if it works. It will complain about not having plugins or a config.json file. Ignore that for now.
- CRTL-C to stop it and now install the insteonlocal plugin with sudo npm -g install homebridge-platform-insteonlocal
- Once everything is installed, in the home directory you'll find a directory named .homebridge and inside that you'll create the config.json file.
- Type sudo nano config.json
- Your homebridge config file should be something like this [see below], obviously replacing "hub username" and "hub password" with your actual hub username and password, and replace host with your hub's IP address. And of course, all the devices will be what you have and your device IDs. The names can be anything you want, that's really just for you. It is the name that will show up in HomeKit, but it's the ID and type that's important to making your Insteon devices work.
Information about the config.json options for various Insteon devices can be found here
{
"bridge": {
"name": "Homebridge",
"username": "1A:2B:3C:4D:5E:6F",
"port": 45525,
"pin": "777-20-543"
},
"description": "Hubitat Integrations, Insteon integrations",
"accessories": [],
"platforms": [{
"platform": "InsteonLocal",
"name": "Insteon Local Platform",
"user": "[hub username]",
"pass": "[hub password]",
"host": "192.168.0.2",
"port": "25105",
"model": "2245",
"refresh": "300",
"use_express": "true",
"server_port": "3000",
"devices": [
{
"name": "Kitchen Light",
"deviceID": "22D508",
"dimmable": "no",
"deviceType": "lightbulb"
},
{
"name": "Table Lamp",
"deviceID": "3381AA",
"dimmable": "yes",
"deviceType": "lightbulb"
},
{
"name": "Floor Lamp",
"deviceID": "39FD35",
"dimmable": "no",
"deviceType": "lightbulb"
},
{
"name": "Deck Light",
"deviceID": "22740C",
"dimmable": "yes",
"deviceType": "lightbulb"
},
{
"name": "Overhead Light",
"deviceID": "2B55GH",
"dimmable": "yes",
"deviceType": "lightbulb"
},
{
"name": "Porch Light",
"deviceID": "3H6G48",
"dimmable": "yes",
"deviceType": "lightbulb"
},
{
"name": "Toilet",
"deviceID": "245D99",
"deviceType": "leaksensor"
},
{
"name": "Front Door",
"deviceID": "3FFFF64",
"deviceType": "doorsensor"
}
]
}
]
}
Stand-alone Express Server
If you're going to just install the express server, then you'll need to install Node.js separately and before installing Express Server. Probably easiest to still just use the homebridge install, but then just don't run homebridge if you don't want it.
-
To install the stand-alone Express Server, type sudo npm -g install insteon-server
-
If it complains about missing dependencies, then type sudo npm -g install home-controller and after that's done, type sudo npm -g install express to get the required dependencies.
-
The Express Server config.json file needs to be created in the insteon-server directory and it should look something like this [see below], obviously replacing "hub username" and "hub password" with your actual hub username and password, and replace host with your hub's IP address. And of course, all the devices will be what you have and your device IDs. The names can be anything you want, that's really just for you. It's the ID and type that makes a difference.
{ "user": "[hub username]", "pass": "[hub password]", "host": "192.168.0.2", "port": "25105", "model": "2245", "server_port": "3000", "devices": [ { "name": "Kitchen Light", "deviceID": "22D508", "dimmable": "no", "deviceType": "lightbulb" }, { "name": "Table Lamp", "deviceID": "3381AA", "dimmable": "yes", "deviceType": "lightbulb" }, { "name": "Floor Lamp", "deviceID": "39FD35", "dimmable": "no", "deviceType": "lightbulb" }, { "name": "Deck Light", "deviceID": "22740C", "dimmable": "yes", "deviceType": "lightbulb" }, { "name": "Overhead Light", "deviceID": "2B55GH", "dimmable": "yes", "deviceType": "lightbulb" }, { "name": "Porch Light", "deviceID": "3H6G48", "dimmable": "yes", "deviceType": "lightbulb" } ] }
-
To run the express server, type cd /usr/local/lib/node_modules/insteon-server (or the exact path where your insteon-server directory lives on Raspbian) and then type node insteonserver.js
Note: the /usr/local/lib/ path might be different on Raspbian. I cannot remember. I run mine on a Mac. You essentially need to be at the insteon-server directory to run. You may be able to add the directory path to your run command (i.e. node /usr/local/lib/node_modules/insteon-server insteonserver.js), but this doesn't work for me.
There's are many different ways to accomplish the same things in Raspbian, so over time you might want to play with them. One in particular is auto startup. I personally prefer the manual startup. I just find it easier to see what's going on with Homebridge, but if you're just using the stand-alone Express Server, then there's nothing to see. All it will show is
Connecting to Insteon Model 2245 Hub...
Connected to Insteon Model 2245 Hub...
There are tons of guides and instructions out there for how to setup auto startup and many opinions on which way is best. Best advice I can give is, once you get it working, make a backup of your config.json file (and if you're using Homebridge then also backup the persist and accessories directories) and most importantly, make an image of your entire SD card. That way you can play with stuff and if it gets screwed up, you just re-image the SD card and your sins are forgiven.
To install and configure the drivers in HE, download the driver code and follow the instructions here
Instructions for installing HE driver code are here if you haven't done that before.