h4de5 / home-assistant-toshiba_ac

Toshiba AC integration into home-assistant.io
GNU General Public License v3.0
113 stars 17 forks source link

Conflict with SolarEdge integration #40

Open ghosmar66 opened 2 years ago

ghosmar66 commented 2 years ago

The Toshiba integration has a conflict with SolarEdge integration. When the Toshiba integration is installed installing the SolarEdge integration gives the following error:

`Logger: aiohttp.server Source: components/solaredge/config_flow.py:45 First occurred: February 17, 2022, 7:25:29 PM (3 occurrences) Last logged: 9:49:52 PM

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 164, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper result = await method(view, request, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 69, in async_step_user can_connect = await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 45, in _check_site response = api.get_details(site_id) File "/usr/local/lib/python3.9/site-packages/solaredge/solaredge.py", line 81, in get_details r = requests.get(url, params) TypeError: get() takes 1 positional argument but 2 were given`

When the Toshiba integration is removed this error is not shown when installing the SolarEdge integration.

System Info: Version core-2022.2.8 Installation Type Home Assistant OS Development false Supervisor true Docker true User root Virtual Environment false Python Version 3.9.7 Operating System Family Linux Operating System Version 5.10.63-v8 CPU Architecture aarch64

h4de5 commented 2 years ago

the only connection i found was in a sub-package from the toshiba-ac package: aiohttp this one seems to build up opun an older requests version. https://github.com/aio-libs/aiohttp/blob/master/requirements/constraints.txt#L174

the second parameter for .get() only came with requests version 2.7 https://docs.python-requests.org/en/v2.7.0/api/

You can try to modify the manifest.json file from solaredge: https://github.com/home-assistant/core/blob/dev/homeassistant/components/solaredge/manifest.json#L5

and add requests in the required version: "requirements": ["solaredge==0.0.2", "stringcase==1.2.0", "requests>=2.7.0"],

If this does not work - I can't really help, as I don't know how home-assistant handles different package versions otherwise.

h4de5 commented 2 years ago

I bumped toshiba-ac to the latest version - please try out again, if this has changed anything.

h4de5 commented 2 years ago

please reopen if still an issue.

Prozpect commented 2 years ago

Hi, I'm having the same issue. I have Toshiba AC on the latest version (11 mrt) and I get the error with SolarEdge. Without Toshiba AC installed SolarEdge works fine.

the log is the same as OP.

