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 199 forks source link

Google Home unable to pair with HA bridge #572

Closed Ram0909 closed 7 years ago

Ram0909 commented 7 years ago

I tried adding Philips Hue under the "Home Control" tab in the Google Home app, but it was unable to pair. It takes me to https://hue-adapter.appspot.com. I used an older version of the app (1.20.9) as described in #544 and still wasn't able to pair. The HA bridge connects to my FIBARO Hub perfectly. Since the newer version of the bridge is default port 80, I doubt it's a port issue. Thank you.

bwssytems commented 7 years ago

Any thing that uses the web is later than 1.20.9. Check the version of your app that you installed.

RedVortex commented 7 years ago

@Ram0909 I've also tried pairing it for quite some time last night and was unsuccessful with my Google Home app on iOS. I've also tried pairing it using the Hue web site (on Chrome/Macbook Pro) and it didn't work either and the https://www.meethue.com/api/nupnp wasn't returning anything either.

I've tried troubleshooting it a bit and it's almost as if the multicast, upnp or something used for discovery is not working properly. If I use the real Hue app, I was finally able to find it after a long discovery process but it found it by scanning the network I think, not through normal discovery which is what is used by Google Home and pretty much everything else.

I'm running this on Raspbian Jessie on RPI 3 Model B. I've tried using the on-board ethernet, then the on-board wireless and both (each time reconfiguring properly the bridge IP). I'm running it on port 80 and I start it like this (sudo is necessary to bind to ports <80): sudo java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge.jar

I'm running 4.3.1 and using the java version provided through the repositories 1.8.0_65.

I'll let you know if I find anything but nothing so far after a few hours of troubleshooting. Could be something simple I missed as well but I've tried many things and read the doc many times.

I've also tried pinging the multicast address that it should be answering from and I've got my 2 Google Homes IP addresses that are answering properly as they should but the ha-bridge IP does not, that's why I think it may be something with the upnp and/or multicast.

Ram0909 commented 7 years ago

@bwssytems I checked the version, even tried it with v1.19.29, it still takes me to the same page. image

Also, since I am new to programming, kindly instruct accordingly. Thank you.

Ram0909 commented 7 years ago

@RedVortex Any luck? Also, mine doesn't go to the meethue link, but to the adapter.appspot one.

brandoncorry commented 7 years ago

So, I was able to get it working with an older version as mentioned, but was also trying to see if there were workarounds for folks.

I was able to do it all through a browser, but we will need to understand how to generate a few keys before it can work for the masses.. if we can figure out how to obtain these values, I think we will be able to maybe get this added to the HA-Bridge as helper tool?

https://hue-adapter.appspot.com/client/#/activate?home=GOOGLEHOMEID1,GOOGLEHOMEID2&activationId=ACTIVATION_GUID&redirect_uri=assistant-handoff%3A%2F%2Fcomplete

Activation Guid is in the form of: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Google Home IDs are in the form of: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

brandoncorry commented 7 years ago

Ok. Did some more poking around... if you navigate to the URL below with the IP address of your Google Home, you will be able to grab the Google Home ID. We still need to figure out how to get the activationId.

http://IP_OF_GOOGLE_HOME:8008/setup/eureka_info?params=version,name,build_info,device_info,net,setup,settings,opt_in,opencast,multizone&options=detail

You'll see a bunch of JSON, one field is: "cloud_device_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

danopia commented 7 years ago

I'm running 1.20.9 and get the hue adapter page, which I believe is trying to pair with my physical bridge even though I powered off the original bridge. It's just hanging at the pair step.


I experimented a bit by reassigning the IP address from the actual bridge (while it was turned off) to my rpi. Then the latest Google Home app paired easily to my HA Bridge through hue-adapter.appspot.com. I was then able to control my HA Bridge device through Google Assistant.


Unfortunately, powering the real bridge back on updates the https://www.meethue.com/api/nupnp entry to a new private IP. It seems as though this is Google Assistant's primary reference. The commands stop working.

I can't find any results on registering virtual devices to the /nupnp endpoint. Seems like that would be a requirement to support Google Assistant going forward.

I'll just use IFTTT until then...

Also, messing with the IPs totally confused Google Wifi's home control. I couldn't see the old bridge record while nupnp was misconfigured, so I couldn't even remove the old record.

rwoolf commented 7 years ago

I have tried using every old apk version but when I select Philip hue it always takes me to hue-adapter.appspot.com. Has google made it so that even old apks will no longer work?

I can find no way for GH to directly look for my ha-bridge

bwssytems commented 7 years ago

I'm not sure what to do about this as I cannot control what Google does....

harolds commented 7 years ago

@brandoncorry got any further with your tries to make a work-around?

ghost commented 7 years ago

I updated my hue bridge and bulbs. Now unfortunately, when I try to add Philips Hue devices the google home app just redirects me to the Hue login page to authorize access. I just wanted to mention this here.

phantomfsoc commented 7 years ago

I got it working by using a jailbroken iPad. I used APPCAKE to download an old version of Google home and that worked to discover HA-BRIDGE.

msh100 commented 7 years ago

