Amazon Echo - Alexa don't find any devices

Did it give you any errors?

I can get the error to go away by placing the item tag where you suggested (after the <>), but Echo is still not recognizing any devices. I have observed some very weird behavior though:

  • When the item tag is placed before the icon in the <> symbols, Echo recognizes the first item with this syntax, but none that come after it. This gives me an error in the Designer about the missing OEF.

  • When the item tag it placed after the <> symbols with the icon, Echo never recognizes the item.

  • I can temporarily discover multiple items by doing the following.

  • Put the item tag before the <>

  • Discover devices in the Alexa app

  • Put the item tag after the <>

  • Move the item tag before the <> on the next item

  • And repeat the same process

But this process only works for about 3 items when the app then says the devices are offline a.k.a not discovered any longer…

Yes, really weird, I have no clue about it …

I can only suggest to go through the three docs again step by step:

Official Alexa Smart Home Skill for openHAB 2 (first couple of posts)
http://docs.openhab.org/addons/io/openhabcloud/readme.html
http://docs.openhab.org/addons/io/homekit/readme.html

Very, very interesting. After browsing through the docs you suggested I read, I figure that I could try and enable the Hue Emulation service. After I did, all of my devices showed up (after I tagged them after the <> like you suggested.

Take away: Anyone having trouble with the Alexa binding, try installing the Hue Emulation service

Thank you for your suggestions @sihui

1 Like

@markee @Jensen @Max1968 @eddalexandre @KingVanilla

For all who did not find any device with Alexa (via Official Alexa Smart Home Skill), I have maybe a solution! See here: Link

Hope this helps!

Edit: updated new information! (21 July)

I am not sure if you are still having problems but I have only (just today!) got my Alexa integration to work, and thought I would share what worked for me in case it helps.

Initially, I was thinking it was a uPNP problem, but I eliminated all variables by downloading a vanilla openhabian on another flash card and running a vanilla install with a new connection to myopenhab.org and connecting that to alexa… ( luckily I have a second Pi, but you could do it on the same machine if you’re at a pinch). and just put the simplest .switch together: it was just

default.items

Switch testlight "testlight" <light> ["Lighting"]

this it magically started working - so something in my old Pi setup must’ve been causing the problem
(I am starting to think it was a Java problem - it was showing an error with the java version errors despite my trying to upgrade it shrug not going to now playing I’m simply replacing the old with the new - it works!).

Anyway… since the basic test worked with openhabian , I am now running that as my main setup - I just added each switch into the .items until they all worked, then copy|paste my old .sitemap and .rules. (yes, I had to fix my mosquitto server etc… but that was pretty vanilla too…)

anyway… I don’t know if it’ll help you but I’ve posted some excerpts from my setup so you can reference to - with the correct formatting and groups… (this is from a live-working system that does work so maybe you can use them for reference - just dump the mqtt stuff for your own command setup)

house.items

Group:Switch:OR(ON, OFF) AllLights "All Lights" ["Switchable"] //"Alexa, turn [on|off] all lights"
Group:Switch:OR(ON, OFF) Lounge "Lounge Lights" ["Switchable"] //"Alexa, turn [on|off] Lounge Lights"
Group:Switch:OR(ON, OFF) Kitchen "Kitchen Lights" (Kitchenunderbenchlight, KitchenSinkLight, KitchenBenchLight, KitchenTableLight) ["Switchable"] //"Alexa, Turn [on|off] kitchen lights"

Number OutsideTemp "Outside Temperature [%.1f °C]" ["CurrentTemperature"] { mqtt="<[mosquitto:house/outside/temperature:state:default]"}
Switch OutsideLight "Outside Light" <light> [ "Lighting" ] {mqtt=">[mosquitto:house/outside/lights:command:ON:ON],>[mosquitto:house/outside/lights:command:OFF:OFF], <mosquitto:house/outside/lights:state:default]"}

Switch LoungeBlinds "Blinds" <blinds> [ "Switchable" ] {mqtt=">[mosquitto:house/lounge/blinds:command:ON:OPEN],>[mosquitto:house/lounge/blinds:command:OFF:CLOSE], <[mosquitto:house/lounge/blinds:state:default]"}
Switch Kitchenunderbenchlight "Underbench Lights" <light> (Kitchen, AllLights) [ "Lighting" ] {mqtt=">[mosquitto:house/kitchen/underbenchLight:command:ON:ON], >[mosquitto:house/kitchen/underbenchLight:command:OFF:OFF], <[mosquitto:house/kitchen/underbenchLight:state:default]"}
[truncated for size...just more switch entries from here]

FWIW: for my testing , I recommend starting VERY basic (ie. one switch in the items file first and see if you can get that linking to alexa and expand from there). As you can see i use a lot of MQQT for all of my switching - as I have an a homebrew-arduino 12V setup here… hope it’s not too complicated to follow.

in regards to testing:
I would start from a blank .items file:

  1. add the switch entry in the .items
  2. tail -f /var/log/openhab2/openhab.log - and check to see if there are any errors.
  3. open paperui/configuration/services/openhabconnector/configure and make sure that the added switch was both visible and activated (ticked) then saved (should see an update in the log to openhab when you click save)
  4. wait a few seconds for that to link to myopenhab
  5. open alexa.amazon.com and discover. If it worked, I would see the new entry if it is all working.
  6. test: “Alexa, turn on [switch i just added]” if she says OK… start adding until they are all there!
    then repeat.

I found the difficulties were when I added them all at one go - and something wasn’t working in one of them, then none would work… so I did them SLLLLOOOWWLY, one-at-a-time - and now everything works… tedious but finally successful.

hope this helps someone in someway.
Mike
Melbourne, Australia

1 Like

I have the problem of Alexa not discovering devices from OpenHAB.
When looking at network packets, I don’t see any response from OH.
Meanwhile UPNP packets are seen by it.
Here is an excerpt from logs with debugging:

2017-08-15 12:08:24.166 [DEBUG] [upnp.transport.spi.MulticastReceiver] - UDP datagram received from: 192.168.1.161:50000 on local interface: Intel(R) Ethernet Connection (2) I219-V and address: 192.168.1.11
2017-08-15 12:08:24.166 [TRACE] [upnp.transport.spi.DatagramProcessor] - ===================================== DATAGRAM BEGIN ============================================
2017-08-15 12:08:24.166 [TRACE] [upnp.transport.spi.DatagramProcessor] - M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: 15
ST: urn:schemas-upnp-org:device:basic:1

2017-08-15 12:08:24.166 [TRACE] [upnp.transport.spi.DatagramProcessor] - -===================================== DATAGRAM END =============================================
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.protocol.ProtocolFactory  ] - Creating protocol for incoming asynchronous: (IncomingDatagramMessage) M-SEARCH
2017-08-15 12:08:24.166 [DEBUG] [org.jupnp.transport.Router          ] - Received asynchronous message: (IncomingDatagramMessage) M-SEARCH
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.model.message.UpnpHeaders ] - Parsing all HTTP headers for known UPnP headers: 4
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Trying to parse 'ST' with class: STAllHeader
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Invalid header value for tested type: STAllHeader - Invalid ST header value (not ALL): urn:schemas-upnp-org:device:basic:1
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Trying to parse 'ST' with class: RootDeviceHeader
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Invalid header value for tested type: RootDeviceHeader - Invalid root device NT header value: urn:schemas-upnp-org:device:basic:1
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Trying to parse 'ST' with class: UDADeviceTypeHeader
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.model.message.UpnpHeaders ] - Adding parsed header: (UDADeviceTypeHeader) 'urn:schemas-upnp-org:device:basic:1'
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Trying to parse 'HOST' with class: HostHeader
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.model.message.UpnpHeaders ] - Adding parsed header: (HostHeader) '239.255.255.250:1900'
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Trying to parse 'MX' with class: MXHeader
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.model.message.UpnpHeaders ] - Adding parsed header: (MXHeader) '15'
2017-08-15 12:08:24.166 [TRACE] [upnp.model.message.header.UpnpHeader] - Trying to parse 'MAN' with class: MANHeader
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.model.message.UpnpHeaders ] - Adding parsed header: (MANHeader) 'ssdp:discover'
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.transport.Router          ] - Trying to obtain lock with timeout milliseconds '6000': ReadLock
2017-08-15 12:08:24.166 [TRACE] [org.jupnp.transport.Router          ] - Acquired router lock: ReadLock
2017-08-15 12:08:24.199 [TRACE] [org.jupnp.transport.Router          ] - Releasing router lock: ReadLock
2017-08-15 12:08:24.199 [TRACE] [jupnp.protocol.async.ReceivingSearch] - Responding to device type search: urn:schemas-upnp-org:device:basic:1
2017-08-15 12:08:24.494 [TRACE] [org.jupnp.registry.Registry         ] - Maintaining registry...

