Hello Guys, I working on a new project and I want to get the OWntracks data in to my webpage. I am not sure where to start. Please suggest me

Requirement:

  1. I want to gather the owntracks data in webpage and once I get the data I want to save it in database.

Problem: Dont know where to start. I have Owntracks installed . I created one webpage . Now what next.?

OwnTracks pushes data to a message queue (they are working on a http server backend, so that might be easier), so you will need to install something like mosquitto.

If you are going down the MQTT way then you will need to write something to read messages from the queue and persist them in a database.

Then your website will need to do whatever you want in the website with the data.

Are you a developer?

It’s not so difficult. As @rossdargan said at the moment OwnTracks can send private message to a MQTT broker. You can find documentation about install and configure mosquitto on OwnTrack website. Openhab can work as MQTT client thanks to MQTT Binding and message coming from Owntracks could be easily used by Mqttitude Binding.

Hello Rossdargan,
I really appreciate your comment.

I have already installed mosquitto in my /usr/local/cellr/Mosquitto

Also basedn in owntracks documents. Its little bit difficult for me to understand how it work. Because I am new in this field. Yes I am developer and I am working on new project.

If you have any idea about below points could you please help me step by step.

  1. I have installed mosquitto let me know how to check its working .
  2. How should I connect my owntracks and webpage . e.g. where should I write the connection code in eclipse

My only problem is If I get the data on webpage from owntracks then I will be able to store it.
But I am still figuring out how to connect and access owntracks.

I am looking forward your reply

Hey there,
Thank you for reply.
I will try to read more about mqtt binding and let you know the progress.
Meanwhile can you please let me know how to connect owntrack step by step to webpage.
I tried my best to figure this out but I failed. I installed mosquitto also. Also from terminal

Last login: Thu Apr 14 09:45:41 on ttys000

HEMANTs-MacBook-Air:~ Hemantc09$ /usr/local/sbin/mosquitto -v
1460652355: mosquitto version 1.4.8 (build date 2016-02-14 11:22:37-0800) starting
1460652355: Using default config.
1460652355: Opening ipv6 listen socket on port 1883.
1460652355: Opening ipv4 listen socket on port 1883.

I am getting this. Whats next step then?

Hey there,
I think my mosquitto is working fine.

PFA . I have shared screen shot for what I did.

Also can you please let me know whats the next step.

  1. I want to get connected owntracks and my front end. Could you please help where to write the code I mean connection code to get connect or access owntracks data?

If you dont mind please reply me on

hemantc09@gmail.com

What have you tried? You haven’t told me what you are writing your front end in, what your persistence technology is going to be, what the front end is going to be used for.

In fact what has this got to do with openhab!?!

Hey there,
I just got understanding or mosquitto publishing and subscribing its working fine for me.

I am trying to get the owntracks published data and I am trying to collect it on my front end side. Which will be my Html and jacavscript webpage.

But I dont know how to do that .or how should I get the data from owntracks and display it on webpage.

The front end is going to to be used for displaying owntracks data. I mean the locations that I am supposed to get from owntracks.

I read so many documents. but couldnt figure out how to get and connect owntracks to front end.

Hi,
once you have installed owntracks on your mobile in the Preferences/Connection section you can set up the connection to your MQTT broker (mosquitto in your case). Don’t forget that since you’ll send your position from outside your network you have to make your broker visible from external calls and open the mqtt port (default 1883 with no security, 8883 with security configuration) on your router and forward communication from the router to your broker. It’s also suggested to set up a password and a certificate for authentication. All those steps are documented here, also there’s a community where you can get support. I think here you’ll get support to configure the binding to get the owntracks position in openhab.