Owntracks and hassio

hi all
dont know it there is some one that can help me with setting up own tracks (think i need a set up for dummes)

using hassio on pi3, done a fresh install and installed the following addon. samba, ssh, mosquitto duckdns with lets encrypt set up. all is working fine (can access HA on https.) have a couple of sonoff switches that operate fine as well.

but can not get owntrackes to connect from andriod phone.

mode- private mqtt
host- ****duckdns.org
port-8333 (open)

username- as broker
password-as broker
device id- ben
tracker id- bc

ca cert- fullchain.pem (coped from Ha ssl file)

status is currently reading as end point msg.

java.lang.string index out of bounds exception:length=36; regionstart=32; regionlengh=-26
(1st time this msg has been show)

this is my current set up in owntracks but have tried all sorts. im sure its human error but i dont know where to go from here.

thanks for looking.

Give OwnTracks via HTTP a try. I have found it to work far more consistently than mqtt.

1 Like

Did you change the port to 8333 for some reason? It’s usually 8883. Also, did you remember to forward the port in your router?

lol only a typo …

You might take a look at my post. It is a complete working setup in hassio, I only decided to go for Zanzito since it offers me more options and it’s more accurate. TLS with Owntracks and Mosquitto not working

As of last night own tracks is connected. ? Ill see how it goes for a couple of days.
Mlamie i’ll definitely give you set up a look.
Thanks all

my configuration is on:
HA configuration.yaml :

port: 1883
username: !secret username
password: !secret password


  • platform: owntracks
    cd max_gps_accuracy: 200
    waypoints: true

Owntrack APP:

mode: private mqtt
host: whateveryouris.ddns.net (with no https://)
port: 1883
websockets: off
user: me
pass: nonofyours
device ID: me
tracker ID: em
security TLS: off
Clean Session: on
keepalive: 60

On my samsung phone, I had to edit the configuration management on the owntracks app and change “mqttprotocollevel” to 3 in order to work.
Also had to port forward 1883 on my router, and it works flawless.

Another good working solution is to:

  • Set up cloudmqtt (free tier)
  • Get owntracks connecting to cloudmqtt (TLS)
  • Install mosquitto addon for hassio
  • Configure mosquitto as the mqtt provider for HASS
  • Configure a bridge between mosquitto and cloudmqtt - this is the bridge config for mosquitto that goes in hassio share folder:
    MQTT: Working Mosquitto / CloudMQTT Bridge

Works great.

I use GPSlogger instead of Owntracks.

OwnTracks for Android is no longer maintained.
This version is left for reference and will continue working as is.

GPSlogger works great. Use this manual and it works.

My advise:
make your hassio available by https first.

I am not able to associate the devices displayed on the frontend with the Owntracks status.
The built-in MQTT broker answers

1510827916: New client connected from as simonesimone (c1, k900, u’Simone’)

so I think it may be an username problem.
I have tried associating to all the MACs in Known_devices.YAML
SimonesimoneSC (userdeviceID), simonesimone, simone_simone, simone_simone_SC,
I think all the combination possible.

ATP it is device_tracker.simonesimone
but the frontend shows me “away” or “not home” according the views, and not “at work”

Where is my fault?

Thank you.

Did you add zones?

Yes. Both on hassio and on owntracks.
Not ever seen anything different than “away”
It seems that there’s no talk between mqtt and hassio, at least. Or mqtt does not receive lat-long :confused:


I can see zones in the maps and the db on the embedded MQTT being updated.
Devices are updated only when I reopen nmap tracking -that I switched on to avoid conflicts-

Hi. Sorry to bother you… can you provide config examples?
I am trying to make it working, but somehow, somewhere something does not talk with something else. :confused:

I’m not near my config. But I assume owntracks states is always sayin connected ?

And on the geofence you clicked the share button on the bottom.

And on the main hamburger reporting is switched on. ??

From the last:
yes, it is reporting.
(EDIT: I can even see my friends position, so I suppose there’s a dialog with MQTT)
geofences config’d and shared.
(EDIT: even if I assumed that the zone is checked by HASSIO according lat-long, isn’t it?)
owntracks answers “connected” for enpoint state but “endpoint state message” not available.
queue on 0.
MQTT states lots of
New client connected from ecc.,
as told :confused:

Thank you again.

Ok here you go:

  1. Install the mosquitto hassio addon
  2. Use the samba addon to create a cloudmqtt.conf config file in \\hassio\share\mosquitto
  3. The cloudmqtt.conf file should look like this:
connection couldmqtt
  address <cloudmqtt server>
  topic # in 1
  try_private true
  notifications false
  start_type automatic
  remote_clientid <cloudmqtt user you configured for HA to login as>
  remote_username <cloudmqtt user you configured for HA to login as>
  remote_password <password for above user>
  keepalive_interval 300
  cleansession true
  bridge_protocol_version mqttv311
  local_clientid <local mosquitto user>
  bridge_cafile /etc/ssl/certs/ca-certificates.crt
  bridge_insecure false

In your hassio mosquitto addon config you need to have:

 "customize": {
    "active": true,
    "folder": "mosquitto"

K. :slight_smile:
I’ll try ASAP.
thank you.

And nope, again.
I checked the state of the devices on Hass.io while at home and not.
It seems that the lat-long are displayed with home values only when I turn on the NMAP compenent.
With just owntracks, there is NO lat-long in hass.io

I think I am missing something little but really relevant, I suppose to be a facepalm away from the solution.

hi sardauker
this is the relevant parts of my config hope it helps.


Name of the location where Home Assistant is running

name: Home

Location required to calculate the time the sun rises and sets

latitude: .***
longitude: .******

Impacts weather/sunrise data (altitude above sea level in meters)

elevation: 134

metric for Metric, imperial for Imperial

unit_system: metric

Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones

time_zone: Europe/London

Customization file

customize: !include customize.yaml

Show links to resources in log and frontend


Enables the frontend


Enables configuration UI



Secrets are defined in the file secrets.yaml

api_password: !secret http_password
(TLS and dns stuff)

#Uncomment this if you are using SSL/TLS, running in Docker container, etc.

Checks for available updates

Note: This component will send some information about your system to

the developers to assist with development of Home Assistant.

For more information, please see:



Optional, allows Home Assistant developers to focus on popular components.

include_used_components: true

Discover some devices automatically


Allows you to issue voice commands from the frontend in enabled browsers


Enables support for tracking state changes over time


View all events in a logbook


Enables a map showing the location of tracked devices


Track the sun


Weather prediction


  • platform: darksky

  • platform: mqtt
    state_topic: “button/01/topic”

Text to speech


  • platform: google

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

broker: core-mosquitto


  • platform: owntracks
    max_gps_accuracy: 100
    waypoints: True
    • MY NAME (matching username from owntrackes )


  • name: home
    latitude: .***
    longitude: .****
    radius: 400
    icon: mdi:home

Thank you all again.

I Currently can see “friends” (my wife) on owntracks-android
I can be certain that MQTT “talks” back and forth to the phones.

Now the problem has to be between MQTT and Hassio.

I am tinkering constantly with the YAML and the MQTT config, but I can’t see the elephant :confused: