bm1549 / frigidaire

Python API for the Frigidaire 2.0 App
MIT License
13 stars 8 forks source link

Integration with Home Assistant? #35

Closed DonRomaniello closed 4 months ago

DonRomaniello commented 4 months ago

Has this been folded into HA? I'm struggling to get my AC connected, and before I dig much deeper I figured I would ask,

DonRomaniello commented 4 months ago

Here's some more context, this occurs after trying to add the integration:

`This error originated from a custom integration.

Logger: custom_components.frigidaire.config_flow Source: custom_components/frigidaire/config_flow.py:66 integration: frigidaire First occurred: June 30, 2024 at 5:51:27 PM (3 occurrences) Last logged: 11:10:02 AM

Unexpected exception Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/socket.py", line 963, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1060, in _validate_conn conn.connect() File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f64cf81d0>: Failed to establish a new connection: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 801, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 594, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.latam.ecp.electrolux.com', port=443): Max retries exceeded with url: /authentication/authenticate (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f64cf81d0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/frigidaire/config_flow.py", line 66, in async_step_user await validate_input(self.hass, user_input) File "/config/custom_components/frigidaire/config_flow.py", line 38, in validate_input appliances = await hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/frigidaire/config_flow.py", line 30, in setup client = frigidaire.Frigidaire(username, password, timeout=60) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/frigidaire/init.py", line 246, in init self.authenticate() File "/usr/local/lib/python3.12/site-packages/frigidaire/init.py", line 282, in authenticate auth_response = self.post_request('/authentication/authenticate', data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/frigidaire/init.py", line 428, in post_request response = requests.post(f'{API_URL}{path}', data=json.dumps(data), headers=self.headers, verify=False, timeout=self.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.latam.ecp.electrolux.com', port=443): Max retries exceeded with url: /authentication/authenticate (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f64cf81d0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))`

DonRomaniello commented 4 months ago

Although, does that mean I should go to this repo?

https://github.com/rothn/frigidaire_homeassistant

bm1549 commented 4 months ago

This is the supported repo:

https://github.com/bm1549/home-assistant-frigidaire

DonRomaniello commented 4 months ago

Thank you, sorry to not have done enough digging before asking for help.