home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.53k stars 297 forks source link

External URL fallback issue #2888

Closed ncodee closed 1 week ago

ncodee commented 1 month ago

Model Name: iPhone 15 Pro Software Version: 18.1 App version: 2024.7 (2024.730)

Home Assistant Core Version 2024.7.4

Describe the bug I'm not sure if it's by design, but Internal URL is never used when WiFi is connected even when both URL's are manually defined in the app. It always uses/shows Connected via as External URL and does not fall back to Internal, which results in connectivity issues.

To Reproduce

Expected behaviour If connected to WiFi it should automatically switch to Internal URL when mobile data is on or off. If WiFi is off, it should then automatically switch to External URL with mobile data on.

bgoncal commented 1 month ago

Did you define your home network SSID in the app?

Do you allow location permission and set to "Always"?

If you remote your external URL (having those items above configured correctly), does it connects to internal URL?

ncodee commented 1 month ago

Did you define your home network SSID in the app?

Do you allow location permission and set to "Always"?

If you remote your external URL (having those items above configured correctly), does it connects to internal URL?

Yes, to all. I think it’s just the status info is outputting wrong, as I can clearly access HA using WiFi with mobile data turned off.

Unless of course, it’s still connecting via external url?

bgoncal commented 1 month ago

Before moving forward, let's try removing the current server and adding it back so see if there is any improvement

ncodee commented 1 month ago

Before moving forward, let's try removing the current server and adding it back so see if there is any improvement

No dice, I’m afraid. It only happens when you manually enter a ‘external_url’ under Server settings.

ncodee commented 1 week ago

@bgoncal Any update on this please? Handover is still broken 2024.8.1 iOS app.

bgoncal commented 1 week ago

@bgoncal Any update on this please? Handover is still broken 2024.8.1 iOS app.

No updates, please send me your logs after you run the app and try to switch between URLs

https://forms.gle/Wbsmbdn4CHfCDd7e9

bgoncal commented 1 week ago

Also a screenshot from your internal and external URL configuration

ncodee commented 1 week ago

https://forms.gle/Wbsmbdn4CHfCDd7e9

Thanks, I have submitted the form with logs and screenshots attached to the same link.

bgoncal commented 1 week ago

Screenshots from each internal/external URL configuration screen please

bgoncal commented 1 week ago

If you check your SSID sensor in home assistant (inside your iPhone device from mobile app integration) does it ever reporta or local wifi name?

ncodee commented 1 week ago

If you check your SSID sensor in home assistant (inside your iPhone device from mobile app integration) does it ever reporta or local wifi name?

I'm not sure what happened, but it had suddenly switched to 'Internal URL' and is now working as intended. Everything was configured correctly, SSID, permissions, internal and external url.

Also, off note: Just wondering, would it be possible to somehow make the configuration semi-automatic, so the user doesn't have to define a SSID manually, or enable 'Full' location permission? It will make the experience much more seamless for new users.

I guess we can mark this resolved for now? :)

bgoncal commented 1 week ago

Unfortunately the location permission (full) is necessary for background operations