Sensor calibration data
The curve that converts a sensor's raw readings into meaningful units.
Calibration data converts what a sensor actually reports into what a reader wants to see. An analogue fuel sensor reports volts, and the calibration curve turns those volts into litres. Without it a reading is a raw number with no useful meaning.
Updating replaces the whole curve rather than adding points to it. For Omnicomm sensors a third operation takes the manufacturer's own calibration file directly.
API actions
API base path: /tracker/sensor/calibration_data.
Get a sensor's calibration curve. Available to demo accounts, and reachable from a fuel-server session.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked.
123456Sensor ID.
234567The calibration curve
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 201: no tracker with this ID belongs to the account. Error 228: the sensor does not support calibration.
Error response object
POST /v2/tracker/sensor/calibration_data/read HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 40
{
"tracker_id": 123456,
"sensor_id": 234567
}{
"success": true,
"value": [
{
"in": 0.7,
"out": 60
}
]
}Errors
These errors come in addition to the general error codes:
201 - No tracker with this ID belongs to the account.
228 - The sensor does not support calibration.
Required sub-user rights: tracker_update.
Replaces a sensor's whole calibration curve rather than adding points to it.
Requires the tracker_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked.
123456Sensor ID.
234567The curve was replaced
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 201: no tracker with this ID belongs to the account. Error 219: the tracker is a clone. Error 228: the sensor does not support calibration.
Error response object
POST /v2/tracker/sensor/calibration_data/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 86
{
"tracker_id": 123456,
"sensor_id": 234567,
"data": [
{
"in": 0,
"out": 0
},
{
"in": 0.7,
"out": 60
}
]
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - No tracker with this ID belongs to the account.
219 - The tracker is a clone.
228 - The sensor does not support calibration.
Required sub-user rights: tracker_update.
Replace a sensor's calibration curve from an Omnicomm LLS monitor XML configuration file. Multipart request, with the file in a part named file.
When the file describes several sensors, sensor_id selects which one to take.
Requires the tracker_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked.
123456Sensor ID.
234567The LLS monitor XML file.
The curve was replaced
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 201: no tracker with this ID belongs to the account. Error 219: the tracker is a clone. Error 228: the sensor does not support calibration. Error 233: no file part was sent. Error 234: the file is not a valid LLS monitor XML file. Error 235: the file holds no calibration data for that sensor number.
Error response object
POST /v2/tracker/sensor/calibration_data/upload_omnicomm HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 56
{
"tracker_id": 123456,
"sensor_id": 234567,
"file": "binary"
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - No tracker with this ID belongs to the account.
219 - The tracker is a clone.
228 - The sensor does not support calibration.
233 - No file part was sent.
234 - The file is not a valid LLS monitor XML file.
235 - The file holds no calibration data for that sensor number.
Last updated
Was this helpful?