Recently, I’ve been experiencing severe performance issues with the myopenhab cloud connector. Does anybody know how to debug remote connection attempts? Are there any log files available?
The connection works perfectly fine via VPN and local connection, or within the local network, of course. There, the dashboard loads almost instantly.
I recently installed a reverse proxy and SSL, but since the cloud connector is not going through the proxy, should this change not impact it, or am I overlooking something?
Any help is appreciated, currently myopenhab with Alexa/Google Voice is unusable because of the delays.
I enabled debug logging and now see some ping/pong messages. The latency is around 50ms, which seems to be fine. Other than that, I see when the server receives a request from Android and finishes responding, which takes less than a second. There are no warnings or anything, though.
The Android app takes 15 to 30 seconds to show OpenHAB’s home page. Executing a voice command takes the same time. Usually, Google Home needs 1 to 2 seconds to process voice commands.
I have almost same issue, and have had it for years now. I gave up trying to find the solution.
Conneting through myopenhab.org works perfectly.
Enter Main UI instantly without any issues.
Pages load instantly. But… I get no data readings at all. All cards show no readings.
What I have noticed is:
If I leave a page open in the browser, I suddenly gets data readings after a few minutes. Changing page, and then Im back to no data readings again, and have to leave the page open in the browser for a few minutes..
This happened when I upgraded from openHAB 2.x to openHAB 4.x long time ago.
There are no issues when using the openHAB app (Android). (I dont use Google through the app) Thats pretty strange, as I thought it would be using the same connection through myopenhab.org.
There are no issues with direct locally connections.
I think there was a PR on that some time ago. Something to do with the websocket where the events come into the browser for MainUI not working right. I don’t remember when but it was definitely prior to 5.0 release. But it might not be in 4.3.7.
But that wouldn’t be the same issue posted above. That’s definitely something different. Commands go through the REST API (i.e. making web calls) and the events come through that websocket. It’s two different communication paths.
Have you tried trace level logging? Even at the debug level I wouldn’t expect there to be much useful info related to this. But if at trace level we can see individual events being published from the websocket that might provide some information.
Beyond that I don’t have any suggestions. I’m not seeing the same behavior and there haven’t been any other reports, so there isn’t a lot of information to go on.
But doesnt openHAB mobile app (for android) use the REST API as well? Its working just fine in that app. The issue only happens when using browser on a PC, outside local network.
The issue you describe are related to the websocket, not the REST API calls.
Have you checked the browser console for errors or strangeness there? If it works for one but not the other, the problem is most likely related to what’s different, in this case the PC Browser.
Note, even in the Android app, MainUI is basically rendered using a webview (i.e. an embedded browser).
FYI, my problem is solved. Seems like my firewall rules were too restrictive and I didn’t allow loopback connections. For some reason, the connection was still possible for the cloud connector but super slow. After reenabling loopback in my IP tables everything works accordingly again.