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

daysToNextService(Object)
data.value

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

timestamp

(Date)

kilometersToNextService(Object)
data.value

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

timestamp

(Date)

cbsReportsCount(Object)
data.value

(Number) (uinteger) The number of CBS reports

timestamp

(Date)

monthsToExhaustInspection(Object)
data.value

(Number) (duration) Time until exhaust inspection

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)

Example

{
  "daysToNextService": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 501,
        "unit": "days"
      }
    }
  },
  "kilometersToNextService": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 3681,
        "unit": "kilometers"
      }
    }
  },
  "cbsReportsCount": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 3
      }
    }
  },
  "monthsToExhaustInspection": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 5,
        "unit": "months"
      }
    }
  },
  "teleserviceAvailability": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "successful"
      }
    }
  },
  "serviceDistanceThreshold": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 5000,
        "unit": "kilometers"
      }
    }
  },
  "serviceTimeThreshold": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 4,
        "unit": "weeks"
      }
    }
  },
  "automaticTeleserviceCallDate": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "2018-11-23T11:33:50.000Z"
      }
    }
  },
  "teleserviceBatteryCallDate": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "2018-11-23T10:36:50.000Z"
      }
    }
  },
  "nextInspectionDate": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "2018-10-23T14:38:47.000Z"
      }
    }
  },
  "conditionBasedServices": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "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": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "2018-12-05T03:22:56.000Z"
      }
    }
  },
  "timeToNextService": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 501,
        "unit": "days"
      }
    }
  },
  "distanceToNextService": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 3681,
        "unit": "kilometers"
      }
    }
  },
  "timeToExhaustInspection": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 5,
        "unit": "months"
      }
    }
  },
  "lastECall": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "2018-12-05T03:22:56.000Z"
      }
    }
  }
}

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(['days_to_next_service']),
  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

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