Pynetgear error when netgear not configured?

I’m getting the following error consistently even when I don’t have netgear configuring under device_tracker.

> 16-05-06 12:29:07 pynetgear: Error talking to API

> Traceback (most recent call last):

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py",
> line 142, in _new_conn

>     (self.host,
> self.port), self.timeout, **extra_kw)

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py",
> line 91, in create_connection

>     raise err

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py",
> line 81, in create_connection

>     sock.connect(sa)

> OSError: [Errno 101] Network is unreachable

>  

> During handling of the above exception, another exception
> occurred:

>  

> Traceback (most recent call last):

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py",
> line 578, in urlopen

>     chunked=chunked)

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py",
> line 362, in _make_request

>    
> conn.request(method, url, **httplib_request_kw)

>   File
> "/usr/lib/python3.4/http/client.py", line 1090, in request

>    
> self._send_request(method, url, body, headers)

>   File
> "/usr/lib/python3.4/http/client.py", line 1128, in _send_request

>    
> self.endheaders(body)

>   File
> "/usr/lib/python3.4/http/client.py", line 1086, in endheaders

>    
> self._send_output(message_body)

>   File
> "/usr/lib/python3.4/http/client.py", line 924, in _send_output

>     self.send(msg)

>   File
> "/usr/lib/python3.4/http/client.py", line 859, in send

>     self.connect()

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py",
> line 167, in connect

>     conn =
> self._new_conn()

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py",
> line 151, in _new_conn

>     self, "Failed
> to establish a new connection: %s" % e)

> requests.packages.urllib3.exceptions.NewConnectionError:
> <requests.packages.urllib3.connection.HTTPConnection object at
> 0x71d83ed0>: Failed to establish a new connection: [Errno 101] Network is
> unreachable

>  

> During handling of the above exception, another exception
> occurred:

>  

> Traceback (most recent call last):

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line
> 403, in send

>     timeout=timeout

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py",
> line 623, in urlopen

>    
> _stacktrace=sys.exc_info()[2])

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/retry.py",
> line 281, in increment

>     raise
> MaxRetryError(_pool, url, error or ResponseError(cause))

> requests.packages.urllib3.exceptions.MaxRetryError:
> HTTPConnectionPool(host='routerlogin.net', port=5000): Max retries exceeded
> with url: /soap/server_sa/ (Caused by
> NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection
> object at 0x71d83ed0>: Failed to establish a new connection: [Errno 101]
> Network is unreachable',))

>  

> During handling of the above exception, another exception
> occurred:

>  

> Traceback (most recent call last):

>   File
> "/home/pi/.homeassistant/deps/pynetgear/__init__.py", line 113, in
> _make_request

>     self.soap_url,
> headers=headers, data=message, timeout=10)

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 111,
> in post

>     return
> request('post', url, data=data, json=json, **kwargs)

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 57, in
> request

>     return
> session.request(method=method, url=url, **kwargs)

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line
> 475, in request

>     resp =
> self.send(prep, **send_kwargs)

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line
> 585, in send

>     r =
> adapter.send(request, **kwargs)

>   File
> "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line
> 467, in send

>     raise
> ConnectionError(e, request=request)

> requests.exceptions.ConnectionError:
> HTTPConnectionPool(host='routerlogin.net', port=5000): Max retries exceeded
> with url: /soap/server_sa/ (Caused by
> NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection
> object at 0x71d83ed0>: Failed to establish a new connection: [Errno 101]
> Network is unreachable',))

> 16-05-06 12:29:07
> homeassistant.components.device_tracker.netgear: Failed to Login

> 16-05-06 12:29:07 homeassistant.components.device_tracker:
> Error setting up platform netgear

My configuration.yaml:

> device_tracker:
>    - platform: owntracks
>      max_gps_accuracy: 400
>      track_new_devices: no
>      interval_seconds: 12
>      consider_home: 180
>    - platform: nmap_tracker
>      hosts: 192.168.13.2-254
>      home_interval: 10

Anyone else running into this? Do I have something configured wrong?

Thanks,
Yang

What version are you using? I had this once I think, but then upgraded and it went away.

I’m new to HA, so this is a fresh install - version 0.18.2. I’m running a Netgear R7000 router if that matters.

Like I said, the strange thing is that the error happens even without enabling netgear as a platform. When I do enable netgear in the device tracker instead of nmap, I get the same error, but it must get through because I get my known devices table filled from the router (I deleted the nmap entries beforehand just to be sure).

Thanks,
Yang

I am fairly new as well. I think if you enable discovery, it finds your netgear router and then will try to login to it… I think.

But your router is supported, so you could setup the password etc and have home-assistant talk to the router.

Here’s some info on configuring it: https://home-assistant.io/components/device_tracker.netgear/
Here’s some documentation on the underlying pynetgear component: https://github.com/balloob/pynetgear

Yeah we auto discover netgear routers. I’m surprised your router doesn’t support routerlogin.net

Thanks for the tip. I have a separate DNS server instead of using the one in the Netgear R7000 which might contribute to the anomaly.

I read up on routerlogin.net and added it to my /etc/hosts file pointing to my router. It seems to have worked around the problem.

I don’t get the error anymore, but I do a get a double entry in the journal saying it is a connecting/scanning once for 192.168.13.1 (my router IP) and once for routerlogin.net. Is it actually now scanning twice per interval?

INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): routerlogin.net
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.13.1
INFO:homeassistant.components.device_tracker.netgear:Scanning
INFO:pynetgear:Get attached devices
INFO:homeassistant.components.device_tracker.netgear:Scanning
INFO:pynetgear:Get attached devices
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.13.1
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): routerlogin.net

Yes that would seem so. Since netgear is auto discovered you can remove your configuration entry.

Just so you know,

I’m getting the same errors, I run a R7000 with advancedtomato, I think that is the problem on my side