Logger: aiohttp.server Source: components/solaredge/config_flow.py:45 First occurred: 08:49:41 (1 occurrences) Last logged: 08:49:41

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 166, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper result = await method(view, request, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 69, in async_step_user can_connect = await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 45, in _check_site response = api.get_details(site_id) File "/usr/local/lib/python3.9/site-packages/solaredge/solaredge.py", line 81, in get_details r = requests.get(url, params) TypeError: get() takes 1 positional argument but 2 were given

h4de5 commented 2 years ago

did you try to add the requests package with version >=2.7.0 to the solarEdge integration?

Prozpect commented 2 years ago

Thank for taking the time, it's appreciated.

I've got SolarEdge installed now and running without Toshiba AC, but I cant seem to find the manifest.json file for SolarEdge. Where should I find it?

h4de5 commented 2 years ago

this depends on how you have installed HA. if it is running in docker you may find it here: /usr/src/homeassistant/homeassistant/components/solaredge

if you start it within python - it may be somewhere like this: /usr/local/lib/python3.9/site-packages/homeassistant/components/solaredge

unfortunatelly I don't know how to help here. it seems solaredge does not specify which request versions it needs - so it uses whichever is available. other integrations may just set the required version and do not use that feature.

another problem is, that the sources of solaredge have not been updated in 4 years (according to the linked github repo) so it seems unlikely that this will be fixed anytime soon from that side.

Prozpect commented 2 years ago

I've got it running on a Pi. I'll get into it another time, got to go now.

I'll let you know if I have any results.

ghosmar66 commented 2 years ago

I've got it running on a Pi. I'll get into it another time, got to go now.

I'll let you know if I have any results.

I am interested in how you got it running. I am using a Pi as well (running HA OS). Can you please share?

Prozpect commented 2 years ago

I've got it running on a Pi. I'll get into it another time, got to go now. I'll let you know if I have any results.

I am interested in how you got it running. I am using a Pi as well (running HA OS). Can you please share?

Soory, I meant I got HA running on a PI. The problem is still not solved for me... I guess we'll have to get into the software of the pi to get to the solaredge component and change the values as Andi stated.

marsman82 commented 1 year ago

Did somebody found a solution for this problem? I Would like to be able to use both the Toshiba airco and the solaredge integrations but I can’t get it to work.

Prozpect commented 1 year ago

Did somebody found a solution for this problem? I Would like to be able to use both the Toshiba airco and the solaredge integrations but I can’t get it to work.

I tried it again last month, but couldn't get it to work either. I found the python folder on the raspberry pi using winscp, but couldn't find the home assistant folder that h4de5 stated a few posts back. So I couldn't find the SolarEdge components folder. Are you using a raspberry pi?

marsman82 commented 1 year ago

I’m using a docker container on sykology nas.

tgrf commented 1 year ago

Unfortunately the issue is back on Home Assistant 2023.5.3, Frontend 20230503.3 with Toshiba AC 2023.5.0 (that means the latest versions).

h4de5 commented 1 year ago

too bad. was it working in between?

tgrf commented 1 year ago

I've added this integration recently, on Toshiba AC 2023.3.0 (v0.3.1), so I don't know if it used to work. Neither Toshiba AC 2023.5.0 (v0.3.2) nor previous version allows works alongside the SolarEdge integration.

Logs:

2023-05-22 17:20:37.912 ERROR (MainThread) [frontend.js.latest.202305033] :0:0 Script error. 2023-05-22 17:20:45.211 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 69, in async_step_user can_connect = await self.hass.async_add_executor_job( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 45, in _check_site response = api.get_details(site_id) File "/usr/local/lib/python3.10/site-packages/solaredge/solaredge.py", line 81, in get_details r = requests.get(url, params) TypeError: get() takes 1 positional argument but 2 were given 2023-05-22 17:23:58.265 ERROR (MainThread) [frontend.js.latest.202305033] :0:0 Script error.

meelvoormark commented 1 year ago

Not working here either, latest version of HA (2023.6.3) latest Solaredge / latest Toshiba AC 2023.5.1

Beast12 commented 11 months ago

Same issue here... Is there already a fix for this? Or a way to run both of them without the issues mentioned here?

Logger: aiohttp.server
Source: components/solaredge/config_flow.py:45
First occurred: 7:32:59 AM (29 occurrences)
Last logged: 7:40:32 AM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 297, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 393, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 69, in async_step_user
    can_connect = await self.hass.async_add_executor_job(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 45, in _check_site
    response = api.get_details(site_id)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/solaredge/solaredge.py", line 81, in get_details
    r = requests.get(url, params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: get() takes 1 positional argument but 2 were given
maarten117 commented 10 months ago

The problem seems to persist.

Any news on this issue?

GeitjeG commented 8 months ago

Same error interference with SolarEdge integration... Hope this can be solved?

Click for error log Logger: aiohttp.server Source: components/solaredge/config_flow.py:45 First occurred: 23:11:16 (5 occurrences) Last logged: 23:14:34 Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin return await func(self, request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 298, in async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 394, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 69, in async_step_user can_connect = await self.hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 45, in _check_site response = api.get_details(site_id) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/solaredge/solaredge.py", line 81, in get_details r = requests.get(url, params) ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: get() takes 1 positional argument but 2 were given
Nissex commented 8 months ago

Not possible to add Solaredge integration in HAOS 10.5 and 11. ("Not possible to connect to SolarEdge API") Tried in two separate HA installations. No Toshiba or Daikin integrations.

Beast12 commented 6 months ago

Any updates on this one? It has been already opened since February 2022...

h4de5 commented 6 months ago

no change and no more info other than already listed above.

Beast12 commented 5 months ago

Nothing? This is kinda a essential integration in home assistant, that has been opened almost 2 year ago...

Bbiggers340 commented 2 months ago

Still have to choose between Toshiba and Solarwdge, I'm choosing solaredge until this is fixed

koen-venly commented 2 months ago

Use the solar edge modbus... Then you can use both..