Owntracks via MQTT no Device Tracker Update

Hello everybody,

I have the problem that the device trackers are not updated via Owntrack:

Owntrack runs in MQTT mode, updated data also go to the Home Assistant - however, the data is not imported into the corresponding device_tracker - as a result, the MQTT data record is up-to-date, but the associated device tracker is not.

Owntrack configuration:

# Geolocation
owntracks:
  max_gps_accuracy: 200
  waypoints: true
  mqtt_topic: "owntracks/#"
  events_only: false
  waypoint_whitelist:
    - xxx.xxx
    - xxx.xxx
  region_mapping:
    zu Hause: zu Hause

Does somebody has any idea?

Best wishes
Michael

Hi,
First a couple of questions:

  • Any errors in the log?
  • How do you see that the information get’s to Home Assistant?

Then some good old investigations tricks:
Remove every owntracks options from your configuration and just start with:
owntracks:
and see whats happens next.
If that works add one option at a time until you find the offending statement.
I’m not sure if space in the region mapping is ok or not.
Good luck!

Hello,

I have created an automation that solves the problem:

## -------------------------------------------------------------------------- ##
## GPS-Aktualisierung Ontracks                                                ##
## -------------------------------------------------------------------------- ##

- alias: 'GPS Update Michael'
  trigger:
  - platform: mqtt
    topic: owntracks/michael.xxxx/iPhone
  action:
  - data_template:
      dev_id: michael
      gps:
        - '{{ trigger.payload_json.lat }}'
        - '{{ trigger.payload_json.lon }}'
      gps_accuracy: '{{ trigger.payload_json.acc }}'
      battery: '{{ trigger.payload_json.batt }}'
    service: device_tracker.see 

I have made a corresponding entry in the known_devices.yaml:

michael:
  icon: mdi:map-marker
  mac:
  name: michael
  picture:
  track: true

Best wishes
Michael

2 Likes