News about HomeKit and Vera

Hackworth, I’m done with the homebridge plugin. I did it based on my previous code, so the thing should work as both: standalone and plugin for homebridge.

To try it use the usual:

[code]npm install -g homebridge

npm install -g homebridge-vera[/code]

You are part of the collaborators on the github project so go ahead and change it anyway you want :slight_smile:

PS: Sorry for the long waiting, my job has been throwing me a lot of challenges lately

This is exciting stuff…can’t wait to try.

[quote=“damianxd, post:401, topic:186853”]Hackworth, I’m done with the homebridge plugin. I did it based on my previous code, so the thing should work as both: standalone and plugin for homebridge.

To try it use the usual:

[code]npm install -g homebridge

npm install -g homebridge-veralink[/code]

You are part of the collaborators on the github project so go ahead and change it anyway you want :slight_smile:

PS: Sorry for the long waiting, my job has been throwing me a lot of challenges lately[/quote]

So is this just a Platform I can add to homebridge because I can add it but it doesn’t want to configure from homebridge JSON or where it says it wants the config file. So can it just be added as a platform?

this is my config:

[code]{
“bridge”: {
“name”: “Homebridge”,
“pin”: “987-65-432”,
“username”: “CC:22:3D:E3:CE:30”,
“veraIP”: “192.168.0.228”

},
"platforms": [{
	"platform": "PhilipsHue",
	"name": "Philips Hue",
	"ip_address": "192.168.0.209",
	"username": "theuser"
}, {
	"platform": "VeraLink ",
	"name": "VeraLink",
	"veraIP": "192.168.0.228"
}],

"accessories": [{
		"accessory": "Applescript",
		"name": "",
		"on": "tell application '''' to activate",
		"off": "quit application ''''"
	},

	{
		"accessory": "Http",
		"name": "Downstairs Heater",
		"switchHandling": "yes",
		"http_method": "GET",
		"on_url": "https://",
		"off_url": "https://",
		"status_url": "https://"
	}
]

}[/code]

Yes!, sorry… I forgot to add that on the readme:

"platforms": [ { "platform" : "Vera", "name" : "Vera" } ]

In your case it would be:

[code]{
“bridge”: {
“name”: “Homebridge”,
“pin”: “987-65-432”,
“username”: “CC:22:3D:E3:CE:30”,
“veraIP”: “192.168.0.228”

},
"platforms": [{
	"platform": "PhilipsHue",
	"name": "Philips Hue",
	"ip_address": "192.168.0.209",
	"username": "theuser"
}, {
        "platform" : "Vera",
        "name" : "Vera"
    }],

"accessories": [{
		"accessory": "Applescript",
		"name": "",
		"on": "tell application '''' to activate",
		"off": "quit application ''''"
	},

	{
		"accessory": "Http",
		"name": "Downstairs Heater",
		"switchHandling": "yes",
		"http_method": "GET",
		"on_url": "https://",
		"off_url": "https://",
		"status_url": "https://"
	}
]

}[/code]

For the moment the configuration of the VeraIP is external and it goes on this folder:

/home/<name>/.veralink/config.js

When you start the homebridge app you will notice the config file listed on the output like this

*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see [b] Please add your configuration file to /home/damian/.veralink/config.js [/b] Loaded plugin: homebridge-veralink VeraLink initializing Registering platform 'homebridge-veralink.Vera' --- Loaded config.json with 0 accessories and 1 platforms. --- Loading 1 platforms... [Vera] Initializing Vera platform... /home/damian/nikai/test/index.js:27

I will add the configuration on from homebridge config.js in the next update.

Any luck on getting this to run on Windows?

Sent from my iPhone using Tapatalk

Mac guinea pig for damianxd’s fresh homebridge-veralink plugin signing in!

First and foremost big big thank you @Albeebe, @Hackworth and @damianxd and all the others for making this possible! I was so excited to find out that someone has finally cracked this!!

I read the thread through and decided to give homebridge the homebridge plugin my first shot since leveraging homebridge sounds like the way to go here.

