Doors
getState([, propertyNames])
Declaration
hmkit.commands.Doors.getState()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Returns
DoorsResponse
Example
hmkit.telematics.sendCommand(
hmkit.commands.Doors.getState(),
accessCertificate
);
DoorsResponse
Parameters
insideLocks | (Object) |
data.value | (Array |
timestamp | (Date) |
insideLocksState | (Object) |
data.value | (String) (enum) Inside locks state for the whole vehicle (combines all specific lock states if available) |
timestamp | (Date) |
locks | (Object) |
data.value | (Array |
timestamp | (Date) |
locksState | (Object) |
data.value | (String) (enum) Locks state for the whole vehicle (combines all specific lock states if available) |
timestamp | (Date) |
positions | (Object) |
data.value | (Array |
timestamp | (Date) |
Example
{
"insideLocks": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_left"
},
"lockState": {
"value": "locked"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_right"
},
"lockState": {
"value": "unlocked"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_right"
},
"lockState": {
"value": "unlocked"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_left"
},
"lockState": {
"value": "unlocked"
}
}
}
],
"insideLocksState": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "locked"
}
},
"locks": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_left"
},
"lockState": {
"value": "unlocked"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_right"
},
"lockState": {
"value": "unlocked"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_right"
},
"lockState": {
"value": "locked"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_left"
},
"lockState": {
"value": "locked"
}
}
}
],
"locksState": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "unlocked"
}
},
"positions": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_left"
},
"position": {
"value": "open"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_right"
},
"position": {
"value": "closed"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_right"
},
"position": {
"value": "closed"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_left"
},
"position": {
"value": "closed"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "all"
},
"position": {
"value": "closed"
}
}
}
]
}
getAvailability([, propertyNames])
Declaration
hmkit.commands.Doors.getAvailability()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Example
// Get availability for all properties
hmkit.telematics.sendCommand(
hmkit.commands.Doors.getAvailability(),
accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
hmkit.commands.Doors.getAvailability(['insideLocks']),
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
{
"insideLocks": {
"availability": {
"updateRate": {
"value": "trip_high"
},
"rateLimit": {
"value": 64,
"unit": "hertz"
},
"appliesPer": {
"value": "vehicle"
}
}
}
}
lockUnlockDoors({ locksState })
Parameters
locksState | (String) (enum) Locks state for the whole vehicle (combines all specific lock states if available) |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Doors.lockUnlockDoors({
"locksState": "unlocked"
}),
accessCertificate
);