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

Evnex integration won't load anymore in HA 2024.5 #34

Open
xxxarmitagexxx opened this issue May 4, 2024 · 3 comments
Open

Evnex integration won't load anymore in HA 2024.5 #34

xxxarmitagexxx opened this issue May 4, 2024 · 3 comments

Comments

@xxxarmitagexxx
Copy link

xxxarmitagexxx commented May 4, 2024

Hi,

Recently the Evnex integration has been failing systematically to load in Home Assistant, currently 2024.5.1.

Looking at the logs, there is this error:

Traceback (most recent call last):
  File "/config/custom_components/evnex/__init__.py", line 164, in async_update_data
    ] = await evnex_client.get_org_charge_points(org.slug)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tenacity/_asyncio.py", line 47, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tenacity/__init__.py", line 314, in iter
    return fut.result()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.12/site-packages/tenacity/_asyncio.py", line 50, in __call__
    result = await fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/evnex/api.py", line 189, in get_org_charge_points
    return EvnexGetChargePointsResponse(**json_data).data.items
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 341, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for EvnexGetChargePointsResponse
data -> items -> 0 -> connectors -> 0 -> meter -> frequency
  field required (type=value_error.missing)

Any clue what the issue could be, it was working fine in the past.

@hardbyte
Copy link
Owner

hardbyte commented May 4, 2024

From the error message it looks like the data has changed but I suspect its the validation library I'm using (pydantic) is finally updated.

I'm trying out a new pre-release now on HA 2024.5 - it won't be compatible with every component though (due to the way Python dependencies are resolved across components). Perhaps let me know if that works, otherwise I might need to see the debug logs before that validation error. https://github.com/hardbyte/ha-evnex/releases/tag/v0.6.0a2

@sultanoswing
Copy link

sultanoswing commented May 24, 2024

Not sure if related, but the evnex HACS integration (0.6.0a2) hasn't been working for me for a couple of weeks now.

Just ran pip install evnex to make sure things were updated (HA 2024.5.5, Supervisor 2024.05.1). Rebooted, and getting errors in the log:

`Logger: homeassistant.setup
Source: setup.py:271
First occurred: 09:01:04 (1 occurrences)
Last logged: 09:01:04

Setup failed for custom integration 'evnex': Requirements for evnex not found: ['evnex>=0.4.1'].`

`Logger: homeassistant.util.package
Source: util/package.py:123
First occurred: 09:00:59 (3 occurrences)
Last logged: 09:01:04

Unable to install package evnex>=0.4.1: ERROR: Cannot install evnex==0.4.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts`

Not sure where / how to resolve these dependency errors?

@sultanoswing
Copy link

sultanoswing commented May 26, 2024

Follow up comment - is there any way to install this outside of HACS / through the terminal?

To try to resolve the dependency issue I uninstalled the Evnex integration. Now when trying to reinstall it through the GUI (+ Add Integration), I'm getting the error:
"Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble"

EDIT: finally managed to get the integration loaded - I think by uninstalling and reinstalling Pydantic from the terminal.

But now, despite entering my username (xxx@email.com + my evnex app account password), the devices fail to load thanks to this error: #36

Still - closer than before a working integration!

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

3 participants