Custom Position Update

Steenkamp7 years ago

Hi,
I want to reflect the (last known position, even if it is a few days old) on the web.
After my compulsory midnight server restart, devices only start reflecting as they report to the server, not all the devices.

Will it work to just update the latest 'positionid' of the device via the API after restart.

Best Regards

Anton Tananaev7 years ago

I'm not sure you can update it via API.

Steenkamp7 years ago

Any suggestions?

The offline (No GPS signal) units usually report at least once a day via SMS (Telerivet) and I update the 'lastupdate' field directly in the 'devices' table.
This however reflects correctly in the interface. 4 hours, 16 hours etc. I just cannot see if this is because of an underground parkade or whatever reason the GPS signal is unavailable.

I presume I can create a custom protocol that can handle these SMS's received by Telerivet.

Anton Tananaev7 years ago

If you want to push data to Traccar, just use OsmAnd HTTP protocol.

Steenkamp7 years ago

Thank you Anton!

http://xxx.xxx.xxx.xxx:5055/?id=876&lat=-18.432892&lon=21.905652&timestamp="2018-09 27T05:39:22.000"&hdop=0&altitude=990&speed=0

I presume no response will be given.
Is my Timestamp correct?

Anton Tananaev7 years ago

You should get a standard HTTP response. I would recommend to use unix timestamp, but ISO format would also work, but remove quotes.

Steenkamp7 years ago

Great! problem solved.

Thankyou.