Remote Control
getControlState([, propertyNames])
Declaration
hmkit.commands.RemoteControl.getControlState()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Returns
RemoteControlResponse
Example
hmkit.telematics.sendCommand(
hmkit.commands.RemoteControl.getControlState(),
accessCertificate
);
RemoteControlResponse
Parameters
angle | (Object) |
data.value | (Number) (angle) Wheel base angle |
timestamp | (Date) |
controlMode | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
Example
{
"angle": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 50,
"unit": "degrees"
}
},
"controlMode": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "started"
}
}
}
getAvailability([, propertyNames])
Declaration
hmkit.commands.RemoteControl.getAvailability()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Example
// Get availability for all properties
hmkit.telematics.sendCommand(
hmkit.commands.RemoteControl.getAvailability(),
accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
hmkit.commands.RemoteControl.getAvailability(['controlMode']),
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
{
"controlMode": {
"availability": {
"updateRate": {
"value": "trip_high"
},
"rateLimit": {
"value": 64,
"unit": "hertz"
},
"appliesPer": {
"value": "vehicle"
}
}
}
}
controlCommand({ angle, speed })
Parameters
angle | (Number) (angle) Wheel base angle |
speed | (Number) (speed) Target speed |
Example
hmkit.telematics.sendCommand(
hmkit.commands.RemoteControl.controlCommand({
"angle": {
"degrees": 50
},
"speed": {
"kilometers_per_hour": 5
}
}),
accessCertificate
);
startControl()
Parameters
Example
hmkit.telematics.sendCommand(
hmkit.commands.RemoteControl.startControl({}),
accessCertificate
);
stopControl()
Parameters
Example
hmkit.telematics.sendCommand(
hmkit.commands.RemoteControl.stopControl({}),
accessCertificate
);