App not reconnecting to server after wifi loss

First post, so hopefully right :wink:

I tried searching on the android app with reconnect, wifi and networking error but could’n find a post simular to my problem. Although it does not seem that weird to be unique.

I’ve got openhab 3.2 stable on a raspberry with a wall mounted Lenovo M10 Android 10 Tablet showing a openhab 3 UI dashboard using the android app. Works perfect for two or three days and than shows either a reconnecting message, a blank screen or the lenovo desktop.

I think I discovered the cause of this, it’s a temporary wifi loss of the tablet. I got a mesh wifi system and sometimes it decides to switch between 2.4 of 5 Ghz or a Wifi 4 or Wifi 6 connection. The tablet takes 5 seconds to restore the connection. After that the app first shows the reconnecting message, than the white screen and after a hour or so the tablet kills the app. I can reproduce this by switching off-on the wifi on the tablet or by unplugging the closest wifi point.

My question is … is there anything I can do to prevent this? Maybe a setting in android, the openhab app or the openhab server? Or is this a bug or common behavior?

Perhaps try using reserved IP addresses on your hub, for your OH server and it’s various IP connected devices.

By reserved you mean a fixed IP address? Both the openhab and tablet are set to keep their addresses (even on reboot of modem/router/wireless accesspoints). I checked in the modem/router (a Fritzbox 7590) and the option is set “keep same IPv4 adress”. I assume (no separate option) this also forces this for the IPv6 adress. Checked it, dis/enabled wifi on tablet, it kept local address 192.168.178.24.

Or am I thinking the wrong way with reserved address?

Yes that’s what I meant. So obviously that is not the problem/solution…

To keep you updated, I’m trying a dirty workaround. I activated an extra wifi network, only 2.4Ghz, no mesh, only one AP, all ‘intelligent options off’ and connected the tablet to it. So far it’s keeping running but it’s only a day. If it’s three the record is broken and this confirms the diagnose and workaround.

Of course, I’m still open for suggestions to try! This is a bit of a silly workaround wasting a bit of energy and clogging up the 2.4Ghz…

Can you post a screenshot of the reconnecting message and the white screen?

I have a very similar if not the same issue, using the DECO m4 mesh system. I finally got PO’d enough to try to fix it.

It only appears to happen on Android 12 for me. Its still an issue - its not predicable but happens throughout the day - you open openhab and it says server not available - it clearly is available because every other device gets to it during this “unavailable” time. If I wait for a while, it will fix itself, or if I manually turn off wifi on the device then reconnect seems ok. I though itwas mesh related, but I unplugged the other repeaters and it still happens. It seems more likely a 2.4 and 5ghz switiching problem - Have not disabled 5g yet its too disruptive to do this week.

With no confirmed positive effect I have also tried:
i) re-installing firmware on the deco wifi hotspots, it appears more stable
ii) added the wifi name in the app settings
iii) uninstalled and reinstalled the app
iv) downgraded the firmware on the deco wifi hotspots since it never happened prior to the last upgrade

testing now - walking around and all wifi are back on. I’ll give it a few days and report back.

I’m curious. For me a seperate (non mesh) networks was a major improvement. It runs at least a week stable but unfortunately it keeps happening. Turning the WiFi off/on never solves it for me. Killing/restarting the app does. But keep the updates coming, you never know how a solution is found …
:+1:

I will, may take some time with the improvement. It’s all white with a small red bar with a message “reconnection to server” or something like that. Server is reacheable with another phone or browser, it’s something in the app.

Well it still happens, I turned off the 5Ghz to see if that would help, held for 2hrs then again.
I have now set the app to never sleep (this is android).

Awaiting results. Will post app log when it happens.

Took a long time for spontaneous appearing, so today I forced it by dis/enabling the wifi. In Dutch it says “An error occured while loading openhab 3 UI” with a reconnect button. But … wait for it … I upgraded today to the new 3.3 version. And this changes the behavior, in about a minute (after the wifi was back) it actually reconnects to the server again (instead of switching to a complete white screen). So apparently something in this release fixed my problem!!!

I have to check the forum if someone already made a feature request for the app to start with a specific dashboard instead of the home openHAB 3 UI screen. That would make it perfect (i.e. save a click to get my preferred view on my wall-mounted screen).