Windows
getWindows([, propertyNames])
Declaration
hmkit.commands.Windows.getWindows()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Returns
WindowsResponse
Example
hmkit.telematics.sendCommand(
hmkit.commands.Windows.getWindows(),
accessCertificate
);
WindowsResponse
Parameters
openPercentages | (Object) |
data.value | (Array |
timestamp | (Date) |
positions | (Object) |
data.value | (Array |
timestamp | (Date) |
Example
{
"openPercentages": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_left"
},
"openPercentage": {
"value": 0.2
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front_right"
},
"openPercentage": {
"value": 0.5
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_right"
},
"openPercentage": {
"value": 0.5
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear_left"
},
"openPercentage": {
"value": 0.1
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "hatch"
},
"openPercentage": {
"value": 0.18
}
}
}
],
"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": "open"
}
}
},
{
"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": "open"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "hatch"
},
"position": {
"value": "open"
}
}
}
]
}
getAvailability([, propertyNames])
Declaration
hmkit.commands.Windows.getAvailability()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Example
// Get availability for all properties
hmkit.telematics.sendCommand(
hmkit.commands.Windows.getAvailability(),
accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
hmkit.commands.Windows.getAvailability(['openPercentages']),
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
{
"openPercentages": {
"availability": {
"updateRate": {
"value": "trip_high"
},
"rateLimit": {
"value": 64,
"unit": "hertz"
},
"appliesPer": {
"value": "vehicle"
}
}
}
}
controlWindows({ openPercentages, positions })
Parameters
openPercentages | (Array |
positions | (Array |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Windows.controlWindows({
"openPercentages": [
{
"location": {
"value": "front_left"
},
"openPercentage": {
"value": 0.2
}
},
{
"location": {
"value": "front_right"
},
"openPercentage": {
"value": 0.5
}
},
{
"location": {
"value": "rear_right"
},
"openPercentage": {
"value": 0.5
}
},
{
"location": {
"value": "rear_left"
},
"openPercentage": {
"value": 0.1
}
},
{
"location": {
"value": "hatch"
},
"openPercentage": {
"value": 0.18
}
}
],
"positions": [
{
"location": {
"value": "front_left"
},
"position": {
"value": "open"
}
},
{
"location": {
"value": "front_right"
},
"position": {
"value": "open"
}
},
{
"location": {
"value": "rear_right"
},
"position": {
"value": "closed"
}
},
{
"location": {
"value": "rear_left"
},
"position": {
"value": "open"
}
},
{
"location": {
"value": "hatch"
},
"position": {
"value": "open"
}
}
]
}),
accessCertificate
);