Bulk-transmit position data to server?

obelix8 years ago

is there a way to bulk transmit position data to the server?

I'm using a kind of self-made "tracking device" based on a raspberry pi, which sends every second the devices position data via an UMTS data stick to my traccar server using the osmand protocol. The raspberry uses the web client URL of the traccar installation for that.

It works well - but there are areas where my data stick doesn't have a network uplink, but I don't want to lose the collected positioning data from those areas. So I think of logging all data locally in the raspberry into an sqlite database which then gets transmitted. Sure - it would be possible to crawl through the database result by result to transmit it to traccar, but it would be much easier to transmit all data up to the current position in bulk.

I'm using mySQL as a database for the traccar installation. So sure - it would be possible to write a small php at the traccar server which receives the data and writes them direct into the mySQL database. But I'm not sure if writing direct to the mySQL might break other things in traccar.

that's why my question - before starting to write (and break ;)) code: is there already a bulk transmit option available? Or is it absolutely not recommended to write to the mySQL database directly?

thanks in advance!

Anton Tananaev8 years ago

Some protocols support transmitting data in batches.

I would not recommend to write data directly into the database. By doing that you would bypass Traccar handlers that calculate various things (e.g. status, distance etc). Also, latest position won't be updated.