Alexa randomly turns to "device is unresponsive", even though the amazonechocontrol binding is still connected (e.g. Echo_Dot_Speak still works)

Platform information:

  • Hardware: Raspi 3 B+ (Raspian OS 10)
  • Attached Hardware: Amber Wireless AMB8465 stick to read out Wireless M-Bus from water & heat meter
  • Docker / Portainer: 2.9.3
  • openHAB Software: 3.1.0 Release Build
  • openHAB Bindings: Homematic Binding (logging the heating, controlling lights and blinds), Gardena Binding for Gardena Gateway / smart irrigation control (logging soil humidity), Alexa Binding (controlling the Homematic lights)
  • Homematic IP Hardware: CCU2 (2.59.7), multiple Homematic IP devices

From time to time my Alexa binding turns incapable of controlling devices (they show up as “unresponsive” in the Alexa App):

My first thought was that the entire binding is offline. But when the devices turn unresponsive, both the Things in openHAB are shown as “online” (both the account as well as the actual Echo Dot)…

… and simple tests such as
events.sendCommand("Echo_Dot_Speak", "Test");
still work. So the binding is somehow still there.

The log shows nothing related to that (e.g. when I try to switch on a light by talking to Alexa), which is probably another hint that the “inbound connection” to openHab does not seem to work anymore.

The only hint I have for a potential root cause is a log entry ~ 1 minute…

17:10:38.787 [INFO ] [ocontrol.internal.WebSocketConnection] - Web Socket close 1005. Reason: null

… which is maybe related to this: Web Socket Error on AmazonEchoControl binding every 65 seconds , though this would not explain why the binding works most of the time (and if it doesn’t, disabling and enabling the binding makes it work again).

Anyone having an idea?

The binding has nothing to do with your problems. The connection openHAB device → Alexa (i.e. „Alexa, turn on my bedroom light“) is via the myopenhab cloud and the openHAB Alexa skill. The binding is for controlling Alexa devices from the openHAB side.

If these devices are related to the openHAB skill for Amazon Alexa, I would recommend to go over the troubleshooting guide.

Can be closed for now, was probably related to the skill update: openHAB Skill for Amazon Alexa: New Device-Centric Metadata Syntax . Will monitor further.

1 Like

Since the problem re-materialized today (even with 3.2 release build and the 3.2.7-version of the updated AmazonEchoControl binding (Amazonechocontrol newest version - #13 by MFI-Net) I’m opening this up again:

Thanks for the hint. After a) going through the Troubleshooting guide as indicated by @jeshab and b) as pointed out by @J-N-K, this problem does indeed not appear to be caused by the binding.

I’m currently trying to debug the root cause, but am still struggling to come to a conclusion, given what I’m seeing, since what I see does not make sense to me:

  • All devices can be perfectly controlled via openHAB UI locally (x.x.x.x:8080), so things seem to be running correctly
  • Alexa in general is online (music, whether, etc working perfectly fine)
  • openHAB can make Alexa say things via a simple events.sendCommand("Echo_Bad_Speak", "Test"); which also leaves trails in the log
  • Asking Alexa to switch on the light does not work ("“the hub the device is connected to is not responding”) but the request leaves a trail in the log:
21:13:45.519 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Echo_Dot_LastVoiceCommand' changed from alexa to 
21:13:45.530 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Echo_Dot_LastVoiceCommand' changed from  to alexa
21:13:47.159 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Echo_Dot_LastVoiceCommand' changed from alexa to stehlampe ein

@J-N-K, when you said…

… it’s either the myopenHAB Cloud or the openHAB Alexa Skill. Is there a way to tell which one it is? Or is it something else?

Does any of what I described above make sense?

No idea. I never looked in either code. Since the lastVoiceCommand channel works, it seems it’s not an issue of your network connection in general and the fact that lastVoiceCommand contains the correct command indicates that Alexa understood what you said.

Maybe next time this happens you can try to login to myopenhab.org with a browser and see if you can access your dashboard. If you can control there and Alexa still does not work, you are at least sure that it’s not your connection to the cloud but the connection between cloud and skill.

Still fighting hard with myself to not restart openHAB to solve the problem, but trying to figure out what’s the current root cause.

Logged into myopenhab.org (“Your openHAB is not online.”), so definitely a myopenHAB Cloud-problem? The Alexa skill can work without the myopenhab.org cloud, correct? If so, how is it possible that the Alexa commands reach openHAB, but appear to not be executed correctly (with a restart solving all this)?

No, it’s working for me. So the issue is in your connection to the cloud.

There are two parts:

  • “Alexa controls openHAB”: this is done by exposing things with metadata to the cloud. The openHAB skill enables you to control these devices with your voice via Alexa
  • “openHAB controls Alexa”: this is done via the amazonechocontrol binding. Part of this is to listen for events from Alexa like “someone said something” or “the volume of the speaker changed”, the other part is to send commands to Alexa (like “say arbitrary text” or “play radio xy”).

Both parts are completely independent. So the binding will see that Alexa understood “Turn on light xy”. This would even work if you disable the openHAB skill and has nothing to do with what happens afterwards. It’s just the “log” of what Alexa recorded.

That’s actually not true. It’s not because the Alexa voice history shows the requested command that it indicates that it was processed as intended. This is why I mentioned before that you can’t use the Amazon Echo Control binding as a way to troubleshoot the Alexa skill.

So you actually have all the information you need to determine the root cause. You have to understand that the Amazon Echo Control binding connects from OH to Amazon, while the Alexa skill goes the opposite direction via myopenhab.org. If your connection to that cloud service is down, as you highlighted, then the Alexa skill will not work. As a matter a fact, the error returned specifically indicates the root cause in the troubleshooting guide.

In all, this is an issue between your OH server and the myopenhab.org cloud connector service. Once you resolve it, the Alexa skill will work again.

I didn’t state that Alexa is doing the correct thing after she understood something. I said “lastVoiceCommand contains the last thing you said, so the network connection is fine and Alexa in general is able to understand something”.

1 Like

Thanks! I think you’re right. Just checked openhab.log. It contains frequent messages like this:

2022-01-11 08:15:32.957 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxx, base URL = http://localhost:8080)
2022-01-11 08:17:40.587 [ERROR] [io.openhabcloud.internal.CloudClient] - Error connecting to the openHAB Cloud instance. Reconnecting.
2022-01-11 08:17:41.308 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxx, base URL = http://localhost:8080)

What’s odd:

  1. Despite having several of these messages in the past x days, the function of Alexa was not affected (at least not noticeably, so maybe just good timing)
  2. Despite the last log entry showing that the Cloud connection is there, myopenhab.org says it’s not.

Long story short: Problem seems to be like you said (" issue between your OH server and the myopenhab.org cloud connector service"). So I have to do some more research on this (or as a mitigation / no sustainable workaround) just do a restart.

Update: Problem might also be related to a recent DHCP problem which I’m having here, so closing this for now / have to observe further.