Giter Site home page Giter Site logo

Comments (8)

drakhart avatar drakhart commented on July 19, 2024

Can you please try without combining it with the EV Smart Charging integration? Just to make sure it works standalone. Thanks in advance.

Rationale behind: I have the feeling that this other integration is trying to subscribe to events fired by Super Soco sensors even before they are ready. Here's what I'm talking about: https://github.com/jonasbkarlsson/ev_smart_charging/blob/main/custom_components/ev_smart_charging/coordinator.py#L363

from ha-super-soco-custom.

Xnygra avatar Xnygra commented on July 19, 2024

Unfortunately no changes when removed the EV Smart Charging.

Logger: custom_components.super_soco_custom
Source: custom_components/super_soco_custom/vmoto_soco_api.py:129
Integration: Super Soco Custom (documentation, issues)
First occurred: 19:43:07 (1 occurrences)
Last logged: 19:43:07

Traceback (most recent call last):
File "/config/custom_components/super_soco_custom/vmoto_soco_api.py", line 130, in _api_wrapper
res = await self._session.post(url, headers=headers, json=data)
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
await resp.start(conn)
File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 899, in start
message, payload = await protocol.read() # type: ignore[union-attr]
File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/super_soco_custom/coordinator.py", line 174, in _async_update_data
self._user_data = (await self._client.get_user())[DATA_DATA]
File "/config/custom_components/super_soco_custom/vmoto_soco_api.py", line 64, in get_user
return await self._api_wrapper(url, headers)
File "/config/custom_components/super_soco_custom/vmoto_soco_api.py", line 129, in _api_wrapper
async with async_timeout.timeout(TIMEOUT):
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

Ok, that's clearly a connection timeout error. I could increase the timeout, but I feel like the current 5 seconds limit is already very generous for an API request.

Do you usually experience connection issues with other stuff? Also, could you please try to ping app.vmotosoco-service.com from your Home Assistant host and report the delay here?

For reference, I'm getting a consistent 49ms delay.

from ha-super-soco-custom.

Xnygra avatar Xnygra commented on July 19, 2024

image

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

Honestly, I don't know why you're getting timeouts while fetching the data, you should be good with those ping figures.

If you happen to have the required knowledge you could try increasing the Vmoto Soco API timeout and restarting HA, until you find a limit that works for you. And if you find a suitable timeout I can then push it to the repo so it's available in general and doesn't mess your integration on every update.

The file to edit is config/custom_components/super_soco_custom/vmoto_soco_api.py and the timeout variable is just TIMEOUT, in line 15 (here's the link for reference). I believe that in HAOS the config folder is located under /mnt/data/supervisor/homeassistant/config, but I can't check that myself as I'm using HA Core on an Ubuntu box.

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

I took the chance of releasing beta 11 with other fixes to also increase the API timeout to 10 seconds (instead of 5). Please let me know if that fixed the issue for you, or if you already managed to fix it by yourself increasing the timeout even more.

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

Hi, @Xnygra. It's been more than one month since I replied to this thread, but I still haven't had any updates from you. Is the issue still happening? Thanks.

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

Closing due to inactivity, assumed to be solved.

from ha-super-soco-custom.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.