Authentication Home Assistant and Owntracks HTTP

I really don’t get the instructions of the Owntracks HTTP component https://www.home-assistant.io/components/device_tracker.owntracks_http/

The documentation states I need to use authentication for identification:

Identification: Turn Authentication on, username homeassistant and password is your API password that you use to login to Home Assistant.

I really don’t know how to do this. In my configurationfile I have added:
auth_providers:

  • type: homeassistant

- type: legacy_api_password

Owntracks

device_tracker:

  • platform: owntracks_http

I try to use as serveraddress: https://xxx.duckdns.org:8123/api/owntracks/hendry/iphone . This URL is reachable from the internet. I also created a token under my useraccount for 10 years with a really large password. I then entered as username homeassistant in my (IOS) Owntracks app and my password is the generated password token.

I cannot connect (Response error 401) from within the Owntracks app. I replaced my username with my real username and also tried my normal login password for HA. All same error. What am I missing?

1 Like

You don’t need auth_providers in your configuration you just need api_password

http:
  api_password: YOUR_PASSWORD

Then in the configuration page of owntracks put username as homeassistant and password as YOUR_PASSWORD

It’s not using the new Auth tokens yet.

Or using the token should be possible:

That thread is for tasker, not owntracks.

I’m sorry. Long day - I use tasker to emulate the owntracks app.

1 Like

Hi all,

currently I’m new to HA, and a bit surprised.
After watching the last keynote I needed to check HA out, and it looks fine but my best guess is the documentation needs lots and lots of work…
Right now I’m trying to setup Owntracks for instance, and all I can find in the documentation is ‘https://www.home-assistant.io/components/owntracks/
Looks fine, but after reading that page as a newbee I just followed the intructions, and nothing works
Should the config just be added to the configuration.yaml as in the example, or should it be under trackers?
How to set the agents? Doc says ‘url given to you when setting up the integration;’
What integration, maybe the part that hasn’t been documented yet?

I might probably be missing something, so I was wondering if you guys and girls can help me point in the right direction.

Cheers!
Leon

I would also really like to know how to configure the owntrack component.

How do I obtain the ‘url given to you when setting up the integration’ ? I suppose this will be some path below https://<my.home.assistant.server>/ , but what exactly?
I also suppose the user and password that I should enter is the user and password of my HA instance, is that correct?

From inspecting the source I get the idea that this component is supposed to open up a dialog when first registered. But I don’t understand HA enough to understand what exactly is going on.

I tried adding an owntracks: keyword in my configure.yaml. This resulted in a connected Owntracks component when I view settings. However when clicking on that it says ‘no connected devices’. When clicking the ‘Configure’ setting of the owntracks component it says ‘Only a single instance is necessary’.

Any help is appreciated.

@mrpraline you are close. If you want this to work, you have to remove the current implementation of owntracks you are using and then re-add it via the gui. The information you are looking for will then be presented to you one time. You have to save it somewhere safely, because else it will be lost and you have to go through the process delete and re-add again. So here a step by step guide.

  1. Open HA in a browser
  2. Open configuration
  3. Open Integrations
  4. If OwnTracks:Owntracks show up under configured, delete it
    4.1 klick on it
    4.2 top right corner is a trash can to delete it
  5. Add new owntracks instance under setup new integration
    The login credentials and configuration for owntracks will be presented to you
    in a popup window. Save it somewhere, as there is no way to get it back at a later point
    in time if it is lost, besides repeating step 1-5

Does this help?

P.S. took me quite some time to understand how this works. Not really the best way IMHO.

Edit:

I also suppose the user and password that I should enter is the user and password of my HA instance, is that correct?

Sadly no. I assumed so as well, but follow procedure above and you will see. Basically no authentication besides the secret api address is needed. I think this is also the reason why there is only one chance to obtain the information.

1 Like

Thanks, that was it! This should be added to the component page.

you are welcome to make a PR :wink:

Hi, I did everything as written, the app works, but I do not generate a client in HA, why?

did you check the known_devices.yaml file ?

Am I doing this right if the status field in the Owntracks app (IOS) says “Idle”?

on android it says Aktive: Endpoint state. IOS I don’t know.

1 Like

Hi,

Since OwnTracks got changed to a integration i’m having serious issues configuring it again from scratch.
I did as the integration setup asked me to do, but when i put the api address plus encryption in my android phone the following status is received:
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

I’ve trried configuring and restarting multiple times, without success.

Anyone who can help me?

Anyone here who can help me with this??

Your cert is invalid.

Hi,

I managed to fix the issue with OwnTracks.
It was the webhook URL needed for this to work, so not the URL in the Integration Setup.
Cert is valid btw :wink:

Thank you!
It finally works for me!