Kamereon low-level API Reference

Core

Kamereon API.

renault_api.kamereon.get_account_url(root_url, account_id)

Get the url to the account.

Parameters
  • root_url (str) –

  • account_id (str) –

Return type

str

async renault_api.kamereon.get_account_vehicles(websession, root_url, api_key, gigya_jwt, country, account_id)

GET to /accounts/{account_id}/vehicles.

Parameters
  • websession (aiohttp.client.ClientSession) –

  • root_url (str) –

  • api_key (str) –

  • gigya_jwt (str) –

  • country (str) –

  • account_id (str) –

Return type

renault_api.kamereon.models.KamereonVehiclesResponse

renault_api.kamereon.get_car_adapter_url(root_url, account_id, version, vin, *, adapter_type='kca')

Get the url to the car adapter.

Parameters
  • root_url (str) –

  • account_id (str) –

  • version (int) –

  • vin (str) –

  • adapter_type (str) –

Return type

str

renault_api.kamereon.get_commerce_url(root_url)

Get the Kamereon base commerce url.

Parameters

root_url (str) –

Return type

str

renault_api.kamereon.get_contracts_url(root_url, account_id, vin)

Get the url to the car contracts.

Parameters
  • root_url (str) –

  • account_id (str) –

  • vin (str) –

Return type

str

async renault_api.kamereon.get_person(websession, root_url, api_key, gigya_jwt, country, person_id)

GET to /persons/{person_id}.

Parameters
  • websession (aiohttp.client.ClientSession) –

  • root_url (str) –

  • api_key (str) –

  • gigya_jwt (str) –

  • country (str) –

  • person_id (str) –

Return type

renault_api.kamereon.models.KamereonPersonResponse

renault_api.kamereon.get_person_url(root_url, person_id)

Get the url to the person.

Parameters
  • root_url (str) –

  • person_id (str) –

Return type

str

renault_api.kamereon.get_required_contracts(endpoint)

Get the required contracts for the specified endpoint.

Parameters

endpoint (str) –

Return type

str

async renault_api.kamereon.get_vehicle_contracts(websession, root_url, api_key, gigya_jwt, country, locale, account_id, vin)

GET to /accounts/{accountId}/vehicles/{vin}/contracts.

Parameters
  • websession (aiohttp.client.ClientSession) –

  • root_url (str) –

  • api_key (str) –

  • gigya_jwt (str) –

  • country (str) –

  • locale (str) –

  • account_id (str) –

  • vin (str) –

Return type

renault_api.kamereon.models.KamereonVehicleContractsResponse

async renault_api.kamereon.get_vehicle_data(websession, root_url, api_key, gigya_jwt, country, account_id, vin, endpoint, endpoint_version=None, params=None, *, adapter_type='kca')

GET to /v{endpoint_version}/cars/{vin}/{endpoint}.

Parameters
  • websession (aiohttp.client.ClientSession) –

  • root_url (str) –

  • api_key (str) –

  • gigya_jwt (str) –

  • country (str) –

  • account_id (str) –

  • vin (str) –

  • endpoint (str) –

  • endpoint_version (Optional[int]) –

  • params (Optional[Dict[str, str]]) –

  • adapter_type (str) –

Return type

renault_api.kamereon.models.KamereonVehicleDataResponse

async renault_api.kamereon.get_vehicle_details(websession, root_url, api_key, gigya_jwt, country, account_id, vin)

GET to /accounts/{account_id}/vehicles/{vin}/details.

Parameters
  • websession (aiohttp.client.ClientSession) –

  • root_url (str) –

  • api_key (str) –

  • gigya_jwt (str) –

  • country (str) –

  • account_id (str) –

  • vin (str) –

Return type

renault_api.kamereon.models.KamereonVehicleDetailsResponse

renault_api.kamereon.has_required_contracts(contracts, endpoint)

Check if vehicle has contract for endpoint.

Parameters
Return type

bool

async renault_api.kamereon.request(websession, method, url, api_key, gigya_jwt, params, json=None, schema=None, *, wrap_array_in=None)

Process Kamereon HTTP request.

Parameters
  • websession (aiohttp.client.ClientSession) –

  • method (str) –

  • url (str) –

  • api_key (str) –

  • gigya_jwt (str) –

  • params (Dict[str, str]) –

  • json (Optional[Dict[str, Any]]) –

  • schema (Optional[marshmallow.schema.Schema]) –

  • wrap_array_in (Optional[str]) –

Return type

renault_api.kamereon.models.KamereonResponse

async renault_api.kamereon.set_vehicle_action(websession, root_url, api_key, gigya_jwt, country, account_id, vin, endpoint, attributes, endpoint_version=None, data_type=None, *, adapter_type='kca')

POST to /v{endpoint_version}/cars/{vin}/{endpoint}.

Parameters
  • websession (aiohttp.client.ClientSession) –

  • root_url (str) –

  • api_key (str) –

  • gigya_jwt (str) –

  • country (str) –

  • account_id (str) –

  • vin (str) –

  • endpoint (str) –

  • attributes (Dict[str, Any]) –

  • endpoint_version (Optional[int]) –

  • data_type (Optional[Dict[str, Any]]) –

  • adapter_type (str) –

Return type

renault_api.kamereon.models.KamereonVehicleDataResponse

Data models

Kamereon models.

class renault_api.kamereon.models.ChargeDaySchedule(raw_data, startTime, duration)

Kamereon vehicle charge schedule for day.

Parameters
  • raw_data (Dict[str, Any]) –

  • startTime (Optional[str]) –

  • duration (Optional[int]) –

Return type

None

for_json()

Create dict for json.

Return type

Dict[str, Any]

get_end_time()

Get end time.

Return type

Optional[str]

class renault_api.kamereon.models.ChargeSchedule(raw_data, id, activated, monday, tuesday, wednesday, thursday, friday, saturday, sunday)

Kamereon vehicle charge schedule for week.

Parameters
Return type

None

for_json()

Create dict for json.

Return type

Dict[str, Any]

class renault_api.kamereon.models.HvacDaySchedule(raw_data, readyAtTime)

Kamereon vehicle hvac schedule for day.

Parameters
  • raw_data (Dict[str, Any]) –

  • readyAtTime (Optional[str]) –

Return type

None

for_json()

Create dict for json.

Return type

Dict[str, Optional[str]]

class renault_api.kamereon.models.HvacSchedule(raw_data, id, activated, monday, tuesday, wednesday, thursday, friday, saturday, sunday)

Kamereon vehicle hvac schedule for week.

Parameters
Return type

None

for_json()

Create dict for json.

Return type

Dict[str, Any]

class renault_api.kamereon.models.KamereonPersonAccount(raw_data, accountId, accountType, accountStatus)

Kamereon person account data.

Parameters
  • raw_data (Dict[str, Any]) –

  • accountId (Optional[str]) –

  • accountType (Optional[str]) –

  • accountStatus (Optional[str]) –

Return type

None

class renault_api.kamereon.models.KamereonPersonResponse(raw_data, errors, accounts)

Kamereon response to GET on /persons/{gigya_person_id}.

Parameters
Return type

None

class renault_api.kamereon.models.KamereonResponse(raw_data, errors)

Kamereon response.

Parameters
Return type

None

raise_for_error_code()

Raise exception if errors found in the response.

Return type

None

class renault_api.kamereon.models.KamereonResponseError(raw_data, errorCode, errorMessage)

Kamereon response error.

Parameters
  • raw_data (Dict[str, Any]) –

  • errorCode (Optional[str]) –

  • errorMessage (Optional[str]) –

Return type

None

get_error_details()

Extract the error details sometimes hidden inside nested JSON.

Return type

Optional[str]

raise_for_error_code()

Raise exception from response error.

Return type

None

class renault_api.kamereon.models.KamereonVehicleBatteryStatusData(raw_data, timestamp, batteryLevel, batteryTemperature, batteryAutonomy, batteryCapacity, batteryAvailableEnergy, plugStatus, chargingStatus, chargingRemainingTime, chargingInstantaneousPower)

Kamereon vehicle battery-status data.

Parameters
  • raw_data (Dict[str, Any]) –

  • timestamp (Optional[str]) –

  • batteryLevel (Optional[int]) –

  • batteryTemperature (Optional[int]) –

  • batteryAutonomy (Optional[int]) –

  • batteryCapacity (Optional[int]) –

  • batteryAvailableEnergy (Optional[int]) –

  • plugStatus (Optional[int]) –

  • chargingStatus (Optional[float]) –

  • chargingRemainingTime (Optional[int]) –

  • chargingInstantaneousPower (Optional[float]) –

Return type

None

get_charging_status()

Return charging status.

Return type

Optional[renault_api.kamereon.enums.ChargeState]

get_plug_status()

Return plug status.

Return type

Optional[renault_api.kamereon.enums.PlugState]

class renault_api.kamereon.models.KamereonVehicleCarAdapterData(raw_data, vin, vehicleId, batteryCode, brand, canGeneration, carGateway, deliveryCountry, deliveryDate, energy, engineType, familyCode, firstRegistrationDate, gearbox, modelCode, modelCodeDetail, modelName, radioType, region, registrationCountry, registrationNumber, tcuCode, versionCode, privacyMode, privacyModeUpdateDate, svtFlag, svtBlockFlag)

