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

Error "The access is forbidden" when "Pause Load" or "start load" #122181

Open
d4icon opened this issue Jul 19, 2024 · 18 comments
Open

Error "The access is forbidden" when "Pause Load" or "start load" #122181

d4icon opened this issue Jul 19, 2024 · 18 comments
Assignees
Labels
integration: renault waiting-for-upstream We're waiting for a change upstream

Comments

@d4icon
Copy link

d4icon commented Jul 19, 2024

The problem

Registrador: homeassistant.components.websocket_api.http.connection
Fuente: components/websocket_api/commands.py:241
integración: Home Assistant WebSocket API (documentación, problemas)
Ocurrió por primera vez: 11:55:18 (1 ocurrencias)
Último inicio de sesión: 11:55:18

[140716478846368] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 40, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 151, in set_charge_start
return await self._vehicle.set_charge_start()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/renault_api/renault_vehicle.py", line 504, in set_charge_start
response = await self.session.set_vehicle_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/renault_api/renault_session.py", line 261, in set_vehicle_action
return await kamereon.set_vehicle_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/init.py", line 364, in set_vehicle_action
await request(
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/init.py", line 157, in request
kamereon_response.raise_for_error_code()
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/models.py", line 136, in raise_for_error_code
error.raise_for_error_code()
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/models.py", line 98, in raise_for_error_code
raise exceptions.KamereonResponseException(
renault_api.kamereon.exceptions.KamereonResponseException: ('err.func.wired.forbidden', 'The access is forbidden')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/button/init.py", line 132, in _async_press_action
await self.async_press()
File "/usr/src/homeassistant/homeassistant/components/renault/button.py", line 47, in async_press
await self.entity_description.async_press(self)
File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 42, in wrapper
raise HomeAssistantError(err) from err
homeassistant.exceptions.HomeAssistantError: ('err.func.wired.forbidden', 'The access is forbidden')

What version of Home Assistant Core has the issue?

core-2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

renault

Link to integration documentation on our website

https://www.home-assistant.io/integrations/renault/

Diagnostics information

Registrador: homeassistant.components.websocket_api.http.connection
Fuente: components/websocket_api/commands.py:241
integración: Home Assistant WebSocket API (documentación, problemas)
Ocurrió por primera vez: 11:55:18 (1 ocurrencias)
Último inicio de sesión: 11:55:18

[140716478846368] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 40, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 151, in set_charge_start
return await self._vehicle.set_charge_start()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/renault_api/renault_vehicle.py", line 504, in set_charge_start
response = await self.session.set_vehicle_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/renault_api/renault_session.py", line 261, in set_vehicle_action
return await kamereon.set_vehicle_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/init.py", line 364, in set_vehicle_action
await request(
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/init.py", line 157, in request
kamereon_response.raise_for_error_code()
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/models.py", line 136, in raise_for_error_code
error.raise_for_error_code()
File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/models.py", line 98, in raise_for_error_code
raise exceptions.KamereonResponseException(
renault_api.kamereon.exceptions.KamereonResponseException: ('err.func.wired.forbidden', 'The access is forbidden')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/button/init.py", line 132, in _async_press_action
await self.async_press()
File "/usr/src/homeassistant/homeassistant/components/renault/button.py", line 47, in async_press
await self.entity_description.async_press(self)
File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 42, in wrapper
raise HomeAssistantError(err) from err
homeassistant.exceptions.HomeAssistantError: ('err.func.wired.forbidden', 'The access is forbidden')

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @epenet, mind taking a look at this issue as it has been labeled with an integration (renault) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of renault can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign renault Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


renault documentation
renault source
(message by IssueLinks)

@d4icon
Copy link
Author

d4icon commented Jul 20, 2024

One detail.
The A/C call does work.

It is the other two that return the same error.
(I tried with the car plugged in, of course).

I would love to be able to make it work for some automations.

Thanks

PD: car is new: Renault Scenic etech

@matttheotter
Copy link

matttheotter commented Aug 12, 2024

Same issue with a new Megane Etech.

@d4icon
Copy link
Author

d4icon commented Sep 23, 2024

any news?

@epenet
Copy link
Contributor

epenet commented Sep 23, 2024

charge_start and charge_stop are not compatible with all vehicles, and there is no official documentation to know which vehicles work and which don't work.

It seems that the best workaround is to use instead the schedule mode (instant/calendar)

@d4icon
Copy link
Author

d4icon commented Sep 23, 2024

charge_start and charge_stop are not compatible with all vehicles, and there is no official documentation to know which vehicles work and which don't work.

It seems that the best workaround is to use instead the schedule mode (instant/calendar)

Mmm...
But something doesn't add up for me.

There are colleagues with the Megane Etech, that it works for them and others that it doesn't (like the one above).

Something doesn't add up.
And I find it strange that in my case (the new Scenic, which is practically a Megane Etech) it doesn't work either... or some do and some don't.

Could you give me more information or where to look?
Any test that can be done?

Maybe they have updated the API or something new is required?

Using the programming does not work for me, as I want to use it to automate the charging, depending on the time and the price of kWh.
The car falls asleep once you stop charging, and the charger does not wake it up.
The only way is the car key, or from the official application, using the button to ‘start charging’ or ‘stop charging’.

I would really appreciate some help.

Translated with DeepL.com (free version)

@matttheotter
Copy link

I had a BMS update on my Megane my25, but I had to go back to the dealer to fix it.

The car no longer goes to sleep when charging stops.

Potentially the same fix for the Scenic is available?

@d4icon
Copy link
Author

d4icon commented Sep 23, 2024

I had a BMS update on my Megane my25, but I had to go back to the dealer to fix it.

The car no longer goes to sleep when charging stops.

Potentially the same fix for the Scenic is available?

How long ago was this?
Well, I don't know if there is something similar in the Scenic.

Why did the car fall asleep if the charger stopped for some reason (lack of power at home for X minutes)?

Tell me more about it.
Thanks

@matttheotter
Copy link

Had the update at the end of August, I don't know why the car stopped charging.

Worth booking it in.

@d4icon
Copy link
Author

d4icon commented Sep 30, 2024

charge_start and charge_stop are not compatible with all vehicles, and there is no official documentation to know which vehicles work and which don't work.
It seems that the best workaround is to use instead the schedule mode (instant/calendar)

Mmm... But something doesn't add up for me.

There are colleagues with the Megane Etech, that it works for them and others that it doesn't (like the one above).

Something doesn't add up. And I find it strange that in my case (the new Scenic, which is practically a Megane Etech) it doesn't work either... or some do and some don't.

Could you give me more information or where to look? Any test that can be done?

Maybe they have updated the API or something new is required?

Using the programming does not work for me, as I want to use it to automate the charging, depending on the time and the price of kWh. The car falls asleep once you stop charging, and the charger does not wake it up. The only way is the car key, or from the official application, using the button to ‘start charging’ or ‘stop charging’.

I would really appreciate some help.

Translated with DeepL.com (free version)

@epenet any help?
On the other hand...
If the ‘start charging’ and ‘stop charging’ buttons work in the official Renault application, I find it strange that I can't use it from here.

@remo-tech
Copy link

Same problem here with the Scenic .
Starting charge works fine from the MyRenault app, so the feature exist.
I would be glad to help tracking the problem if someone can point me in the right direction

@d4icon
Copy link
Author

d4icon commented Oct 14, 2024

Same problem here with the Scenic . Starting charge works fine from the MyRenault app, so the feature exist. I would be glad to help tracking the problem if someone can point me in the right direction

exactly.
This is what I meant, @epenet

The option is there and it works in the app.
It should be able to be implemented here as well.

@epenet
Copy link
Contributor

epenet commented Oct 14, 2024

The Renault API is fully undocumented.
The first step is to ensure it is working in renault-api: https://github.com/hacf-fr/renault-api

  • If it is working there, it can be easily used in Home Assistant.
  • If it is not working there, then it needs to be added there before it can be used in Home Assistant.

@remo-tech
Copy link

It is not working either. I have opened an issue here, but I have not idea if this is still maintained ...
hacf-fr/renault-api#1348

@epenet epenet added the waiting-for-upstream We're waiting for a change upstream label Oct 14, 2024
@epenet
Copy link
Contributor

epenet commented Oct 14, 2024

It is not working either. I have opened an issue here, but I have not idea if this is still maintained ... hacf-fr/renault-api#1348

Thanks - the library is still maintained but it relies on "discoveries" by users.
So until a user discovers how to do start charge, then we're rather stuck

@d4icon
Copy link
Author

d4icon commented Oct 14, 2024

The Renault API is fully undocumented. The first step is to ensure it is working in renault-api: https://github.com/hacf-fr/renault-api

* If it is working there, it can be easily used in Home Assistant.

* If it is not working there, then it needs to be added there before it can be used in Home Assistant.

OK, I'll give you some information, and some questions I have.
I'll do it in the other repo as you indicated, which seems a more appropriate place.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@d4icon
Copy link
Author

d4icon commented Jan 12, 2025

Any newss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: renault waiting-for-upstream We're waiting for a change upstream
Projects
None yet
Development

No branches or pull requests

4 participants