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

Offline Albeebe

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +10/-1
News about HomeKit and Vera
« on: April 10, 2015, 10:53:40 pm »
If you're interested in HomeKit and being able to control your Vera with Siri, please read on.

I successfully "hacked" together a way to control my Vera using Siri and HomeKit.

I'll start by getting this overwhelming excitement out before going into the technical details and what it means for you...

"Turn on my outdoor lights"
"Dim my outdoor lights to 20%"
"Lock my front door"

I actually got it working, and I'm just totally blown away at how incredible it is to control things using Siri. In fact, I can see myself walking up to my front door and using an Apple watch to tell Siri "Unlock my front door" and have it unlock within seconds. I now have a reason to get an Apple watch, just for this ability alone. You're laying on the couch and ready to watch a movie... lift up your arm and speak into your apple watch.... "Dim the lights to 10%". Woah, incredible. Up until now, I've been using an app to control things and you need to open an app, wait for a connection, go to the right screen, then tap on a light to control it. On my best days i can do that in 5 seconds, normally, 10-15 seconds.  With Siri... 3 seconds.

Moving on to where HomeKit and Vera currently stand...

The crappy news is that you probably won't see Vera including HomeKit anytime soon, if ever. Looks like Apple wants HomeKit enabled things like light switches, light bulbs, locks, etc... to have built in wifi or bluetooth so they can communicate directly with your iPhone on the same WiFi network, or if you're not on the same network, an Apple tv will act as a bridge between your devices and your iPhone while your away from your house. Not only that, each HomeKit enabled product needs to be certified by Apple.

Apple said that devices that don't support HomeKit can take advantage of HomeKit by using a bridge. Unfortunately it looks like the only devices that are allowed to be "bridged" are devices that report things like a motion detector, or a temperature sensor. You cannot bridge devices that control things like a lock, or a light switch, or a thermostat. LAME! Vera cannot legally get around this, because Apple wont certify them, and if Vera were to circumvent Apple and implement HomeKit on their own, they would likely get sued.

Why would they get sued, and how can you circumvent Apple to get Vera to work with HomeKit?

Bear with me as i'm still learning the details of how this all works. Basically Apple has created the HomeKit Accessory Protocol. This protocol is how all HomeKit devices, bridges, and your iPhone communicate with each other. The only way to get the documentation on how this protocol works is to pay a fee to apple, sign an NDA, and join the MFI (Made for iPhone?) program. If you try to reverse engineer the protocol, my understanding is that you would be breaking the law, specifically the DMCA. If someone reverse engineers the protocol, and writes a program that uses the protocol, is that illegal? That i don't know. So if Vera implements the HomeKit Accessory Protocol because they reverse engineered it, i think Apple would shut that down real quick.

How did you get Vera to work with HomeKit?

Ok so this is probably what you want to know. Some smart people reverse engineered the protocol and wrote some code to simulate HomeKit devices. Heres the project I found and got working https://github.com/nfarina/homebridge

Basically you run this code on your computer while on the same network as your iphone. The code then allows you to simulate HomeKit devices, so that your iPhone will see them and allow you to control them. When you try to control one of these devices, the code gets notified that for instance, you want to turn on your bathroom light. From there, the code can take over and do anything you want.

What i was able to do is write some code that when a command comes into to control a light, i then send a command off to Vera to actually control the light. Its totally hacked together, but it works and proves that the ability to control your entire home using Siri and Vera is technically possible.

What does this mean for the Vera community

I'm writing this post because i just figured all this out and got a hacked together prototype working. I'm going to refine it so that everyone else can easily use it, no matter what your skill level is. I think i can make it so simple, it will take you under 2 minutes to get running. So follow this post and ill keep you updated over the weekend.

Offline Albeebe

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +10/-1

Offline mda

  • Sr. Member
  • ****
  • Posts: 464
  • Karma: +9/-0
Re: News about HomeKit and Vera
« Reply #2 on: April 11, 2015, 12:08:01 am »
That would be wonderful. Thanks @Albeebe !

Offline teonebello

  • Sr. Member
  • ****
  • Posts: 405
  • Karma: +0/-0
  • Macs, Home Automation, Bikers
Re: News about HomeKit and Vera
« Reply #3 on: April 11, 2015, 02:11:27 am »
Should this become a plugin?
Great!

Offline intveltr

  • Hero Member
  • *****
  • Posts: 1683
  • Karma: +93/-5
Re: News about HomeKit and Vera
« Reply #4 on: April 11, 2015, 10:52:23 am »
Awesome work!  Nice to see people are working hard to reverse engineer the protocol.  Apple need to be slapped around hard for their vision on home automation: the insistence on proprietary, licensed, closed protocols has the potential to set the state of the art back half a decade. 

Reading through some reports on the restrictions that Apple may place on HomeKit bridges, it seems to me that those restrictions are not as severe as all that.  The restricitons seem to be:
1) No locks
2) Any device that is capable of communicating directly through Homekit must do so, i.e. all WiFi and Bluetooth devices.

Also, there is work being done on "official" HomeKit bridges, such as this one: http://z-wavealliance.org/first-z-wave-to-apple-homekit-bridge-demonstrated/
HomeWave is available in the App Store!  Turn your iPhone/iPad into an easy-to-use remote control for Vera.

Offline Albeebe

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +10/-1
Re: News about HomeKit and Vera
« Reply #5 on: April 11, 2015, 11:27:54 am »
I don't know if zwave.me is making an official bridge, or just hacking something together. I would think they are just hacking it together.

My mind is really just blown away today as I've been processing all this homekit stuff and what it means.

I downloaded a homekit app and there was that light in my hallway that I was able to expose to homekit. That really blew me away. I used an app unrelated to Vera to control a light using Vera! Think about that... It means that Vera could just become a dumb box that exposes your devices to HomeKit and you could use an app that has nothing to do with any particular controller.

Someone's going to come along and make a slick app to control your home and it will work with Vera, SmartThings, HomeSeer etc...

That's just crazy yet so incredible.

As for Apple being restrictive and not completely opening it up, I can kind of feel why there may be a necessary reason for it but I'm just to new to all this to have all the facts.


Sent from my iPhone using Tapatalk

Offline boojew

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #6 on: April 11, 2015, 11:29:14 am »
Amazing! Would you mind posting your code?

Offline Albeebe

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +10/-1
Re: News about HomeKit and Vera
« Reply #7 on: April 11, 2015, 11:55:58 am »
I honestly just hacked the code together and I was surprised it worked. I'm trying to find time this weekend to package it up so you can try it out.  Stay tuned.


Sent from my iPhone using Tapatalk

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4431
  • Karma: +247/-120
Re: News about HomeKit and Vera
« Reply #8 on: April 11, 2015, 01:34:37 pm »
I downloaded a homekit app and there was that light in my hallway that I was able to expose to homekit. That really blew me away. I used an app unrelated to Vera to control a light using Vera! Think about that... It means that Vera could just become a dumb box that exposes your devices to HomeKit and you could use an app that has nothing to do with any particular controller.
Perhaps I lack vision, but I'm not understanding your direction or gaol. The idea of Vera, to me, is to have a smart box that automatically controls devices of various makes and technologies. Vera does that to a very large extent right now.

With Vera, the light can be automated, completely. It can also be controlled by an app, if you really want to. It can also be controlled by voice, if Apple chooses to allow you to, which so far they seem not to.

I presume that you are aware of the fact that you can control any device under Vera by simply sending a HTTP GET request to Vera. Are you also aware that Vera can itself send HTTP requests to other devices, like WiFi devices and Bluetooth/Zigbee gateways to control other devices? Already, Vera is vastly more flexible than Homekit and can already control FAR more non-Z-Wave devices than Homekit can.

So, my question is; why would I or anyone want to turn my far more open and far more extensible home automation controller into a dumb box, that is then controlled(manually) by Homekit, or any smartphone app? My goal is automation while yours seems to be, as stated so far,  iPhone as a hand held remote control.

Offline boojew

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +0/-0
Re: News about HomeKit and Vera
« Reply #9 on: April 11, 2015, 01:38:14 pm »
This doesn't preclude other automation- but rather allows manual intervention via Siri. Same as using an app. I have schedules for all my devices but regularly override them via an app. Doing this via Siri would be awesome.

If I were an android user, I'd be using tasker and various plugins to make be his happen. No difference.

Really looking forward to this

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4431
  • Karma: +247/-120