Kamereon vehicle data hvac-status attributes.

Parameters
  • raw_data (Dict[str, Any]) –

  • vin (Optional[str]) –

  • vehicleId (Optional[int]) –

  • batteryCode (Optional[str]) –

  • brand (Optional[str]) –

  • canGeneration (Optional[str]) –

  • carGateway (Optional[str]) –

  • deliveryCountry (Optional[str]) –

  • deliveryDate (Optional[str]) –

  • energy (Optional[str]) –

  • engineType (Optional[str]) –

  • familyCode (Optional[str]) –

  • firstRegistrationDate (Optional[str]) –

  • gearbox (Optional[str]) –

  • modelCode (Optional[str]) –

  • modelCodeDetail (Optional[str]) –

  • modelName (Optional[str]) –

  • radioType (Optional[str]) –

  • region (Optional[str]) –

  • registrationCountry (Optional[str]) –

  • registrationNumber (Optional[str]) –

  • tcuCode (Optional[str]) –

  • versionCode (Optional[str]) –

  • privacyMode (Optional[str]) –

  • privacyModeUpdateDate (Optional[str]) –

  • svtFlag (Optional[bool]) –

  • svtBlockFlag (Optional[bool]) –

Return type

None

controls_action_via_kcm(action)

Return True if model uses endpoint via kcm.

Parameters

action (str) –

Return type

bool

reports_charging_power_in_watts()

Return True if model reports chargingInstantaneousPower in watts.

Return type

bool

supports_endpoint(endpoint)

Return True if model supports specified endpoint.

Parameters

endpoint (str) –

Return type

bool

uses_electricity()

Return True if model uses electricity.

Return type

bool

uses_fuel()

Return True if model uses fuel.

Return type

bool

class renault_api.kamereon.models.KamereonVehicleChargeHistoryData(raw_data)

Kamereon vehicle data charge-history attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleChargeModeActionData(raw_data)

Kamereon vehicle action data charge-mode attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleChargeModeData(raw_data, chargeMode)

Kamereon vehicle data charge-mode attributes.

