The Situation:
Home Assistant Companion app does not resolve the IP when on home wifi, even though from the same phone HA is accessible via the Chrome app and the Edge app.
If I turn off wifi and connect to my home VPN the app resolves the ip and connects fine.
The Setup:
HA is running in docker behind Traefik with a Lets Encrypt SSL Cert.
PfSense DNS resolver holds the DNS records. pihole is the DNS server used by the phone and is using PfSense as the upstream DNS server
What I have tried:
- Remove pihole and use PfSense as the DNS directly (didnāt work)
- Disable āPrivate DNSā in Android Settings (didnāt work)
- Install HA Companion app on another phone to test (works)
Device Info
Primary Phone:
Pixel 7 Pro
Android Version: 14 (Build AP1A.240305.019.A1)
Installed app from Google Play Store
Version: 2024.1.5-full
Test Phone
Pixel 5
Android Version: 13 (Build TP1A.221105.002)
Installed app from FDroid
Version: 2024.1.5-minimal
Logs
This log (domains replaced with example.com) is from my primary phone after connecting to the VPN to setup the app, then trying to open it again after connecting to the wifi and turning the VPN off.
I think this is the pertinent log line
03-23 20:25:44.856 16954 16954 E WebviewActivity: onReceivedError: errorCode: -2 url:https://ha.example.com/?external_auth=1
03-23 20:25:44.805 16954 17005 D SensorWorker: Updating all Sensors in foreground.
03-23 20:25:44.805 16954 16954 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
03-23 20:25:44.805 16954 16954 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 0, currentMillis: 1711239944805)
03-23 20:25:44.805 16954 17005 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
03-23 20:25:44.816 16954 16954 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
03-23 20:25:44.820 16954 16954 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
03-23 20:25:44.820 16954 16954 D ServerConnectionInfo: Using external URL
03-23 20:25:44.820 16954 16954 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
03-23 20:25:44.820 16954 16954 D ServerConnectionInfo: Using external URL
03-23 20:25:44.836 16954 16954 I cr_A11yState: Enabled accessibility services list updated.
03-23 20:25:44.838 16954 16954 I cr_A11yState: Informing listeners of changes.
03-23 20:25:44.838 16954 16954 I cr_A11yState: New AccessibilityState: State{isScreenReaderEnabled=true, isTouchExplorationEnabled=false, isPerformGesturesEnabled=true, isAnyAccessibilityServiceEnabled=true, isAccessibilityToolPresent=false, isSpokenFeedbackServicePresent=false, isTextShowPasswordEnabled=true, isOnlyPasswordManagersEnabled=false}
03-23 20:25:44.856 16954 16954 E WebviewActivity: onReceivedError: errorCode: -2 url:https://ha.example.com/?external_auth=1
03-23 20:25:44.858 16954 16954 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
03-23 20:25:44.860 16954 16954 D CompatibilityChangeReporter: Compat change id reported: 232195501; UID 10294; state: DISABLED
03-23 20:25:44.872 16954 17005 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
03-23 20:25:44.874 16954 17005 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
03-23 20:25:44.878 16954 17005 E SensorReceiver: Error while getting core config to sync sensor status
03-23 20:25:44.890 16954 16954 D CompatibilityChangeReporter: Compat change id reported: 280005585; UID 10294; state: DISABLED
03-23 20:25:44.921 16954 17005 D SensorReceiver: Nothing to update for server 1 (Home)
03-23 20:25:44.921 16954 17005 I SensorReceiver: Sensor updates and sync completed
03-23 20:25:44.921 16954 17007 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=fd2f6ec9-f3e8-473c-a2fd-02b567a4c25a, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
03-23 20:25:44.947 16954 16954 I WM-SystemFgDispatcher: Stopping foreground service
03-23 20:25:45.507 16954 17212 D ProfileInstaller: Installing profile for io.homeassistant.companion.android
03-23 20:25:46.914 16954 16954 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.app.Dialog$$ExternalSyntheticLambda2@8d186c3
03-23 20:25:46.917 16954 17069 D HWUI : endAllActiveAnimators on 0xb400006f03094e50 (RippleDrawable) with handle 0xb400006f5307cf70
03-23 20:25:46.922 16954 16954 D IntegrationRepository: setAppActive(): false
03-23 20:25:46.923 16954 16954 D IntegrationRepository: set
Here is a screenshot of the app when it is not working
You can see the ERR_NAME_NOT_RESOLVED error in the background.
Seems similar to this thread but was no solution posted
Any thoughts/suggestions would be appreciated I have been banging my head against this for a couple of weeks.