Maintenance

getState([, propertyNames])

Declaration

hmkit.commands.Maintenance.getState()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Returns

MaintenanceResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Maintenance.getState(),
  accessCertificate
);

MaintenanceResponse

Parameters

cbsReportsCount(Object)
data.value

(Number) (uinteger) The number of CBS reports

timestamp

(Date)

teleserviceAvailability(Object)
data.value

(String) (enum)

timestamp

(Date)

serviceDistanceThreshold(Object)
data.value

(Number) (length) Distance threshold for service

timestamp

(Date)

serviceTimeThreshold(Object)
data.value

(Number) (duration) Time threshold for service

timestamp

(Date)

automaticTeleserviceCallDate(Object)
data.value

(Date) (timestamp) Automatic teleservice call date

timestamp

(Date)

teleserviceBatteryCallDate(Object)
data.value

(Date) (timestamp) Teleservice batter call date

timestamp

(Date)

nextInspectionDate(Object)
data.value

(Date) (timestamp) Next inspection date

timestamp

(Date)

conditionBasedServices(Object)
data.value

(Array)

timestamp

(Date)

brakeFluidChangeDate(Object)
data.value

(Date) (timestamp) Brake fluid change date

timestamp

(Date)

timeToNextService(Object)
data.value

(Number) (duration) Time until next servicing of the vehicle

timestamp

(Date)

distanceToNextService(Object)
data.value

(Number) (length) The distance until next servicing of the vehicle

timestamp

(Date)

timeToExhaustInspection(Object)
data.value

(Number) (duration) Time until exhaust inspection

timestamp

(Date)

lastECall(Object)
data.value

(Date) (timestamp) Date-time of the last eCall

timestamp

(Date)

distanceToNextOilService(Object)
data.value

(Number) (length) Indicates the remaining distance until the next oil service; if this limit was exceeded, this value indicates the distance that has been driven since then.

timestamp

(Date)

timeToNextOilService(Object)
data.value

(Number) (duration) Indicates the time remaining until the next oil service; if this limit was exceeded, this value indicates the time that has passed since then.

timestamp

(Date)

Example

{
  "cbsReportsCount": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 3
    }
  },
  "teleserviceAvailability": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "successful"
    }
  },
  "serviceDistanceThreshold": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 5000,
      "unit": "kilometers"
    }
  },
  "serviceTimeThreshold": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 4,
      "unit": "weeks"
    }
  },
  "automaticTeleserviceCallDate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "2018-11-23T11:33:50.000Z"
    }
  },
  "teleserviceBatteryCallDate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "2018-11-23T10:36:50.000Z"
    }
  },
  "nextInspectionDate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "2018-10-23T14:38:47.000Z"
    }
  },
  "conditionBasedServices": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "year": {
          "value": 2019
        },
        "month": {
          "value": 5
        },
        "id": {
          "value": 3
        },
        "dueStatus": {
          "value": "ok"
        },
        "text": {
          "value": "Brake fluid"
        },
        "description": {
          "value": "Next change at specified date at the latest."
        }
      }
    }
  ],
  "brakeFluidChangeDate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "2018-12-05T03:22:56.000Z"
    }
  },
  "timeToNextService": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 501,
      "unit": "days"
    }
  },
  "distanceToNextService": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 3681,
      "unit": "kilometers"
    }
  },
  "timeToExhaustInspection": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 5,
      "unit": "months"
    }
  },
  "lastECall": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "2018-12-05T03:22:56.000Z"
    }
  },
  "distanceToNextOilService": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 525.6,
      "unit": "kilometers"
    }
  },
  "timeToNextOilService": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 66.8,
      "unit": "days"
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Maintenance.getAvailability()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Example

// Get availability for all properties
hmkit.telematics.sendCommand(
  hmkit.commands.Maintenance.getAvailability(),
  accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
  hmkit.commands.Maintenance.getAvailability(['cbs_reports_count']),
  accessCertificate
);

Response

Parameters

availability(Object)
updateRate.value

(String) enum

rateLimit.value

(Number)

rateLimit.unit

(String)

appliesPer.value

(String)

Discussion

The response contains an availability object for each property, as shown in the example

Example

{
  "cbs_reports_count": {
    "availability": {
      "updateRate": {
        "value": "trip_high"
      },
      "rateLimit": {
        "value": 64,
        "unit": "hertz"
      },
      "appliesPer": {
        "value": "vehicle"
      }
    }
  }
}