Parameters
  • raw_data (Dict[str, Any]) –

  • chargeMode (Optional[str]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleChargeScheduleActionData(raw_data)

Kamereon vehicle action data charge-schedule attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleChargesData(raw_data)

Kamereon vehicle data charges attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleChargingSettingsData(raw_data, mode, schedules)

Kamereon vehicle data charging-settings attributes.

Parameters
Return type

None

update(args)

Update schedule.

Parameters

args (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleChargingStartActionData(raw_data)

Kamereon vehicle action data charging-start attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleCockpitData(raw_data, fuelAutonomy, fuelQuantity, totalMileage)

Kamereon vehicle data cockpit attributes.

Parameters
  • raw_data (Dict[str, Any]) –

  • fuelAutonomy (Optional[float]) –

  • fuelQuantity (Optional[float]) –

  • totalMileage (Optional[float]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleContract(raw_data, type, contractId, code, group, durationMonths, startDate, endDate, status, statusLabel, description)

Kamereon vehicle contract.

Parameters
  • raw_data (Dict[str, Any]) –

  • type (Optional[str]) –

  • contractId (Optional[str]) –

  • code (Optional[str]) –

  • group (Optional[str]) –

  • durationMonths (Optional[int]) –

  • startDate (Optional[str]) –

  • endDate (Optional[str]) –

  • status (Optional[str]) –

  • statusLabel (Optional[str]) –

  • description (Optional[str]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleContractsResponse(raw_data, errors, contractList)

Kamereon response to GET on /accounts/{accountId}/vehicles/{vin}/contracts.

Parameters
Return type

None

class renault_api.kamereon.models.KamereonVehicleData(raw_data, type, id, attributes)

Kamereon vehicle data.

Parameters
  • raw_data (Dict[str, Any]) –

  • type (Optional[str]) –

  • id (Optional[str]) –

  • attributes (Optional[Dict[str, Any]]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleDataAttributes(raw_data)

Kamereon vehicle data attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleDataResponse(raw_data, errors, data)

Kamereon response to GET/POST on …/cars/{vin}/{type}.

Parameters
Return type

None

get_attributes(schema)

Return jwt token.

Parameters

schema (marshmallow.schema.Schema) –

Return type

Optional[renault_api.kamereon.models.KamereonVehicleDataAttributes]

class renault_api.kamereon.models.KamereonVehicleDetails(raw_data, vin, registrationNumber, radioCode, brand, model, energy, engineEnergyType)

Kamereon vehicle details.

Parameters
Return type

None

controls_action_via_kcm(action)

Return True if model uses endpoint via kcm.

Parameters

action (str) –

Return type

bool

get_brand_label()

Return vehicle model label.

Return type

Optional[str]

get_energy_code()

Return vehicle energy code.

Return type

Optional[str]

get_model_code()

Return vehicle model code.

Return type

Optional[str]

get_model_label()

Return vehicle model label.

Return type

Optional[str]

reports_charge_session_durations_in_minutes()

Return True if model reports history durations in minutes.

Return type

bool

reports_charging_power_in_watts()

Return True if model reports chargingInstantaneousPower in watts.

Return type

bool

supports_endpoint(endpoint)

Return True if model supports specified endpoint.

Parameters

endpoint (str) –

Return type

bool

uses_electricity()

Return True if model uses electricity.

Return type

bool

uses_fuel()

Return True if model uses fuel.

Return type

bool

warns_on_method(method)

Return warning message if model trigger a warning on the method call.

Parameters

method (str) –

Return type

Optional[str]

class renault_api.kamereon.models.KamereonVehicleDetailsGroup(raw_data, code, label, group)

Kamereon vehicle details group data.

Parameters
  • raw_data (Dict[str, Any]) –

  • code (Optional[str]) –

  • label (Optional[str]) –

  • group (Optional[str]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleDetailsResponse(raw_data, vin, registrationNumber, radioCode, brand, model, energy, engineEnergyType, errors)

Kamereon response to GET on /accounts/{account_id}/vehicles/{vin}/details.

Parameters
Return type

None

class renault_api.kamereon.models.KamereonVehicleHvacHistoryData(raw_data)

Kamereon vehicle data hvac-history attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleHvacModeActionData(raw_data)

Kamereon vehicle action data hvac-mode attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleHvacScheduleActionData(raw_data)

Kamereon vehicle action data hvac-schedule attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleHvacSessionsData(raw_data)

Kamereon vehicle data hvac-sessions attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleHvacSettingsData(raw_data, mode, schedules)

Kamereon vehicle data hvac-settings (mode+schedules) attributes.

Parameters
Return type

None

class renault_api.kamereon.models.KamereonVehicleHvacStartActionData(raw_data)

Kamereon vehicle action data hvac-start attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleHvacStatusData(raw_data, lastUpdateTime, externalTemperature, hvacStatus, nextHvacStartDate, socThreshold)

Kamereon vehicle data hvac-status attributes.

Parameters
  • raw_data (Dict[str, Any]) –

  • lastUpdateTime (Optional[str]) –

  • externalTemperature (Optional[float]) –

  • hvacStatus (Optional[str]) –

  • nextHvacStartDate (Optional[str]) –

  • socThreshold (Optional[float]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleLocationData(raw_data, lastUpdateTime, gpsLatitude, gpsLongitude)

Kamereon vehicle data location attributes.

Parameters
  • raw_data (Dict[str, Any]) –

  • lastUpdateTime (Optional[str]) –

  • gpsLatitude (Optional[float]) –

  • gpsLongitude (Optional[float]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleLockStatusData(raw_data, lockStatus, doorStatusRearLeft, doorStatusRearRight, doorStatusDriver, doorStatusPassenger, hatchStatus, lastUpdateTime)

Kamereon vehicle data lock-status attributes.

Parameters
  • raw_data (Dict[str, Any]) –

  • lockStatus (Optional[str]) –

  • doorStatusRearLeft (Optional[str]) –

  • doorStatusRearRight (Optional[str]) –

  • doorStatusDriver (Optional[str]) –

  • doorStatusPassenger (Optional[str]) –

  • hatchStatus (Optional[str]) –

  • lastUpdateTime (Optional[str]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleNotificationSettingsData(raw_data)

Kamereon vehicle data notification-settings attributes.

Parameters

raw_data (Dict[str, Any]) –

Return type

None

class renault_api.kamereon.models.KamereonVehicleResStateData(raw_data, details, code)

Kamereon vehicle data res-set attributes.

Parameters
  • raw_data (Dict[str, Any]) –

  • details (Optional[str]) –

  • code (Optional[str]) –

Return type

None

Kamereon vehicles link data.

Parameters
Return type

None

class renault_api.kamereon.models.KamereonVehiclesResponse(raw_data, errors, accountId, country, vehicleLinks)

Kamereon response to GET on /accounts/{account_id}/vehicles.

Parameters
Return type

None