pynetgear: Router webui not accessible after using pynetgear

Version: 0.5.2 Router: Netgear R8000 Use case: homeassistant 0.89.2 device tracker

When I configured my device tracker and booted up homeassistant, I can no longer access the router’s web ui via direct IP or routerlogin.net but accessing the device via pynetgear works just fine

I can ping the device just fine, but accessing the web ui fails with a connection refused message. Stopping homeassistant doesn’t resolve the issue either. Rebooting the router allows me to access the web ui again at least until I turn homeassistant back on

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

and neither of those replicate the error, though the script fails at somepoint

here is v1 (force_login_v2=false) that ran since last night 1773 Error talking to API Traceback (most recent call last): File “/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py”, line 601, in urlopen chunked=chunked) File “/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py”, line 387, in _make_request six.raise_from(e, None) File “”, line 2, in raise_from File “/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py”, line 383, in _make_request httplib_response = conn.getresponse() File “/usr/lib/python3.5/http/client.py”, line 1197, in getresponse response.begin() File “/usr/lib/python3.5/http/client.py”, line 297, in begin version, status, reason = self._read_status() File “/usr/lib/python3.5/http/client.py”, line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”) File “/usr/lib/python3.5/socket.py”, line 575, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/local/lib/python3.5/dist-packages/requests/adapters.py”, line 440, in send timeout=timeout File “/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py”, line 639, in urlopen _stacktrace=sys.exc_info()[2]) File “/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py”, line 357, in increment raise six.reraise(type(error), error, _stacktrace) File “/usr/local/lib/python3.5/dist-packages/urllib3/packages/six.py”, line 685, in reraise raise value.with_traceback(tb) File “/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py”, line 601, in urlopen chunked=chunked) File “/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py”, line 387, in _make_request six.raise_from(e, None) File “”, line 2, in raise_from File “/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py”, line 383, in _make_request httplib_response = conn.getresponse() File “/usr/lib/python3.5/http/client.py”, line 1197, in getresponse response.begin() File “/usr/lib/python3.5/http/client.py”, line 297, in begin version, status, reason = self._read_status() File “/usr/lib/python3.5/http/client.py”, line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”) File “/usr/lib/python3.5/socket.py”, line 575, in readinto return self._sock.recv_into(b) urllib3.exceptions.ProtocolError: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/local/lib/python3.5/dist-packages/pynetgear/init.py”, line 375, in _make_request data=message, timeout=30, verify=False) File “/usr/local/lib/python3.5/dist-packages/requests/api.py”, line 112, in post return request(‘post’, url, data=data, json=json, **kwargs) File “/usr/local/lib/python3.5/dist-packages/requests/api.py”, line 58, in request return session.request(method=method, url=url, **kwargs) File “/usr/local/lib/python3.5/dist-packages/requests/sessions.py”, line 508, in request resp = self.send(prep, **send_kwargs) File “/usr/local/lib/python3.5/dist-packages/requests/sessions.py”, line 618, in send r = adapter.send(request, **kwargs) File “/usr/local/lib/python3.5/dist-packages/requests/adapters.py”, line 490, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’)) Get attached devices failed Traceback (most recent call last): File “pynetgeartestscriptv1.py”, line 8, in for i in netgear.get_attached_devices(): TypeError: ‘NoneType’ object is not iterable

Those look like standard networking issues between the server and the R8000, not uncommon to see a few when you are iterating 1700+ times

I have absolutely no clue. The HA plugin does the same or I am missing something. Perhaps just trying to bump the version to 0.6.1 in home-assistant but I am pretty sure it will not fix it. (you need to modify the HA netgear py file, not only install with pip or HA will overrides it with the specified version on startup)

A better way to override would be to override the device tracker as a custom_component, that way you aren’t editing core files.

Let me know if there is anything that is unclear or missing from the CLI and I can try to make a fix to improve it. This first round was the best I could think of from my own perspective.