Closed dustardly closed 4 years ago
Did you update to 0.3.6? The update solved this issue for me! (Or better: danimtb solved the issue with this update ;-) )
Iām using dasshio 0.3.6 as I wrote
hi @dustardly,
Seems your requests are taking some time to respond. There was a timeout introduced recently.
Could you please try this additional field in your configuration?
{
"request_timeout_secs": 5,
....
}
That will set a 5 seconds timeout to the post request. If it continues to happen, please try with slightly higher values.
I will try to adjust the default value for that accordingly to your results
Thanks š
hi @dustardly,
Seems your requests are taking some time to respond. There was a timeout introduced recently.
Could you please try this additional field in your configuration?
{ "request_timeout_secs": 5, .... }
That will set a 5 seconds timeout to the post request. If it continues to happen, please try with slightly higher values.
I will try to adjust the default value for that accordingly to your results
Thanks š
I try to add this to my config but I had a warning and don't accept
19-04-16 07:53:53 WARNING (MainThread) [hassio.addons.validate] Unknown options request_timeout_secs
I wrote so
{ "timeout": 20, "request_timeout_secs": 5, "buttons": [ { "name": "dash", "address": "44:65:0d:51:ab:3b", "domain": "switch", "service": "turn_on", "service_data": "{\"entity_id\": \"switch.campanello\"}" }, { "name": "nobo", "address": "34:D2:70:22:1E:A3", "domain": "switch", "service": "turn_on", "service_data": "{\"entity_id\": \"switch.cancello\"}" } ] }
solved , changed filter on firewall and restarted router, all working, maybe something blocked by firewall and too much time for answer. Thanks
The action works great now on 0.3.6. I get this one error below but it does not seem to affect it. File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 306, in _raise_timeout raise ReadTimeoutError(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):
Now there is a long delay from the time you press the button to the action and visa vera if you toggle a light off and on. Is there a way to reduce that delay? I have the timeout set at default 20.
CLosing the original issue as solved. @gdreelin please open a new one for your case
Dasshio 0.3.6 HA 0.91.3
2019-04-16 00:14:15,547 | INFO | Reading config file: /data/options.json 2019-04-16 00:14:15,552 | INFO | Starting... 2019-04-16 00:14:15,553 | INFO | Starting sniffing... 2019-04-16 00:18:12,777 | INFO | nobo button pressed! 2019-04-16 00:18:15,017 | 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.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "", line 2, in raise_from
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, 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.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 306, in _raise_timeout
raise ReadTimeoutError(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 67, in arp_display
timeout=request_timeout_secs
File "/usr/lib/python3.6/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, kwargs)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, kwargs)
File "/usr/lib/python3.6/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)
2019-04-16 00:18:15,035 | INFO | Finishing sniffing
2019-04-16 00:18:15,036 | INFO | Starting sniffing...