Charging
Table of Contents
getState([, propertyNames])
Declaration
hmkit.commands.Charging.getState()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Returns
ChargingResponse
Example
hmkit.telematics.sendCommand(
hmkit.commands.Charging.getState(),
accessCertificate
);
ChargingResponse
Parameters
acousticLimit | (Object) |
data.value | (String) (enum) Acoustic limitation of charging process. |
timestamp | (Date) |
auxiliaryPower | (Object) |
data.value | (Number) (power) Auxiliary power used for predictions. |
timestamp | (Date) |
batteryCapacity | (Object) |
data.value | (Number) (energy) Indicates the battery capacity |
timestamp | (Date) |
batteryChargeTransferEvent | (Object) |
data.value | (String) (enum) Indicates that the high-voltage battery lost state of charge due to an energy transfer to the 12V battery. |
timestamp | (Date) |
batteryChargeType | (Object) |
data.value | (String) (enum) Battery charge type. |
timestamp | (Date) |
batteryCoolingTemperature | (Object) |
data.value | (Number) (temperature) Battery cooling temperature. |
timestamp | (Date) |
batteryCurrent | (Object) |
data.value | (Number) (electric_current) Battery current - charging if posititive and discharning when negative. |
timestamp | (Date) |
batteryEnergy | (Object) |
data.value | (Number) (energy) Energy content of the high-voltage battery. |
timestamp | (Date) |
batteryEnergyChargable | (Object) |
data.value | (Number) (energy) Energy required until high-voltage battery is fully charged. |
timestamp | (Date) |
batteryLed | (Object) |
data.value | (String) (enum) State of LED for the battery. |
timestamp | (Date) |
batteryLevel | (Object) |
data.value | (Number) (double) Battery level percentage between 0.0-1.0 |
timestamp | (Date) |
batteryLevelAtDeparture | (Object) |
data.value | (Number) (double) Battery charge level expected at time of departure |
timestamp | (Date) |
batteryMaxAvailable | (Object) |
data.value | (Number) (energy) Maximum available energy content of the high-voltage battery. |
timestamp | (Date) |
batteryPerformanceStatus | (Object) |
data.value | (String) (enum) Performance status of the xEV battery. |
timestamp | (Date) |
batteryStatus | (Object) |
data.value | (String) (enum) Battery state. |
timestamp | (Date) |
batteryTemperature | (Object) |
data.value | (Number) (temperature) Battery temperature |
timestamp | (Date) |
batteryTemperatureControlDemand | (Object) |
data.value | (String) (enum) Current demand of HV battery temperature control system. |
timestamp | (Date) |
batteryTemperatureExtremes | (Object) |
data.value | (Object) Current highest-lowest temperature inside the battery. |
timestamp | (Date) |
batteryVoltage | (Object) |
data.value | (Number) (electric_potential_difference) High-voltage battery electric potential difference (aka voltage). |
timestamp | (Date) |
chargeLimit | (Object) |
data.value | (Number) (double) Charge limit percentage between 0.0-1.0 |
timestamp | (Date) |
chargeMode | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
chargePortState | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
chargerPower | (Object) |
data.value | (Number) (power) Power of the charger. |
timestamp | (Date) |
chargerVoltage | (Object) |
data.value | (Number) (electric_potential_difference) Charger voltage |
timestamp | (Date) |
chargingCompleteLock | (Object) |
data.value | (String) (enum) Locking status of the charging plug after charging complete. |
timestamp | (Date) |
chargingCurrent | (Object) |
data.value | (Number) (electric_current) Charging electric current. |
timestamp | (Date) |
chargingEndReason | (Object) |
data.value | (String) (enum) Reason for ending a charging process. |
timestamp | (Date) |
chargingPhases | (Object) |
data.value | (String) (enum) Charging process count of the high-voltage battery (phases). |
timestamp | (Date) |
chargingRate | (Object) |
data.value | (Number) (power) Charge rate when charging |
timestamp | (Date) |
chargingRateDistance | (Object) |
data.value | (Object) Range increase per time unit during ongoing charging process based on the average energy comsumption for driving. |
timestamp | (Date) |
chargingScenario | (Object) |
data.value | (String) (enum) Charging scenario. |
timestamp | (Date) |
chargingSingleImmediate | (Object) |
data.value | (String) (enum) Single instant charging function status. |
timestamp | (Date) |
chargingTimeDisplay | (Object) |
data.value | (String) (enum) Charging time displayed in the vehicle. |
timestamp | (Date) |
chargingWindowChosen | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
conservingCharge | (Object) |
data.value | (String) (enum) Indicates if the vehicle is conserving charge. |
timestamp | (Date) |
currentLimit | (Object) |
data.value | (Number) (electric_current) Limit for the charging current. |
timestamp | (Date) |
currentType | (Object) |
data.value | (String) (enum) Type of current in use |
timestamp | (Date) |
departureTimeDisplay | (Object) |
data.value | (String) (enum) Departure time displayed in the vehicle. |
timestamp | (Date) |
departureTimes | (Object) |
data.value | (Array |
timestamp | (Date) |
distanceToCompleteCharge | (Object) |
data.value | (Number) (length) Distance until charging completed |
timestamp | (Date) |
drivingModePHEV | (Object) |
data.value | (String) (enum) Indicates the current driving mode for Plug-In Hybrid Vehicle. |
timestamp | (Date) |
estimatedRange | (Object) |
data.value | (Number) (length) Estimated range |
timestamp | (Date) |
estimatedRangeTarget | (Object) |
data.value | (Number) (length) Remaining electric range depending on target charging status. |
timestamp | (Date) |
flapLockStatus | (Object) |
data.value | (String) (enum) Locking status of charging flap. |
timestamp | (Date) |
fullyChargedEndTimes | (Object) |
data.value | (Object) Time and weekday when the vehicle will be fully charged. |
timestamp | (Date) |
hybridOperatingMode | (Object) |
data.value | (String) (enum) Operating mode of the hybrid vehicle. |
timestamp | (Date) |
limitStatus | (Object) |
data.value | (String) (enum) Indicates whether charging limit is active. |
timestamp | (Date) |
maxChargingCurrent | (Object) |
data.value | (Number) (electric_current) Maximum charging current |
timestamp | (Date) |
maxRange | (Object) |
data.value | (Number) (length) Maximum electric range with 100% of battery |
timestamp | (Date) |
minChargingCurrent | (Object) |
data.value | (Number) (electric_current) Minimum charging current. |
timestamp | (Date) |
pluggedIn | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
plugLockStatus | (Object) |
data.value | (String) (enum) Locking status of charging plug. |
timestamp | (Date) |
plugType | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
preconditioningDepartureEnabled | (Object) |
data.value | (String) (enum) Preconditioning activation status at departure |
timestamp | (Date) |
preconditioningDepartureStatus | (Object) |
data.value | (String) (enum) Status of preconditioning at departure time |
timestamp | (Date) |
preconditioningError | (Object) |
data.value | (String) (enum) Preconditioning error if one is encountered |
timestamp | (Date) |
preconditioningImmediateStatus | (Object) |
data.value | (String) (enum) Status of immediate preconditioning |
timestamp | (Date) |
preconditioningRemainingTime | (Object) |
data.value | (Number) (duration) Time until preconditioning is complete. |
timestamp | (Date) |
preconditioningScheduledTime | (Object) |
data.value | (Object) Preconditioning scheduled departure time. |
timestamp | (Date) |
reductionTimes | (Object) |
data.value | (Array |
timestamp | (Date) |
restriction | (Object) |
data.value | (Object) Charging limit and state |
timestamp | (Date) |
smartChargingOption | (Object) |
data.value | (String) (enum) Smart charging option being used to charge with. |
timestamp | (Date) |
smartChargingStatus | (Object) |
data.value | (String) (enum) Status of optimized/intelligent charging |
timestamp | (Date) |
starterBatteryState | (Object) |
data.value | (String) (enum) State of the starter battery |
timestamp | (Date) |
stationDisplayedStatus | (Object) |
data.value | (String) (enum) Status shown on the display of the charging station. |
timestamp | (Date) |
stationPowerType | (Object) |
data.value | (String) (enum) The power type of the connected charging station. |
timestamp | (Date) |
stationStatus | (Object) |
data.value | (String) (enum) Status of the charging station. |
timestamp | (Date) |
status | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
timers | (Object) |
data.value | (Array |
timestamp | (Date) |
timeToCompleteCharge | (Object) |
data.value | (Number) (duration) Time until charging completed |
timestamp | (Date) |
Example
{
"acousticLimit": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "automatic"
}
},
"auxiliaryPower": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 120,
"unit": "kilowatts"
}
},
"batteryCapacity": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 70,
"unit": "kilowatt_hours"
}
},
"batteryChargeTransferEvent": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "low_voltage_battery_service_required"
}
},
"batteryChargeType": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "quick"
}
},
"batteryCoolingTemperature": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 63.4,
"unit": "celsius"
}
},
"batteryCurrent": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": -0.6,
"unit": "amperes"
}
},
"batteryEnergy": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 119.5,
"unit": "kilowatt_hours"
}
},
"batteryEnergyChargable": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 30.75,
"unit": "kilowatt_hours"
}
},
"batteryLed": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "no_colour"
}
},
"batteryLevel": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.5
}
},
"batteryLevelAtDeparture": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.9
}
},
"batteryMaxAvailable": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 99,
"unit": "kilowatt_hours"
}
},
"batteryPerformanceStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "normal"
}
},
"batteryStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"batteryTemperature": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 38.4,
"unit": "celsius"
}
},
"batteryTemperatureControlDemand": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "high_cooling"
}
},
"batteryTemperatureExtremes": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"extreme": {
"value": "highest"
},
"temperature": {
"value": 85,
"unit": "celsius"
}
}
},
"batteryVoltage": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 120,
"unit": "volts"
}
},
"chargeLimit": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 0.9
}
},
"chargeMode": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "timer_based"
}
},
"chargePortState": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "open"
}
},
"chargerPower": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 120,
"unit": "kilowatts"
}
},
"chargerVoltage": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 400,
"unit": "volts"
}
},
"chargingCompleteLock": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "inactive"
}
},
"chargingCurrent": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 3.14,
"unit": "amperes"
}
},
"chargingEndReason": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "goal_reached"
}
},
"chargingPhases": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "one"
}
},
"chargingRate": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 150,
"unit": "kilowatts"
}
},
"chargingRateDistance": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"distance": {
"value": 150,
"unit": "kilometers"
},
"time": {
"value": 1,
"unit": "hours"
}
}
},
"chargingScenario": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "charging_to_departure_time_finished"
}
},
"chargingSingleImmediate": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"chargingTimeDisplay": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "display_duration"
}
},
"chargingWindowChosen": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "not_chosen"
}
},
"conservingCharge": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"currentLimit": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 100,
"unit": "amperes"
}
},
"currentType": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "alternating_current"
}
},
"departureTimeDisplay": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "reachable"
}
},
"departureTimes": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"state": {
"value": "active"
},
"time": {
"hour": {
"value": 16
},
"minute": {
"value": 32
}
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"state": {
"value": "inactive"
},
"time": {
"hour": {
"value": 11
},
"minute": {
"value": 51
}
}
}
}
],
"distanceToCompleteCharge": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 120.5,
"unit": "kilometers"
}
},
"drivingModePHEV": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "hybrid_parallel"
}
},
"estimatedRange": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 432.1,
"unit": "kilometers"
}
},
"estimatedRangeTarget": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 300,
"unit": "kilometers"
}
},
"flapLockStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "locked"
}
},
"fullyChargedEndTimes": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"weekday": {
"value": "monday"
},
"time": {
"hour": {
"value": 5
},
"minute": {
"value": 30
}
}
}
},
"hybridOperatingMode": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "auto_charge_sustain"
}
},
"limitStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "inactive"
}
},
"maxChargingCurrent": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 25,
"unit": "amperes"
}
},
"maxRange": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 555,
"unit": "kilometers"
}
},
"minChargingCurrent": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 5,
"unit": "amperes"
}
},
"pluggedIn": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "plugged_in"
}
},
"plugLockStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "unlocked"
}
},
"plugType": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "type_2"
}
},
"preconditioningDepartureEnabled": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "enabled"
}
},
"preconditioningDepartureStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"preconditioningError": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "not_possible_low"
}
},
"preconditioningImmediateStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "active"
}
},
"preconditioningRemainingTime": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 110,
"unit": "minutes"
}
},
"preconditioningScheduledTime": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"hour": {
"value": 5
},
"minute": {
"value": 30
}
}
},
"reductionTimes": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"startStop": {
"value": "start"
},
"time": {
"hour": {
"value": 17
},
"minute": {
"value": 33
}
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"startStop": {
"value": "stop"
},
"time": {
"hour": {
"value": 12
},
"minute": {
"value": 52
}
}
}
}
],
"restriction": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"active": {
"value": "active"
},
"limit": {
"value": "max"
}
}
},
"smartChargingOption": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "renewable_energy"
}
},
"smartChargingStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "scc_is_active"
}
},
"starterBatteryState": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "green"
}
},
"stationDisplayedStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "in_progress"
}
},
"stationPowerType": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "ac_smart"
}
},
"stationStatus": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "station_ready"
}
},
"status": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "charging"
}
},
"timers": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"timerType": {
"value": "preferred_start_time"
},
"date": {
"value": "2017-01-10T16:32:05.000Z"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"timerType": {
"value": "preferred_end_time"
},
"date": {
"value": "2017-01-10T16:36:05.000Z"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"timerType": {
"value": "departure_date"
},
"date": {
"value": "2017-01-10T16:36:05.000Z"
}
}
}
],
"timeToCompleteCharge": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 60,
"unit": "minutes"
}
}
}
getAvailability([, propertyNames])
Declaration
hmkit.commands.Charging.getAvailability()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Example
// Get availability for all properties
hmkit.telematics.sendCommand(
hmkit.commands.Charging.getAvailability(),
accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
hmkit.commands.Charging.getAvailability(['estimatedRange']),
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
{
"estimatedRange": {
"availability": {
"updateRate": {
"value": "trip_high"
},
"rateLimit": {
"value": 64,
"unit": "hertz"
},
"appliesPer": {
"value": "vehicle"
}
}
}
}
openCloseChargingPort({ chargePortState })
Parameters
chargePortState | (String) (enum) |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Charging.openCloseChargingPort({
"chargePortState": "open"
}),
accessCertificate
);
setChargeLimit({ chargeLimit })
Parameters
chargeLimit | (Number) (double) Charge limit percentage between 0.0-1.0 |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Charging.setChargeLimit({
"chargeLimit": 0.9
}),
accessCertificate
);
setChargeMode({ chargeMode })
Parameters
chargeMode | (String) (enum) |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Charging.setChargeMode({
"chargeMode": "timer_based"
}),
accessCertificate
);
setChargingTimers({ timers })
Parameters
timers | (Array |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Charging.setChargingTimers({
"timers": [
{
"timerType": {
"value": "preferred_start_time"
},
"date": {
"value": "2017-01-10T16:32:05.000Z"
}
},
{
"timerType": {
"value": "preferred_end_time"
},
"date": {
"value": "2017-01-10T16:36:05.000Z"
}
},
{
"timerType": {
"value": "departure_date"
},
"date": {
"value": "2017-01-10T16:36:05.000Z"
}
}
]
}),
accessCertificate
);
setReductionOfChargingCurrentTimes({ reductionTimes })
Parameters
reductionTimes | (Array |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Charging.setReductionOfChargingCurrentTimes({
"reductionTimes": [
{
"startStop": {
"value": "start"
},
"time": {
"hour": {
"value": 17
},
"minute": {
"value": 33
}
}
},
{
"startStop": {
"value": "stop"
},
"time": {
"hour": {
"value": 12
},
"minute": {
"value": 52
}
}
}
]
}),
accessCertificate
);
startStopCharging({ status })
Parameters
status | (String) (enum) |
Example
hmkit.telematics.sendCommand(
hmkit.commands.Charging.startStopCharging({
"status": "charging"
}),
accessCertificate
);