How to use RestAPI OBD-Query command

Hi there,

i try to use the “/dongle/{unit_id}/obd/query/{command}/” described in the swagger documentation.

I tried the following command (i have removed the token and device id):

curl -X POST “https://api.autopi.io/dongle/device_id/obd/query/SOC%20mode%3D220%20pid%3D101%20header%3D7E4%20bytes%3D64%20formula%3D’bytes_to_int(message.data%5B7%3A8%5D)%2F2.0’%20unit%3D%25%20baudrate%3D500000%20protocol%3D6%20verify%3Dfalse%20force%3Dtrue/” -H “accept: application/json” -H "Authorization: bearer token

Unfortunately I get a server response error (“

Not Found

The requested resource was not found on this server.

”).

So is it not possible to query a specific command (especially for a SOC-request of the battery) via the RestAPI?

Thanks and best regards
Tim

Ok now i was able to get another error message:

device-id”: “ERROR: Command may not be supported - add ‘force=True’ to run it anyway”

I have already set the force parameter to True. The RestAPI call looks like this:

https://api.autopi.io/dongle/device-id/obd/query/custombattery/?mode=‘220’&pid=‘105’&header=‘7E4’&bytes=54&formula=‘bytes_to_int(message.data[34:35])/2.0’&force=‘True’

Anybody knows how to solve this issue?

Best regards
Tim