I don’t see any answer from OH on each of Echo’s UPNP packets.
The local devices are configured, here are examples (the first one just for test):

Switch LivingRoomLight "Living Room Light" <light> [ "Lighting" ]

Switch egAmplifierPower "Amplifier" <amplifier> (gLivingRoom) [ "Switchable" ] {mqtt=">[mq:EG/Amp/1:command:ON:1],>[mq:EG/Amp/0:command:OFF:0]"}

How to troubleshoot the reason there is no reply on UPNP?
I use OpenHAB 2.2.0-SNAPSHOT.

I’ve just updated to 2.2 and now get error messages when discovering devices through Alexa. It worked with no problems before, did you figure it out?

I was under a wrong impression that UPNP should work when using Alexa Smart Home skill for OpenHAB.
Everything works correctly (the problem of not discovering devices was on Amazon side).
There are some limitations in the current version of OH skill (for example, payload v3 - entertainment devices - not supported), but what’s documented - works O.K.

May be useful to someone. Spent weeks in troubleshooting.
My Echo Plus was not discovering devices, Alexa was requesting /api/description.xml but after that nothing. Monitoring network traffic revealed that Alexa was switching to port 80 even if URLBase in description.xml was http://192.168.1.13:8080/.
The solution that worked for me was to configure nginx bypass the requests to /api to OH in case they are from local network:

