No Owntracks device in known_devices

HI,

Cant get an Owntracks device in my known_devices file with this device_tracker setup:

- platform: owntracks_http
  max_gps_accuracy: 100
  secret: !secret owntracks_secret
  waypoints: true
  mqtt_topic: !secret owntracks_mqtt_topic
  waypoint_whitelist:
    - !secret mqtt_username

What could be amiss here, i can see my Owntracks on 8883 in the mqtt log, my phone is connected and i can publish locations etc etc.
Just never shows up in Home Assistant.

because of the above, i am not able to create a mqtt sensor yet, dont know what topic to subscribe to, other than my username

Please have a look?
Thanks,
Marius

Your using the http component but you mentioned the mqtt logs.

Try the mqtt component?

Now you mention it… never realized i might have mixed them up…

Is use OwnTracks on the iPhone. And have device tracker setup on that account. Would that need the Mqtt component?

What would the http component have to look like then? Or is that for another setup.

Only mentioned the Mqtt log because I’m trying to create a senor reading the input from my iPhone setup OwnTracks

Check the docs for the difference between the two types of owntracks platforms :+1:

well i tried… to be honest, the docs are not the clearest of all.
especially on the http platform, all it says is configure like below:

- platform: owntracks_http

ive made 2 entries now, following should follow guidelines on the mqtt platform (took out the _http)

nothing happening so far
might be im using the 8883 port , will have to look into that.

- platform: owntracks
  max_gps_accuracy: 100
  secret: !secret owntracks_secret
  waypoints: true
  mqtt_topic: !secret owntracks_mqtt_topic
  waypoint_whitelist:
    - !secret mqtt_username

Apparently i need ‘libsodium’ to be able to decipher my encrypted events. If i deselect the secret key, i can see this in the mqtt logs:

{“batt”:77,“lon”:4.xxxxx,“acc”:30,“vel”:0,“vac”:3,“lat”:5x.xxxx,“t”:“u”,“_cp”:1,“conn”:“m”,“tst”:15xxxx,“alt”:8,“_type”:“location”,“tid”:“MH”}

guess i can make a sensor for each of those with this;?

- platform: mqtt
  state_topic: 'owntracks/[username]/[phone]'
  name: "Owntracks"
  value_template: '{{value_json.batt}}' '{{value_json.lon}}'. '{{value_json.lat}}'.  etc etc?

since im trying to use owntracks for tracking home / not home, would i need the lon and lat into one template? For security settings i havent set Home in the app (and since im not using it encrypted now, maybe i shouldn’t…) so would have to rely on calculating lat/long.

see this for available parameters:
http://owntracks.org/booklet/tech/json/

Yeah, you’re right, just looked at the docs and they’re not the clearest.

I take it it’s mqtt you want to use?

Are you using the embedded MQTT broker?

yes, and im seeing it now. Not sure how to get the lon and lat together in a way i can use it for using it as home-away.
some values are a bit fuzzy. type gets value location, but i cant see the location itself?

if possible, i would like the http component also. doesn’t show up just yet.

It’s populating the known_devices.yaml file with OwnTracks devices?

If not - take a look at this thread, he had issues with the embedded broker populating known_devices.yaml

If it is populating known_devices.yaml, all you need is your home lat/lon also set in your configuration.yaml and the device_tracker will automatically select your home or not_home states from the values in the MQTT message.

its not populating the known_devices, but i can subscribe to the mqtt stream.

If i read correctly, it will populate the known_devices when configured through the _htpp component, using homeassistant as username and ha_password . for obvious reasons (…) it;s not my preferred configuration, handing over my HA credentials to other apps…

Conseqeuntly, I am looking for a way to have HomeAssistant use the mqtt topics,that it can read, and which i can get into the frontend with dedicated mqtt sensors:

1419

surely i have my lat/lon set in configuration.yaml. If you say it will automatically st my home/not_home status, in which entity would it do that? maybe i just cant see it pop up (using a default_view) and must look for it in the dev-tools…