Companion app can't connect to HA on home network but browser can

I have an HA instance that runs in a VM on a Linux Mint machine which is connected to my router via ethernet. It is configured to be accessible from the local network only.
Right now, I cannot access it with the companion app, which claims the server is unreachable.
However, if I use my browser (Firefox mobile) it can reach the dashboard on both the IPv4 and the xxx.local adress of my instance.
Furthermore, I can see that the app can reach the instance because the sensors get updated. So there must be something going wrong when trying to open the UI.

This issue comes and goes, without any clear pattern for as far as I can tell.

Who has suggestions about possible solutions to this issue?

Thanks, Allard

1 Like

No suggestions at all? Did I supply enough information? Both the Android app and the Ha instance are the latest version.

this means that API calls are working but authenticated webview is not working. Have you tried rebooting your VM host and other things already?

Just to add. I’m running HA OS on a RPI4. Updated both OS and APP. I have the exact same issue as you ever since the first version I installed back in January. In my case, I have the nabu casa subscription, and a cloudflare tunnel. At least once a week, the companion app refuses to connect to the server. Most times only through the local wifi. If I disable wifi, it connects. But sometimes, like today, it doesn’t connect either via ipv4, xxx.local, cloudflare, or nabu casa. Through the browser, no problems whatsoever.

I’ve tried several solutions found either in this forum or elsewhere, nothing has permanently fixed the issue.

Yes, I’ve rebooted everything multiple times. Sometimes it works after a reboot, sometimes it doesn’t. Can’t really find a clear pattern yet.

that points more to a network issue than anything

It still remains that I can get the frontend displayed in my browser but not in the companion app. And I am talking about the browser on the same phone that has the app installed. So I don’t think it is a network issue, the IP address is reachable and the relevant information can reach my phone.

1 Like

Check that you have the internal url for the companion app set as http and not httpS.

Thanks, but that is not the problem.
In the mean time I have tried a bunch of things and I think it may be related to my router, which tends to randomly connect devices only through IPv6 and not IPv4*, especially ethernet connected devices. Ever since I have connected the HaOS VM both through wifi and through ethernet, and use the wifi address as internal and the .local address as the external URL in the app, I’ve not had this problem again.
Which doesn’t mean the problem is really solved, perhaps I just found a workaround. Because as I said before, at some moments it was possible for me to reach the lovelace UI with the browser on the phone on one or both of the URLs configured in the companion app, and the companion app still said it could not connect.
I’m getting a different provider and router in a week or two, let’s see if the problem still occurs after that.

  • I haven’t looked in to this, but is it possible to use an IPv6 adress in the companion app?
1 Like