Set Odometer and Run Hour counts - 0x0012 and 0x0013
Set an initial Odometer or Run Hour reading on the device, via API call
Table of Contents
Before you start
Ensure you have reviewed:
A full list of API calls can be found at: https://api.oemserver.com/swagger/index.html.
Description
The following messages can be sent in order to set an initial Run Hours or Odometer reading on a device. For use with On Device Run Hours.
0x0012 - Set Odometer Request Example
Payload:
Offset |
Length |
Data Type |
Description |
0 |
4 |
UINT32 |
The odometer value in metres/10 |
Example:
{
"MessageType":18, // 0x0012 – Set Odometer,
"CANAddress":4294967295, //0xFFFFFFFF,//HOST_ADDRESS
"Data":[232,03,00,00], //See below
"ExpiryDateUTC":"2018-07-20T18:25:43.511Z"
}
The above example sets the odometer reading to 10km = 10 000m. The unit/LSB is 10m therefore,
10 000m/10m = 1000 = 0x3E8
Converting this to Little Endian = E8 03 00 00
Then we send the byte array in JSON format
E8 = 232
03 = 03
00 = 00
00 = 00
Giving:
[232, 03, 00, 00]
0x0013 - Set Run Hours
Payload:
Offset |
Length |
Data Type |
Description |
0 |
4 |
UINT32 |
The run hours value in seconds |