When remote connection is used?

Hello,
Maybe there is somewhere similar problem/discussion but I couldn’tfind it.
I have question about when HomeHabit use remote connection and when local. I usually connecting to WiFi network on my work and then HomeHabit shows message Disconnected from … Trying to reconnect. The IP in that network is not even similar like in my home, so it can’t connect locally and won’t connect remotely.
So when HomeHabit decide to connect by remote connection? Only when WiFi is off?
Maybe it is possible to check if it could connect to local server few times and when is no succes the try remote connection?
I’am using myopenhab to connect via remote and it always work when WiFi is off.

Best regards,
Krzysztof

Remote connection should be used when the app is connected to a different Wifi network from original local setup. I believe there is a bug in the app when used on latest Android OS that doesn’t get correct Wifi network name, so it might not work fully.
Let me check on this, will update.