Tracking the Emperor (part 2)
I'm not a stalker of the Emperor of Japan. Please read previous related post for the explanation. Now it's experimenting time!
The Setup
As said, I want to experiment with Traccar solution, so:
- I've installed the Traccar app (from F-Droid) on my mobile phone.
- I've downloaded the Traccar server in the “Other” version: even though I'm currently on Windows (office laptop), I don't want to install personal things here (even though I can technically do that), obviously, so I've chosen the Zip file version with its “very complex” manual installation procedure.
Basically, I've downloaded the zip, unzipped it in a folder and simply run a per the instructions:
java -jar tracker-server.jar conf/traccar.xml
. Going tohttp://localhost:8082
and it works like a charm, withadmin
as user andadmin
as password, as described in documentation. - Then I've opened the app and read the
Device identifier
field, that has to be configured in the server. - Next step, going in the server (through
http://localhost:8082
) and adding there such Device so that the server will recognize its messages, and show it in the map.I'm not in Germany... it's a picture I've taken online somewhere...
- In order for the server to be reachable from my phone, I've created a free account on ngrok and after having started the Traccar server (through Windows command prompt), I've opened another command prompt to let ngrok knows my connection:
ngrok http http://localhost:8082
and that's it. (Obviously, before that, there's a one-liner to let ngrok configure the secure connection through your token:./ngrok authtoken aaaaaaaaaaa
(whereaaaaaaaaaaa
is the token you'll find in your dashboard setup page as soon as you login in ngrok). Then you can run the previous command.)
That's it. I mean: this morning I've run the server, opened the ngrok connection and once you run the ngrok command you'll receive the connection URL (it's the free account, it changes every time):
ngrok by @inconshreveable (Ctrl+C to quit) Session Status online Account Marco (Plan: Free) Version 2.3.39 Region United States (us) Web Interface http://127.0.0.1:4040 Forwarding http://73020e1ae0d6.ngrok.io -> http://localhost:8082 Forwarding https://73020e1ae0d6.ngrok.io -> http://localhost:8082 Connections ttl opn rt1 rt5 p50 p90 0 0 0.00 0.00 0.00 0.00
I've grabbed the HTTPS URL and written it into the Server URL
field in my app.
I've turned on the Traccar app
Service status
, and as soon as I get outside, to bring my son to school, the app started sending positions to my server!
Optional: I've set the Frequency
to 120 seconds.
Open Points
There still are a few things to check:
- I have to use the mobile phone browser to access the server and see the position on the map. Not nice, but can survive it. I've not yet explored alternatives.
- As foreseen by my colleague, there is the possibility to use the free account of AWS EC2 for having a much secure place (see, for example, Private GPS tracking server on AWS Cloud for free for an English guide or Guida server privato per Traccar (GPS SinoTrack e Tracking vari) in Italian language), but as said I don't like the idea to put my (son!) data there.
- I was not able to see the complete movement path but only the live position. It should be only a matter of configuration, I think.
Tracking the Emperor (part 2) by Marco Bresciani is licensed under CC BY-SA 4.0