I've got hAP ac2 which will live in my car together with 3G modem and a GPS receiver.
It's all configured, I have internet and VPN tunnel back to home, GPS data is also getting through.
Now I need to send the GPS data to the Traccar server.
There is a script on wiki:
Code: Select all
{
:global lat
:global lon
/system gps monitor once do={
:set $lat $("latitude")
:set $lon $("longitude")
}
tool fetch mode=http url="http://10.55.8.160/index.php" port=8080 http-method=post \
http-data=("{\"lat\":\"" . $lat . "\",\"lon\":\"" . $lon . "\"}") http-content-type="application/json"
:put ("{\"lat\":\"" . $lat . "\",\"lon\":\"" . $lon . "\"}")
}
Code: Select all
http://demo.traccar.org:5055/?id=123456&lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}
Can you please help to modify the original script?
Thank you so much!