Alexa and Hue Emulation - No devices discovered

Well, I have a similar problem but not quite the same.
I have two echo dots, I also ordered one of them during the cyber Monday week.

I am using openhab 2.2 (openhabian) and set up hue emulation some time ago. But at this time I already had both echos.

Hue emulation was working perfectly since then. It still works like a charm (without errors) but I added a new switch item yesterday which Alexa just doesn’t want to discover… May this be related to your problem?

Item definition:

Switch Wohnzimmer_PC "Fernseher" <screen> (Wohnzimmer, Steckdosen) ["Switchable"]

I tried to reinstall the hue emulation binding and tried discover while being in pairing mode again, but it didn’t work.
I don’t want to delete all devices because I fear that will also be not found anymore.

Edit: FIXED IT :slight_smile:
I had set up the LAN port of the Raspberry Pi (connected to network via wifi) as a wake on lan source for my wifi connected PC.
I had to specify the wifi-interface ip address in the hue emulation configuration. Now it’s working as expected again.

Same here for Echo Spot. it working now after forwarding port 80 to 8080 by iptable and config the discovery port to 80 under openhab hue emulation services.

i checked out the related issues.

According to http://www.burgestrand.se/hue-api/api/lights/, this is not allowed in the Hue API. If I change the code in HueEmulationServlet.java (line 481) to return 254 instead, alexa no longer complains when items are switched on.

May i know where and how to change the code to get rid of the error message?

Do you have issues with TargetTemperature tagged devices?
I have no issues with Lighting or Switchable items, but TargetTemperature items are not discovered by Alexa :frowning:

Item definition:

Number Test_Temperatur "Temperatur Küche [%.1f °C]" <temperature> (Temperatur) [ "TargetTemperature" ] {channel="mysensors:temperature:e50852a4:temp"}

This could be the reason:

@digitaldan Is this true?

In former times it was:

private static final String[] SUPPORTED_TAGS = new String[] { "Switchable", "Lighting", "TargetTemperature" };

Hi All :slight_smile:

