Alexa Integration randomly stops working

I’ve been using Alexa integration for years now with very few issues. Recently, though, I’ve had a recurring problem: All of my openHAB items will periodically become unavailable to Alexa. When I look in the Alexa app, they all show offline/disconnected.
I can temporarily fix it by restarting openHAB, but after another day or two, the problem comes back. I can’t seem to figure out what is causing the problem in order to fix it permanently.
The especially odd thing is that I can’t see any errors or issues on the openHAB side of things. Everything appears to operating normally in my logs and in the UI.

Is anyone else having a similar issue? If not, the only thing I can think of is that my SD card is wearing out and causing a strange glitch once in a while.

Oh, and for reference: I’m running OH 3.3.0 Release Build, via openhabian on a Rasberry Pi 3.

Some people had issues with openhab cloud connection in the past.
As the Alexa skill is using the cloud connection, it would also be impacted.
Restarting OH will also restore cloud connection, but there are also other ways to reestablish the connection.
Check your logs (or when the issue next time happens), if cloud connection is still working or not …

Thanks for pointing me in the direction of the cloud connection. I had forgotten that the cloud connection was part of the Alexa integration. Looking back through my log, that is definitely the problem. Once the problem starts happening, openHAB keeps connecting and disconnecting every few minutes, with
“Error connecting to the openHAB Cloud instance. Reconnecting.”
and
“Error during communication”
errors every so often.

Now to figure out what is causing those errors… The lack of other people posting about this leads me to believe that it’s probably not a server-side issue. Could it have something to do with a corrupt auth file? That was a problem I had with the ecobee binding a while back. Otherwise, I’m at a loss as to what the underlying cause of the communications error is. My Raspberry pi is on a solid ethernet connection and I haven’t noticed any issues with my internet service.

I’m going to try stopping OH, clearing the cache, and restarting, just in case that “low hanging fruit” fixes it.

I have been experiencing the same issue for a few months now. Did you manage to to resolve it ? If yes, how please ?

Same issues for me here but it’s not just Alexa. Google Assistant also can’t see the items.

There were two disconnections/reconnections to the OH Cloud in a short space of time 5 hours ago. The penultimate line in the log shows 'Connected to the openHAB Cloud service but the last line states

A connection to https://myopenhab.org/ was leaked

But unless I restart openHAB, Alexa and Google connections will not work. After I restart, the same issue happens again after a few weeks.

You probably don’t need to restart OH. Going into the settings for the cloud in the GUI and saving is enough to restart the connector.

There are may threads on this you can read about this such as: Disconnected from the openHAB Cloud service - #110 by Josh_Schachat

and How to automatically restart cloud connector after an unexpected disconnection - #25 by ssalonen

and Openhab cloud connection stops working, does not try to reconnect - #63 by momo90

I think my issue is different.

These users are all complaining about being disconnected from the Cloud. That did happen in my logs last night but that may well have been genuine. I could have had a short network issue at that time.

The key point here is that the last but one entry in the log said that the connection was established so I’m connected to the Cloud again.

After this point, I was getting notifications as well so I know that it MUST be connected to the OH Cloud. However, Alexa and Google Assistant cannot see any items until I restart OH.

There’s a simple test to see if you have the same issue: go to the GUI for the cloud settings, click save, wait a few minutes, and see if Alexa works again.

Yep this is the problem indeed and matches the symtoms from other users. The cloud keeps on thinking that openHAB is offline, and not all functionality work

I have this issue with Alexa as well and for me it also seems to be the cloud connection. Another simple test is to logon to myopenhab.org and see if the cinnection is shown as online or offline there.

It really seems part of the issue that the local openHAB instance thinks the connection is established, but the cloud service doesn‘t.

1 Like