Trunk

getState([, propertyNames])

Declaration

hmkit.commands.Trunk.getState()

Parameters

propertyNames

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

Returns

TrunkResponse

Example

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

TrunkResponse

Parameters

lock(Object)
data.value

(String) (enum)

timestamp

(Date)

lockSafety(Object)
data.value

(String) (enum) Indicates the safe-state of the trunk.

timestamp

(Date)

position(Object)
data.value

(String) (enum)

timestamp

(Date)

Example

{
  "lock": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "unlocked"
    }
  },
  "lockSafety": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "safe"
    }
  },
  "position": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "open"
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Trunk.getAvailability()

Parameters

propertyNames

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

Example

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

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

controlTrunk({ lock, position })

Parameters

lock

(String) (enum)

position

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Trunk.controlTrunk({
    "lock": "unlocked",
    "position": "open"
  }),
  accessCertificate
);