home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.07k stars 587 forks source link

Setting internal connection url should not rely on location #4341

Closed jjohnson83853 closed 1 month ago

jjohnson83853 commented 1 month ago

Is your feature request related to a problem? Please describe. The problem is the app wants to know if you are on an internal network by looking at the wifi sid and location. This is needless complicated, drains batterry and could potential cause bugs (would not work if I have different wifi sids or on a network connected by gateways or is hardwired).

Describe the solution you'd like The optimal solution would be to have a heartbeat url (maybe the login page) on the homeassistant server that is checked using the set internal url address whenever connection is required to the server (with a short timeout since it should be local and fast). If that fails then attempt the same thing with the remote url address.

Describe alternatives you've considered, if any Could ping instead but may not work if the target server has icmp turned off. Could check wifi sid (without checking location) but I could be accessing the service in a way that does not rely on the current wifi sid (multiple ways this could happen).

dshokouhi commented 1 month ago

Sorry this is how android works. In order to read teh SSID you need location. This will not be implemented it will make things needlessly complicated for everything.