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

Problem with the Solax integration #113696

Open
tarrinho opened this issue Mar 17, 2024 · 10 comments
Open

Problem with the Solax integration #113696

tarrinho opened this issue Mar 17, 2024 · 10 comments

Comments

@tarrinho
Copy link

The problem

I'm having an issue with the solax integration:
I'm able to connect to solax (http://ip/api/realTimeData.htm - error code 200), but when I try to add the device in the Integration part (SolaX Power), I receive the note that it doesn't work (Unexpected error). So I decided to had a reverse proxy (Apache), and what I see is:
"GET /api/realTimeData.htm HTTP/1.1" 503 506 "-" "Python/3.12 aiohttp/3.9.3"

What version of Home Assistant Core has the issue?

core-2024.3.1

What was the last working version of Home Assistant Core?

not sure, but 1 year ago, it was working

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SolaX Power

Link to integration documentation on our website

https://www.home-assistant.io/integrations/solax

Diagnostics information

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1120, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1102, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1005, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('', 80)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/solax/inverter.py", line 61, in get_data
data = await self.make_request()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/solax/inverter.py", line 75, in make_request
raw_response = await self.http_client.request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/solax/inverter_http_client.py", line 56, in request
return await self.get()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/solax/inverter_http_client.py", line 61, in get
async with session.get(url, headers=self.headers) as req:
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 578, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 911, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host :80 ssl:default [Connect call failed ('192.168.2.5', 80)]

The above exception was the direct cause of the following exception:

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 38, in validate_api
response = await api.get_data()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/solax/init.py", line 50, in get_data
return await rt_request(self.inverter, 3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/solax/init.py", line 26, in rt_request
return await inv.get_data()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/solax/inverter.py", line 64, in get_data
raise InverterError(msg, str(self.class.name)) from ex
solax.inverter.InverterError: ('Could not connect to inverter endpoint', 'XHybrid')

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

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)

@tarrinho
Copy link
Author

Hello,
any news? Is there any other information that I can supply that would help?
Thanks

@tarrinho
Copy link
Author

tarrinho commented May 1, 2024

Hello Robin (@squishykid ),

did this integration stop working?

Thanks,
Pedro

@Darsstar
Copy link
Contributor

Darsstar commented May 2, 2024

2024.5.0 has solax 3.1.0 which improves the discovery process by, among other things, consolidating identical requests.

The version of the library in your older HA instance could very well have spammed the inverter to the point it becomes unresponsive for a bit.

Consider updating, or creating a test instance with 2024.5.0 and see if that helps.

@tarrinho
Copy link
Author

tarrinho commented May 3, 2024

Did the upgrade:
image

Same error:
image

@dretful
Copy link

dretful commented Jun 22, 2024

Same error as tarrinho. Would be grateful for a fix?

@lstolcman
Copy link

should be fixed with #115129

@japeral
Copy link

japeral commented Oct 8, 2024

should be fixed with #115129

Same problem here why #115129 was closed? muppets.

@clevermarketing
Copy link

i get in home-assistent.log a

WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.solax_srxn47sqgg_daily_yield (<class 'homeassistant.components.solax.sensor.InverterSensorEntity'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+solax%22

what can i do?

@harry051266
Copy link

Did the upgrade: image

Same error: image

I got it after the last update solax cloud. you can find the password under: Devices - "your Inverter" - klick the tree points and Backup password. That`s the password you need and the correct IP of course. port 80 is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants