bwssytems / ha-bridge

Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k stars 198 forks source link

Request: Tie in to Apple HomeKit #159

Closed stevenmcastano closed 7 years ago

stevenmcastano commented 8 years ago

First of all, thanks for this... this is EXACTLY what I've been looking for. I've been writing my own custom Alexa skill in python for a month, and this replaces the entire thing with even more control and better functionality.

Do you think there's any chances of this picking up the ability to tie into Apple HomeKit and something like the MyTouchHome app?

Right now I'm using another project called "homebridge" https://github.com/nfarina/homebridge to link my iOS devices to my multiple home automation systems for the same functionality. So I could just configure both of them with matching names and activation URLs, etc, but it would be amazing to have both of these in one single app.

Any plans for that in the future?

bwssytems commented 8 years ago

Something to be looked into.

stevenmcastano commented 8 years ago

For sure, I'm using it more and more... I've been tying in shell scripts, multiple command options, etc... and things are going great. The only problem is, right now I have to replicate all those changes over to another app for Siri to work as well.

Is there an API in ha-bridge I could hit? This way maybe my homebridge install could at least just point to ha-bridge and I'd only have to send a single web request over and use ha-bridge to do all the actual heavy lifting?

audiofreak9 commented 8 years ago

Homekit is Phillips Hue Bridge compatible, it should discover the ha-bridge as a Hue if you run the ha-bridge on port 80 rather than the default port 8080.

bwssytems commented 8 years ago

Also, the ha-bridge emulates a Philips Hue Bridge so you can use those api calls to control it as well. ans as @audiofreak9 says, most external programs that utilize a hue, it is better to set the ha-brige to port 80 as a lot of apps hard code this port number for a hue bridge

magenbs commented 7 years ago

Homekit only works with the new Hue bridge 2. Does ha-bridge emulate the new authentication?

http://www2.meethue.com/en-us/friends-of-hue/apple-homekit/

bwssytems commented 7 years ago

Yes, I incorporated the features for V2 into the V3.0.0 and later ha-bridge. There may be some nuances of V2 that I am missing.

Ukhauk commented 7 years ago

Siri is a great addition to Alexa integration. To add to ha-bridge into homekit what Apps are best to pick up the bridge and devices ? I have been trying the Philips Hue apps which pick up ha-bridge, they want me to update the Hue Bridge software, if I skip this and go to Siri Voice control in the app it tries to pair my phone with the bridge but says device not found etc. So I am guessing I need a better 3rd party app thats not as fussy. Much appreciated

bwssytems commented 7 years ago

Which app are you using? I'll give it a try and see if I can do some debug.

Ukhauk commented 7 years ago

Both versions of the UK Philips Hue app. Hesperus, Eve and MyHome+. The Hue apps see ha_bridge and conplain that the firmaware needs updating. What apps are you using to add ha_bridge to homekit ?

bwssytems commented 7 years ago

I do not use Homekit, not an apple person. Just was looking for what apps do what to look at.

bwssytems commented 7 years ago

I have an updated jar to try: http://bwssystems.com/files/ha-bridge-3.1.0l.jar

rodriguezst commented 7 years ago

It still doesn't work with Apple Homekit for me but with the updated jar I got rid of those annoying messages prompting to update the bridge firmware version while using the official Hue app (v1) for Android /iOS. Thanks!

As for the Hue for Android/iOS (v2) app, it detects the bridge just fine but then prompts you to define new rooms that cannot be created. I guess your project does not support this feature.

peadard commented 7 years ago

Ok so bear with me for a tick. I have the same issue so I looked into an alternative way of getting this to work with HomeKit. Having this Hue Bridge setup I then setup the nfarina homebridge https://github.com/nfarina/homebridge. Once I had this up and running I installed the Hue accessory here: https://www.npmjs.com/package/homebridge-philipshue. I then pointed the accessory to my bwssystems hue bridge and voila it discovered the bridge and all its accessories. Now while it is not a perfect way of doing it, it does mean that I only have to add my accessories in one place (bwssystems) and Alexa and Siri can both access them. I hope this made sense to you guys.

rodriguezst commented 7 years ago

Thanks @peadard!

I don't plan on using Homekit that much (more of an Android guy) but I'll do it your way to play a bit with Apple's Homekit

bwssytems commented 7 years ago

V3.2.0 has been release, see if that helps with home kit.

rodriguezst commented 7 years ago

V3.2.0 still doesn't work with HomeKit After reading a bit about how HomeKit works I found out that it doesn't use the public Hue api. Hue bridges with HomeKit support have another Apple's custom protocol implemented with a setup pin and Apple's Zeroconf (Bonjour).

I ended up installing nfarina's homebridge as @peadard suggested and everything works great. All my ha-bridge accessories are now available on Apple devices.

bwssytems commented 7 years ago

This is good news. Could you write up the instructions for this? Looks like it will be something to post for others.

Thanks

bwssytems commented 7 years ago

closing as the ha-bridge does not use the meethue.com website for remote control which Apple Homekit expects.