Good day!
I have spent over 5 hours trying to understand why I cannot get the ltap to show up on my traccar server.
my android phone was setup and running in less than 1 minute, but I was not able to make it happen for the ltap mini
I used every script I found on the internet, there are 3 variants up until now that I found and none of them work.
My setup is as follows.
my Traccar server is running behind cloudflare which forwards traffic to nginx reverse proxy and it forwards that traffic to port 5055 and I set up this way because that is my general understanding of how it should work, I know it works because my phone always shows up online and with great accuracy.
I don’t know what is wrong exactly but it would be great if someone points me to the right direction.
I still haven’t figured out how to get it running.
my doubt is that it will never work if it has no gps signal.
ill need to get the attachment.
With the use of Gemini Pro Deep Research, I was able to finally get it working.
I didn’t have time to learn scripting, one day I might.
but to those who faced my issue and no one offered help.
DEVICE-ID is replaced with whatever identifier you setup in both script and Traccar
SELFHOSTED.URL is replaced with the url of your self hosted instance, I removed the port bit from tool fetch mode at the end because my ngnix redirects the url to that port directly, if it is assigned in the script it will fail to connect.
you might need to change from https to http if you aren’t actually using https, in both url and tool fetch mode=https to http.
but because I use cloudflare, it is using https.
This is the script I used:
{
:local devid;
:local spd;
:local alti;
:local lat;
:local lon;
:local vld;
:set $devid “DEVICE-ID”;
:local sendurl (“https://SELFHOSTED.URL/”);
/system gps monitor once do={
:set $vld $(“valid”);
:set $lat $(“latitude”);
:set $lon $(“longitude”);
:set $spd $(“speed”);
:set $alti $(“altitude”);
}
if ($vld = true) do {
:set $alti [:pick $alti 0 [:find $alti “m” -1]];
:set $spd [:pick $spd 0 [:find $spd " km/h" -1]];
:local senddata (“?id=” . $devid. “&lat=” . $lat . “&lon=” . $lon . “&altitude=” . $alti . “&speed=” . $spd);
/tool fetch mode=https url=$sendurl http-method=put http-data=$senddata http-header-field=“Content-Type: application/x-www-form-urlencoded” output=none
}
}