Hue Emulation - Discovery problem

I’m using OpenHAB 2.4 inside a docker with network_mode: host, and I’ve installed the Hue Emulation addon via PaperUI. I’ve configured it so it announced itself on port 80 via PaperUI - Configuration -> System -> IO -> Hue Emulation -> Optional Discovery Web Port = 80.

My OpenHAB itself is running on port 8484, whilst I have Apache running on port 80. So in the main http: //openhabip/ I have set up mod_rewrite to reverse proxy the requests for /description.xml and /api/* to http: //openhabapi:8484/ for the equivalent url.

Then I went to Google Home app on my android phone and tried to add / link “Philips Hue”, and that’s where I got stuck. Google Home brought me to meethue.com web site where I had to create an account. Then when it presented the option to link a bridge, it couldn’t find any bridges.

I tried downloading the “Philip Hue” App onto Android. It managed to find the bridge, but it then got stuck in “Create a room” screen and will not proceed until I created a room. Creating a room failed. This is what’s in the apache access log (with the ip addresses removed):

“GET /api/f070de4e-dcdd-436c-aa07-06e766f5a281/config HTTP/1.1” 200 1021 “-” “-”
“POST /api/f070de4e-dcdd-436c-aa07-06e766f5a281/groups HTTP/1.1” 200 22 “-” “-”
“POST /api/f070de4e-dcdd-436c-aa07-06e766f5a281/scenes HTTP/1.1” 404 122 “-” “-”
“POST /api/f070de4e-dcdd-436c-aa07-06e766f5a281/scenes HTTP/1.1” 404 122 “-” “-”
“POST /api/f070de4e-dcdd-436c-aa07-06e766f5a281/scenes HTTP/1.1” 404 122 “-” “-”
“DELETE /api/f070de4e-dcdd-436c-aa07-06e766f5a281/groups/1 HTTP/1.1” 404 124 “-”
“GET /api/f070de4e-dcdd-436c-aa07-06e766f5a281/config HTTP/1.1” 200 1021 “-” “-”

So how can I proceed with this? What am I doing wrong? I suspect it’s something to do with upnp and docker.

The hue emulation in OH 2.4 does only support lights and a bit of groups nothing more.
The OH 2.5 variant supports everything else.

Regarding Google Home: You must force Google Home to connect to the bridge via the local API. (Search the internet on how to archive that. The tl;dr: It’s a hack, Google does not want you to do that, but it works.)
The cloud API (aka meethue account) does not work and will never work as we are not affiliated with Philips.

Cheers, David

It seems that the “workaround” using an older googlehome apk used to work back in 2017, but now in 2019 no longer works? Or do I need to dig deeper?

I’m an Alexa user so can’t really help :confused: Would be very sweet if you can dig deeper and if you’ve found a solution I’ll add it to the service documentation.

At the moment I’m using myopenhab cloud to connect google home to openhab, but sometimes google home says “openhab is unreachable at the moment”. Usually when I have been tinkering with openhab config. A restart of openhab usually fixed it.