server {
    listen                                    80;
    server_name                               my.server.com;
    location / {
        return 301                            https://$server_name$request_uri;
    }

    location /api {
        allow                                 192.168.1.0/24;
        proxy_pass                            http://localhost:8080/api;
    }
}

I am struggling to get Alexa working with openHAB directly, I followed:

I see that app on my iphone, but no new devices are found. How can I debug this more? I ran tcpdump on my public interface port 443 and when I run a discover I see lots of traffic from amazonaws.com to my IP, but I don’t see anything in the logs. In your post you mention passing /api via NGINX, but when I hit localhost:8080/api I get:

[root@lisa openhab2]# curl http://localhost:8080/api
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /api. Reason:
<pre>    Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.3.22.v20171030</a><hr/>

</body>
</html>

I am running openHAB 2.2

Hi!

I have the same problem …
I use the homekit skill and on my iPhone everything works in homekit and on my previous installation alexa worked too (just installed the openhab skill and started the search) but now if i do so no device is found and i don’t know why.
Obviously my tags are correct (cause it works on my iDevices) and i even deactivated and reactivated the OH Skill in my Alexa app.
Do you have any idea what else i could try?

@Jonas88

Did you try (read) this?

Link

Hi Celaeno1,

thank you for your reply!
I read it (now) and I can’t see why it’s not working.
I added all my things/items (except the z-wave stuff), through textual config files (in the tings and items folders).
I deactivated the simple “Item Linking - Simple Mode” because it creates duplicates when i do textual configuration and configuration via paperui.

I switched it on and told alexa to find new devices, what she did not.
I think that’s because i added the items before without “simple item linking”. Is that correct?
Do i have to add them again with that slider turned on? ;-(

I deleted my runtime.cfg because it auto deinstalled several bindings … (although it was empty - just lines with # so its basically empty)

I did it!
Thanks to your advice I recognized that the openHAB connector binding was not properly installed.
It did not show up in services menu but as i wanted to install it again it told me that it’s already installed.
after trying again it showed up in the service menu.
I then edited the uuid and secret again and now alexa did find everything!
thanks a lot!

No, only when “Simple item linking” is turned OFF and NEVER was turned ON before, then Alexa can find devices.
The only exceptions: You don’t have installed: lifx, tradfri, hue, max, mihome
Then you can turn ON “Simple item Linking” without any problems.

That’s not true either.
On my old Installation i enabled simple item linking and alexa worked too (i had installed the hue binding).
Again: it was an issue with the myopenhab cloud Service for in my case.

@Jonas88

It depends on when you first have installed the huebinding. In my case (in July 2017) this following line was missing (or empty):

Line 23: <label>Brightness</label>

It seems, that later on the labels were added!

In my case (in July 2017) the labels were missing, see here:

{"link":"https://myopenhab.org/rest/items/hue_0100_0017882971e8_8_brightness","state":"0","type":"Dimmer","name":"hue_0100_0017882971e8_8_brightness","tags":["Lighting"],"groupNames":[]}
{"link":"https://myopenhab.org/rest/items/hue_0100_0017882971e8_1_brightness","state":"0","type":"Dimmer","name":"hue_0100_0017882971e8_1_brightness","tags":["Lighting"],"groupNames":[]}
{"link":"https://myopenhab.org/rest/items/hue_0100_0017882971e8_2_brightness","state":"0","type":"Dimmer","name":"hue_0100_0017882971e8_2_brightness","tags":["Lighting"],"groupNames":[]},

Maybe there are people out there, who installed the huebinding long ago (with “Simple Item Linking”). So they will get no devices with Alexa APP.

Cheers

Alex :slight_smile:

I’m not sure if this affects too many people, but I’ll throw it out there… I was putting in an echo for my inlaws and tried to set it up before the device had been delivered. After some trial and error I determined that discovery only works if you have an Echo connected and on the network. It won’t work if the phone app is alone.