Charging

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

estimatedRange(Object)
data.value

(Number) (length) Estimated range

timestamp

(Date)

batteryLevel(Object)
data.value

(Number) (double) Battery level percentage between 0.0-1.0

timestamp

(Date)

chargeLimit(Object)
data.value

(Number) (double) Charge limit percentage between 0.0-1.0

timestamp

(Date)

timeToCompleteCharge(Object)
data.value

(Number) (duration) Time until charging completed

timestamp

(Date)

chargePortState(Object)
data.value

(String) (enum)

timestamp

(Date)

chargeMode(Object)
data.value

(String) (enum)

timestamp

(Date)

maxChargingCurrent(Object)
data.value

(Number) (electric_current) Maximum charging current

timestamp

(Date)

plugType(Object)
data.value

(String) (enum)

timestamp

(Date)

chargingWindowChosen(Object)
data.value

(String) (enum)

timestamp

(Date)

departureTimes(Object)
data.value

(Array)

timestamp

(Date)

reductionTimes(Object)
data.value

(Array)

timestamp

(Date)

batteryTemperature(Object)
data.value

(Number) (temperature) Battery temperature

timestamp

(Date)

timers(Object)
data.value

(Array)

timestamp

(Date)

pluggedIn(Object)
data.value

(String) (enum)

timestamp

(Date)

status(Object)
data.value

(String) (enum)

timestamp

(Date)

chargingRate(Object)
data.value

(Number) (power) Charge rate when charging

timestamp

(Date)

batteryCurrent(Object)
data.value

(Number) (electric_current) Battery current - charging if posititive and discharning when negative.

timestamp

(Date)

chargerVoltage(Object)
data.value

(Number) (electric_potential_difference) Charger voltage

timestamp

(Date)

currentType(Object)
data.value

(String) (enum) Type of current in use

timestamp

(Date)

maxRange(Object)
data.value

(Number) (length) Maximum electric range with 100% of battery

timestamp

(Date)

starterBatteryState(Object)
data.value

(String) (enum) State of the starter battery

timestamp

(Date)

smartChargingStatus(Object)
data.value

(String) (enum) Status of optimized/intelligent charging

timestamp

(Date)

batteryLevelAtDeparture(Object)
data.value

(Number) (double) Battery charge level expected at time of departure

timestamp

(Date)

preconditioningDepartureStatus(Object)
data.value

(String) (enum) Status of preconditioning at departure time

timestamp

(Date)

preconditioningImmediateStatus(Object)
data.value

(String) (enum) Status of immediate preconditioning

timestamp

(Date)

preconditioningDepartureEnabled(Object)
data.value

(String) (enum) Preconditioning activation status at departure

timestamp

(Date)

preconditioningError(Object)
data.value

(String) (enum) Preconditioning error if one is encountered

timestamp

(Date)

batteryCapacity(Object)
data.value

(Number) (energy) Indicates the battery capacity

timestamp

(Date)

auxiliaryPower(Object)
data.value

(Number) (power) Auxiliary power used for predictions.

timestamp

(Date)

chargingCompleteLock(Object)
data.value

(String) (enum) Locking status of the charging plug after charging complete.

timestamp

(Date)

batteryMaxAvailable(Object)
data.value

(Number) (energy) Maximum available energy content of the high-voltage battery.

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)

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)

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)

departureTimeDisplay(Object)
data.value

(String) (enum) Departure time displayed in the vehicle.

timestamp

(Date)

restriction(Object)
data.value

(Object) Charging limit and state

timestamp

(Date)

limitStatus(Object)
data.value

(String) (enum) Indicates whether charging limit is active.

timestamp

(Date)

currentLimit(Object)
data.value

(Number) (electric_current) Limit for the charging current.

timestamp

(Date)

smartChargingOption(Object)
data.value

(String) (enum) Smart charging option being used to charge with.

timestamp

(Date)

plugLockStatus(Object)
data.value

(String) (enum) Locking status of charging plug.

timestamp

(Date)

flapLockStatus(Object)
data.value

(String) (enum) Locking status of charging flap.

timestamp

(Date)

acousticLimit(Object)
data.value

(String) (enum) Acoustic limitation of charging process.

timestamp

(Date)

minChargingCurrent(Object)
data.value

(Number) (electric_current) Minimum charging current.

timestamp

(Date)

estimatedRangeTarget(Object)
data.value

(Number) (length) Remaining electric range depending on target charging status.

timestamp

(Date)

fullyChargedEndTimes(Object)
data.value

(Object) Time and weekday when the vehicle will be fully charged.

timestamp

(Date)

preconditioningScheduledTime(Object)
data.value

(Object) Preconditioning scheduled departure time.

timestamp

(Date)

preconditioningRemainingTime(Object)
data.value

(Number) (duration) Time until preconditioning is complete.

timestamp

(Date)

batteryVoltage(Object)
data.value

(Number) (electric_potential_difference) High-voltage battery electric potential difference (aka voltage).

timestamp

(Date)

batteryTemperatureControlDemand(Object)
data.value

