Skip to content

Connection instability when switching between LAN, VPN, and Nabu Casa remote access #4605

@RichHB619

Description

@RichHB619

I wanted to report an issue I encountered with the Home Assistant iOS app related to connection handling when using a single server configuration with both local and Nabu Casa access.

Environment:

  • Home Assistant OS
  • Core: 2026.4.4
  • Supervisor: 2026.04.2
  • Frontend: 20260325.8
  • iOS Companion App: 2026.4.1 (2026.1904)
  • iOS: 26.4.2

Issue:
When using a single server entry (with both internal and external URLs), the app had difficulty switching between local (LAN/VPN) and remote (Nabu Casa) connections. I experienced:

  • App getting stuck on “Connecting” or losing connection
  • WebSocket failing to establish or reconnect reliably
  • Login/auth webview occasionally failing to hand off back to the app
  • In some cases requiring app restart or even device restart to recover
  • Inconsistent behavior when switching between LAN, VPN, and remote access

Browser access (both local and via Nabu Casa) worked consistently, so the issue appears isolated to the mobile app’s connection/session handling.

Workaround (Resolved):
I created two separate server entries in the iOS app:

  • One using the local URL (LAN)
  • One using Nabu Casa (remote)

With this setup:

  • The app reliably selects the correct endpoint based on reachability
  • WebSocket connections remain stable
  • No more connection drops or login issues
  • No need to restart the app or device

Feedback:
It seems the auto-switching logic within a single server configuration may cause instability in environments with:

  • VPN usage
  • frequent network changes (LAN ↔ WAN)
  • larger or more active HA setups

You may want to review:

  • WebSocket reconnection handling
  • auth handoff from webview → native app
  • internal vs external URL switching logic within a single server profile

Happy to provide logs or test further if helpful.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions