It is possible to send commands via API, but not all commands might be supported through the web console.
I see that you implemented some commands for the WATCH ... cool
https://github.com/tananaev/traccar/blob/master/src/org/traccar/protocol/WatchProtocolEncoder.java
Found also the "upload" button for sending commands in the GUI.
What is missing in the webinterface are parameters and so on. But fine, can be added some day (maybe I will dive deeper into the project)
Thank you!
Hello,
I am also looking for this information, please let me know if you find anything.
Thanks in advance.
Atul
What information are you looking for? All information is already provided.
Hello Anton,
I am looking for the information on how can I set the SOS1, SOS2 numbers using API. As mentioned in earlier post, setting up SOS number is missing in Web Interface. It does have a drop-down option for SOS, but no way to provide value to it. Please let me know if you or someone has already tried setting this up using API / Web Interface
Thanks much for your help
Atul
It won't work with web interface, but you can use API. Just provide the required parameters.
Hello,
I tried to use swagger to send some request, but its not working. I am sure I am missing something. Using Swagger/Postman/Fiddler, I tried to give the user/password that I normally give to login to user interface and to set SOS number I set "deviceId" as my watch ID, "type" as "sosNumber" and kept "attributes" as "null" [also tried with other parameters and setting value to my phone number] but nothing works
Can you please let me know how can API be used to set this?
Thanks,
Atul
How do you expect to set SOS number if you don't provide a number in attributes? Check response for error details, or server logs if the command was successful.
Hello Anton,
I did tried setting attributes as mentioned in earlier post, however, its not working. I am sure I am missing something while setting up attributes. I do get 200 OK after running API and no error. Rebooting the device works though.
I get this in logs every time I execute:
2016-12-12 18:24:34 INFO: [A35FB9C8] id: 6105863143, command type: sosNumber sent 2016-12-12 18:24:34 DEBUG: [A35FB9C8: 5093 > 42.106.22.181] HEX: 5b43532a363130353836333134332a303031322a534f537b696e6465787d2c7b70686f6e657d5d
This decodes to - [CS61058631430012*SOS{index},{phone}]
I tried multiple ways of setting attributes, below is one of them, can you help me with the right way of setting this up?
{ "deviceId": 7, "type": "sosNumber", "attributes": { "SOS": 2, "number": 8888888888 } }
Thanks,
Atul
Not sure where you got "SOS" and "number" from. Can you point out where you found those names? Actual attribute names are "index" and "phone". Also, phone number should be a string value.
This worked. Thanks much Anton. I guess I mis-read the attributes name and hence was struggling with this.
Thanks a lot Anton, very much appreciate.
Atul
Hi Anton,
how to reverse engineer some more commands for the watch? For example to set the time zone?
I tried decompiling the SeTracker APK, but could not find anything usefull (search for strings like SOSSMS).
How were the current commands found?
Alex
Found a way ... see https://github.com/tananaev/traccar/issues/2702
Is it generally possible to send commands to trackers?
And in particular in the protocol "watch".
Using the original APP it is possible to set phone book entries and so on.
Regards,
Alex