update_speed_settings

To set speed parameters, use the unit/update_speed_settings method:

Copied!
svc=unit/update_speed_settings&params={"itemId":<long>,
"speedParameter":"<text>",
"speedMeasure":<uint>
}

Parameters

The request must contain the following parameters:

Parameter Description
itemId Unit ID.
speedParameter Speed parameter (parameter code from the unit message).
speedMeasure Parameter of the units of measurement. Numerical. The value is the code of the units of measurement, from 0 to 6.

Example

Below is an example of the unit/update_speed_settings request.

Copied!
svc=unit/update_speed_settings&params={
    "itemId": 1583,                 // Unit ID.
    "speedParameter": "speed",     // Parameter used to determine speed.
    "speedMeasure": 0              // Speed measurement system (for example, 0 for km/h, 1 for mph).
}

Response

If the request is completed successfully, an empty object is returned:

Copied!
{}

If the request fails, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters: a parameter is missing or has a wrong type, for example, speedMeasure is negative.
6 Failed to update speed parameters, or speedMeasure is outside the range of 0 to 6.
7 No Edit connectivity settings access right to the unit.

If you find a mistake in the text, please select it and press Ctrl+Enter.