I’m on macbook pro OsX 10.11.2 and iPhone 6 iOS 9.2 with the Eve app (which I just found thanks to this thread!). The installation went smoothly with the readmes and example config files in GitHub - homebridge/homebridge: HomeKit support for the impatient. and https://github.com/damianxd/VeraLink/ (with the config addition damianxd just posted) . In just one hour (after reading through the thread) I got homebridge up and running, my devices recogniced, paired with Eve and seen by Siri :-).

Some findings:

  1. VeraLink seems to require the same config.js file both in the install dir (/usr/local/lib/node_modules/homebridge-veralink/config.js for me) and in the user directory (/Users/wnurmi/.veralink/config.js for me). If I lack either, I get TypeError: Cannot read property 'veraIP' of undefined.
  2. For some reason pairing homebridge to Eve times out 9 out of 10 times. I tried clearing the persist folder, but it didn’t help (most times at least).
  3. None of my scenes are recognised yet, only devices are. Not sure if I’m just missing some configs or if scenes are not supported yet by the plugin. Will look into it.
  4. I’m having similar trouble as reported by others where homekit looses connection to homebridge after just a minute or so. I’m confident there is a fix for that posted already, will look into it next.

After I get things running properly I’m planning to buy RPi2 and set this up permanently on that :-). Again thanks everyone for the awesome thread, I’ll keep you posted on my progress.

EDIT: readability

there was another plugin for homebridge?! damn… I’m always late on everything -.- the code for that github project seems like it will work fine

Cool Thanks for the heads up of where to place the config file for the mac in both places that worked!
Now I’m having the same issue of it dieing after a minute or so like you.

4) I'm having similar trouble as reported by others where homekit looses connection to homebridge after just a minute or so. I'm confident there is a fix for that posted already, will look into it next.

Did you figure this out yet? Is there an advantage to use on the Pi besides power efficiency?

Thanks

[quote=“damianxd, post:404, topic:186853”]Yes!, sorry… I forgot to add that on the readme:

"platforms": [ { "platform" : "Vera", "name" : "Vera" } ]

In your case it would be:

[code]{
“bridge”: {
“name”: “Homebridge”,
“pin”: “987-65-432”,
“username”: “CC:22:3D:E3:CE:30”,
“veraIP”: “192.168.0.228”

},
"platforms": [{
	"platform": "PhilipsHue",
	"name": "Philips Hue",
	"ip_address": "192.168.0.209",
	"username": "theuser"
}, {
        "platform" : "Vera",
        "name" : "Vera"
    }],

"accessories": [{
		"accessory": "Applescript",
		"name": "",
		"on": "tell application '''' to activate",
		"off": "quit application ''''"
	},

	{
		"accessory": "Http",
		"name": "Downstairs Heater",
		"switchHandling": "yes",
		"http_method": "GET",
		"on_url": "https://",
		"off_url": "https://",
		"status_url": "https://"
	}
]

}[/code]

For the moment the configuration of the VeraIP is external and it goes on this folder:

/home/<name>/.veralink/config.js

When you start the homebridge app you will notice the config file listed on the output like this

*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see [b] Please add your configuration file to /home/damian/.veralink/config.js [/b] Loaded plugin: homebridge-veralink VeraLink initializing Registering platform 'homebridge-veralink.Vera' --- Loaded config.json with 0 accessories and 1 platforms. --- Loading 1 platforms... [Vera] Initializing Vera platform... /home/damian/nikai/test/index.js:27

I will add the configuration on from homebridge config.js in the next update.[/quote]

All that worked so far, Thanks ;D

about the scenes, I will add that on the next release. If anyone has troubles with homebridge, you could try to run VeraLink as the standalone version, maybe it will be more stable.

npm install homebrige-veralink node VeraLink.js

Ok This is the error I get after using Siri to control the lights, I assume it has something to do with not being able to handle request of status.

[code]/usr/local/lib/node_modules/homebridge-veralink/node_modules/sync-request/index.js:31
throw new Error(response.error.message || response.error || response);
^

Error: socket hang up
at Object.doRequest [as request] (/usr/local/lib/node_modules/homebridge-veralink/node_modules/sync-request/index.js:31:11)
at Object.Switch.getStatus (/usr/local/lib/node_modules/homebridge-veralink/lib/types/switch.js:43:31)
at null. (/usr/local/lib/node_modules/homebridge-veralink/lib/types/switch.js:99:38)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)
at Characteristic.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:120:10)
at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:438:20)
at Array.forEach (native)
at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:410:8)
at emitThree (events.js:97:13)[/code]
Any thoughts on how to correct this problem so Homebridge can continue to run?

