bimmer_connected.vehicle

Models state and remote services of one vehicle.

bimmer_connected.vehicle.COMBUSTION_ENGINE_DRIVE_TRAINS = {<DriveTrainType.PHEV: 'PHEV'>, <DriveTrainType.CONVENTIONAL: 'CONV'>}

Set of drive trains that have a combustion engine

class bimmer_connected.vehicle.ConnectedDriveVehicle(account, attributes: dict)[source]

Models state and remote services of one vehicle.

Parameters:
  • account – ConnectedDrive account this vehicle belongs to
  • attributes – attributes of the vehicle as provided by the server
available_attributes

Get the list of non-drivetrain attributes available for this vehicle.

available_state_services

Get the list of all available state services for this vehicle.

drive_train

Get the type of drive train of the vehicle.

drive_train_attributes

Get list of attributes available for the drive train of the vehicle.

The list of available attributes depends if on the type of drive train. Some attributes only exist for electric/hybrid vehicles, others only if you have a combustion engine. Depending on the state of the vehicle, some of the attributes might still be None.

get_vehicle_image(width: int, height: int, direction: bimmer_connected.vehicle.VehicleViewDirection) → bytes[source]

Get a rendered image of the vehicle.

:returns bytes containing the image in PNG format.

has_destination_service

Return True if destinations are available.

has_hv_battery

Return True if vehicle is equipped with a high voltage battery.

In this case we can get the state of the battery in the state attributes.

has_internal_combustion_engine

Return True if vehicle is equipped with an internal combustion engine.

In this case we can get the state of the gas tank.

has_range_extender

Return True if vehicle is equipped with a range extender.

In this case we can get the state of the gas tank.

has_rangemap_service

Return True if rangemap (range circle) is available.

has_statistics_service

Return True if statistics are available.

has_weekly_planner_service

Return True if charging control (weekly planner) is available.

lsc_type

Get the lscType of the vehicle.

Not really sure what that value really means. If it is NOT_SUPPORTED, that probably means that the vehicle state will not contain much data.

name

Get the name of the vehicle.

rangemap_service_type

Returns the vehicles rangemap service type if available.

set_observer_position(latitude: float, longitude: float) → None[source]

Set the position of the observer, who requests the vehicle state.

Some vehicle require you to send your position to the server before you get the vehicle state. Your position must be within some range (2km?) of the vehicle to get you a proper answer.

update_state() → None[source]

Update the state of a vehicle.

class bimmer_connected.vehicle.DriveTrainType[source]

Different types of drive trains.

BEV = 'BEV'
BEV_REX = 'BEV_REX'
CONVENTIONAL = 'CONV'
PHEV = 'PHEV'
bimmer_connected.vehicle.HV_BATTERY_DRIVE_TRAINS = {<DriveTrainType.PHEV: 'PHEV'>, <DriveTrainType.BEV: 'BEV'>, <DriveTrainType.BEV_REX: 'BEV_REX'>}

set of drive trains that have a high voltage battery

class bimmer_connected.vehicle.LscType[source]

Known Values for lsc_type field.

Not really sure, what this value really contains.

I_LSC_IMM = 'I_LSC_IMM'
LSC_BASIS = 'LSC_BASIS'
LSC_PHEV = 'LSC_PHEV'
NOT_SUPPORTED = 'NOT_SUPPORTED'
UNKNOWN = 'UNKNOWN'
bimmer_connected.vehicle.RANGE_EXTENDER_DRIVE_TRAINS = {<DriveTrainType.BEV_REX: 'BEV_REX'>}

Set of drive trains that have a range extender

class bimmer_connected.vehicle.VehicleViewDirection[source]

Viewing angles for the vehicle.

This is used to get a rendered image of the vehicle.

DASHBOARD = 'DASHBOARD'
DRIVERDOOR = 'DRIVERDOOR'
FRONT = 'FRONT'
FRONTSIDE = 'FRONTSIDE'
REAR = 'REAR'
REARBIRDSEYE = 'REARBIRDSEYE'
REARSIDE = 'REARSIDE'
SIDE = 'SIDE'