(String) (enum) Current demand of HV battery temperature control system.

timestamp

(Date)

chargingCurrent(Object)
data.value

(Number) (electric_current) Charging electric current.

timestamp

(Date)

batteryStatus(Object)
data.value

(String) (enum) Battery state.

timestamp

(Date)

batteryLed(Object)
data.value

(String) (enum) State of LED for the battery.

timestamp

(Date)

batteryCoolingTemperature(Object)
data.value

(Number) (temperature) Battery cooling temperature.

timestamp

(Date)

batteryTemperatureExtremes(Object)
data.value

(Object) Current highest-lowest temperature inside the battery.

timestamp

(Date)

Example

{
  "estimatedRange": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 432.1,
      "unit": "kilometers"
    }
  },
  "batteryLevel": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.5
    }
  },
  "chargeLimit": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.9
    }
  },
  "timeToCompleteCharge": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 60,
      "unit": "minutes"
    }
  },
  "chargePortState": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "open"
    }
  },
  "chargeMode": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "timer_based"
    }
  },
  "maxChargingCurrent": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 25,
      "unit": "amperes"
    }
  },
  "plugType": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "type_2"
    }
  },
  "chargingWindowChosen": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "not_chosen"
    }
  },
  "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
          }
        }
      }
    }
  ],
  "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
          }
        }
      }
    }
  ],
  "batteryTemperature": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 38.4,
      "unit": "celsius"
    }
  },
  "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"
        }
      }
    }
  ],
  "pluggedIn": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "plugged_in"
    }
  },
  "status": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "charging"
    }
  },
  "chargingRate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 150,
      "unit": "kilowatts"
    }
  },
  "batteryCurrent": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": -0.6,
      "unit": "amperes"
    }
  },
  "chargerVoltage": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 400,
      "unit": "volts"
    }
  },
  "currentType": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "alternating_current"
    }
  },
  "maxRange": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 555,
      "unit": "kilometers"
    }
  },
  "starterBatteryState": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "green"
    }
  },
  "smartChargingStatus": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "scc_is_active"
    }
  },
  "batteryLevelAtDeparture": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.9
    }
  },
  "preconditioningDepartureStatus": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "preconditioningImmediateStatus": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "preconditioningDepartureEnabled": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "enabled"
    }
  },
  "preconditioningError": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "not_possible_low"
    }
  },
  "batteryCapacity": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 70,
      "unit": "kilowatt_hours"
    }
  },
  "auxiliaryPower": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 120,
      "unit": "kilowatts"
    }
  },
  "chargingCompleteLock": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "inactive"
    }
  },
  "batteryMaxAvailable": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 99,
      "unit": "kilowatt_hours"
    }
  },
  "chargingEndReason": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "goal_reached"
    }
  },
  "chargingPhases": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "one"
    }
  },
  "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"
    }
  },
  "chargingSingleImmediate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "chargingTimeDisplay": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "display_duration"
    }
  },
  "departureTimeDisplay": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "reachable"
    }
  },
  "restriction": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "active": {
        "value": "active"
      },
      "limit": {
        "value": "max"
      }
    }
  },
  "limitStatus": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "inactive"
    }
  },
  "currentLimit": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 100,
      "unit": "amperes"
    }
  },
  "smartChargingOption": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "renewable_energy"
    }
  },
  "plugLockStatus": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "unlocked"
    }
  },
  "flapLockStatus": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "locked"
    }
  },
  "acousticLimit": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "automatic"
    }
  },
  "minChargingCurrent": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 5,
      "unit": "amperes"
    }
  },
  "estimatedRangeTarget": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 300,
      "unit": "kilometers"
    }
  },
  "fullyChargedEndTimes": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "weekday": {
        "value": "monday"
      },
      "time": {
        "hour": {
          "value": 5
        },
        "minute": {
          "value": 30
        }
      }
    }
  },
  "preconditioningScheduledTime": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "hour": {
        "value": 5
      },
      "minute": {
        "value": 30
      }
    }
  },
  "preconditioningRemainingTime": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 110,
      "unit": "minutes"
    }
  },
  "batteryVoltage": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 120,
      "unit": "volts"
    }
  },
  "batteryTemperatureControlDemand": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "high_cooling"
    }
  },
  "chargingCurrent": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 3.14,
      "unit": "amperes"
    }
  },
  "batteryStatus": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "batteryLed": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "no_colour"
    }
  },
  "batteryCoolingTemperature": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 63.4,
      "unit": "celsius"
    }
  },
  "batteryTemperatureExtremes": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "extreme": {
        "value": "highest"
      },
      "temperature": {
        "value": 85,
        "unit": "celsius"
      }
    }
  }
}

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"
      }
    }
  }
}

startStopCharging({ status })

Parameters

status

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Charging.startStopCharging({
    "status": "charging"
  }),
  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
);

openCloseChargingPort({ chargePortState })

Parameters

chargePortState

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Charging.openCloseChargingPort({
    "chargePortState": "open"
  }),
  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
);