We have moved at community.getvera.com

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

Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #435 on: January 11, 2016, 07:57:18 am »
I have been hoping to be able to get this running for a long time but always thought it was beyond me. On spur of moment I decided to buy a raspberry pi2 on Friday and in 3 hours I had minibian installed and set up remotely via putty as I have no USB keyboard.
I followed Hackworth 's github.com instructions and all is good. I see the devices recognised, and then via a iPhone app and see them being turned on on the putty session when I use Siri to turn them on.
However when I disconnect putty it seems to stop the bridge from running and so I have to log back in and restart it. What am I doing wrong? Is it possibly to run this as a background service?
Thanks and great work everyone.

Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #436 on: January 11, 2016, 04:59:16 pm »
For anyone else trying to keep homebridge running, not sure if this is the best way but was very easy.

https://github.com/cflurin/homebridge-shims/wiki/Startup-Homebridge-on-a-Raspberry-Pi-using-PM2



Offline ctguess

  • Full Member
  • ***
  • Posts: 145
  • Karma: +4/-2
Re: News about HomeKit and Vera
« Reply #437 on: January 11, 2016, 05:17:13 pm »
Here's another way to start the HomeKitBridge and have it run for extended periods of time.  Again, I don't know if this is the best way, but it does allow for manual control of starting it up, if that's important to you. 

http://raspi.tv/2012/using-screen-with-raspberry-pi-to-avoid-leaving-ssh-sessions-open 

TL;DR Summary

to install:  sudo apt-get install screen
to use:  after cd /VeraHomeKitBridge  type screen npm start run app.js    ** (see note below)
to exit the 'screen' session and leave the bridge running so you can then kill your ssh session:  ctrl+a  then d

**(or whatever your command is to start it...I can't remember exactly because I've only had to do it twice in 3 months. From my limited unix skills, I've deduced that the limited logging space on the RPI I run this on was full and so the bridge crashed.)


Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #438 on: January 11, 2016, 05:55:12 pm »
Thanks, I will have a look at that too.

On Hackworth's install is it possible to also run the plugins?  I have installed the Sonos one and trying to edit the config.json but the setup of it is different to the homelink one and I am not sure how to add the relevant accessories section. 

Offline kraka40

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #439 on: January 11, 2016, 07:33:19 pm »
just got VeraHomeKitBridge working yesterday on unbuntu!  Nice job on the module, will definitely start to dig in a bit further.

For those running ubuntu and looking to run this as a daemon, I followed instructions here
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04

pretty straight forward instructions on using pm2.

Thanks and again nice work!  Now to up the accessories integration! :)
« Last Edit: January 11, 2016, 09:20:15 pm by kraka40 »

Offline ctguess

  • Full Member
  • ***
  • Posts: 145
  • Karma: +4/-2
Re: News about HomeKit and Vera
« Reply #440 on: January 12, 2016, 05:39:44 pm »
@simonclark

I'm not sure what you are asking.  The homekitbridge is just (for lack of a better term) voice control of Vera.  It doesn't run plugins, which are written in Lua and reside on Vera.  It can start plugins, or better stated, scenes that use plugins. 

For example, around the holidays I had a scene that I created that turned on my Sonos and started playing a Pandora Christmas Carols station.  I named that scene "Christmas Carols".  After creating the scene and restarting the homekitbridge so that it could find the new 'accessory' I was able to say "Hey Siri, start the Christmas Carols" or "Hey Siri, turn on the Christmas Carols" and it would do so.  I see no reason why you couldn't do something similar with Sonos and a station/playlist/etc. of your choice. 

To find the value of the station/playlist you want to play (it will look something like pndrradio:2904534714116392522) start playing it on your Sonos, then within Vera go to your Sonos device, then advanced, then variables and scroll to almost the bottom and find the AVTransportURI field and copy the value.  Use the advanced editor to create an action for your scene and enter that as the value for the PlayURI action. 

Offline JuniorJedi

  • Full Member
  • ***
  • Posts: 112
  • Karma: +3/-1
Re: News about HomeKit and Vera
« Reply #441 on: January 13, 2016, 11:11:47 am »
I think there's confusion over VerHomeKitBridge and home bridge (which does support plugins, and also has a vera plugin).

On a different note:
My 14 month old son has worked out that if he presses the crown on my Apple Watch he can make the waveform pattern respond by babbling.
This morning whatever he said sounded to Siri like "turn on them" and my house went into meltdown. I have a bit of logic that runs when certain lights are on that turns of other lights and devices - it was like a nightclub at 6 a.m.
Not to mention that every push notification I have fired off too!

Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #442 on: January 13, 2016, 12:38:30 pm »
Thanks JuniorJedi yes that was what I was asking. I wasn't sure if VeraHomeKitBridge was based on / a version of Homebridge and would allow other system plugins to work.
If I want native homekit sonos control I presume I can't run both?

