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

Expections since ~ beginning of May #117

Open
Daywalker789 opened this issue Jun 6, 2024 · 2 comments
Open

Expections since ~ beginning of May #117

Daywalker789 opened this issue Jun 6, 2024 · 2 comments

Comments

@Daywalker789
Copy link

I have 10 buttons in use since April, all worked fine. Since beginning of May I observe that the buttons do not work by every press and in the log I find:

---snip---
2024-06-06 22:00:32,537 | INFO | Starting sniffing...
2024-06-06 22:00:36,533 | INFO | Sagrotan button pressed!
2024-06-06 22:00:38,548 | ERROR | Unable to perform request: Check [url], [body], [headers] and API password or [domain], [service] and [service_data] format.
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.7/http/client.py", line 1344, in getresponse
response.begin()
File "/usr/lib/python3.7/http/client.py", line 306, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.7/http/client.py", line 267, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.7/socket.py", line 589, 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/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3.7/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 423, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 331, in _raise_timeout
self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='hassio', port=80): Read timed out. (read timeout=2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/dasshio.py", line 65, in arp_display
timeout=request_timeout_secs
File "/usr/lib/python3.7/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.7/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='hassio', port=80): Read timed out. (read timeout=2)
2024-06-06 22:00:38,621 | INFO | Finishing sniffing
2024-06-06 22:00:38,622 | INFO | Packet captured! Waiting 5 seconds...
2024-06-06 22:00:43,627 | INFO | Starting sniffing...
2024-06-06 22:01:01,944 | INFO | Sagrotan button pressed!
2024-06-06 22:01:03,369 | INFO | Request: http://hassio/homeassistant/api/services/switch/toggle - body: {"entity_id": "switch.papas_alter_pc"}
2024-06-06 22:01:03,370 | INFO | Status Code: 200
2024-06-06 22:01:03,371 | INFO | Successful request
2024-06-06 22:01:03,431 | INFO | Finishing sniffing
---snip---

As you can see the first attemp failed but the second one was succesfull.

Any idea or any help possible on this behave? THX.

@lejogs
Copy link

lejogs commented Nov 22, 2024

Slow response - but - I think this might just be a timeout :

See : #106

@lejogs
Copy link

lejogs commented Nov 22, 2024

Could the light be taking longer that 2 seconds to toggle?

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

2 participants