Renault high-level API Reference

Session

Session provider for interaction with Renault servers.

class renault_api.renault_session.RenaultSession(websession, locale=None, country=None, locale_details=None, credential_store=None)

Renault session for interaction with Renault servers.

Parameters:
  • websession (ClientSession)

  • locale (str | None)

  • country (str | None)

  • locale_details (dict[str, str] | None)

  • credential_store (CredentialStore | None)

async get_account_vehicles(account_id)

GET to /accounts/{account_id}/vehicles.

Parameters:

account_id (str)

Return type:

KamereonVehiclesResponse

async get_person()

GET to /persons/{person_id}.

Return type:

KamereonPersonResponse

async get_vehicle_contracts(account_id, vin)

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

Parameters:
  • account_id (str)

  • vin (str)

Return type:

KamereonVehicleContractsResponse

async get_vehicle_data(account_id, vin, endpoint, params=None, *, adapter_type='kca')

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

Parameters:
  • account_id (str)

  • vin (str)

  • endpoint (str)

  • params (dict[str, str] | None)

  • adapter_type (str)

Return type:

KamereonVehicleDataResponse

async get_vehicle_details(account_id, vin)

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

Parameters:
  • account_id (str)

  • vin (str)

Return type:

KamereonVehicleDetailsResponse

async http_request(method, endpoint, json=None, *, schema=None)

GET to specified endpoint.

Parameters:
  • method (str)

  • endpoint (str)

  • json (dict[str, Any] | None)

  • schema (Schema | None)

Return type:

KamereonResponse

async login(login_id, password)

Attempt login on Gigya.

Parameters:
  • login_id (str)

  • password (str)

Return type:

None

property login_token: str | None

Return the current Gigya login token.

This token is obtained from the password on login, and is used to mint JWTs (access tokens) without re-supplying the password. Store it securely instead of the password, and restore it with set_login_token (or by pre-populating the credential store) on the next session.

set_login_token(login_token)

Restore a Gigya login token obtained from a previous session.

This avoids storing and reusing the user password: a session restored this way can mint JWTs without ever calling login.

Parameters:

login_token (str)

Return type:

None

async set_vehicle_action(account_id, vin, endpoint, attributes, *, adapter_type='kca')

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

Parameters:
  • account_id (str)

  • vin (str)

  • endpoint (str)

  • attributes (dict[str, Any])

  • adapter_type (str)

Return type:

KamereonVehicleDataResponse

Client

Client for Renault API.

class renault_api.renault_client.RenaultClient(session=None, websession=None, locale=None, country=None, locale_details=None, credential_store=None)

Proxy to a Renault profile.

Parameters:
  • session (RenaultSession | None)

  • websession (ClientSession | None)

  • locale (str | None)

  • country (str | None)

  • locale_details (dict[str, str] | None)

  • credential_store (CredentialStore | None)

async get_api_account(account_id)

Get account proxy for specified account id.

Parameters:

account_id (str)

Return type:

RenaultAccount

async get_api_accounts()

Get account proxies.

Return type:

list[RenaultAccount]

async get_person()

GET to /persons/{person_id}.

Return type:

KamereonPersonResponse

property session: RenaultSession

Get session provider.

Account

Client for Renault API.

class renault_api.renault_account.RenaultAccount(account_id, session=None, websession=None, locale=None, country=None, locale_details=None, credential_store=None)

Proxy to a Renault account.

Parameters:
  • account_id (str)

  • session (RenaultSession | None)

  • websession (ClientSession | None)

  • locale (str | None)

  • country (str | None)

  • locale_details (dict[str, str] | None)

  • credential_store (CredentialStore | None)

property account_id: str

Get account id.

async get_api_vehicle(vin)

Get vehicle proxy for specified vin.

Parameters:

vin (str)

Return type:

RenaultVehicle

async get_api_vehicles()

Get vehicle proxies.

Return type:

list[RenaultVehicle]

async get_vehicles()

GET to /accounts/{account_id}/vehicles.

Return type:

KamereonVehiclesResponse

property session: RenaultSession

Get session provider.

Vehicle

Client for Renault API.

class renault_api.renault_vehicle.RenaultVehicle(account_id, vin, *, session=None, websession=None, locale=None, country=None, locale_details=None, credential_store=None, vehicle_details=None, car_adapter=None)

Proxy to a Renault vehicle.

Parameters:
property account_id: str

Get account id.

async get_battery_soc()

Get vehicle battery state of charge limits

Return type:

KamereonVehicleBatterySocData