Is there a feature difference between VeraHomeKitBridge and the homebridge vera plugin?

@ctguess VeraHomeKitBridge is a way to allow ios homekit access to Vera but Homekit can access much more. Yes I am planning to create vera scenes for my TVS and.sonos but it would be quicker if homekit communicated directly to Sonos rather than through Vera, and might give more commands, play, pause etc "Hey Siri, pause kitchen speakers" without the need to create vera scenes for every use case.. Or even explain to the wife why she has to say "turn on the pause kitchen speakers" to run the vera scene  ::)



Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #443 on: January 13, 2016, 12:45:51 pm »
JuniorJedi just to be clear I assume your answer means VeraHomeKitBridge can't run homebridge plugins?

Offline JuniorJedi

  • Full Member
  • ***
  • Posts: 112
  • Karma: +3/-1
Re: News about HomeKit and Vera
« Reply #444 on: January 13, 2016, 02:02:01 pm »
JuniorJedi just to be clear I assume your answer means VeraHomeKitBridge can't run homebridge plugins?

Apologies for lack of clarity. Yes I believe this to be the case.


Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #445 on: January 13, 2016, 06:54:47 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-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

@damianxd  I have after much fun got homebridge and your plugin installed on a clean Pi install.  I am now trying to run your plugin with the Hue and Sonos plugins and am getting to this stage where its timing out.

Code: [Select]
Loaded plugin: homebridge-philipshue
Registering platform 'homebridge-philipshue.PhilipsHue'
---
Loaded plugin: homebridge-vera
VeraLink initializing
Registering platform 'homebridge-veralink.Vera'
---
Loaded config.json with 1 accessories and 2 platforms.
---
Loading 2 platforms...
[Philips Hue] Initializing PhilipsHue platform...
[Philips Hue] PhilipsHue Platform Plugin Version 0.0.2
[Philips Hue] Fetching Philips Hue lights...
[Vera] Initializing Vera platform...

I'm not sure if my config file setup is correct.  Do I need a config.js in the.veralink folder and a config.json in the .homebridge folder, and should they be the same?

thanks

Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #446 on: January 14, 2016, 03:08:53 pm »
So after finally getting homebridge installed, I discovered that the Sonos plugin only allows turn on and turn off, so no advantage to the VeraHomekitbridge so I am going back to that which just works!

Offline goldriver

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #447 on: January 15, 2016, 06:22:13 am »
After installing on windows and been able to find all the config correctly, I'm now trying to install homebridge-vera on a Ubuntu 14 linux box but I'm stuck at the same place I was with windows but this time everything I did to fix the ip not found on windows does not fix my issue on Ubuntu

here is the message

"Loaded config.json with 0 accessories and 1 platforms.
---
Loading 1 platforms...
[Vera] Initializing Vera platform...

/usr/local/lib/node_modules/homebridge-vera/index.js:27
    this.verainfo = this.functions.getVeraInfo(Veraconfig.veraIP);
                                                         ^
TypeError: Cannot read property 'veraIP' of undefined
 

"

I did copy the config.js file both in /home/ubuntu/.veralink and the installation DIR "/usr/local/lib/node_modules/homebridge-vera" , and also copied the config.json file in /home/ubuntu/.homebridge drirectory and "/usr/local/lib/node_modules/homebridge" but I always have the same "veraIP undefined message.

Here are my 2 config files:

config.js

module.exports = {
    veraIP:  "192.168.1.215",
    happort: 6200,
    dimmertest: true,
    cardinality: 0,
    bridged: true,
    includesensor: false,
    pincode: "031-45-155",
    mainHNpath: "./node_modules/hap-nodejs"

config.js
{
  "bridge": {
    "name": "HomeBridge",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-155",
    "veraIP": "192.168.1.215"
  },
  "platforms": [
    {
      "platform": "Vera",
      "name": "Vera"
    }
  ]
}


Can anyone give me a hand at this ?

Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: News about HomeKit and Vera
« Reply #448 on: January 15, 2016, 01:16:45 pm »
I had this as well. Try calling the one in .vera link .json not.js in case that matters and I think you can take out the veraIP line from the homebridge config file. Unfortunately I have deleted my setup to check as doesn't see the benefit of that install over Hackworth's one.

Offline goldriver

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #449 on: January 15, 2016, 03:41:20 pm »
I had this as well. Try calling the one in .vera link .json not.js in case that matters and I think you can take out the veraIP line from the homebridge config file. Unfortunately I have deleted my setup to check as doesn't see the benefit of that install over Hackworth's one.

thanks Simon, unfortunatly, this does not work either... still searching and trying all kind of setup but have not got chance yet ...