Owntracks http new authentication

Hi there,

I’m having issues trying to have the owntracks http working with the new authentication. According to the docs

  • Mode: Select Private HTTP
  • Host: [Home Assistant URL]:[port]/api/owntracks/[your name]/[device name]
  • Identification: Turn Authentication on, username homeassistant and password is your API password that you use to login to Home Assistant.

But the API password is not used anymore. While I have the owntracks mqtt configured and working properly with no issued, I followed all the steps, but it doesn’t connect.

In the android devices, I can configure the owntracks app to use mqtt but after a while I doesn’t update anymore. According to the owntracks documentation, it is highly recommended to use http instead of mqtt because some android limitation in the background.

I have searched everywhere but I have found nothing and, since http is recommended for Android devices because mqtt does not update, I wondering how you guys are dealing with that or if I’m missing something.

Thanks for your help!

I’m having the same dilemma on iOS. Please advise if you get a solution - I am getting repeated errors when trying to connect:

error Could not connect to the server. {
NSErrorFailingURLKey = “https://removed.duckdns.org:8123/api/owntracks/removed/iphone”;
NSErrorFailingURLStringKey = “https://removed.duckdns.org:8123/api/owntracks/removed/iphone”;
NSLocalizedDescription = “Could not connect to the server.”;
NSUnderlyingError = “Error Domain=kCFErrorDomainCFNetwork Code=-1004 “(null)” UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}”;
“_kCFStreamErrorCodeKey” = 61;
“_kCFStreamErrorDomainKey” = 1;
}

Don’t know whether this relates to api password or not. I added the api password in the settings in Owntracks app so quite possibly.

I’m also having authentication problems with Owntracks HTTP. I’m using the API password but the hassio logs is displaying this warning: “Login attempt or request with invalid authentication from xxx.xxx.x.xx”

Well… at least it is nice to know im not the only one :blush:

Version 0.7 has been out for a month now… I just wonder what Android users are using where their owntracks installation

I’ve got the same problem on my Android phone, I tried to login with my “new” account and even tried to use a token somehow, but nothing was succesful.

Just realised why my phones IP was getting banned.

Is there no way to configure it for the new auth?

Seems like a limitation in the Owntracks client. I finally bit the bullet and set up a TLS MQTT proxy just for Owntracks.

I just enabled the legacy api for e temporary solution.

2 Likes

Any new insights on this topic? Facing the exact same problem.

For now just as @getsmokes pointed out, you can enable the api_password and use it as documented.

1 Like

Ok. Thanks. I tried to avoid that, thinking, there would be a lot of fiddling around in the config.yaml involved (like this and onwards: https://developers.home-assistant.io/blog/2018/07/02/trying-new-auth.html).
However it really is as simple as:

http:
  api_password: YOUR_PASSWORD

if anyone wonders like me …

Hi! I still have some trouble setting this up… As far as I know everything is filled out correctly, however nothing is showing up in known_devices.yaml.

First I got the same errors like you, about the invalid login attempt. I already have the api_password set up in my config from the beginning so that’s not working for me. For some reason, when I created a known_devices file myself to see if that helps, I stopped getting the invalid login errors, but there’s still nothing happening.

Visit to see the solution:

I have iOS and Owntracks gives me error 401 on http and in iOS there is no way to edit http as in Android and what they show in tutorial.