Homebridge is an OSS Node.js server that emulates the iOS HomeKit API. I’ve just submitted a pull request to that project that adds support for creating HomeKit accessories for each of your Hello, Home actions, and by extension, enabled a means to trigger them via Siri.
Hope you’ve got a good lawyer. From the apple developer’s license:
Neither the name, trademarks, service marks or logos of Apple Inc. maybe used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple.
Hah yeah should probably change the name. For now, the folks searching for SmartThings and HomeKit will probably will appreciate being able to find it.
Hmm, is any of the code I wrote or things I named here actually violating trademarks? I named the SmartApp “Hello HomeBridge” and the bridge accessory “SmartThingsHelloHome”. BetterHomeKit is an existing app, and I only include the phrase “HomeKit” in setup instructions.
Hey pantaleon, I actually redid things a bit and made a simple JSON API SmartApp, then hooked that up to the homebridge app to export both switches and lights to HomeKit:
I used it to turn on my lights this morning from bed with Siri
Error: read ECONNRESET
at exports._errnoException (util.js:746:11)
at TCP.onread (net.js:559:26)
npm ERR! Darwin 14.3.0
npm ERR! argv “node” “/usr/local/bin/npm” “run” "start"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! homebridge@0.0.0 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the homebridge@0.0.0 start script ‘node app.js’.
npm ERR! This is most likely a problem with the homebridge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls homebridge
npm ERR! There is likely additional logging output above.
Got it working on my Pi last night using indigo+
It appears the server/client doesn’t like adding devices that are push buttons (virtual switches I use for running scenes in ST). When you add the device the client hangs before asking for the pin. Stop and restart the server and the client will continue with the add.
Here’s what I had to do on the pi side.
git clone https://github.com/nfarina/homebridge.git
cd homebridge
git submodule init
git submodule update
npm install mdns
npm rebuild //I’m not sure if this is needed but I had done npm install several times before I realized I had to install mdns.
npm install
mkdir lib
cd lib
git clone https://github.com/KhaosT/HAP-NodeJS.git
First time poster on the forums. I’m a long-time apple user and recently set up smartthings for a new home. Homebridge has been absolutely amazing! I have it running in a dedicated ubuntu VM on my home ESXi server and it has been working great. My wife was impressed by automation but has been even more impressed with this!!
I’ve been running the server and testing for awhile. My biggest problem is that avahi seems to be causing it to stop responding. I have to do a kill -HUP (avahi PID) and then restart the server and it works fine again for maybe an hour if I’m lucky. Has anyone seen this or have a suggestion?
So do you still need a dev account to make the betterhomekit app and export it directly to your iPhone?
Also I’m a little confused on where you create the config.json. Do I install the config file in the pi in the home directory …/cd…?
I also loaded the groovy and the Hello HomeBridge code as smartapps and it shows as a smartapp in the smartthings lab.
When I open the “hello home bridge” it says copy and paste the below but only config arrow menu is an option and “invalid access token: nullinvalid token”. When I click config it says invalid token null.
What do I do from here. Sorry need a bit more guidance. The PI is setup and ready to go though!
Finally got it working. I needed to install the SmartThings.JS file into accessories folder. And to start the server go to the homebridge directory then type node app.js
Works perfectly. If for some reason the apps don’t work on your smartthings ios app use the lte network and then they magically start working.
Also don’t forget that the manual code for homekit devices is 031-45-154.
Now I need to figure out how to add my thermostat. Any ideas would be cool I wonder if it configures like a switch?
I changed the coding in the json.groovy file to show me the thermostat controls and now I just need to know if I just put it in the config file and it will recognize it as a thermostat or does there need to be additional changes?
So I think I got most of the way there - homebridge is running on the RPI, I made the config.json file, and I added the smartapp with the oauth blah blah and it shows up on the phone with the device I want to use. I figured out to use the insteon+ app instead of the insteon app, and I’ve added the light as a device in there and can control it from the insteon+ app, but when I tell siri to turn off the laundry light it says it can’t find any lights…