Odometer/Total Distance update - not via UI

Quade dennis6 years ago

Hi Anton
I've tested updating the odometer by clicking on device, then in Device menu clicking Gear Icon and setting new value in Device Distance

However is there a way to do this without using the UI, either with API or directly editing the last record in the database?
I dont use the UI, and in some cases need to work out the delta based on when odometer reading was taken and distance travelled since the reading, and add this to new odometer reading

I assume you have caching built in so i'm not sure simply updating the row will work?

Quade dennis6 years ago

Just re-checked and found this
https://www.traccar.org/api-reference/#path--devices--id--distance

I assume this is what I need, thanks

Anton Tananaev6 years ago

Yes. Traccar web app is using same API, so anything you can do there you can also do directly through API.