Alexa and Hue Emulation - No devices discovered

Hello @alexander_romanov_pv

It seems to me that there must have been either a change in the Echo firmware or I don’t know what happened.

A couple of days ago I cleared my smart home devices in the Alexa app, since I wanted to do a fresh include after changing my device names.

And what happened? Same as with you - no devices are discovered by the Echo Dot. The Echo, however, discovers devices but what it discovers is not usable as it always says that there seems to be a network connection issue and the devices do not respond.

@kai - So basically, Alexa is currently not usable with my OpenHAB. Is somebody maintaining the binding? On Github there was no clear maintainer to see for me and the issue was never really address in the issue tracker. It would really be a big step, if somebody with enough knowledge could take over the maintenance of the Hue Binding, so that OpenHAB can be used with Alexa reliably, as it is one of THE killer features for me and many of my friends using OpenHAB (or not and sticking to Hue or similar stuff). Is there any chance somebody could take this over to active maintenance?

Nevermind - I realized that the Hue Emulation must have been updated recently and my OpenHAB build from mid-February then seemed to be the cause of issues. After searching for the issue more than half a day, it turned that with the most recent version of OpenHAB all is working (beside some weird value out of range bug but I describe that in another thread).

I must admit that I used to stay on a build, if all worked and marked the package as “hold” in Debian, since I don’t want every-day updates. But obviously, keeping a build a couple of weeks can cause issues, too. :thinking:

@antares2001 What build are you on? I am experiencing the same issue after updating recently. Everything worked perfectly for a year and now Alexa cannot discover any devices. Tried clearing temp files / cache / items / things and forgetting everything from the alexa webapp. Rebooted all my 3 echo dot devices. I see many lines like this in the log:

2018-03-29 17:08:45.779 [DEBUG] [ulation.internal.HueEmulationServlet] - 10.42.0.176: GET /api/description.xml
2018-03-29 17:08:45.979 [DEBUG] [ulation.internal.HueEmulationServlet] - 10.42.0.176: GET /api/gCSKapNhfin535TWWVtFzwbpErHcw6qWHWt5Q3sU/lights
2018-03-29 17:08:46.000 [DEBUG] [ulation.internal.HueEmulationServlet] - 10.42.0.176: GET /api/gCSKapNhfin535TWWVtFzwbpErHcw6qWHWt5Q3sU/lights

Those are coming from the IPs of my echo devices during discovery. Anyone else seeing this with a recent build? I’m running 2.3.0 snapshot 1243 on a pi.

Hi @anthonygillet

I spent almost an entire day of my vacation just messing around with Hue Emulation and the Alexa. Did all what you did and got those same log messages. I cleared all in /var/lib/openhab… that had hue in its name (for i in $(find . -name "*hue*"); do rm -rf $i; done), uninstalled the binding before that, reinstalled it afterwards, …

In the end the thing that worked was - uninstall the Hue Binding (I used that to check the Hue Emulation), the Hue Emulation, delete all from /var/lib and the hueemuletion.service in /etc/openhab2, removed all [ “Lighting/Switchable” ] tags in my .items files, then upgraded to OpenHAB 2.3.0~20180329135911-1 (the latest nightly at that moment) and then installed Hue Emulation and Hue Binding and BAM - all out of a sudden after I added one lamp as [ “Lighting” ] it was discovered by Hue Emulation AND by Alexa.

