home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Solax Power EV Charger Unexpected error #118541

Open Bl00d-B0b opened 3 months ago

Bl00d-B0b commented 3 months ago

The problem

When I try to add my SolaX EV charger X3-EVC-11K(PHX) (Firmware: 3.004.11), then I receive "Unexpected error". I am connecting via my home IP network, not via default AP.

P.S. my SolaX Inverter X3-MIC-8K G2 works perfect (Firmware: 3.016.02) via internal IP network, no need to connect to default AP.

What version of Home Assistant Core has the issue?

2024.5.5

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

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/solax/discovery.py", line 122, in discover
    done, pending = await asyncio.wait(pending, return_when=return_when)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 464, in wait
    return await _wait(fs, timeout, return_when, loop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 550, in _wait
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/solax/config_flow.py", line 56, in async_step_user
    serial_number = await validate_api(user_input)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/solax/config_flow.py", line 35, in validate_api
    api = await real_time_api(
          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/solax/__init__.py", line 36, in real_time_api
    i = await discover(ip_address, port, pwd, return_when=asyncio.FIRST_COMPLETED)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/solax/discovery.py", line 75, in discover
    async with timeout(kwargs.get("timeout", 15)):
  File "/usr/local/lib/python3.12/site-packages/async_timeout/__init__.py", line 141, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.12/site-packages/async_timeout/__init__.py", line 228, in _do_exit
    raise asyncio.TimeoutError
TimeoutError

Additional information

X3-EVC-11K(PHX) API: {"SN":"SQxxxxxxxx","ver":"3.004.11","type":1,"Data":[4,0,24162,24336,24694,0,0,0,0,0,0,0,0,0,0,0,37,65503,32,0,65534,0,0,0,32,0,0,15,1,0,0,0,0,4996,4996,4992,8753,7947,6149,5,0,0,0,0,0,0,0,0,1,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4895,7168,6149,0,1,1,1,0,0,121,1195,1000,64936,44,0,0,0,1,0],"Information":[11.000,1,"C3xxxxxxxxxxxx",1,1.13,1.01,0.00,0.00,0.00,1],"Error":{"ErrorCode":"0","ErrorData":[0.00,0,0.00,0.0,0.00,0,0.00,0.00,0.00,0.00,0.00,86.43,0.00]},"OCPPServer":"","OCPPChargerId":""}

X3-MIC-8K G2 API: {"sn":"SRxxxxxxxx","ver":"3.016.02","type":16,"Data":[2456,2396,2455,81,82,83,2071,2049,2057,4313,4287,0,74,74,0,3199,3208,0,4999,4999,4999,2,30069,0,205,8000,53,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6179,0,2,5,7,0,15978,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Information":[8.000,16,"MCxxxxxxxxxxxx",8,1.27,0.00,1.29,1.00,0.00,1]}

home-assistant[bot] commented 3 months ago

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

Code owner commands Code owners of `solax` 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 solax` 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)


solax documentation solax source (message by IssueLinks)

Bl00d-B0b commented 3 months ago

Hello,

I update firmware for my SolaX EV charger, still receive Unexpected error, and this is my new API reply, some changes! X3-EVC-11K(PHX) API: {"SN":"SQxxxxxxxx","ver":"3.008.02","type":1,"Data":[4,0,24037,24583,24528,0,0,0,0,0,0,0,0,0,1,0,37,65502,65503,1,65532,65535,0,0,30,0,0,15,1,0,0,0,0,4998,4996,4996,7207,782,6150,1,0,0,0,0,0,0,0,0,1,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4895,7168,6149,0,1,1,1,0,0,121,1195,1000,0,44,0,0,0,1,0],"Information":[11.000,1,"C3xxxxxxxxxxxx",1,1.13,1.01,0.00,0.00,0.00,1],"Error":{"ErrorCode":"0","ErrorData":[0.00,0,0.00,0.0,0.00,0,0.00,0.00,0.00,0.00,0.00,86.43,0.00]},"OCPPServer":"","OCPPChargerId":"","QRContent":""}

DanielWeeber commented 2 months ago

EVchargers does not seem to be supported as of right now

DanielWeeber commented 2 months ago

I've created a PR for this and added support for X3 EVC. Maybe give it a thumbs up so @squishykid sees it ;) https://github.com/squishykid/solax/pull/167