Renault API
Project description
Features
This Python package manages the communication with the private Renault API used by the official MyRenault application.
The client is able to read various vehicle attributes, such as:
mileage
GPS location
fuel autonomy (for fuel vehicles)
battery autonomy (for electric vehicles)
contracts associated to the vehicle (warranty and connected services)
For some vehicles, it is also possible to manage:
hvac/pre-conditionning of the vehicle
charge schedule
This package has been developed to be used with Home-Assistant, but it can be used in other contexts
Requirements
Python (>= 3.10)
API Usage
You can install Renault API via pip from PyPI:
$ pip install renault-api
import aiohttp
import asyncio
from renault_api.renault_client import RenaultClient
async def main():
async with aiohttp.ClientSession() as websession:
client = RenaultClient(websession=websession, locale="fr_FR")
await client.session.login('email', 'password')
print(f"Accounts: {await client.get_person()}") # List available accounts, make a note of kamereon account id
account_id = "Your Kamereon account id"
account = await client.get_api_account(account_id)
print(f"Vehicles: {await account.get_vehicles()}") # List available vehicles, make a note of vehicle VIN
vin = "Your vehicle VIN"
vehicle = await account.get_api_vehicle(vin)
print(f"Cockpit information: {await vehicle.get_cockpit()}")
print(f"Battery status information: {await vehicle.get_battery_status()}")
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
CLI Usage
The renault-api is also available through a CLI, which requires additional dependencies. For the added dependencies, you can install Renault API via pip from PyPI:
$ pip install renault-api[cli]
Once installed, the following command prompts for credentials and settings, displays basic vehicle status information, and generates traces:
$ renault-api --log status
Credentials will automatically be stored in the user home directory (~/.credentials/renault-api.json)
Logs will automatically be generated in logs subfolder
It is also possible to use raw http GET/POST commands, for example to get odometer and others data on a Windows machine:
C:> renault-api http get /commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/cockpit
Or to request a battery status refresh on a Windows Machine (internal quotes escaped, whole payload enclosed in un-escaped quotes):
C:> renault-api http post /commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/actions/refresh-battery-status "{\\"data\\": {\\"type\\": \\"RefreshBatteryStatus\\"}}"
Please see the Command-line Reference for full details.
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, Renault API is free and open source software.
Disclaimer
This project is not affiliated with, endorsed by, or connected to Renault. I accept no responsibility for any consequences, intended or accidental, as a as a result of interacting with Renault’s API using this project.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project was generated from @cjolowicz’s Hypermodern Python Cookiecutter template. This project was heavily based on @jamesremuscat’s PyZE python client for the Renault ZE API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file renault_api-0.5.3.tar.gz.
File metadata
- Download URL: renault_api-0.5.3.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e0a8edd7d8c63b057ab6031ba8f859d4588eb2b7a59ba3eaa0897f90b5562a3
|
|
| MD5 |
9ed895d89e401c36303b878003640bf8
|
|
| BLAKE2b-256 |
a03a28978dc2497ce33bbce7bbe757c51afafa03104815954f3d10e991934e3e
|
Provenance
The following attestation bundles were made for renault_api-0.5.3.tar.gz:
Publisher:
release.yml on hacf-fr/renault-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
renault_api-0.5.3.tar.gz -
Subject digest:
5e0a8edd7d8c63b057ab6031ba8f859d4588eb2b7a59ba3eaa0897f90b5562a3 - Sigstore transparency entry: 869830171
- Sigstore integration time:
-
Permalink:
hacf-fr/renault-api@fbc6d22a1b4960bd2ff16f2f49ba7da31732f444 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hacf-fr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fbc6d22a1b4960bd2ff16f2f49ba7da31732f444 -
Trigger Event:
push
-
Statement type:
File details
Details for the file renault_api-0.5.3-py3-none-any.whl.
File metadata
- Download URL: renault_api-0.5.3-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d99db7a90c7292ef132e8cd374d4e92add4abf1310b68288ecfe8639f413fa8
|
|
| MD5 |
0b9336c4307c4ea5b3583fbdfee18bf1
|
|
| BLAKE2b-256 |
02447250e992344376eff144a2edb0e116526d91ac7c39374498fb7749227b86
|
Provenance
The following attestation bundles were made for renault_api-0.5.3-py3-none-any.whl:
Publisher:
release.yml on hacf-fr/renault-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
renault_api-0.5.3-py3-none-any.whl -
Subject digest:
3d99db7a90c7292ef132e8cd374d4e92add4abf1310b68288ecfe8639f413fa8 - Sigstore transparency entry: 869830174
- Sigstore integration time:
-
Permalink:
hacf-fr/renault-api@fbc6d22a1b4960bd2ff16f2f49ba7da31732f444 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hacf-fr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fbc6d22a1b4960bd2ff16f2f49ba7da31732f444 -
Trigger Event:
push
-
Statement type: