Could be wrong format. Have you checked the command against the protocol documentation?
I have not checked the protocol documentation. However I checked the Traccar documentation which suggested to first create the command in Traccar.
Then, I checked the Traccar API to send commands which the sample code looks like
import requests
import json
url = "http://XXX/api/commands/send"
payload = json.dumps({
"id": 1,
"deviceId": XX,
"description": "engineStop",
"type": "engineStop",
"attributes": {}
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic XXXX'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Running that command returns a 200 status code however the effect to stop the engine does not happen on the vehicle. The above code worked in the past. Nothing has changed on the code side but the device and vehicle to which we are sending commands to have changed.
Any thoughts on what could be causing it to not work via API but works via SMS commands?
You have to check the log.
Understood, will retry and check logs then revert back. Thanks.
Hello
Please let us know if you fixed this issue..
I am really interested on this option.
Hello, researching still. But so far seems to be a device specific issue since it works on certain devices while fails on other devices.
Hi,
I have configured engineStop command on Traccar.
However when I send engineStop command to Traccar via API I get a status response code 200 meaning the command has been accepted but no results or effect in stopping the engine. However when I send a stop command via SMS, the command works. Device uses gt06 protocol.
What could possibly be wrong?