Following this thread. Anyone can help?
Hello, I have not received a response from anyone about this yet, but I want to better explain my requirement: Normally I can send the command "monitor123456" from SMS to the gps device, how do I send this or any other command from gprs?
Is the question about command format or about API?
Hello Anton, yes, basically it is in the previous example (monitor123456) that is the text that I normally send by sms, how should I do it by gprs ?, it is probably a basic question, but please give me a light an orientation about it, My admiration and respect for you
My question is not a yes or no question.
Anton, my question is about the API
You can check what the official web app sends.
Thanks Anton, one last question about it, in the case of this example: "check123456", should I send it in some special format by gprs? or can I send it like this?
You would need to check with your device vendor.
Thanks Anton, and excuse me if these are inappropriate questions, but I am new to traccar
Good day sir @Grupo Datasoft Ltda. In my case, in ZX303, the command is in hex format sent by server. Try to find out what tcp command does your device accept from the server. You can check it in the device documentation release by your vendor.
Hello,
I want to send commands to devices via api , did this command in linux bash terminal :
curl http://admin:mypass@myserveraddress/api/commands/send/{"id":0,"description":"New\u2026","deviceId":312,"type":"custom","textChannel":false,"attributes":{"data":"getstatus"}}
The result was : HTTP 404 Not Found - NotFoundException (...)
When i give the command to the device via traccar web interface is working .
This part : {"id":0,"description":"New\u2026","deviceId":312,"type":"custom","textChannel":false,"attributes":{"data":"getstatus"}}
i copyed from my web browser , developer tool , network at the moment when i give the command to the device via traccar web interface .
Please tell me where im wrong , whats wrong in my curl command .
That's definitely not the right way to send payload with curl. Have you read their documentation?
Thank you Anton for your answer !
Can you please show a better bash command line for send commands to devices via api ?
Kind Regards,
Hi, finally and thanks to Anton's timely response, I have been able to consume the traccar API successfully, I have been able to send standard traccar commands without problems. However, I need to send a custom command, for the GPS303 device, it is necessary to be able to call the device and listen to its microphone, I must first send the command "monitor + key", then I can call the device and listen to its microphone, at the end of the call, I must send the command "tracker + key", those are the commands that are usually sent via sms, how can I send those commands by GPRS from the API? I tried to send them as the documentation says but it did not work correctly. I thank anyone who can guide me in this regard. Many thanks