Send Commands to GPS tracker device

James John 4 years ago

Hi
I want to send command to the GPS device, and the device uses watch protocol.
The message that I want to send the device as follow: [SG*8800000015*0009*UPLOAD,10]
My question is How to send this command to the device using API commands that is a JSON as follow:

http://{host}:{port}/api/commands:
{
"id": 0,
"deviceId": 0,
"description": "string",
"type": "string",
"attributes": { }
}

If the API doesn't support this command, can you tell me what is the best way to send this command to the device using web app Traccar platform

Anton Tananaev 4 years ago

You can probably send it as a custom command UPLOAD,10.

James John 4 years ago

Like this:

http://{host}:{port}/api/commands:
{

"id": 1,
"deviceId": 15,
"type": "custom",
"attributes": {"UPLOAD":10 }

}
Anton Tananaev 4 years ago

No. Try sending it via web app and check what command is sent using browser developer tools.

James John 4 years ago

Thank you very much.