Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R5 electric #1478

Open
argonaute199 opened this issue Feb 19, 2025 · 0 comments
Open

R5 electric #1478

argonaute199 opened this issue Feb 19, 2025 · 0 comments

Comments

@argonaute199
Copy link

Hello,

I try to manage the schedule or the load of my R5 electric on Home Assistant and I have an error code "renault_api.kamereon.exceptions.KamereonResponseException: ('err.func.wired.forbidden', 'The access is forbidden')".

So I test the python code :

To test my API access, I tried this simple code (with the good account parameters) to return the battery level and if works fine

async def set_charging_schedule():
    async with aiohttp.ClientSession() as websession:
        client = RenaultClient(websession=websession, locale="fr_FR")
        await client.session.login(EMAIL, PASSWORD)
        account = await client.get_api_account(ACCOUNT_ID)
        vehicle = await account.get_api_vehicle(VIN)

        # Paramètre de batterie
        battery_status = await vehicle.get_battery_status()
        print(f"Battery status: {battery_status}")

loop = asyncio.get_event_loop()
loop.run_until_complete(set_charging_schedule())

Then, to identify the scheduling problem, I tried the same code but I ask to return the scheduler parameters instead of the battery level and it fails and it returns the "'The access is forbidden'" error.

async def set_charging_schedule():
    async with aiohttp.ClientSession() as websession:
        client = RenaultClient(websession=websession, locale="fr_FR")
        await client.session.login(EMAIL, PASSWORD)
        account = await client.get_api_account(ACCOUNT_ID)
        vehicle = await account.get_api_vehicle(VIN)

        # Paramètre de charge
        charging_settings = await vehicle.get_charging_settings()
        print("Paramètres actuels de charge : ", charging_settings)

loop = asyncio.get_event_loop()
loop.run_until_complete(set_charging_schedule())

Any idea ?
Thank you best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant