OwnTracks Integration Guide

for HAUS IoT controllers

About OwnTracks

OwnTracks is an Open Source project which provides an iOS and an Android app with which your smartphone publishes its current location.

OwnTracks publishes data only to your own selected backend (MQTT Broker) in order to ensure that only you and the people you authorize have access to the data published by the app.

Get OwnTracks for Android: https://play.google.com/store/apps/details?id=org.owntracks.android

Get OwnTracks for iOS: https://itunes.apple.com/us/app/mqttitude/id692424691?mt=8

Below guide reflects OwnTracks for Android’s user interface. The iOS version slightly differs.

Initial configuration

Please invoke menu with top-left menu icon, then navigate through the Preferences menu and fill in fields as explained below:


Connection:

Reporting: Leave it unchanged.

Notifications: Leave it unchanged.

Advanced:

Special configuration

If you use a special MQTT broker, imposing limits on topic names, you might not use OwnTracks’ default owntracks/%u/%d topic. It is quite common for free online MQTT brokers, that you are forced to use a certain prefix (usually your username) for your topics.

OwnTracks supports configuring its base topic by pubTopicBase and subTopic parameters.

Change base topic on iOS version

Go to the Status screen in the OwnTracks app and tap it 3 times. By doing this, you invoke the “expert mode”, and the needed parameters appears as editable.

Set pubTopicBase to <owntracks topic prefix>owntracks/%u/%d

Set subTopic to <owntracks topic prefix>owntracks/+/+

Change base topic on Android version

Go to Preferences / Configuration management and check the current values for these parameters. Tap the top right menu icon and select Editor. You can edit any parameter by entering its name as key and typing in the new value.

Set key = pubTopicBase and value = <owntracks topic prefix>owntracks/%u/%d

Set key = subTopic and value = <owntracks topic prefix>owntracks/+/+

Change parameters with .otrc file

This method works for both Android and iOS versions. You need to create a JSON formatted text file on your device (or elsewhere and transferring it to the device) with below content:

{

"_type": "configuration",

"pubTopicBase": "<owntracks topic prefix>owntracks/%u/%d",

"subTopic": "<owntracks topic prefix>owntracks/+/+"

}

Where <owntracks topic prefix> is your free choice prefix. In case of MaQiaTTo broker it will be <your e-mail address>/ (Note the trailing slash!).

Save this file with whatever name and .otrc extension. Then open the file, ad use OwnTracks as the application to open with. OwnTracks then pulls in the defined parameters and save the changes in its own configuration.

You can check the changed configuration: go to Preferences / Configuration management and lookup the parameters in the list.

Configure Regions

You can configure one or more regions, so your phone will send events to your devices over MQTT when you enter or leave a region.


Please invoke menu with top-left menu icon, then enter Regions menu and add one or more regions as explained below:


Tap the + sign to add a new region, then fill in fields:


Description: Use Region name set in Device identity menu in HAUS IoT controller, e.g. Home. OwnTracks will notify the HAUS IoT controllers configured with this Region name on entering or leaving the region.


Latitude, Longitude: GPS coordinates of the center of the region.


Radius: Radius of the region in meters. Entering and leaving region will be detected at this distance from the center.

Tracking modes

OwnTracks can be put to silent mode or the frequency of location reports can be tuned.

You can use the “play”, “pause” or “stop” icons on the top menubar to switch between modes.

There are 4 modes:



OwnTracks documentation

For further information please see the official OwnTracks documentation: https://owntracks.org/booklet/

Monitoring modes:
https://owntracks.org/booklet/features/location/

General Restrictions on Android 6 and higher:
https://owntracks.org/booklet/features/android/