Vehicle Status

getVehicleStatus([, propertyNames])

Declaration

hmkit.commands.VehicleStatus.getVehicleStatus()

Parameters

propertyNames

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

Returns

VehicleStatusResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.VehicleStatus.getVehicleStatus(),
  accessCertificate
);

VehicleStatusResponse

Parameters

states(Object)
data.value

(Array<Array>) (bytes) The bytes of a Capability state

timestamp

(Date)

Example

{
  "states": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "doors": {
          "locksState": {
            "data": {
              "value": "unlocked"
            }
          },
          "positions": [
            {
              "data": {
                "location": {
                  "value": "front_left"
                },
                "position": {
                  "value": "open"
                }
              }
            },
            {
              "data": {
                "location": {
                  "value": "rear_right"
                },
                "position": {
                  "value": "open"
                }
              }
            }
          ],
          "timestamp": {
            "data": {
              "value": "2017-01-10T16:32:05.000Z"
            }
          }
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "charging": {
          "chargePortState": {
            "data": {
              "value": "open"
            }
          },
          "chargeMode": {
            "data": {
              "value": "immediate"
            }
          },
          "chargingRate": {
            "data": {
              "value": 35,
              "unit": "kilowatts"
            }
          },
          "maxRange": {
            "data": {
              "value": 555,
              "unit": "kilometers"
            }
          },
          "timestamp": {
            "data": {
              "value": "2017-01-10T16:32:05.000Z"
            }
          }
        }
      }
    }
  ]
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.VehicleStatus.getAvailability()

Parameters

propertyNames

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

Example

// Get availability for all properties
hmkit.telematics.sendCommand(
  hmkit.commands.VehicleStatus.getAvailability(),
  accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
  hmkit.commands.VehicleStatus.getAvailability(['states']),
  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

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