calc_sensors_last

The unit/calc_sensors_last request is used to add the ability to calculate unit sensor values from cache. Depending on the Last message only option in the settings of each sensor, cache may mean either the last known unit parameters or the last message.

Copied!
svc=unit/calc_sensors_last&params={"unitId":<long>, "sensorId":<long>}

Parameters

Parameter

Description

unitId

Unit ID

sensorId

Sensor ID

Example

Copied!
svc=unit/calc_sensors_last&params={"unitId":1532, "sensorId":15}

Response

If the request is completed successfully, a response with sensor values is returned. A response example:

Copied!
{
	"6": {
		"value": "25701",
		"format": {
			"value": "A1-Velcom (BY) (25701)"
		}
	}
}

If the request hasn’t been completed, an error code is returned.

Error codes

Error code

Description

4Invalid input parameters.
5Error obtaining the last value.
7The user doesn't have the required access right to the unit (ADF_ACL_AVL_UNIT_VIEW_SENSORS).
Download PDF file
Download Word document

See also