Capabilities

getCapabilities([, propertyNames])

Declaration

hmkit.commands.Capabilities.getCapabilities()

Parameters

propertyNames

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

Returns

CapabilitiesResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Capabilities.getCapabilities(),
  accessCertificate
);

CapabilitiesResponse

Parameters

capabilities(Object)
data.value

(Array)

timestamp

(Date)

webhooks(Object)
data.value

(Array)

timestamp

(Date)

Example

{
  "capabilities": [
    {
      "data": {
        "capability": "doors",
        "supportedProperties": [
          "insideLocks",
          "insideLocksState",
          "locks",
          "locksState",
          "positions"
        ]
      }
    },
    {
      "data": {
        "capability": "charging",
        "supportedProperties": [
          "chargeLimit",
          "departureTimes",
          "estimatedRange"
        ]
      }
    }
  ],
  "webhooks": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "available": {
          "value": "available"
        },
        "event": {
          "value": "trip_started"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "available": {
          "value": "available"
        },
        "event": {
          "value": "trip_ended"
        }
      }
    }
  ]
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Capabilities.getAvailability()

Parameters

propertyNames

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

Example

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

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