Owntracks and mqtt - need help

Hi, i´m on OH2 and want to install a mqtt server (mosquitto) on my debian jessie installation. Openhab is on the same machine.

I installed mosquitto with help of this tutorial: http://krausix.de/mosquitto-mqtt-debianraspbian/

I installed owntracks on my android smartphone.

I installed the mqtt binding in paper UI (it´s only a version 1 binding)

I configured the mqtt.cfg like this:








#<broker>.lwt=<last will definition>

And now? Do i need a dyndns connection or how can i connect owntracks with the mqtt server? Any port forwardings? Is this secure to use?

How can i check if mosquitto is running and there is no problem with my installation?

first of all check if the mosquitto server is running using the command mosquitto_sub and mosquitto_pub.
In order to use owntrack you also need to install the owntracks binding. The mosquitto server have to be visible from the public network so you should forward ports (1883 or 883 better) to the server.

Ok, with mosquitto_sub i get many messages. So i think it is working…

dyndns is already running on my internet router. I only have to make portforwarding for 1883 (or ssl 8883).

owntracks-binding is only needed if i want to use it with places or waypoints? If i only want to see the position of the users on a google maps, i don´t need to use the owntracks binding?
Is this right?

Do i have to use the OH1 binding for mqtt or can i use it without this with maybe curl-commands or something like this?

Owntracks is used to implement a presence monitoring, it takes the messages sent to mosquitto and it checks for example if the position (lat, long) sent is within a range from a position you have defined in conf. updating a switch item. If you want just to know the lat and long you can get them from the mosquitto messages using a json transformation.

Is this a security issue, if i open the port for mqtt in my router? I don´t use portforwardings in my current setup, i only use a VPN. (But i don´t want to use a vpn with my smartphone.)

It´s sad, that habdroid doesn´t have this gps/position-feature. Rotini (another android client) has this built in. Is working very good. But since rotini will change to a paid app soon, i look for alternatives.

There is a programm called “owntracks recorder”. What is the benefit of this? I think i don´t use it, because i can do all with openhab?