Hue-emulation: Alexa doesn't detect devices?

Hi there,

I’m trying to re-add my Switches in Alexa using hue-emulation since I have change the server/config of OpenHab (2.4).

This is what I’m doing:

  • Enable hue-emulation
  • Set discovery address to my Openhab IP
  • Change OpenHab Port from 8080 to 80 (Docker)
  • Enable Pairing
  • Alexa Android App: Try to discover Hue Bridge V1 devices

Unfortunately nothing is discovered. If I use hue-essentials and connect to my openhab IP, it discovers all the devices.

In the logs I seem to get an error as well:

2019-03-09 18:27:31.503 [ERROR] [         ] - bundle (247)[] : The modified method has thrown an exception
java.lang.NullPointerException: null
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke( ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:?]
	at java.lang.reflect.Method.invoke( ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod( ~[39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500( ~[39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke( ~[39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.modify( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent( [39:org.apache.felix.scr:2.1.2]
	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent( [39:org.apache.felix.scr:2.1.2]
	at$FireConfigurationEvent.sendEvent( [9:org.apache.felix.configadmin:1.9.4]
	at$ [9:org.apache.felix.configadmin:1.9.4]
	at$ [9:org.apache.felix.configadmin:1.9.4]
	at$ [9:org.apache.felix.configadmin:1.9.4]
	at Method) ~[?:?]
	at [9:org.apache.felix.configadmin:1.9.4]
	at [9:org.apache.felix.configadmin:1.9.4]
	at [?:?]

Can anyone tell me what I’m doing wrong?

Hue emulation does not work in docker containers where IP interfaces do not have a mac address assigned.

That was fixed with oh 2.5m1 (or snapshots not sure).

Thanks @David_Graeff I’ve switched to 2.5m1 but it doesn’t seem to work.
The two files (description and api/) are there.

description.xml contains: URLBase: which is the internal docker IP

Should this be different?

Do you still experience the error in the log file? That should be gone now. If your “description.xml” and /api works, it is actually the Echos fault. A lot of people struggle with the current Amazon implementation, including me. You need to remove all devices from your Echo (best is to hard reset it even) to make it discover the bridge.

Have a look at the troubleshoot section of the hue emulation doc. Check the debug page if your devices are really exposed.

No error anymore.

Hmm… what settings are you using in the service config? Do I need to enable the Alexa fix and IP/Port?

The port is required if you use a reverse proxy. If you start openHAB on port 80 it is not required.

If you start a hard-reseted / newly installed / just unboxed Echo discovery process, then no. But most of the time yes.

I’ve removed all Hue devices, and did as above, but it doesn’t work :frowning:
I’m not sure if I should really reset the Echo - does this just affect the echo or also my skills or training data?

It sometimes works without a full Echo reset. You need to try the discovery by asking multiple different Echos, use the webpage and use the App as well. Apparently they all perform the discovery in a slightly different way, it also seem to depend on the firmware version.

Is this definitely resolved?

Running 2.5.0.M1 on docker and I can get everything except HUE/Alexa bridge working now.
I have a spent plenty time getting this far…

There is one remaining pull request that need to be merged because Alexa sends incorrect requests. Apart from that it works, yes.

Ok - will try again.
I’m running 2.5.0.M1 in docker on port 8888 - am I missing a critical change?
My network is host mode - but do I maybe have to force port 80 (or 8300?) requests at 8888?

Thanks for any suggestions

Most Alexa Echo firmwares are happier with port 80, sometimes it works on other ports but that’s not guaranteed.

Even without the patch Alexa should find devices. It just cannot command them.

Thanks David,

If I keep struggling, will have a go at using the Alexa Openhab cloud skill instead.

Thanks for your assistance

If you are familiar with AWS I’d recommend to install your own OH skill instance (find that in the openhab alexa repository). Openhab Cloud is not known for its stability at peak times.

Oh dear, that’s a nuisance :slight_smile:
It’s a long downward spiral . . .what started with a quick migration to Docker has become a re-write for Alexa integration and a vitis to AWS.

I would not say so. The latest issues are more likely due to the huge increase of users and a onetime outage of one of our app servers.

1 Like