I tried setting up device tracker to my router running DDWRT. On startup, this results in a connection timeout (see error log below).
Is there any way I can change the timeout - the ddwrt component appears to use 4 seconds? I am not very Python-savvy but tried changing the timeout in the ddwrt.py file. That results in an error with no accompanying stack trace. So, that’s probably not the right way.
16-11-24 22:22:54 homeassistant.components.device_tracker.ddwrt: Connection to the router timed out
Traceback (most recent call last):
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 391, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 387, in _make_request
httplib_response = conn.getresponse()
File “/usr/lib/python3.4/http/client.py”, line 1171, in getresponse
response.begin()
File “/usr/lib/python3.4/http/client.py”, line 351, in begin
version, status, reason = self._read_status()
File “/usr/lib/python3.4/http/client.py”, line 313, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”)
File “/usr/lib/python3.4/socket.py”, line 374, 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 “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/adapters.py”, line 423, in send
timeout=timeout
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py”, line 334, in increment
raise six.reraise(type(error), error, _stacktrace)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/packages/six.py”, line 686, in reraise
raise value
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 594, in urlopen
chunked=chunked)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 393, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 313, in _raise_timeout
raise ReadTimeoutError(self, url, “Read timed out. (read timeout=%s)” % timeout_value)
requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host=‘192.168.1.2’, port=80): Read timed out. (read timeout=4)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/device_tracker/ddwrt.py”, line 141, in get_ddwrt_data
timeout=4)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/api.py”, line 70, in get
return request(‘get’, url, params=params, **kwargs)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/api.py”, line 56, in request
return session.request(method=method, url=url, **kwargs)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/sessions.py”, line 488, in request
resp = self.send(prep, **send_kwargs)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/sessions.py”, line 609, in send
r = adapter.send(request, **kwargs)
File “/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/adapters.py”, line 499, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host=‘192.168.1.2’, port=80): Read timed out. (read timeout=4)
16-11-24 22:22:54 homeassistant.components.device_tracker: Error setting up platform ddwrt