bm1549 / home-assistant-frigidaire

Custom component for the Frigidaire integration
30 stars 10 forks source link

Error 502 #16

Closed BigWebstas closed 2 years ago

BigWebstas commented 2 years ago

I just recently started getting an error 502, is anyone else seeing this issue?

Traceback (most recent call last):
  File "/config/custom_components/frigidaire/__init__.py", line 20, in setup
    hass.data[DOMAIN][entry.entry_id] = frigidaire.Frigidaire(
  File "/usr/local/lib/python3.9/site-packages/frigidaire/__init__.py", line 256, in __init__
    self.authenticate()
  File "/usr/local/lib/python3.9/site-packages/frigidaire/__init__.py", line 292, in authenticate
    auth_response = self.post_request('/authentication/authenticate', data)
  File "/usr/local/lib/python3.9/site-packages/frigidaire/__init__.py", line 420, in post_request
    return self.parse_response(response)
  File "/usr/local/lib/python3.9/site-packages/frigidaire/__init__.py", line 394, in parse_response
    raise FrigidaireException(f'Request failed with status {response.status_code}: {response.content}')
frigidaire.FrigidaireException: Request failed with status 502: b'{"status":"ERROR","message":"Exception when calling service: epi-server, status: 502, body: <!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Strict//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\">\\r\\n<html xmlns=\\"http://www.w3.org/1999/xhtml\\">\\r\\n<head>\\r\\n<meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=iso-8859-1\\"/>\\r\\n<title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>\\r\\n<style type=\\"text/css\\">\\r\\n<!--\\r\\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\\r\\nfieldset{padding:0 15px 10px 15px;} \\r\\nh1{font-size:2.4em;margin:0;color:#FFF;}\\r\\nh2{font-size:1.7em;margin:0;color:#CC0000;} \\r\\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \\r\\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\\"trebuchet MS\\", Verdana, sans-serif;color:#FFF;\\r\\nbackground-color:#555555;}\\r\\n#content{margin:0 0 0 2%;position:relative;}\\r\\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\\r\\n-->\\r\\n</style>\\r\\n</head>\\r\\n<body>\\r\\n<div id=\\"header\\"><h1>Server Error</h1></div>\\r\\n<div id=\\"content\\">\\r\\n <div class=\\"content-container\\"><fieldset>\\r\\n  <h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>\\r\\n  <h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3>\\r\\n </fieldset></div>\\r\\n</div>\\r\\n</body>\\r\\n</html>\\r\\n","code":"ECP0204","data":{}}'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/frigidaire/__init__.py", line 28, in async_setup_entry
    await 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 "/config/custom_components/frigidaire/__init__.py", line 26, in setup
    raise data_entry_flow.AbortFlow from err
TypeError: __init__() missing 1 required positional argument: 'reason'
bm1549 commented 2 years ago

I only have an AC and haven't used it since the weather got colder, but a 502 indicates that Frigidaire's servers are having issues

bm1549 commented 2 years ago

@BigWebstas is this still happening? If so, can you try loading it from the Frigidaire app and see if the issue is the same?

BigWebstas commented 2 years ago

It appears to be working now, sorry for the late response

BigWebstas commented 2 years ago

Environmental issue, closing the bug