Therefore I discovered that my rules are now not working since it seems in the lambdas there was a change from the “[” to “(” brackets, i.e., it now looks like this:

var lastItem = gAll.allMembers.findFirst(item|item.name.equals(itemName))

I’ve actually faced a couple of issues with that nightly versions where it seems there have been some breaking changes compared to my mid-February version I used before.

Biggest mess to me is, that though I expect a lot of people are on nightly builds, these important changes are not communicated properly or at all. That I have to use () instead of [] brackets is what I only discovered by chance. I didn’t understand why the log gave me errors in my rules where these lines were in and I just by accident re-typed it with () brackets instead of [] and discovered that worked. @Kai such stuff could perhaps be stated somewhere easy to see and prominent on the forum homepage? :thinking:

Hope this helps you solve your issues. Keep me posted.

1 Like

Have the same Problem - no alexa items found since upgrade to latest nightly. Google Assistant works fine.

I did somehow get everything working a few days later after a combination of clearing all things and items from the console, deleting tmp and cache, deleting hueemulation directory, reinstalling binding, and rebooting every echo dot and wireless AP/router on my network. Of course removing all items blew away my HomeKit configuration for all my items as well, which takes hours to recreate. I have no idea which one of these things, if any, fixed the issue, or if I just perturbed it out of existence.

@antares2001 I totally agree that we need a place where breaking changes are documented. I ran into the same issue with my rules with the format of forEach statements and just had to guess why things stopped working. Maybe a sticky post that gets a new comment when things like this happen?

Running openHAB 2.3.0~20180411031027-1 (Build #1254) - could not solve the problem - disabled huebinding, hueemulation and deleted cache, hueemulation and tmp folders. After reboot added huebinding and hueemulation. A scan for devices in the alexa app still doesn’t find results.
Can anybody help?

1 Like

any update on what fixes this issue? I am about to nuke everything to try to get to a stable state, but that is hours of work. Wife is frustrated with things that are no longer working.

1 Like

@alfista2600 - I know that “wife is frustrated” very well. In my case it was always best to freshly set up things, as she “saw action” and did not complain in the meantime :slight_smile:

Sorry I can’t help more but morally. Only thing that helped me is described in my thread above.

1 Like

Hi there, I’m reletively new in the topic of openhab, and so far I’m in the process of getting everything running for a while and then, when everthing works(alexa, hue, mysensors, mqtt, tasmota) putting a clean new installation into operation. Right now I am stuck right here. With the openhab cloud, everything works immediately, but I do not want to supply these, besides Alexa with my data …
The funny thing is: In the Alexa web interface on alexa.amazon.de I find the devices, but in the APP where they can then be managed, no chance.

I am on version 2.3.0 and the next step would be again a blank installation, if not in the meantime someone has a solution for the problem?

If anybody should be interested in it, or even face the problem. It is up to you to decide which profile you have selected in the echo … The Hue lights connect only with one profile, one changes on the echo to the other profile says the echo that he is the lamp, outlet, whatever the name … does not know.

Just thought I’d post this as I had a break through last night which may help others. If like me you are not as comfortable manipulating text item files via terminal, there is now an alternative.
Lastest version of Openhabianpi installs a package called Home Builder. This is a web interface tool that basically allows you to define your items, and automatically writes either new item text files for you, or writes them to the paper interfaces internal database. Crucially Home Building allows you to also add Tags in the item configuration, which is what Alexa and hue emulation depend on to work.
Once I created the items via this technique hue emulation and Alexa both worked first time.
Granted I did have to start afresh with clean install of openhabianpi but now it all works!
Items can also be renamed, deleted etc from Paper UI after initial creation in Home Builder.

Hey Everyone,

I have been struggling with HUE Emulation and here’s what fixed it.

It finally worked when I asked Echo (the tower size unit) to discover vs. the Echo Dot. This took me over 3+ hours to figure out what I was doing wrong, hggg . . .

Echo = v2 (found 37 devices)
Echo Dot = v2 (didn’t find anything)

Hope this helps someone else.

Best, Jay

I have the same problem finding the items through Alexa:
Alexa does find just one switch:

Dimmer DenonVolume       	"Verstärker [%.1f]"		(G_Numbers,G_WoZi)	["Lighting"]		{denon="avr2000#MV"}

I have tagged my items correctly and with DEBUG on org.openhab.io.hueemulation I get them correctly shown in the log:

2018-12-27 11:53:04.388 [DEBUG] [org.openhab.io.hueemulation         ] - ServiceEvent MODIFIED - {org.openhab.io.hueemulation.internal.HueEmulationService}={service.id=478, service.bundleid=251, service.scope=bundle, restrictToTagsWhiteLights=Lighting, component.name=org.openhab.io.hueemulation.internal.HueEmulationService, service.config.label=Hue Emulation, component.id=303, createNewUserOnEveryEndpoint=true, restrictToTagsSwitches=Switchable, restrictToTagsColorLights=ColorLighting, pairingTimeout=60, pairingEnabled=true, service.config.category=io, discoveryIp=192.168.178.50, service.config.description.uri=io:hueemulation, service.pid=org.openhab.hueemulation} - org.openhab.io.hueemulation
2018-12-27 11:54:04.274 [DEBUG] [.io.hueemulation.internal.LightItems] - Added items: Licht, Alles, Echo Dot, Kaffeemaschine, Ranzen, Verstärker
2018-12-27 11:54:04.284 [INFO ] [eemulation.internal.ConfigManagement] - Hue Emulation pairing disabled. Service available under /api

Thanks for sharing, guys, but the web interface did not help and I don’t have a large tower alexa.

I recently went through this fun. I don’t have a lot of extra cycles to dig out the related threads, but the Hue Emulation binding was “rewritten”.

If you are only getting Lighting tagged items, there is a workaround of adding the Switchable flag to the White Items config line. Note the CASE and the no space “Lighting,Switchable”.

Note that the NEXT step will remove devices from your Routines if you have any defined in Alexa Smart Home.

Then using the Alexa website (alexa.amazon.com), make sure you’re logged into the correct profile if you have two or more. Navigate to Smart Home -> Devices. Scroll all the way to the bottom and select [Forget all Devices].

Enable the Device Paring slider in Paper UI. And Ask Alexa to “Discover My Devices”
image

With the added Switchable flag, OH2 should serve up the devices to Alexa.

Good Luck!

Thanks a lot Tony!
I will give it a try!

1 Like

That’s awesome!
Thank you very much!

I can discover the items - I did not try to switch them, but I assume that would be working properly.
Otherwise… I will be back :wink:

1 Like

I guess there is no chance to make it work with Rollershutter items? :frowning:

Hello,
same problem here after upgrade to version 2.4.
I have rediscovered devices in Alexa App.
All light devices where successfully discovered, but all ROLLERSHUTTER devices are no longer found.

When I check exposed devices via http://OPENHABIP:8080/api/testuser/lights?debug=true all Rollershutter devices are missing.

example from KNX.items:
Rollershutter Rollo_EG_Flur “Rollo Flur [%d %%]” (Rollos_EG, Rollos) [ “Switchable” ] { channel=“knx:device:knxiprtr:75310002_1:Ch_115” }

When I change switchable => Lighting nothing changes in the mentioned testurl / Alexa App discovery

Is this a normal behaviour that Rollershutter devices are no longer available ?