question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connecting to remote URL when on local network

See original GitHub issue

Actual behaviour

All happens when I’m connected to my home network. When I launch the app, it initially connects to the local URL and it responds fast, as expected. If I move the app to the background and open it again after a while it says “Connecting to remote URL” and the response is much slower so it is clear that it gets it data over the internet. If this happens and I completely close the app and reopen it, it connects to the local url again.

Expected behaviour

I expect the app to always connect to the local url while on the home network.

Steps to reproduce

See “Actual behaviour”

Environment data

Client

  • Android version: 8.0.0
  • Device model: Galaxy S8
  • Stock or customized ROM: Stock ROM
  • App version : 2.3.0
  • Build flavor : Play Store
  • Device language: Dutch

Server

  • Server version: 2.4.0 M4 (but the problem also existed on 2.3.0).
  • Reverse Proxy: No
  • Authentication method : None

openHAB Cloud

  • openHAB Cloud version: No idea.
  • Self hosted cloud or myopenhab.org: myopenhab.org
  • Authentication method : User and password.

Logs

App log

Where can I get it?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
maniac103commented, Jan 6, 2019

Maybe if we’re on a local network and can’t connect to the local server, we should regularly retry to connect to the local server?

1reaction
mueller-macommented, Jan 5, 2019

I think the problem is that the app sometimes failes to connect to the local server, connects to the remote one and as long there is a connection to some server, the app doesn’t try to connect to a specific one (with exceptions for e.g. notifications that are always fetched from the remote server). I guess https://github.com/openhab/openhab-android/pull/780 could fix this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reaching a device in my LAN from the Internet - Super User
Whenever you want to work remotely, connect to the VPN, and you will see the embedded device as if it were on a...
Read more >
Access server using URL locally without going through Internet
When I connect to it from anywhere I connect successfully and everything is fine. But when I connect to it locally, within the...
Read more >
Connecting to remote URL when on local network without ...
I expect the app to always try to connect to the local url while on the home network, wether the home network has...
Read more >
Access to a site on localhost from remote - Stack Overflow
For this scenario we should use VPN services. We should connect our local machine to VPN then in other side we should connect...
Read more >
Remote Desktop - Allow access to your PC from outside your ...
Learn about your options for remotely accessing your PC from outside the PC's network.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found