I’m experiencing at the moment severe issues with the myOpenhab Cloud connection when connecting via myOpenhab Cloud to my openhab instance via an Android phone with the Openhab App.
When opening the sidemap, it loads, but I receive the error “Event subscription failed”. Also the device doesn’t get registered for notifications in myOpenhab. After waiting a couple of seconds, the screen turns black with the error: Sitemap can’t be loaded. Reverse-Proxy received invalid answer from openHAB-Server (HTTP-Code 502).
When accessing the basic UI on a PC in the browser, I receive the error: SSE-Subscription failed (503 Service Unavailable): Executing in fallback mode.
In the last couple of weeks I observed already that changing items in the Openhab App works directly after accessing a page in the sitemap, but after waiting for a couple of seconds, items can’t get changed anymore or to be more precise it seems the value of the updated item doesn’t get received by the app until you reload the sidemap page, e.g. by going one level back and accessing it again. So e.g. if you want to change a temperature from 20°C to 21°C, you see in the log that openhab receives the command to send it to 21°C, but the app keeps displaying 20°C. When trying to change again the value, it sends again 21°C etc.
I have multiple instances of openhab running on multipe sites and receive for all openhab instances the same error
I’m using Openhab v5.1.4 on all instances
I’m using the latest Openhab App for Android from the Play Store and tried on multiple phones / tables with different Android versions. On all deviced I observed the same behaviour
When connecting to my instances via a direct connection without myOpenhab Cloud everything works properly
Is there any known issue at the moment with the myOpenhab Cloud service or does anyone have any advice on how to fix those issues?
Update: After multiple restarts of the instances it seems parts of the errors are resolved.
What remains is:
Android devices are not registering for notifications
The behaviour that items in the sitemap are getting stuck when trying to change them
When opening the Basic UI in the browser, you can use it, but it constantly displays “Offline: Waiting for connection” at the bottom and when sending commands items are not getting refreshed in the browser
So overall it seems to me like some issue with the channel that sends updates back to the client.
When connecting to the sitemap via https://home.myopenhab.org it works and items are getting updated - no errors.
But when using https://home.myopenhab.org instead of https://myopenhab.org on the phone, I’m ending up in an error on the Android app and anyway on htis URL notifications would not be supported.
I do feel that this entire issue has to do with the change of the url to from home.myopenhab.org to connect.myopenhab.org. And I think even this was the time where the issues started.
Maybe one of the developers / maintainers can help.
All I can add is that it seems like it’s the SSE connection which breaks. Why I don’t know. There are various limitations for the maximum number of SSE connections, has anything changed that affects that? Or, is it really about the changed URL?
No, I don’t use anything “cloud”. It just seems from the described behavior that the SSE connection stops working - what’s what’s supposed to relay events to the browser as they happen.
I just tried the Android app in remote mode and I can confirm something is broken.
I open a page containing the status of my windows. Then I close a window, state is property updated in UI. If I reopen the window, the state is not updated in UI.
If I close that page and reopen it, the state is as expected.
No such problem when in local network.
No such problem with Basic UI in local network too.
So yes SSE seems to be no more working well in Android app when using openhabcloud.
Works for me, at least on a quick test. I have a sitemap widget that shows the total power consumption of the house which updates every 5 seconds, and that widget updates fine (watched for 1 minute). This means it’s at least not an issue I. The app or the cloud service.
Coriously that’s the same error as one gets if remote access is disabled in the cloud addon settings. That combined with the above suggests to me there might be some condition in the addon after which it stops relaying the SSE events and/or HTTP connections?
I’m testing now with Android App 3.20.7 with Openhab 5.1.4 - still the same error.
Items not updating anymore after a couple of seconds and after some more seconds the app is turing black with HTTP 502 error. Also notifications are not getting registered in the myopenHAB cloud.
This is definitely unrelated. HTTP status 502 came from the server side, and we didn’t touch SSE registration code in a long time. My bet is on server side or (maybe more likely) addon side
So nothing has changed in awhile, so i’m not sure what the issue is, but i will look at it today. We did make some changes to support webhooks in both the binding and the cloud code, but that did not touch the proxy logic, so its not clear to me yet if that had anything to do with this.
So the home and connect hostnames are mostly just DNS aliases for the same endpoint, the only different is what authentication is used, so when using connect, which is what happens when you use a web browser directly through the cloud serivce (its the only thing that forwards users to connect), it relies completey on the cloud authentication system, using cookies to save session state (you log in first and click on access my dashboard) . home remains completely unchnaged, and is what our mobile clients use, and supports Basic HTTP authentication, so passing a username and password in the requests.
So connect is there to support a pure browser based auth, which is needed for modern oAuth flows (which can then be utalzied by our webhook feature). home remains unchanged and is still intended to be used by our mobile clients.
But if something was broken there, it would work or it would not (auth is rather binary), i don’t see how it would affect something like SSE updates … but i’ll keep an open mind about every possibility as i look.
One other note, if i load both home and connect in different browser tabs, state updates are working in both, so its seems to be ok in the browser, just FYI.
@digitaldan When opening connect in the browser I’m getting on the bottom of the screen “Offline: Waiting for connection”. When going to home I’m receiving partially on the bottom SSE-Subscription failed (see screenshots attached).
When opening what exactly in the browser? Sorry, i don’t recognize the message or what app that is.
FYI, i have been able to reproduce this using CURL, something is closing the SSE connection prematurely after a few seconds, so now that i can reproduce, hopefully i’ll find a fix soon.
Also the registration of Android devices for notifications doesn’t work - just tested once again. iOS works properly. Android doesn’t register in the myopenHAB cloud and with that notifications don’t work.
I’m unsure if this a separate issue or somehow related to that.