SmartThings Community

Hello, Home HomeKit (and Siri!) control via homebridge

smartapp_voice
requires_server

(Jesse Newland) #1

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.

Setup is a little complicated. You need:

Given those ingredients:

  • Install the HelloHomeBridge SmartApp into the SmartThings app on your iOS device.
  • Open the HelloHomeBridge SmartApp
  • Copy the generated config into config.json in your copy of homebridge
  • Start homebridge with npm run start
  • Open BetterHomeKit and tap + to add HomeKit accessories. You’ll then see your Hello, Home actions.
  • Pair your Hello, Home accessories as indicated in the the homebridge readme.
  • Ask Siri to activate one of your Hello Home actions:

Siri, turn on bedtime

  • :sparkles:

Smartthings apple homekit support?
Homekit and SmartThings: The Latest Discussion
Can we get a clear answer? Does V2 support Apple HomeKit
What are the best projects on SmartThings?
Is there any possible way that I can integrate Siri with my SmartThing Hub?
Homekit Software Authentication Finally Coming
Trick to get Siri to run Smart things - Such as Non Philips bulbs or anything else
What genuinely useful stuff to do with ST?
Homebridge/ Smartthings Help
Alexa + ecobee + lights + shades integration? Has anyone done this?
SmartThings and Homebridge - API Timeouts?
HomeKit Integration Video Tutorial (Unofficial Integration Using Homebridge)
Kuna Labor Day Sale
HomeKit intergration?
Need help Smartthings & Homekit via Hue Bridge
Homekit Software Authentication Finally Coming
FAQ: WIFI Devices in ST? How can I integrate a WiFi device that isn’t on the official compatibility list?
(Jesse Newland) #2

Sorry, new user limits meant I had to trim the number of links. References:

If you’re looking for screenshots, they’re in the “pull request” link above.


#3

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.

Like, say, “HomeKit,” for example.


(Jesse Newland) #4

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.


#5

Which is exactly why Apple will shut you down. It’s trademark interference pure and simple. Just sayin’…


(Jesse Newland) #6

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.


#7

Like I said, time for a lawyer. :wink:


(Jesse Newland) #8

No need. I’ll choose optimism, knowing that I’ll happily comply with a cease and desist request if one comes.


(Pantaleon) #9

How is this smart app working out? Has anyone tried it?


(Jesse Newland) #10

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 :slight_smile:


(Pantaleon) #11

I went through your home bridge instructions. It seems a bit complex for me. I’m not a developer and don’t have the apple dev account.


(Jesse Newland) #12

The apple dev account isn’t required anymore actually! Insteon+ is a Homekit-enabled app that is available in the app store today.


(Cedric Bonnet) #13

Hi,

I have an issues and I can’t deal with it.

I run start and then, I have this message :

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.

Can you please help me?


(Dan) #14

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.

ref:


wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
apt-get update
sudo apt-get install libavahi-compat-libdnssd-dev

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

cd HAP-NodeJS
npm install

cd …/…

Then set up in smart things https://github.com/jnewland/SmartThings/blob/master/JSON.groovy

create config.json in the homebridge directory from the JSON setup
and…
npm run start


(Cedric Bonnet) #15

It’s work ! Thanks You !


(Ben) #16

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!!


(Dan) #18

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?


(Mike) #19

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!


(Mike) #20

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 :slight_smile: 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?


(Aaronw) #21

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…