Went and bought the Amazon Echo (2nd Gen AU region) yesterday. Initial setup of it was flawless, however I am pulling my hair out now trying to integrate it with the openHAB. Due to lack of Alexa skill in AU region, I’ve gone down the road of HueEmulation…

  • Openhab version 2.2 runs on port 8080
  • Hue Emulation 2.2.0 (discovery web port set to 80 and port forward is setup with iptables 80 ==> 8080
    one switch was tagged as “Switchable” and I can see it in /api/discovery.xml
{"lights":{"1":{"state":{"on":false,"bri":-1,"hue":0,"sat":0,"xy":[0.0,0.0],"ct":500,"alert":"none","effect":"none","colormode":"ct","reachable":true},"type":"Dimmable Light","name":"Kitchen Switch","modelid":"LWB004","uniqueid":"1","manufacturername":"openHAB","swversion":"66009461","pointsymbol":{"1":"none","2":"none","3":"none","4":"none","5":"none","6":"none","7":"none","8":"none"}}}}
  • Amazon Echo is setup on the same subnet as openhab (10.100.100.0/24)
  • UPnP is enabled on the router (torrent works :slight_smile: )
  • debug log shows nothing… no attempts from the Echo to pull /api/description.xml or /api/discovery.xml

Any ideas would be greatly appreciated :slight_smile:

Thanks
Alex.

Here is a good thread. There is a section that I posted with the steps. If I had to guess your item is not defined properly, or the Device Pairing is not enabled. The HE Binding simply works.

I’ll keep an eye on this thread to try and help further.

Cheers!

Tony

@Toneus Hi Tony, which thread are you referring to?

Oh gawd!.. starting to think that I got a faulty Amazon Echo device… or Amazon changed something in their firmware as it got updated this morning… just banging my head against the wall and not getting anywhere… :frowning:

The Echo devices will say no devices discovered if there are no NEW devices as well. Have you used the Alexa app to confirm that no Devices have been found?

What I did to solve my problems was to go on the website https://alexa.amazon.com and there under Smart Home deleted all devices as bulk. Then a new search discovered by devices and things worked well.

1 Like

Hello all,

I have another question regarding Hue Emulation and Alexa: what will happen if I have Hue Emulation running on OpenHAB and a real Hue Bridge in my house. Will they interfere or will Alexa just happily discover both and serve devices on both devices?

This is a fresh install and no devices ever been used/found in the past. I’ve double checked in the Alexa app on the phone as well as in web browser http://alexa.amazon.com.au/

What is the reason that you are port forwarding? Not required on an open network. Can you leave the port undefined and let the discovery happen normally?

As we’ve mentioned before, and I believe you have done, make sure Pairing Enabled is set to True.

Have you done a Port Scan on your own network?

No, I have not done the port scan…
Yes, pairing is set to “true” in PaperUI.

I’ve read in some previous threads that Amazon Echo (Gen2) will look for port 80… hence the redirect from 80 to 8080 where openhab lives.

Below is the log after asking Alexa to do the discovery… ( openhab - 10.100.100.80; Amazon Echo (Gen2) - 10.100.100.58). Mind you it only happens ONCE after the restart of the device. Any subsequent scan for new devices does NOT produce the log entry.

2018-03-22 13:05:23.594 [TRACE] [tion.internal.HueEmulationUpnpServer] - Got SSDP Discovery packet from 10.100.100.58:50000
34637 2018-03-22 13:05:23.600 [TRACE] [tion.internal.HueEmulationUpnpServer] - Sending to 10.100.100.58 : HTTP/1.1 200 OK^M
34638 HOST: 239.255.255.250:1900^M
34639 EXT:^M
34640 CACHE-CONTROL: max-age=100^M
34641 LOCATION: http://10.100.100.80:8080/api/description.xml^M
34642 SERVER: FreeRTOS/7.4.2, UPnP/1.0, IpBridge/1.15.0^M
34643 hue-bridgeid: 4932545A50FA^M
34644 ST: upnp:rootdevice^M
34645 USN: uuid:b21d73d0-0c31-40d8-90dc-4932545a50fa::upnp:rootdevice^M
34646 ^M
34647
34648 2018-03-22 13:05:23.610 [TRACE] [tion.internal.HueEmulationUpnpServer] - Sending to 10.100.100.58 : HTTP/1.1 200 OK^M
34649 HOST: 239.255.255.250:1900^M
34650 EXT:^M
34651 CACHE-CONTROL: max-age=100^M
34652 LOCATION: http://10.100.100.80:8080/api/description.xml^M
34653 SERVER: FreeRTOS/7.4.2, UPnP/1.0, IpBridge/1.15.0^M
34654 hue-bridgeid: 4932545A50FA^M
34655 ST: urn:schemas-upnp-org:device:basic:1^M
34656 USN: uuid:b21d73d0-0c31-40d8-90dc-4932545a50fa::upnp:rootdevice^M
34657 ^M
34658
34659 2018-03-22 13:05:23.616 [TRACE] [tion.internal.HueEmulationUpnpServer] - Sending to 10.100.100.58 : HTTP/1.1 200 OK^M
34660 HOST: 239.255.255.250:1900^M
34661 EXT:^M
34662 CACHE-CONTROL: max-age=100^M
34663 LOCATION: http://10.100.100.80:8080/api/description.xml^M
34664 SERVER: FreeRTOS/7.4.2, UPnP/1.0, IpBridge/1.15.0^M
34665 hue-bridgeid: 4932545A50FA^M
34666 ST: uuid:b21d73d0-0c31-40d8-90dc-4932545a50fa^M
34667 USN: uuid:b21d73d0-0c31-40d8-90dc-4932545a50fa::upnp:rootdevice^M

So I guess there IS something wrong with my openhab config.

http://10.100.100.80:8080/api/description.xml looks like this:

<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://10.100.100.80:8080/</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
<friendlyName>openHAB Hue Emulation</friendlyName>
<manufacturer>Royal Philips Electronics</manufacturer>
<manufacturerURL>http://www.philips.com</manufacturerURL>
<modelDescription>Philips hue Personal Wireless Lighting</modelDescription>
<modelName>Philips hue bridge 2015</modelName>
<modelNumber>929000226503</modelNumber>
<modelURL>http://www.meethue.com</modelURL>
<serialNumber>0017880ae670</serialNumber>
<UDN>uuid:b21d73d0-0c31-40d8-90dc-4932545a50fa</UDN>
<serviceList>
<service>
<serviceType>(null)</serviceType>
<serviceId>(null)</serviceId>
<controlURL>(null)</controlURL>
<eventSubURL>(null)</eventSubURL>
<SCPDURL>(null)</SCPDURL>
</service>
</serviceList>
<presentationURL>index.html</presentationURL>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<height>48</height>
<width>48</width>
<depth>24</depth>
<url>hue_logo_0.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<height>120</height>
<width>120</width>
<depth>24</depth>
<url>hue_logo_3.png</url>
</icon>
</iconList>
</device>
</root>

And the http://10.100.100.80:8080/api/discovery.xml looks like this:

{"lights":{"1":{"state":{"on":false,"bri":-1,"hue":0,"sat":0,"xy":[0.0,0.0],"ct":500,"alert":"none","effect":"none","colormode":"ct","reachable":true},"type":"Dimmable Light","name":"Kitchen Switch","modelid":"LWB004","uniqueid":"1","manufacturername":"openHAB","swversion":"66009461","pointsymbol":{"1":"none","2":"none","3":"none","4":"none","5":"none","6":"none","7":"none","8":"none"}}}}

Any ideas for the next step please???

Thanks
Alex.

If you actually have a real Hue hub, you must unplug it during the discovery process. Once things are discovered by the Hue emulation, you can plug the hub back in.

Already done that with no success…

“eye of newt, toe of frog” territory…

1 Like

Did you ever manage to resolve the problem?

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: