We have moved at community.getvera.com

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

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
News about HomeKit and Vera
« Reply #60 on: June 05, 2015, 04:23:12 pm »
Only the devices defined in the 3 device files

Offline Jacesparks

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-1
Re: News about HomeKit and Vera
« Reply #61 on: June 05, 2015, 04:47:26 pm »
That shouldn't be an issue.
Can you try:
Follow these instructions in terminal

Download Home Kit, extract, modify the IP address, including the 3 device file (note IP appears twice in lights)
Delete the lib folder.

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

Home Kit folder above EXCEPT for the lib folder and paste into the Homebridge folder. When the popup comes up, click replace and apply to all files.


    $ cd homebridge
    $ git submodule init
    $ git submodule update
    $ npm install
    $ cd lib/HAP-NodeJS
    $ npm install

$ cd homebridge   (if it doesn't move you back to the homebridge folder then just type cd)
$ cd
$ npm run start

Everything should start and it should list all your devices.

Did up to the last step in this section of your post:
   $ cd homebridge
    $ git submodule init
    $ git submodule update
    $ npm install
    $ cd lib/HAP-NodeJS
    $ npm install

And got these errors:
JaceSparkssMBP2:homebridge jacesparks$ npm install
npm WARN package.json VeraHomeKitBridge@0.0.0 No repository field.
npm WARN package.json VeraHomeKitBridge@0.0.0 No license field.
JaceSparkssMBP2:homebridge jacesparks$ cd lib/HAP-NodeJS
JaceSparkssMBP2:HAP-NodeJS jacesparks$ npm install
npm WARN locking Error: EACCES, open '/Users/jacesparks/.npm/_locks/node-persist-c4770429fe57ec12.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/jacesparks/.npm/_locks/node-persist-c4770429fe57ec12.lock failed { [Error: EACCES, open '/Users/jacesparks/.npm/_locks/node-persist-c4770429fe57ec12.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/jacesparks/.npm/_locks/node-persist-c4770429fe57ec12.lock' }
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1

npm ERR! Attempt to unlock /Users/jacesparks/homebridge/lib/HAP-NodeJS/node_modules/node-persist, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm WARN locking Error: EACCES, open '/Users/jacesparks/.npm/_locks/mdns-a8434c1aaae695bd.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/jacesparks/.npm/_locks/mdns-a8434c1aaae695bd.lock failed { [Error: EACCES, open '/Users/jacesparks/.npm/_locks/mdns-a8434c1aaae695bd.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/jacesparks/.npm/_locks/mdns-a8434c1aaae695bd.lock' }
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1

npm ERR! Attempt to unlock /Users/jacesparks/homebridge/lib/HAP-NodeJS/node_modules/mdns, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm WARN locking Error: EACCES, open '/Users/jacesparks/.npm/_locks/curve25519-82b2185e98ff661b.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/jacesparks/.npm/_locks/curve25519-82b2185e98ff661b.lock failed { [Error: EACCES, open '/Users/jacesparks/.npm/_locks/curve25519-82b2185e98ff661b.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/jacesparks/.npm/_locks/curve25519-82b2185e98ff661b.lock' }
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1

npm ERR! Attempt to unlock /Users/jacesparks/homebridge/lib/HAP-NodeJS/node_modules/curve25519, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm WARN locking Error: EACCES, open '/Users/jacesparks/.npm/_locks/srp-aaa0c47227998e49.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/jacesparks/.npm/_locks/srp-aaa0c47227998e49.lock failed { [Error: EACCES, open '/Users/jacesparks/.npm/_locks/srp-aaa0c47227998e49.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/jacesparks/.npm/_locks/srp-aaa0c47227998e49.lock' }
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1

npm ERR! Attempt to unlock /Users/jacesparks/homebridge/lib/HAP-NodeJS/node_modules/srp, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm WARN locking Error: EACCES, open '/Users/jacesparks/.npm/_locks/ed25519-ddbc09586cee0aff.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/jacesparks/.npm/_locks/ed25519-ddbc09586cee0aff.lock failed { [Error: EACCES, open '/Users/jacesparks/.npm/_locks/ed25519-ddbc09586cee0aff.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/jacesparks/.npm/_locks/ed25519-ddbc09586cee0aff.lock' }
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1

npm ERR! Attempt to unlock /Users/jacesparks/homebridge/lib/HAP-NodeJS/node_modules/ed25519, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jacesparks/homebridge/lib/HAP-NodeJS/npm-debug.log


Should I proceed or will it fail?

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: News about HomeKit and Vera
« Reply #62 on: June 05, 2015, 05:00:53 pm »
I would suggest you start over.
Install NodeJS again v0.12.4
Delete the current homebridge folder
Then follow up

Offline C7Z51

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +2/-2
Re: News about HomeKit and Vera
« Reply #63 on: June 05, 2015, 05:09:39 pm »
If anyone has a clue on how to get this working on a synology NAS through SSH, that would be great.

Offline Jacesparks

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-1
Re: News about HomeKit and Vera
« Reply #64 on: June 05, 2015, 05:13:03 pm »
I would suggest you start over.
Install NodeJS again v0.12.4
Delete the current homebridge folder
Then follow up

I have done that twice already too. Hmmmm...   ??? :'(

Offline Ramias

  • Sr. Member
  • ****
  • Posts: 275
  • Karma: +7/-5
Re: News about HomeKit and Vera
« Reply #65 on: June 05, 2015, 05:38:02 pm »
Only the devices defined in the 3 device files

I installed a Virtual Switch device that i wanted to call a scene but apparently it didn't recognize it either.

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: News about HomeKit and Vera
« Reply #66 on: June 06, 2015, 03:53:23 am »

I would suggest you start over.
Install NodeJS again v0.12.4
Delete the current homebridge folder
Then follow up

I have done that twice already too. Hmmmm...   ??? :'(
I am not going to get back to this today.

Try this:
$ cd homebridge
$ npm install stop.
This may take a awhile try  a restart

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: News about HomeKit and Vera
« Reply #67 on: June 06, 2015, 05:27:59 am »
Also in reference to lock permission see https://github.com/npm/npm/issues/4815

Offline Hackworth

  • Full Member
  • ***
  • Posts: 100
  • Karma: +13/-8
Re: News about HomeKit and Vera
« Reply #68 on: June 06, 2015, 03:42:13 pm »
I fixed things up a bit so it'll treat a lock device named "Garage Door" as a garage door, and also added scene support. It assumes if you have on and off scenes, they end in " - On" and " - Off" and will build that into one, switch type device. Oh, and you don't have to edit each accessory file.

https://github.com/Hackworth/VeraHomeKitBridge

Feel free to send me pull requests.

Offline aechelon

  • Jr. Member
  • **
  • Posts: 60
  • Karma: +7/-0
Re: News about HomeKit and Vera
« Reply #69 on: June 06, 2015, 04:20:38 pm »
Hi Everyone,

For those of you who want to try this out on Windows, I've merged the sources, recompiled and packaged them against Node.js v0.10.33 as part of this SourceForge project.
The current version incorporates all the suggestions from earlier in this thread (e.g. fix the hard-coded vera IP address.)

Here is a set of updated instructions based on Albeebe's post from 4/11:

1. If you have a version of Node.js other than v0.10.33 installed you will probably have to uninstall it.
2. Download and install the x86 version of Node.js v0.10.33.   
3. Download and extract file homebridge-vera-win32.zip from SourceForge
4. Edit the app.js file and enter the IP address of your Vera on line 11
5. Open a Node.js Command prompt
6. cd to the directory where you extracted the sources
7. Type: npm run start

This should run the homekit bridge, connect to your vera, and expose any lights, dimmable lights, and locks to HomeKit.

From here the instructions for configuring the MyTouchHome app are identical to Albeebe's post.

Quote
Next you need to download an app that lets you manage HomeKit devices. I found an app called MyTouchHome in the app store for $1.99 that lets you add HomeKit devices on your network to your "home" that you create in the app. Once you create a "home" you need to tap on the "+ Accessory" button. If everythings working, all your Vera devices will show up in the list.

Tap on a device and you'll be prompted to enter a password.  The password is ALWAYS going to be 03145154

*notes*
1. HomeKit only allows devices that have a unique name. If you have a bunch of lights called "ceiling light" only one of the lights will show up in the list.
2. Siri is a bit finicky so you might have to experiment by saying "TURN OFF CEILING LIGHT" or "TURN CEILING LIGHT OFF". If you create a room using HomeKit and add the device to a room try saying "TURN THE BATHROOM CEILING LIGHT OFF".  You have to play around with it.
3. I didn't test unlocking/locking doors but it should work. However i think you need to say things like "TURN ON THE FRONT DOOR LOCK" or "TURN OFF THE FRONT DOOR LOCK" instead of saying unlock the front door.

While testing I ran into an issue while configuring MyTouchHome that required a reset of the configuration.
This can be done from Settings -> Privacy -> HomeKit -> Reset HomeKit Configuration.
You'll want to completely close down the app first as indicated by Apple to be sure the configuration is properly reset.

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: News about HomeKit and Vera
« Reply #70 on: June 06, 2015, 08:46:09 pm »
I fixed things up a bit so it'll treat a lock device named "Garage Door" as a garage door, and also added scene support. It assumes if you have on and off scenes, they end in " - On" and " - Off" and will build that into one, switch type device. Oh, and you don't have to edit each accessory file.



https://github.com/Hackworth/VeraHomeKitBridge

Feel free to send me pull requests.
Tested MAC OS X  - Well done

Default Code 03145154

Download Home Kit,
Extract, modify the IP address in app.js
Delete the lib folder.

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

Home Kit folder above EXCEPT for the lib folder and paste into the Homebridge folder. When the popup comes up, click replace and apply to all files.


    $ cd homebridge
    $ git submodule init
    $ git submodule update
Copy HomeBridge files to applicable home bridge folders

    $ npm install
    $ cd lib/HAP-NodeJS
    $ npm install

$ cd homebridge 
$ npm run start
« Last Edit: June 12, 2015, 06:03:38 pm by Brientim »

Offline Hackworth

  • Full Member
  • ***
  • Posts: 100
  • Karma: +13/-8
Re: News about HomeKit and Vera
« Reply #71 on: June 06, 2015, 09:21:49 pm »
Thanks Brientim! I have instructions in my readme on how to set it up, which are less complicated than those instructions. You don't need to download homebridge, it has nothing to do with this project, the HAP-NodeJS submodule on the other hand is quite important and downloaded for you when doing a recursive git clone (If you forgot to run that, git submodule init & update will take care of it)

If my instructions aren't working on Ubuntu/Debian, let me know.

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: News about HomeKit and Vera
« Reply #72 on: June 06, 2015, 09:29:01 pm »
Thanks Brientim! I have instructions in my readme on how to set it up, which are less complicated than those instructions. You don't need to download homebridge, it has nothing to do with this project, the HAP-NodeJS submodule on the other hand is quite important and downloaded for you when doing a recursive git clone (If you forgot to run that, git submodule init & update will take care of it)

If my instructions aren't working on Ubuntu/Debian, let me know.

The other was tested for OS X... Therefore, slightly different processes to achieve the same aim.

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: News about HomeKit and Vera
« Reply #73 on: June 07, 2015, 03:39:40 am »
Hackworth,

I have gotten pretty far on my raspberry pi running Debian (Rasbian)

I am getting a strange error. When the Mytouchhome app tries to get add a device, if I use the 4 digit PIN from the config.json I get wrong password and a retry with the raspberry just repeating "Start Pair M1". If I use "03145154", the program crashes and I get the following error:

Start Pair M1
Start Pair M3
/VeraHomeKitBridge/lib/HAP-NodeJS/node_modules/srp/lib/srp.js:418
      throw new Error("client did not use the same password");
            ^
Error: client did not use the same password
    at Object.checkM1 (/VeraHomeKitBridge/lib/HAP-NodeJS/node_modules/srp/lib/srp.js:418:13)
    at Object.processPairStepTwo (/VeraHomeKitBridge/lib/HAP-NodeJS/Server.js:273:18)
    at Object.processPairSequence (/VeraHomeKitBridge/lib/HAP-NodeJS/Server.js:233:11)
    at IncomingMessage.<anonymous> (/VeraHomeKitBridge/lib/HAP-NodeJS/Server.js:38:17)
    at IncomingMessage.emit (events.js:107:17)
    at IncomingMessage.Readable.read (_stream_readable.js:373:10)
    at flow (_stream_readable.js:750:26)
    at resume_ (_stream_readable.js:730:3)
    at _stream_readable.js:717:7
    at process._tickCallback (node.js:355:11)

npm ERR! Linux 3.4.103
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
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!     /VeraHomeKitBridge/npm-debug.log
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline Hackworth

  • Full Member
  • ***
  • Posts: 100
  • Karma: +13/-8
Re: News about HomeKit and Vera
« Reply #74 on: June 07, 2015, 03:46:12 am »
anhman, try putting 03145154 as the pin in the config.json file. I'm not sure what the requirements are in terms of length or complexity? You may need to delete all the files under the persist folder after you make the change.