Owntracks with MQTT "disconnected"

It should auto update the UI map. did you setup your devicetrackers correctly as per examples on the HA website?

Thanks for your time?

no i didn’t, how can i do that?

device_tracker:
  - platform: owntracks
    max_gps_accuracy: 100
    waypoints: True

mqtt:
  broker: 192.168.0.12
  port: 1883
  keepalive: 60
  client_id: hassio
  username: roman
  password: 5691

sensor:
  - platform: yr
    name: Weather
    forecast: 24
    monitored_conditions:
      - temperature
      - symbol
      - precipitation
      - windSpeed
      - pressure
      - windDirection
      - humidity
      - fog
      - cloudiness
      - lowClouds
      - mediumClouds
      - highClouds
      - dewpointTemperature
  - platform: mqtt
    state_topic: "owntracks/roman/romkilla"
    name: "Battery A5"
    unit_of_measurement: "%"
    value_template: '{{ value_json.batt }}'

This what i have related to owntracks on my config

I think my device tracker is correctly set, my know_devices also:

gabriela:
  hide_if_away: false
  picture: /local/gaby.jpg
  mac: 
  name: Gaby
  track: true
  vendor: Apple
roman_romkilla:
  hide_if_away: false
  picture: /local/roman.jpg
  mac: 40:D3:AE:5mlllml
  name: Roman
  track: true
  vendor: Samsung

I probably miss the auto update the UI map automation ?

change the topic line in the automation

from
owntracks/phone/phone/cmd
to
owntracks/roman/romkilla/cmd

Just did it and no error in the log but still no update on the map, is there an automation to update the ui map or is it suppose to be automatic?

Thanks vicom for your precious help.

just make sure that your phone reports back via MQTT once the automation is triggered. Do you see the phone’s MQTT response after the automation tigger on MQTT.fx?

Based on output Your phone is 05, so change:
topic: “owntracks/phone/phone/cmd”
to
topic: “owntracks/roman/romkilla/cmd”
Also “tid”:“05” is your phone name on owntracks and it is not == roman or romkilla

Sorry just had a bug on the pc

If i go to MQTT.fx and i subscribe to owntracks/roman/romkilla/cmd and owntracks/roman/romkilla.
If i post my location with owntracks it will update only the owntracks/roman/romkilla broker, owntracks/roman/romkilla/cmd will remain blank.
More i push location more i create massages in MQTT.fx “owntracks/roman/romkilla”

I updated the automations.yaml with the good topic:
“owntracks/roman/romkilla/cmd”

Thanks guys

On your mosquitto-server, try to listen whats going on, login to ssh and paste or type:
mosquitto_sub -u pi -P raspberry -v -t #

You’ll see all messages from and to mqtt.

How can i trigger an automation with MQTT.fx and see if the phone’s response to the mqtt ?

Unfortunately im runnig everything on my synology nas.
All the tutorials are mostly for raspberry.

I’m runnig the mosquitto server on docker, with a terminal option. Maybe i could paste something there?

on MQTT.fx subscribe to the topic “owntracks/roman/romkilla” then you should see the phone’s reply

Use terminal and paste or type :slight_smile:

mosquitto_sub -u pi -P raspberry -v -t #

Now its turnig crazy, for a minut the two topis posted a message every second

owntracks/roman/romkilla:
{"_type":“location”,“tid”:“05”,“acc”:400,“batt”:93,“conn”:“w”,“lat”:43.2716725,“lon”:6.6375902,“t”:“u”,“tst”:1516314699}

owntracks/roman/romkilla/cmd:
{ “_type”: “cmd”, “action”:“reportLocation” }

Do you think it’s the proof of what you where talking about?

Yes it is proof

So does it means that it’s set up propely?

Will i see any difference on the UI map?

How to updater it?

Maybe it does update when i leave home?

Location data is obtained by your smartphone and published to the MQTT broker.
Go to and read : http://owntracks.org/booklet/guide/whathow/

“tid”:“05” is your phone name on owntracks and it is not == roman or romkilla.

Thanks for the link Vlad.

I’m french and i’m getting a little bit lost in the translation.

Should i change owntracks/roman/romkilla to owntracks/05
or something?

When on MQTT.fx on the topic owntracks/roman/romkilla
i can see my location uploaded by the phone:
{"_type":“location”,“tid”:“05”,“acc”:400,“batt”:93,“conn”:“w”,“lat”:43.2716725,“lon”:6.6375902,“t”:“u”,“tst”:1516314699}

I’mmore and more confused.

Thanks anyway, will try to force my brain with the translation.

Device name

Locations are captured in OwnTracks by devices (e.g. your Smartphone). The device name forms the second component of the topic name. In order to avoid clashes in naming and to simplify subscription and authorization we decided to use two topic levels

The user name or identifier (e.g. peter)
The device name (e.g. iPhone)

A typical topic name for a device would therefore be peter/iPhone. Other device naming schemes are possible and transparent to OwnTracks (e.g. using just one level peters-iPhone or multiple levels aFamily/father/iPhone), but under any one OwnTracks name root the number of levels used for device names have to be the same.
++++++++++++++++++++++++++Translated by translate.google.com+++++++++++++
Nom de l’appareil

Les emplacements sont capturés dans OwnTracks par des appareils (par exemple votre Smartphone). Le nom du périphérique constitue le deuxième composant du nom du sujet. Afin d’éviter les conflits dans la dénomination et de simplifier l’abonnement et l’autorisation, nous avons décidé d’utiliser deux niveaux de sujet

 Le nom d'utilisateur ou l'identifiant (par exemple peter)
 Le nom de l'appareil (par exemple, iPhone)

Un nom de sujet typique pour un appareil serait donc peter / iPhone. D’autres schémas de dénomination de dispositifs sont possibles et transparents pour OwnTracks (par exemple en utilisant seulement un niveau peters-iPhone ou plusieurs niveaux aFamily / father / iPhone), mais sous n’importe quelle racine OwnTracks, le nombre de niveaux utilisés pour les noms de périphériques doit être identique.

you set location accuracy to 400 meters (“acc”:400)

vous définissez la précision de localisation à 400 mètres (“acc”: 400)

device_tracker:
platform: owntracks
max_gps_accuracy: 200