Owntracks configuration for Android and HA

Hi guys,

I installed HA yesterday and I am trying to set up an Owntracks device with it. However, no luck so far.

I followed the instructions in the components/owntracks/ HA doc section:

  • I set up an integration in the HA configuration screen. I got the webhook url.
  • I installed the app on my Android phone and tried to set a Connection with Mode Private HTTP.
  • But when I entered the long url to the Host, the ACCEPT button just returned the Connection screen with Host and Identification blank. Tapping Host again, it remembered the entered value, but there was no way for this to appear after leaving the screen with ACCEPT. I entered some values on the Identification as well, but the same behaviour.

Then didn’t really know what to do (there is no any Save or similar button on the Connection screen).

On the HA dashboard, the Integrations screen shows an Owntracks: Owntracks, but when I click on it, it just says “This integration has no devices.” What am I missing?

I also don’t understand where are some configurations stored. I am on Debian, installed HA on a virtual environment and have a ~/.homeassistant dir. But there the .yaml files are almost empty. Maybe that’s normal…

Thank you for any help.

Hmm, it started to work soon after I submitted my post. What I did: I deleted the “http://” protocol from the Host value. Then got a malformed url Java exception when tapping Info, so I put back the protocol. After this, the status changed to Idle, and I got the extra person icon on the HA Dashboard Overview. Hmm, seems a bit slow connection… (10-20 minutes).

And I still don’t know where the configuration is stored??

Thank you,

1 Like

Anything done from the GUI goes into the hidden .storage directory. You don’t edit those with a running system.

Thanks, @flamingm0e. I see owntracks entries in config_entries, device_registry and entity_registry, but those are probably internal, not to edit manually. As I understand from the docs, in addition to this internal representation, I can add a section to my configuration.yaml. But what will connect that section to a device/integration already in the system? I would expect some id, unique name or similar.

Thank you again.

I have a bigger problem. The Url given when I configured the integration used a local IP address, 192.168.1.X, of my server where hass is running. But this obviously stops working when you leave the house, so Owntracks cannot send my location while I’m away. So I set up a remote access to my HA server, which worked nicely: Owntracks updated the HA. But this communication then stopped when I got home :slight_smile:. For some reason not clear to me, my router refuses to forward requests from my local network when they are directed to that same network. This is strange, and may be a peculiarity of this router, but I don’t know what to do about it. I partially solved similar problems by entering the remote host name (of my router) in the /etc/hosts file of my home PC-s - but cannot do the same with the phone.

So bottom line is that Owntracks cannot send location information to my HA server both at home and from outside of my local network. Have you encountered a similar situation?

Thank you for any idea.

Possibly, but why?

You don’t connect yaml to the Integrations done in the GUI, and there is nothing to connect.

Is your base_url configured under the http: section in your config?

This is called NAT loopback or hairpin Nat.

It’s not that strange. It’s not that common for someone to do this type of setup at home, so router manufacturers have no motivation to support such a thing.

You can work around the issue by running your own internal DNS (pihole).

To set advanced configuration. The doc page at OwnTracks - Home Assistant says:

  • you must set it up via the integrations panel
  • Owntracks allows the user to set advanced configuration by adding a section to your configuration.yaml

So you must start setting it up in the integrations panel, then you may continue by adding a section to configuration.yaml. So there is no connection, you say?

An intriguing fact with the UI config is that I cannot usually edit what I have entered so far.
Btw, for the most part of the documentation I see discussing only the configuration.yaml, like the UI config did not existed. I find this very confusing.

Thank you for the notes regarding the NAT loopback, I’ll come back to it later.

You don’t “connect” anything. There is nothing to “connect”. If you want to add advanced configuration, you just add the lines to the configuration.yaml. You asked what will “connect” them, but it’s simply looking at the fact that it has an integration configured. You don’t manually connect them though.

I am thinking of installing pi-hole in my server, to use it as an internal DNS, but I am intimidated by the notes on Prerequisits:

Users may run into issues because we currently install dhcpcd5 , which may conflict with other running network managers such as dhclient , dhcpcd , networkmanager , and systemd-networkd .

Brilliant: these are all the network tools Debian uses. I am afraid to mess my home server (with an installer that is just a bash script), as I don’t consider myself such a good administrator.

But thanks for the hints, anyway.

Run pihole in Docker. It doesn’t mess with your host packages.