Device ID

Phil8 years ago

Hi Anton,

With regards to the Device ID, is it randomly populated each time the app is installed or is it the actual original ID of the device?

Thanks

are you talking about android client app unique id ?

Anton Tananaev8 years ago

It is randomly generated first time you start the app after installation or clean-up.

You can also set your own unique id if you use your own server.
If you are using demo.traccar.org server then you have to use the random generated number

dev3 years ago

please can I get the difference between - id, uniqueId, deviceId

id - is the serial number that I have used
uniqueId - is the IMEI
deviceId - (I am unable to undrstand)

I am trying to update the distance on a specific IMEI
"Update total distance and hours of the Device " (https://www.traccar.org/api-reference/#tag/Devices/paths/~1devices~1{id}~1accumulators/put)

Please advise.

Anton Tananaev3 years ago

id and deviceId are the same things. It's internal device identifier.

dev3 years ago

while doing it on Postman I am encountering an error -
"IllegalArgumentException (DeviceManager:466 < DeviceResource:95 < ...)"

the URL I used is - PUT - http://{host}:{port}/api/devices/20/accumulators
where ID is 20
The body has -
{
"deviceId": 20,
"totalDistance": 0,
"hours": 0
}

Anton Tananaev3 years ago

Check what the official web app sends and compare with your request.

dev3 years ago

For creating a user - https://www.traccar.org/api-reference/#tag/Users/paths/~1users/post

is their a way to get the expiration as now()+1year on NODERED for tracCar