@phantomfsoc which version did you use?

phantomfsoc commented 7 years ago

It was 1.20.*** (not sure of last digits right now, I can check later if need be)

Matt8119 commented 7 years ago

im not sure why the platform android/iOS would matter much in pairing the ha-bridge to the google home... "the oldest version of the apk for the google home app is 1.19.26. you might try that version

msh100 commented 7 years ago

I happen to have an jailbroken iPad around and @phantomfsoc's suggestion also works here. Version 1.20.904. I have more testing to do but it looks positive.

Thanks @phantomfsoc

darnold64 commented 7 years ago

The fact that the Google Home app can no longer discover the Ha-Bridge should be included in the read me file as well as the description. I have wasted a lot of time getting this set up only to learn that it no longer works (or it does but you apparently have to have an old version of the app on an android device...unfortunately I have neither).

bwssytems commented 7 years ago

Sounds like Google has made life harder, I will put in a note that it does not work anymore.

darnold64 commented 7 years ago

In the end I did mange to get it to work. I had to borrow a friends android phone and download an older version of the Google Home app. This allowed it to pair with the ha-bridge. Once it works it is brilliant. I have it fully integrated with, ironically, Philips Dynalite lighting control system through their Ethernet bridge.

emarton77 commented 7 years ago

I just tried 1.19.26 but still can't get Google Home to pair with ha-bridge. Can this be fixed from the ha-bridge side ? Or do you recommend any other option to work with OpenHab 1 ? Thank you

volcan96 commented 7 years ago

Steps I followed to get this to work (latest Google Home FW w/ multiuser support borked my HABridge connection). Note that these steps are for android and will force you to re-initialize Google Home and re-setup rooms/devices on the Google Home

On Sat, Apr 22, 2017 at 9:45 AM emarton77 notifications@github.com wrote:

I just tried 1.19.26 but still can't get Google Home to pair with ha-bridge. Can this be fixed from the ha-bridge side ? Or do you recommend any other option to work with OpenHab 1 ? Thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bwssytems/ha-bridge/issues/572#issuecomment-296385984, or mute the thread https://github.com/notifications/unsubscribe-auth/AT7TRv-9CEvk7NUI-5SdlZSvO7C4zGWXks5ryi6rgaJpZM4MsyWz .

emarton77 commented 7 years ago

@volcan96 Thank you for the steps, however I found what the problem was on my side.

I run OpenHab, Mosquitto, Java 8 and Ha-Bridge on my Synology 213+ (DSM 6.x) which by default does run nginx on port 80. Apparently it's not enough to have the /api/ redirected to the HA-Bridge port, you need HA-Bridge running on port 80 to get it to pair. Here is how i paired Google Home with HA-Bridge. (didn't have to reset anything) After that I moved HA-Bridge to a different port: 8082 and works fine.

  1. Uninstalled Google Home app from android
  2. Downloaded version 1.20.9 using the link above and installed it (probably it will work with other versions to)
  3. Stop HA-Bridge if it's running
  4. Disabled nginx on Synology: synoservicecfg --hard-stop nginx
  5. Start HA-Bridge: java -jar -Dserver.port=80 -Dserver.ip=x.x.x.x ha-bridge-4.5.0.jar
  6. Start Google Home app > Home Control > Philips Hue. It will still go to hue-adapter.appspot.com, just leave it to fail.
  7. Go back to Google Home app > Home Control, the devices from HA-Bridge will show up there, assign them to rooms and you are done.
  8. Stop HA-Bridge
  9. Create a file for HA-Bridge /api/ redirect: /etc/nginx/conf.d/www.ha-bridge.conf
    location /api/ {
        proxy_pass http://x.x.x.x:8082/api/;
    }
  10. Start nginx back up: synoservicecfg --hard-start nginx
  11. Start HA-Bridge up: nohup java -jar -Dserver.port=8082 -Dserver.ip=x.x.x.x ha-bridge-4.5.0.jar &
  12. Test HA-Bridge access through: http://x.x.x.x/api/devices This should list all the device you have in HA-Bridge
jenskastensson commented 7 years ago

When I first received the GH unit I had the original pairing issue reported by @Ram0909. So I the tried to pair with another older Android with app v1.20 - and it worked as described. After this first "v1.20 pairing" I have tried 20+ times to reproduce the issue with v1.22.25.7 :