async get_battery_status()

Get vehicle battery status.

Return type:

KamereonVehicleBatteryStatusData

async get_car_adapter()

Get vehicle car adapter details.

Return type:

KamereonVehicleCarAdapterData

async get_charge_history(start, end, period)

Get vehicle charge history.

Parameters:
  • start (datetime)

  • end (datetime)

  • period (str)

Return type:

KamereonVehicleChargeHistoryData

async get_charge_mode()

Get vehicle charge mode.

Return type:

KamereonVehicleChargeModeData

async get_charge_schedule()

Get vehicle charge schedule.

Return type:

dict[str, Any]

async get_charges(start, end)

Get vehicle charges.

Parameters:
  • start (datetime)

  • end (datetime)

Return type:

KamereonVehicleChargesData

async get_charging_settings()

Get vehicle charging settings.

Return type:

KamereonVehicleChargingSettingsData

async get_cockpit()

Get vehicle cockpit.

Return type:

KamereonVehicleCockpitData

async get_contracts()

Get vehicle contracts.

Return type:

list[KamereonVehicleContract]

async get_details()

Get vehicle details.

Return type:

KamereonVehicleDetails

async get_endpoint_definition(endpoint)

From VEHICLE_ENDPOINTS / DEFAULT_ENDPOINT.

Parameters:

endpoint (str)

Return type:

EndpointDefinition

async get_full_endpoint(endpoint)

From VEHICLE_ENDPOINTS / DEFAULT_ENDPOINT.

Parameters:

endpoint (str)

Return type:

str

async get_hvac_history(start, end, period)

Get vehicle hvac history.

Parameters:
  • start (datetime)

  • end (datetime)

  • period (str)

Return type:

KamereonVehicleHvacHistoryData

async get_hvac_sessions(start, end)

Get vehicle hvac sessions.

Parameters:
  • start (datetime)

  • end (datetime)

Return type:

KamereonVehicleHvacSessionsData

async get_hvac_settings()

Get vehicle hvac settings (schedule+mode).

Return type:

KamereonVehicleHvacSettingsData

async get_hvac_status()

Get vehicle hvac status.

Return type:

KamereonVehicleHvacStatusData

async get_location()

Get vehicle location.

Return type:

KamereonVehicleLocationData

async get_lock_status()

Get vehicle lock status.

Return type:

KamereonVehicleLockStatusData

async get_notification_settings()

Get vehicle notification settings.

Return type:

KamereonVehicleNotificationSettingsData

async get_res_state()

Get vehicle res state.

Return type:

KamereonVehicleResStateData

async get_tyre_pressure()

Get vehicle tyre pressure.

Return type:

KamereonVehicleTyrePressureData

async http_get(endpoint)

Run HTTP GET to endpoint.

Parameters:

endpoint (str)

Return type:

KamereonResponse

async http_post(endpoint, json=None)

Run HTTP POST to endpoint.

Parameters:
  • endpoint (str)

  • json (dict[str, Any] | None)

Return type:

KamereonResponse

property session: RenaultSession

Get session.

async set_ac_start(temperature, when=None)

Start vehicle ac.

Parameters:
  • temperature (float)

  • when (datetime | None)

Return type:

KamereonVehicleHvacStartActionData

async set_ac_stop()

Stop vehicle ac.

Return type:

KamereonVehicleHvacStartActionData

async set_battery_soc(*, min, target)

Sets Battery Soc levels.

Parameters:
  • min (int)

  • target (int)

Return type:

KamereonVehicleBatterySocActionData

async set_charge_mode(charge_mode)

Set vehicle charge mode.

Parameters:

charge_mode (str)

Return type:

KamereonVehicleChargeModeActionData

async set_charge_schedules(schedules)

Set vehicle charge schedules.

Parameters:

schedules (list[ChargeSchedule])

Return type:

KamereonVehicleChargeScheduleActionData

async set_charge_start(when=None)

Start vehicle charge with optional delay.

Parameters:

when (datetime | None)

Return type:

KamereonVehicleChargingStartActionData

async set_charge_stop()

Start vehicle charge.

Return type:

KamereonVehicleChargingStartActionData

async set_hvac_schedules(schedules)

Set vehicle charge schedules.

Parameters:

schedules (list[HvacSchedule])

Return type:

KamereonVehicleHvacScheduleActionData

async supports_endpoint(endpoint)

Check if vehicle supports endpoint.

Parameters:

endpoint (str)

Return type:

bool

property vin: str

Get vin.