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

2.2.7 HTTP Time out #12

Open
flybrys opened this issue May 25, 2021 · 2 comments
Open

2.2.7 HTTP Time out #12

flybrys opened this issue May 25, 2021 · 2 comments

Comments

@flybrys
Copy link

flybrys commented May 25, 2021

I'm using Home Assistant with Soma Connect on a RPi 3B. 3 roller blind motors all within 3 metres of the pi.
Since updating to 2.2.7, I'm getting the below error in Home Assistant. If I try and browse the api functions in a browser, list_devices works and displays all 3, but when I use open, close, set position commands etc the page just hangs and nothing happens. Since upgrading I've also noticed the pi phoning home to connect.somasmarthome.com every 10 seconds in my pihole.

`Logger: homeassistant.components.websocket_api.http.connection
Source: components/soma/cover.py:46
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 8:59:21 PM (3 occurrences)
Last logged: 9:39:17 PM

[433433568] HTTPConnectionPool(host='10.0.2.235', port=3000): Read timed out. (read timeout=5)
[2507258536] HTTPConnectionPool(host='10.0.2.235', port=3000): Read timed out. (read timeout=5)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/client.py", line 1344, in getresponse
response.begin()
File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='10.0.2.235', port=3000): Read timed out. (read timeout=5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 167, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 726, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/cover/init.py", line 290, in async_stop_cover
await self.hass.async_add_executor_job(ft.partial(self.stop_cover, **kwargs))
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/soma/cover.py", line 46, in stop_cover
response = self.api.stop_shade(self.device["mac"])
File "/usr/local/lib/python3.8/site-packages/api/soma_api.py", line 20, in stop_shade
return requests.get(url = "http://"+self.soma_connect_ip+":"+str(self.soma_connect_port)+"/stop_shade/"+mac, timeout = self.timeout).json()
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='10.0.2.235', port=3000): Read timed out. (read timeout=5)
`

@burntcookie90
Copy link

I am also seeing this. Additionally, hitting the HTTP API directly does not seem to work for setting device positions.

@austwhite
Copy link

austwhite commented Jul 16, 2021

I have had this error intermittently and also have it on 2.2.8 intermittently. My blinds all work correctly though.
I never set mine up with the Soma Connect account so mine never phones home. I use it local only with Home Assistant.
I have noticed the Pi drops off the WiFi a fair bit, even though the signal strength is good (both 5GHz and 2.4GHz tried).

Not sure if the errors in HA are related to the signal drops, or if this should be posted in the HA issues instead of here.

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

No branches or pull requests

3 participants