(I'm unable to pair with the iOS app though). I will receive a second unit and try to reproduce these steps.

ashug987 commented 7 years ago

I am running into the issue where I am unable to pair the Google Home with HA. Any other update on this topic?

Matt8119 commented 7 years ago

Try using the earliest version of the APK "1.19.xx to connect it to the HA. I've used that version countless times without issues...

ashug987 commented 7 years ago

I tried using the 1.19.29 and 1.19.26, but the same issue. It's unable to find the HA device and failing with the following issue: "Couldn't fidn Hue Bridge"

I tried with various HA version (including the latest one). Which HA version did you use? Did you recently used it after unpairing?

volcan96 commented 7 years ago

Have you tried pairing via this method: https://github.com/bwssytems/ha-bridge/issues/626

ashug987 commented 7 years ago

Not yet. Let me try that. I will report back

ashug987 commented 7 years ago

I have tried paring via the method: #626 (it took a while for me to setup, hence got delayed), but I am running into the same issues. Its not finding the Hue Bridge. Any other pointers?

volcan96 commented 7 years ago

If you are trying the remix os image have you tried different network settings like nat vs bridge? Probably good idea ro also report on that thread as well since thats remix specific. On Tue, Jun 13, 2017 at 11:07 ashug987 notifications@github.com wrote:

I have tried paring via the method: #626 https://github.com/bwssytems/ha-bridge/issues/626 (it took a while for me to setup, hence got delayed), but I am running into the same issues. Its not finding the Hue Bridge. Any other pointers?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/bwssytems/ha-bridge/issues/572#issuecomment-308200912, or mute the thread https://github.com/notifications/unsubscribe-auth/AT7TRqV8aVboQqBqo4Gq3joE_n7V9dfoks5sDs_lgaJpZM4MsyWz .

ashug987 commented 7 years ago

Yes I have tried to use the bridge, as the NAT as assigning the differnet gateway. I was able to get the IP of the remix OS in the same range and was able to ping the RemixOS from the native OS. However the HA Bridge wasn't detected.

One thing however I have observed that it wasn't able to detect other devices on the network as well (such as chromecast etc.)

harolds commented 7 years ago

As long as you are not able to ping other devices in the same network the pairing will not work ofcause. Could it be that a firewall on your PC is blocking outgoing packages? You can also try if switching to bridged mode on the network interface in VirtualBox helps.

ashug987 commented 7 years ago

I am able to ping the Google Home and other Chromecast on the network and also tried with both NAT and Bridge mode, but no luck identifying the device on the network. I have just posted the same on the other thread as well. Let me know if there is anything else I can try.

harolds commented 7 years ago

Are you running HA bridge on port 80 and can you open it from within the virtual android device?

ashug987 commented 7 years ago

Yes, I am running the HA bridge on port 80 and open it in chrome within the virtual android device without any issue. I can also ping the IP of Google home.

But unfortunetly I the Google Home app is unable to identify any device. Is there a way to configure the wifi in there? My host OS is on desktop with the hard wired connection and no wifi.

harolds commented 7 years ago

No wifi needed because it uses the normal network to connect. Did you connect the Home to your account in the Home app on your phone? If you want I can see if I can help by using remote desktop (TeamViewer).

ashug987 commented 7 years ago

Thank you so much for offering to help. I am in IST timezone and able to meet in ~45 minutes. Does that work for you. Otherwise please let me know what would be good time to meet up. I can setup Teamviewer.

ashug987 commented 7 years ago

B/w yes I did connect the home to my account int he Home app on my physical android phone.

laurence7 commented 7 years ago

I am a bit late to this thread only having just encountered the problem. I tried the method documented by Volcan96 with the older app and after some mucking around I can get GH to see the devices attached to HABridge. But after I plug the Hue Bridge I can't get GM to see the real Hue devices. No problems with the Echo seeing them or for that matter the Hue app on the same device GH is running. How do you get GH to see the real Hue bridge?

gol10dr commented 7 years ago

I got this working without any odd workarounds or running an old build of Home. I did this yesterday through Android on the latest build of Home 1.24.37.4

As many of you had, I tried everything but the app seemed to always to to the myhue site and make me log in... Here is what I did:

1) remove all pairing from Home.. remove bulbs unlink.. 2) Make sure your philips hue hub is disconnected from your network. 3) Start the link process for adding a new device, pick Philips Hue 4) Now when it loads, it goes to the appspot site and does indeed locate your HA Bridge.

I am only getting my devices from HA Bridge and not my other hue devices that are attached to my actual hue hub even though I am specifying the static ip of my hub in HA Bridge.

The best part of getting Google home to work is now the HA Bridge works from anywhere. Since Google Home talks to a specific device, using Google Assistant will let me control my switches from anywhere. I develop apps for both Home and Echo so let me know if you have issues. I have to say that the Echo rocks for discovery over Home.

robertw commented 7 years ago

Yes it pairs just fine as long as you only use one account when you try to add another user through googlehome it will not allow you to add the second

laurence7 commented 7 years ago

Interestingly the phone updated my GH to the latest release but it still works with HABridge. But still no connecting to my existing Hue bulbs. Then I added two more Hue bulbs and for some reason GH sees them with the room name I assigned via the Hue app (the name is lounge which is a room with two lights). But while I can ask GH to turn them on and off, nothing happens. But the Dot controls them fine.

I just bought another Dot for HA and will use GH for information and music. As noted earlier, the Dot rocks for automation and Google has to do more work in this area to catch up.

hamishegg commented 5 years ago

In the end I did mange to get it to work. I had to borrow a friends android phone and download an older version of the Google Home app. This allowed it to pair with the ha-bridge. Once it works it is brilliant. I have it fully integrated with, ironically, Philips Dynalite lighting control system through their Ethernet bridge.

would love to know how to integrate with dynalite and ethernet bridge,

any info anyone can supply