npm install homebrige-veralink node VeraLink.js

The npm is not registered yet? getting a 404

[code]$ npm install homebrige-veralink
npm ERR! Darwin 15.2.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “homebrige-veralink”
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/homebrige-veralink
npm ERR! 404
npm ERR! 404 ‘homebrige-veralink’ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Jeff/.homebridge/npm-debug.log[/code]

You just spelled it wrong on the last post! lol

maybe I wrote that down with some misspell, please copy it from my previous post and remove the -g option from the command. I’m currently traveling so I’m writing this over my phone

Forgive my ignorance, but can someone tell me what the difference between all these implementations are? From reading this thread i see:

[ul][li]Hackworth/VeraHomeKitBridge - I actually got this working on an Ubuntu machine running on VirtualBox[/li]
[li]nfarina/Homebridge - I think this may not be a Vera specific[/li]
[li]damianxd/VeraLink - looks similar to the veraHomeKitBridge[/li]
[li]Be2daErtin/homebridge-VeraLite [/li][/ul]

I followed the thorough steps originally posted by gregorito on November 18 and modified them for homebridbe-veralite. I think I solved the issue with where the connectivity is lost at least partly (I’ve still lost connection to the devices for short whiles though).

Updated steps for running homebridbe-veralite on mac:

  1. Install NodeJS 5.1.0 using installer from their website Node.js — Download Node.js®
  2. Open Terminal app, in Teminal you can type: ‘node -v’ and should get: ‘v5.1.0’ and then type: ‘npm -v’ and should get: ‘3.X.X’
  3. Type ‘sudo npm install -g homebridge’
  4. Type ‘sudo npm install -g homebridge-veralink’
  5. Type ‘sudo npm config set registry http://registry.npmjs.org/’ and press enter
  6. Type ‘sudo npm install -g node-gyp’ and press enter
  7. cd to homebridge-veralink install dir (you can see it in step 4 output, for me it was /usr/local/lib/node_modules/homebridge-veralink/)
  8. Type ‘npm install’ and press enter
  9. Type “open .” Folder will open and you will see its contents in the Finder. Do not quit terminal
  10. Now you must edit ‘package.json’ file. Do not use Textedit! use something like TextWrangler , you can download from (http://www.barebones.com/products/textwrangler/)
  11. If using TextWrangler, open ‘package.json’ file and add the following line to the “dependencies”: "curve25519": "git://github.com/volschin/node-curve25519", Everyhing, including “” must be there, best to just copy from here and paste. Do NOT alter anything else!
  12. Go back to terminal, make sure you are still in the right directory (homebridge-veralink) type ‘npm install’ and press enter. You will see the names of the packages that were installed at the very end but, curve255519 is will still be missing
  13. Type ‘npm install curve25519’ and it will be installed (for some reason, it won’t work without step #13)
  14. Type: ‘cd node_modules’ and press enter
  15. Type ‘open .’ and finder window will open
  16. Rename the folder ‘curve25519-n’ to ‘curve25519’
  17. Create/edit config.js in both homebridge-veralink/ install dir and ~/.veralite/. Change pin, veraIP for yourself. Mine:
module.exports = {
    veraIP:  '10.0.0.11',
    includesensor: false,
    dimmertest: true,
    cardinality: 0,
    happort: 6200,
    bridged: true,
    pincode: '358-62-952',
    mainHNpath: './node_modules/hap-nodejs'
};
  1. Create/edit config.json (as instructed in GitHub - homebridge/homebridge: HomeKit support for the impatient.). Again, change at least ip. Mine:
{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "pin": "358-62-952",
        "veraIP": "10.0.0.11"
    },

    "platforms": [
        {
            "platform" : "Vera",
            "name" : "Vera"
        }
    ]
}
  1. Start running by by typing ‘homebridge’
  2. If you get errors, google them and search this thread.
  3. Open your iPhone app: I use Elgato Eve but there are others…
  4. Click settings, add accessory, chose your accessory, add, add anyway, enter the code manually by typing your pin (from config files), you will get a message: ‘accessory added’.
  5. If adding the homebridge accessory times out (you see homebridge on the phone but don’t get to input the pin), try clearing the persistency folder ~/.homebridge/persist reboot all devices and try again a few times.
  6. Ask Siri to control a device.

Not all steps are probably needed though. The curve hack seemed to fix the most sever connectivity issues.

As for why RPi… My macbook pro is often sleeping or at work, so I need something that’s on all the time. If anyone know how to run this on Vera Lite, let me know!

@sebby - That’s a wonderful question. Here:

If you want something that just works, use [url=https://github.com/Hackworth/VeraHomeKitBridge]https://github.com/Hackworth/VeraHomeKitBridge[/url]

If you want to alpha test what might eventually replace the above, [url=https://github.com/damianxd/VeraLink]https://github.com/damianxd/VeraLink[/url] is for you. It doesn’t have feature parity with the above, it’s an alpha, so if you don’t want to dick around with it then don’t use it.

Anything else listed in this thread is either unrelated or old and depreciated.

@damianxd - Sweet! Might I recommend you rename the repo and npm package to homebridge-vera?

Thanks! I’ve added Eve scenes in addition to my Vera scenes, but they aren’t as flexible. Have you experienced lost connection to the homebridged devices? If not, maybe it’s mac specific?

I’m really trying to get this to work here is my current problem:

$ tail -f npm-debug.log 17 error Exit status 1 18 error Failed at the VeraHomeKitBridge@1.0.0 start script 'node app.js'. 18 error This is most likely a problem with the VeraHomeKitBridge package, 18 error not with npm itself. 18 error Tell the author that this fails on your system: 18 error node app.js 18 error You can get their info via: 18 error npm owner ls VeraHomeKitBridge 18 error There is likely additional logging output above. 19 verbose exit [ 1, true ]

It loads the stops before completion. Any thoughts to why?
Thanks

@Jeff - Maybe I could help you if you included the actual error.

@Hackworth here is what is in the command line ;D :

[code]$ npm run start

VeraHomeKitBridge@1.0.0 start /Users/Jeff/VeraHomeKitBridge
node app.js

/Users/Jeff/VeraHomeKitBridge/lib/HAP-NodeJS/node_modules/mdns/lib/dns_sd.js:35
throw ex;
^

Error: Module version mismatch. Expected 46, got 47.
at Error (native)
at Object.Module._extensions…node (module.js:460:18)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/Users/Jeff/VeraHomeKitBridge/lib/HAP-NodeJS/node_modules/mdns/lib/dns_sd.js:24:20)
at Module._compile (module.js:435:26)
at Object.Module._extensions…js (module.js:442:10)
at Module.load (module.js:356:32)

npm ERR! Darwin 15.2.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “start”
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! VeraHomeKitBridge@1.0.0 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the VeraHomeKitBridge@1.0.0 start script ‘node app.js’.
npm ERR! This is most likely a problem with the VeraHomeKitBridge 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 VeraHomeKitBridge
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Jeff/VeraHomeKitBridge/npm-debug.log[/code]

Hopefully this is what you nedded to see so I can get this working! Thanks!
It appears to stop loading @ 109th device is their a cap of number of devices?

[quote=“rlmalisz, post:387, topic:186853”]So this had been working pretty well. The SSD on the Ubuntu NUC that had been running this (and a lot of other stuff) died two days back, and I’ve just gotten it all pretty much reassembled.

Eve pairs the bridge fine. I can use Eve to actuate devices. But now Siri says something akin to “Sorry Richard, I couldn’t find any devices”…sometimes with “at this time” tacked on at the end.

I’ll futz with it some more as time permits, but was curious if anyone had seen this behavior?

–Richard[/quote]

About a week on, and still haven’t sorted out what’s going on here. Has anyone else seen this? Eve pairs with VeraHomeBridge fine, gets correct status and can set values and such, but Siri consistently say “can’t find any devices”? I have tried the obvious–reseting the iPad’s HomeKit stuff, blowing away “persist” and restarting the bridge. Nothing seems to make any difference. What’s really annoying is this worked two weeks ago. We have had a new ATV4 join the house somewhere around this time, but it seems to have no obvious settings WRT HomeKit. But I guess I should check that again…

–Richard