Re: News about HomeKit and Vera
« Reply #10 on: April 11, 2015, 02:24:09 pm »
@boojew - I agree with what you stated. Homekit supports Vera, then a Homekit app could be used as any other Vera app. However, this is contrary to @Albeebe who said:
It means that Vera could just become a dumb box that exposes your devices to HomeKit and you could use an app that has nothing to do with any particular controller.

He's talking about using Vera as an unintelligent gateway to Z-Wave devices and using a Homekit iPhone app for control and intelligence. His description, sounds, to me, like reinventing the wheel.

Offline Albeebe

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +10/-1
Re: News about HomeKit and Vera
« Reply #11 on: April 11, 2015, 04:09:09 pm »
I guess what I meant was instead of relying on Vera (the company) to build a better UI or a better app or relying on 3rd party developers that have a Vera to build better Vera apps or cool things for people to use... With homekit (at least for us iOS users) you have the potential for a developer that has for example a SmartThings hub or a wink hub to build some awesome tools or apps that can be used by people that have a Vera or a Homeseer hub. 

I think what's possible here is that you could take all your scenes and logic out of Vera and instead put it into a homekit app.

Just to clarify my view on home automation, I have sensors and scenes and logic that automated everything without me having to do anything. However there's times when I'm in bed and I want to adjust the fan or I'm on the couch and want to dim the lights. Being able to tell Siri, turn the fan to 50% is so simple and easy vs using an app or getting up and going to a switch.


Sent from my iPhone using Tapatalk

Offline Albeebe

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +10/-1
Re: News about HomeKit and Vera
« Reply #12 on: April 11, 2015, 04:14:31 pm »
I mean no disrespect to the Vera community and everything that people have contributed to making it an awesome system. Lots of crazy ideas are running through my head and I'm seeing glimpses of what could be possible but it's to early to connect the dots. I'm just thinking out loud :)


Sent from my iPhone using Tapatalk

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4431
  • Karma: +247/-120
Re: News about HomeKit and Vera
« Reply #13 on: April 11, 2015, 07:09:34 pm »
I don't think anyone is taking any offense to anything and, if they are, well $%^ 'em. Keep right on posting your views.

I view home automation differently than you seem to. Especially when you say things like
I think what's possible here is that you could take all your scenes and logic out of Vera and instead put it into a homekit app.
Which is exactly the opposite of what I want and seemingly counter to home automation.

For me, Vera or any HA controller is the master and where the "brains"(scenes and logic) should reside. I think that the phone apps should send commands to the central controller, but the system should not be dependent on the smartphone in any what whatsoever.

If the logic is in the Homekit app, on your iPhone, and you lose the phone on a bus or drop it in water, what happens to your home automation? If the logic stays on a fixed controller in the house, phones can come and go, so can internet connections, but the house continues to function as it should.

I get that what you really want is to have the ability to tell Siri to do your bidding and I suppose that you now have that. But, moving the logic and control into a smartphone app doesn't make sense to me, though it would be great for Apple.


Offline intveltr

  • Hero Member
  • *****
  • Posts: 1683
  • Karma: +93/-5
Re: News about HomeKit and Vera
« Reply #14 on: April 11, 2015, 07:20:52 pm »
I think what's possible here is that you could take all your scenes and logic out of Vera and instead put it into a homekit app.

There are good reasons for having both. There are home-bound scenes, like managing the heating, turning lights on and off when on holiday, and so on. The stuff that makes your home a smart home. These scenes necessarily run on your hub (vera) and not your smart phone: they need to work when you and you smart phone are away from home, but the wife & kids aren't.

But there are personal scenes as well. You have one to set the lights to movie mode. The kids have one for game mode. And your "get together with friends in the living room" scene may well differ from your wife's. That is where I see a role for scenes run from HomeKit instead of from the hub. Currently this is where Homekit is positioned, and it's a subset of the whole smart home architecture.
   
When it comes to integrating different home automation technologies, in my view that *must* take place at the hub, or in a "hub of hubs" (as OpenHAB calls itself). If not, hub centric scenes will not be possible. Perhaps we will see a Homekit based hub running on Apple Tv. But until then, there is still a role for Vera to handle the intellgent part of home automation. Someone mentioned a plugin for Vera to expose all devices attached to Vera to HomeKit. Architecturally, that is what needs to happen. If Apple disallows that, then they have missed the boat in my opinion.
HomeWave is available in the App Store!  Turn your iPhone/iPad into an easy-to-use remote control for Vera.