We have moved at community.getvera.com

Author Topic: News about HomeKit and Vera  (Read 307163 times)

Offline wnurmi

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #405 on: January 05, 2016, 03:19:21 pm »
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 https://github.com/nfarina/homebridge 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
Code: [Select]
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.

- William
PS. has anyone here given https://github.com/Be2daErtin/homebridge-VeraLite a poke?

EDIT: readability
« Last Edit: January 05, 2016, 03:39:00 pm by wnurmi »

Offline damianxd

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +3/-1
Re: News about HomeKit and Vera
« Reply #406 on: January 05, 2016, 03:53:58 pm »
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

Offline Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #407 on: January 05, 2016, 04:24:13 pm »
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.

Quote
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

Offline Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #408 on: January 05, 2016, 04:25:12 pm »
Yes!, sorry... I forgot to add that on the readme:


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

In your case it would be:
Code: [Select]
{
"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://"
}
]
}

For the moment the configuration of the VeraIP is external and it goes on this folder:
Code: [Select]
/home/<name>/.veralink/config.jsWhen you start the homebridge app you will notice the config file listed on the output like this

Quote
*** 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 <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** 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 <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
Please add your configuration file to /home/damian/.veralink/config.js
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.

All that worked so far, Thanks  ;D

Offline damianxd

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +3/-1
Re: News about HomeKit and Vera
« Reply #409 on: January 05, 2016, 04:35:46 pm »
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.

Code: [Select]
npm install homebrige-veralink
node VeraLink.js

Offline Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #410 on: January 05, 2016, 04:37:13 pm »
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: [Select]
/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.<anonymous> (/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.<anonymous> (/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)
Any thoughts on how to correct this problem so Homebridge can continue to run?

Code: [Select]
npm install homebrige-veralink
node VeraLink.js

The npm is not registered yet? getting a 404

Code: [Select]
$ 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

You just spelled it wrong on the last post! lol
« Last Edit: January 05, 2016, 04:45:33 pm by Jeff »

Offline damianxd

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +3/-1
Re: News about HomeKit and Vera
« Reply #411 on: January 05, 2016, 04:46:56 pm »
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

Offline sebby

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +15/-3
Re: News about HomeKit and Vera
« Reply #412 on: January 05, 2016, 05:44:16 pm »
Forgive my ignorance, but can someone tell me what the difference between all these implementations are?    From reading this thread i see:

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

Offline wnurmi

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #413 on: January 05, 2016, 06:24:52 pm »
Did you figure this out yet? Is there an advantage to use on the Pi besides power efficiency?

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 https://nodejs.org/en/download/package-manager/
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":
Code: [Select]
"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:
Code: [Select]
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'
};
18. Create/edit config.json (as instructed in https://github.com/nfarina/homebridge). Again, change at least ip. Mine:
Code: [Select]
{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "pin": "358-62-952",
        "veraIP": "10.0.0.11"
    },

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

19. Start running by by typing 'homebridge'
20. If you get errors, google them and search this thread.
21. Open your iPhone app: I use Elgato Eve but there are others...
22. 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'.
23. 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.
24. 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!

Offline Hackworth

  • Full Member
  • ***
  • Posts: 100
  • Karma: +13/-8
Re: News about HomeKit and Vera
« Reply #414 on: January 05, 2016, 06:26:54 pm »
@sebby - That's a wonderful question. Here:

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

If you want to alpha test what might eventually replace the above, https://github.com/damianxd/VeraLink 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?

Offline wnurmi

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #415 on: January 05, 2016, 06:31:19 pm »
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.

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?

Offline Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #416 on: January 05, 2016, 06:43:38 pm »
If you want something that just works, use https://github.com/Hackworth/VeraHomeKitBridge


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

Code: [Select]
$ 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

Offline Hackworth

  • Full Member
  • ***
  • Posts: 100
  • Karma: +13/-8
Re: News about HomeKit and Vera
« Reply #417 on: January 05, 2016, 06:53:58 pm »
@Jeff - Maybe I could help you if you included the actual error.

Offline Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #418 on: January 05, 2016, 07:26:17 pm »
@Hackworth here is what is in the command line ;D :

Code: [Select]
$ 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.<anonymous> (/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

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?
« Last Edit: January 05, 2016, 07:41:47 pm by Jeff »

Offline rlmalisz

  • Sr. Member
  • ****
  • Posts: 400
  • Karma: +1/-0
Re: News about HomeKit and Vera
« Reply #419 on: January 05, 2016, 09:27:13 pm »
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

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