skodaconnect / homeassistant-skodaconnect

Skoda Connect - A home assistant plugin to add integration with your car
Apache License 2.0
233 stars 27 forks source link

Enyaq iv "Set charger max current" feature not working #67

Closed allhq closed 3 years ago

allhq commented 3 years ago

Hi

I can't set max current amps. (I use lastest beta release) Many many thanks

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/skodaconnect/init.py:365 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 16:20:33 (4 occurrences) Last logged: 16:33:02

[140196606859920] Error handling message: Unknown error [140196611750832] Error handling message: Unknown error Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 423, in set_charger response = await self._connection.setCharging(self.vin, data) File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 1454, in setCharging return await self._setSkodaAPI('charging', vin, data) TypeError: _setSkodaAPI() takes 3 positional arguments but 4 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 25, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script await script_obj.async_run(msg.get("variables"), context=context) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run await asyncio.shield(run.async_run()) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1492, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1527, in _execute_service await handler.job.target(service_call) File "/config/custom_components/skodaconnect/init.py", line 365, in set_current if await car.set_charger_current(current) is True: File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 373, in set_charger_current return await self.set_charger(data) File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 449, in set_charger raise SkodaException(f'Failed to execute set charger - {error}') skodaconnect.exceptions.SkodaException: Failed to execute set charger - _setSkodaAPI() takes 3 positional arguments but 4 were given

Farfar commented 3 years ago

Hi

I can't set max current amps. (I use lastest beta release) Many many thanks

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/skodaconnect/init.py:365 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 16:20:33 (4 occurrences) Last logged: 16:33:02

[140196606859920] Error handling message: Unknown error [140196611750832] Error handling message: Unknown error Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 423, in set_charger response = await self._connection.setCharging(self.vin, data) File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 1454, in setCharging return await self._setSkodaAPI('charging', vin, data) TypeError: _setSkodaAPI() takes 3 positional arguments but 4 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 25, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script await script_obj.async_run(msg.get("variables"), context=context) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run await asyncio.shield(run.async_run()) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1492, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1527, in _execute_service await handler.job.target(service_call) File "/config/custom_components/skodaconnect/init.py", line 365, in set_current if await car.set_charger_current(current) is True: File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 373, in set_charger_current return await self.set_charger(data) File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 449, in set_charger raise SkodaException(f'Failed to execute set charger - {error}') skodaconnect.exceptions.SkodaException: Failed to execute set charger - _setSkodaAPI() takes 3 positional arguments but 4 were given

Update to latest stable release.

Farfar commented 3 years ago

@allhq Try the latest release: 1.0.56

allhq commented 3 years ago

Not working :(

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/skodaconnect/init.py:368 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 21:22:12 (2 occurrences) Last logged: 21:22:16

[139662516765312] Error handling message: Unknown error Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 25, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script await script_obj.async_run(msg.get("variables"), context=context) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run await asyncio.shield(run.async_run()) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1492, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1527, in _execute_service await handler.job.target(service_call) File "/config/custom_components/skodaconnect/init.py", line 368, in set_current if await car.set_charger_current(current) is True: File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 373, in set_charger_current return await self.set_charger(data) File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 423, in set_charger response = await self._connection.setCharging(self.vin, data) File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 1470, in setCharging return await self._setSkodaAPI('charging', vin, json = data) File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 1450, in _setSkodaAPI raise SkodaException('Invalid or no response') skodaconnect.exceptions.SkodaException: Invalid or no response

Farfar commented 3 years ago

skodaconnect.exceptions.SkodaException: Invalid or no response

Well now it seems the request is sent. But the API doesn't respond back.

allhq commented 3 years ago

Where do I look for the bug?

Farfar commented 3 years ago

Where do I look for the bug?

Does it work to change in MySkoda app? All Skoda native API calls are a bit beta since Skoda seems to be working on functionality still.

allhq commented 3 years ago

It does not allow this. :(

Farfar commented 3 years ago

Then it will probably not work for your car. Yet. I'm sure it will in the future though, can't say when though. Only someone with insight into Skodas development of the connected cars could answer that. This is a reverse engineered hobby project :)

allhq commented 3 years ago

Thank you very much! And where I can I want to help with this project. \o/ Climate statement doesn't work either. S/PIN proplem? Charge on/of is working

Farfar commented 3 years ago

I suspect that only a handful of Enyaq iVs have beta functions enabled in the API, don't know how to till yet though. If you are interested in helping out you could enable API debugging in the integration options and enable debug logging in Home Assistant configuration.yaml and then send me home-assistant.log from startup. Scrub the log file from sensitive data first though.

You could also download the example.py from the library, edit the credentials, enable response logs and then run it. What's interesting is the capabilities reported for you car.