We have moved at community.getvera.com

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

Offline jasonkhonlaw

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #390 on: January 02, 2016, 11:37:41 am »
Does anyone have this working so that HomeBridge reads the current status of devices?  The device state in HomeKit is always what I last changed it to using HomeKit.

If I turn something in via Vera or by using the wall switch, HomeKit doesn't know anything about it...

Offline Hackworth

  • Full Member
  • ***
  • Posts: 100
  • Karma: +13/-8
Re: News about HomeKit and Vera
« Reply #391 on: January 02, 2016, 01:25:32 pm »
@jasonkhonlaw - Yes, of course. https://github.com/Hackworth/VeraHomeKitBridge

Offline jasonkhonlaw

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #392 on: January 02, 2016, 01:44:49 pm »
Yeah, that's what I'm using.  It works to control everything, but HomeKit doesn't give me current state of the devices (unless I changed the state through HomeKit)

Offline jasonkhonlaw

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #393 on: January 02, 2016, 02:31:04 pm »
I guess I can try updating the code, mine is from a couple of months back...

Offline jasonkhonlaw

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #394 on: January 02, 2016, 03:46:51 pm »
Updating fixed it, awesome!!  My garage doors work now too (they didn't before)

Offline davemedlin

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #395 on: January 02, 2016, 06:33:32 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.


I've tried this and several other suggestions from this thread trying to run on Windows, I get this error right when it tries to start the script. Any ideas?

Starting Vera HomeKit Bridge...
Unexpected result while probing for avahi: { [Error: dns service error: unknown
error code] errorCode: -65563 }

C:\HomeBridge\lib\HAP-NodeJS\node_modules\mdns\lib\avahi.js:28
  dns_sd.DNSServiceRefDeallocate(sr);
         ^
Error: DNSServiceRef is not initialized
    at supportsInterfaceIndexLocalOnly (C:\HomeBridge\lib\HAP-NodeJS\node_module
s\mdns\lib\avahi.js:28:10)
    at Object.<anonymous> (C:\HomeBridge\lib\HAP-NodeJS\node_modules\mdns\lib\av
ahi.js:32:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (C:\HomeBridge\lib\HAP-NodeJS\node_modules\mdns\lib\md
ns.js:31:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Offline davemedlin

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #396 on: January 02, 2016, 07:00:15 pm »


I've tried this and several other suggestions from this thread trying to run on Windows, I get this error right when it tries to start the script. Any ideas?

Starting Vera HomeKit Bridge...
Unexpected result while probing for avahi: { [Error: dns service error: unknown
error code] errorCode: -65563 }

C:\HomeBridge\lib\HAP-NodeJS\node_modules\mdns\lib\avahi.js:28
  dns_sd.DNSServiceRefDeallocate(sr);
         ^
Error: DNSServiceRef is not initialized
    at supportsInterfaceIndexLocalOnly (C:\HomeBridge\lib\HAP-NodeJS\node_module
s\mdns\lib\avahi.js:28:10)
    at Object.<anonymous> (C:\HomeBridge\lib\HAP-NodeJS\node_modules\mdns\lib\av
ahi.js:32:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (C:\HomeBridge\lib\HAP-NodeJS\node_modules\mdns\lib\md
ns.js:31:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Okay, saw something about needing bounjour service in Windows so made sure it was running and the previous error went away but now it hangs on this one. Any ideas??

Starting Vera HomeKit Bridge...

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: The specified module could not be found.
C:\HomeBridge\lib\HAP-NodeJS\node_modules\srp\node_modules\bignum\build\Release\
bignum.node
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at new require (module.js:380:17)
    at Object.<anonymous> (C:\HomeBridge\lib\HAP-NodeJS\node_modules\srp\node_mo
dules\bignum\index.js:4:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (C:\HomeBridge\lib\HAP-NodeJS\node_modules\srp\lib\srp
.js:2:16)

npm ERR! VeraHomeKitBridge@0.0.0 start: `node app.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the VeraHomeKitBridge@0.0.0 start script.
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! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
npm ERR! cwd C:\HomeBridge
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\HomeBridge\npm-debug.log
npm ERR! not ok code 0

Offline airigami

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #397 on: January 02, 2016, 11:13:42 pm »
Like others, I followed the instructions and all worked perfectly. Thank you to all those that have put time into the software and answering questions here to make it easy for those of us that can't do it ourselves. I used the bridge or a few days without a problem. Then suddenly, it just stopped working.

My Vera works. I can control everything exactly as expected the old ways and all of my timed/automated scenes are behaving properly. Now when I try to issue a command with Eve, it tells me all of my devices are unreachable. At first when this happened, I discovered the IP address of Vera changed. No idea why, but I fixed that in my router's IP reservations so that shouldn't happen again. Immediately after correcting that, everything worked for about an hour. Then it stopped. I've rebooted all of the devices involved just for good measure (iphone, vera, Mac Mini, Airport Extreme), removed persist, and restarted the bridge. Everything starts up. I see it creating devices. Then I go to Eve and it tells me that the devices are all unreachable. The npm-debug.log shows no new entries. Config.json is identical to the distribution except for the correct IP address for my Vera.

Can anyone tell me what I'm missing? Other things to try?

Thanks.



Offline Glen Koenig

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #398 on: January 03, 2016, 10:35:12 am »
...Then suddenly, it just stopped working.

...Can anyone tell me what I'm missing? Other things to try?

Thanks.
Maybe, maybe not.

I've had struggles with stability. My first attempt, with mixed results, was a week ago.  I installed Raspbian from the Noobs at raspberry pi web site. I then installed HomeBridge and got it to work. However, it would always crash after a few hours. Then I upgraded and updated Raspbian build, and it suddenly wouldn't run at all.

Note: I have a Lutron Smart Bridge Pro and Philips Hue Bridge, and both were integrated with Siri. With HomeBridge running I had dupe entries in Eve, and Siri would respond that some devices seemed uninterested. At the time of the first attempt it had not occurred to me to disable those in HomeKit (privacy) and use the Vera for all Siri integration.

I'm now running the out of the box Raspbian from the latest Noobs download without doing any updates other than what Hackworth suggests at his Github page. The only thing I've installed otherwise is screens. It seems to run perfectly now, but it has only been running for a little over a day since the last restart. The good news is that it appears to be stable, and hasn't crashed once. As noted above, I don't allow Lutron or Philips Hue to integrate with Siri, and Siri controls everything fine.

I can also use Siri over cellular connection via Apple TV 3 over a Wifi connection. When ATV had a wired connection it just would't work for me.

Offline Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #399 on: January 05, 2016, 02:38:28 am »
I'm getting an Error on the iPhone:

Reached maximum limit of objects for requested type.

This is when I try to add the bridge, any thoughts how to fix I assume I have way to many devices.I slimmed down my rooms to a few but devices I have alot!

Yep it looks like @ 109 devices it just stops, no errors on the server side. I setup a openLuup Vera and it works but I have no devices to control because its just a fake Veras! any Ideas how to add more Devices than 109?
« Last Edit: January 05, 2016, 03:42:14 am by Jeff »

Offline damianxd

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +3/-1
Re: News about HomeKit and Vera
« Reply #400 on: January 05, 2016, 06:20:18 am »
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: [Select]
npm install -g homebridge

npm install -g homebridge-vera

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

PS: Sorry for the long waiting, my job has been throwing me a lot of challenges lately
« Last Edit: January 06, 2016, 08:28:37 am by damianxd »

Offline JuniorJedi

  • Full Member
  • ***
  • Posts: 112
  • Karma: +3/-1
Re: News about HomeKit and Vera
« Reply #401 on: January 05, 2016, 07:30:53 am »
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.


This is exciting stuff...can't wait to try.

Offline Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #402 on: January 05, 2016, 12:14:06 pm »
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: [Select]
npm install -g homebridge

npm install -g homebridge-veralink

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

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

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: [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": "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://"
}
]
}

Offline damianxd

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

Offline K-Rock

  • Sr. Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #404 on: January 05, 2016, 01:23:21 pm »


I've tried this and several other suggestions from this thread trying to run on Windows, I get this error right when it tries to start the script. Any ideas?


Any luck on getting this to run on Windows?


Sent from my iPhone using Tapatalk