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

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

Closed
allhq opened this issue Sep 8, 2021 · 10 comments
Closed

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

allhq opened this issue Sep 8, 2021 · 10 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@allhq
Copy link

allhq commented Sep 8, 2021

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

@allhq allhq added the bug Something isn't working label Sep 8, 2021
@Farfar
Copy link
Collaborator

Farfar commented Sep 8, 2021

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 added a commit that referenced this issue Sep 8, 2021
	ändrad:        README.md
	ändrad:        custom_components/skodaconnect/manifest.json
	ändrad:        requirements.txt
@Farfar
Copy link
Collaborator

Farfar commented Sep 8, 2021

@allhq Try the latest release: 1.0.56

@allhq
Copy link
Author

allhq commented Sep 8, 2021

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
Copy link
Collaborator

Farfar commented Sep 8, 2021

skodaconnect.exceptions.SkodaException: Invalid or no response

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

@allhq
Copy link
Author

allhq commented Sep 8, 2021

Where do I look for the bug?

@Farfar
Copy link
Collaborator

Farfar commented Sep 8, 2021

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
Copy link
Author

allhq commented Sep 8, 2021

It does not allow this. :(

@Farfar
Copy link
Collaborator

Farfar commented Sep 8, 2021

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
Copy link
Author

allhq commented Sep 8, 2021

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
Copy link
Collaborator

Farfar commented Sep 8, 2021

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.

@Farfar Farfar added wontfix This will not be worked on and removed bug Something isn't working labels Sep 10, 2021
@Farfar Farfar closed this as completed Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants