I don't know if you guys heard, but OpenHab works pretty good with iOS's HomeKit

Demo

Took me about two hours to setup everything (maybe less, I get easily sidetracked). You just need homebridge and the OpenHAB plugin.

4 Likes

looks cool, wanted to try but getting some time out errors from github!?

$ 934 verbose about to build /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs 935 verbose unlock done using /root/.npm/_locks/hap-nodejs-ad226527e82daf47.lock for /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs 936 verbose about to build /usr/local/lib/node_modules/homebridge 937 verbose unlock done using /root/.npm/_locks/homebridge-a5618ac2152da688.lock for /usr/local/lib/node_modules/homebridge 938 verbose stack Error: Command failed: git clone --template=/root/.npm/_git-remotes/_templates --mirror git://github.com/KhaosT/node-curve25519.git /root/.npm/_$ 938 verbose stack Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-KhaosT-node-curve25519-git-750fb09d'... 938 verbose stack fatal: unable to connect to github.com: 938 verbose stack github.com[0: 192.30.252.130]: errno=Connection timed out

That’s really weird. Maybe try in a few hours? Also, how are you running the git clone command?

git clone https://github.com/nfarina/homebridge.git

exactly like in the description - I will try again tomorrow…

You can install from npm I think, with

npm install homebridge

I’m guessing the plugin can only run under Linux, is that correct?

Has anyone managed to get Siri working with OpenHAB under Windows?

Both the bridge and the openhab plugin are written on NodeJS, which you can install on windows

Is the only real benefit here Siri integration? Just curious as an Android user.

1 Like

Still same Error, am i the only One?

Try this https://github.com/npm/npm/issues/7230

@Joshua_Gilman Yes.

ok, that helped a lot! **Thanks! **

Now the installation is done. Openhab config added and homebridge is runnung. But on the iphone the apps are not seeing anything from homebridge…without any errors…
I alredy tried the hints from the tutorial - but not really woking…Any further ideas?

When you start Homebridge, are you seeing any [openHAB] Platform - Accessory Found: messages? You should see one for each item in your sitemap. Beware, however, that Homebridge can’t deal with sitemaps that contain Frame {} or Group {} blocks as I mentioned in this thread: item is not a widget.

Solution: create a separate sitemap for Homebridge that has just the item definitions.

@mm1804 try what @jdwhite said. That’s how it works for me. Create a sitemap specially for homebridge, where all the items you want are in the root of the sitemap.

This one worked well as well


More simple to setup and has a bit more features for now (Like RGB Lights)

@yozik04 It’s actually a lot harder to setup, considering you have to build the it yourself, and get the exact g++ and node and gyp versions. I tried for about 4 hours to setup, before I got angry and tried homebridge and the plugin.

@alex_bartis By simple setup I mean when you have it built, you do not need to create a config file to pick up your openhub items. They are added automatically via your openhab sitemap. I like that I do not need to create a separate config and maintain it. But it is not big deal.
I’ve spent like an hour for OpenHAB-HomeKit-Bridge setup including compilation for the first time. I know that compilation is pain for the most users. =)
I agree with you that homebridge installation is simpler.

What is missing in homebridge for me for now is RGB Lights.
Anyway I have subscribed to homebridge repo to see how it evolves.

Yeah, I couldn’t get past compiling it on my raspberry. And I still don’t know if the problem was with gcc, node or gyp. And homebridge just needs a config file to point to the sitemap. Only special items need to be added to the config, like if you have a fan in a socket (so as not to be mistaken with a light). Otherwise, it will just load the sitemap items.

I think i did everything as in the instructions but somehow its nor working.
Node.js version is v4.2.3

Error: dns service error: unknown

at Error (native)
at new Advertisement (/home/******/Desktop/OpenHAB-HomeKit-Bridge-master/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/home/******/Desktop/OpenHAB-HomeKit-Bridge-master/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:64:10)
at Advertiser.startAdvertising (/home/******/Desktop/OpenHAB-HomeKit-Bridge-master/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
at Bridge.Accessory._onListening (/home/******/Desktop/OpenHAB-HomeKit-Bridge-master/node_modules/hap-nodejs/lib/Accessory.js:352:20)
at emitNone (events.js:67:13)
at HAPServer.emit (events.js:166:7)
at HAPServer._onListening (/home/******/Desktop/OpenHAB-HomeKit-Bridge-master/node_modules/hap-nodejs/lib/HAPServer.js:159:8)
at emitNone (events.js:67:13)
at EventedHTTPServer.emit (events.js:166:7)

npm ERR! Linux 3.4.39
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" "--" "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"
npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! openHAB-HomeKit-Bridge@1.2.0 start: `node index.js start "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the openHAB-HomeKit-Bridge@1.2.0 start script 'node index.js start "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"'.
npm ERR! This is most likely a problem with the openHAB-HomeKit-Bridge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js start "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**::8080" "--sitemap" "Wohnung2"
npm ERR! You can get their info via:
npm ERR!     npm owner ls openHAB-HomeKit-Bridge
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/orangepi/Desktop/OpenHAB-HomeKit-Bridge-master/npm-debug.log

the npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'start',
1 verbose cli   '--',
1 verbose cli   '--name',
1 verbose cli   'myOpenHAB-Bridge',
1 verbose cli   '--server',
1 verbose cli   '***.***.**.**:8080',
1 verbose cli   '--sitemap',
1 verbose cli   'Wohnung2' ]
2 info using npm@2.14.7
3 info using node@v4.2.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart openHAB-HomeKit-Bridge@1.2.0
6 info start openHAB-HomeKit-Bridge@1.2.0
7 verbose unsafe-perm in lifecycle true
8 info openHAB-HomeKit-Bridge@1.2.0 Failed to exec start script
9 verbose stack Error: openHAB-HomeKit-Bridge@1.2.0 start: `node index.js start "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:818:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid openHAB-HomeKit-Bridge@1.2.0
11 verbose cwd /home/*****/Desktop/OpenHAB-HomeKit-Bridge-master
12 error Linux 3.4.39
13 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start" "--" "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"
14 error node v4.2.3
15 error npm  v2.14.7
16 error code ELIFECYCLE
17 error openHAB-HomeKit-Bridge@1.2.0 start: `node index.js start "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"`
17 error Exit status 1
18 error Failed at the openHAB-HomeKit-Bridge@1.2.0 start script 'node index.js start "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"'.
18 error This is most likely a problem with the openHAB-HomeKit-Bridge package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     node index.js start "--name" "myOpenHAB-Bridge" "--server" "***.***.**.**:8080" "--sitemap" "Wohnung2"
18 error You can get their info via:
18 error     npm owner ls openHAB-HomeKit-Bridge
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

I was getting the same thing with Openhab-homekit-bridge. That’s why I gave up and installed homekit bridge with the openhab plugin. Got it working in 5 minutes.

how do i install it “with plugin”. Im using Debian…

ah sry now i get it, the first link is a diferent git rep. XD i should weak up