Netgear (R7000) HASS not able to auth? Any tips?

Hi folks,

Just spinning up my first HASS instance and am having trouble getting it to login to my netgear router so I can start some presence monitoring.

My config is:

device_tracker:
   platform: netgear
   host: 10.1.1.2
   username: admin
   password: xxxxxxx
   port: 80

simple enough - straight out of the help file.

The error is:
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=zone>
INFO:homeassistant.loader:Loaded device_tracker.netgear from homeassistant.components.device_tracker.netgear
INFO:homeassistant.components.device_tracker.netgear:Logging in
INFO:pynetgear:Get attached devices
INFO:pynetgear:Login
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.1.1.2
ERROR:homeassistant.components.device_tracker.netgear:Failed to Login
ERROR:homeassistant.components.device_tracker:Error setting up platform netgear
INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=group.all_devices, new_state=<state group.all_devices=unknown; entity_id=(), friendly_name=all devices, hidden=True, order=0, auto=True @ 2016-06-07T20:20:27.758208+10:00>, old_state=None>
INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=device_tracker, service=see>
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=device_tracker>
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): pypi.python.org
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=updater>

Does anyone have a pointer for a noob?
Ps How fun is this stuff!? Can’t wait to get into MQTT!

Just in case someone else comes along - I never found any hint that the nighthawk provides the xml file generated by the upnp features…

I ended up just using nmap instead - worked ok.

1 Like

Just found this after we spoke earlier on Gitter. Will post how I get on when I try it tonight. Mine’s exactly the same router.

HASS auto discovers Netgear routers. Try removing the configuration.

Thanks folks - worked with the latest update…

However - I learnt about MQTT and owntracks - not going back! :slight_smile:

1 Like

Though the issue is resolved already but I am suggesting my solution which might help any future comers into this thread. Simple enough but it took to figure out a long time for me :wink: I just disabled the port with hash it started working!!! Interesting as the default port is set in pynetgear as 5000 which is not the actual port when I manually login to the router. Rather it uses port 80. So, I was trying to set port 80 which was causing the authentication issue. Then unknowingly I just hashed out the port and poof it started working…

I find that this works sometimes, but other times it fails to log in to the Netgear and gives me some error about exceeding the maximum number of logins. I guess this might be due to restarting HASS regularly for changes.

Hi

I do have the Nighthawk R8500 and getting errors too …

I tried port 5000 port 80 and no port without success

Oct 10 10:52:03 raspberrypi hass[20145]: ERROR:netdisco.ssdp:Error fetching description at http://192.168.1.1:8200/rootDesc.xml
Oct 10 10:52:03 raspberrypi hass[20145]: ERROR:netdisco.ssdp:Error fetching description at http://192.168.1.1:1990//WFADevice.xml
Oct 10 10:52:03 raspberrypi hass[20145]: ERROR:pynetgear:Error talking to API
Oct 10 10:52:03 raspberrypi hass[20145]: raise LocationParseError(url)
Oct 10 10:52:03 raspberrypi hass[20145]: requests.packages.urllib3.exceptions.LocationParseError: Failed to parse: None:None
Oct 10 10:52:03 raspberrypi hass[20145]: During handling of the above exception, another exception occurred:
Oct 10 10:52:03 raspberrypi hass[20145]: requests.exceptions.InvalidURL: Failed to parse: None:None
Oct 10 10:52:03 raspberrypi hass[20145]: ERROR:homeassistant.components.device_tracker.netgear:Failed to Login
Oct 10 10:52:03 raspberrypi hass[20145]: ERROR:homeassistant.components.device_tracker:Error setting up platform netgear

So I had the same issue. I removed the host in my configuration and it suddenly started working perfectly.

1 Like

Is that to say that you let discovery handle it? Host is a required field of the platform. How do you specify user/pass?

Here are the important snippets of my configuration.yaml:

...
# Discover some devices automatically
#discovery:
...
device_tracker:
 - platform: netgear
   username: xxxxxx
   password: yyyyyyyyy
...

Don’t ask me why, but this worked for me. Logs in fine…finds all my connected devices. Sweet as pie. Had to add my Hue and Plex manually, as they are no longer auto discovered…but it is what it is.

Thanks. Indeed - that appears (so far) to work for me, too. I’d given up on using presence on my R7000 as it was too often flaky.

No problem! I’m a long time hacker…recent home automationist! :slight_smile:

Hey guys any of you having problems with the new update 0.41 and the Netgear Device Tracker component ?

Mine became very unreliable sometimes it works sometime it does not …

Any feedback ?

Thanks

1 Like

I’ve tried all the tips above and I’m still getting stacktrace errors on the R8000. I can’t find a way to disable it either. I think the errors are causing OwnTracks to not even try to connect.

The host/username/password/port things did not work for me. Anyone have any other suggestions? Here is my trace I get no matter what I put in:

2017-06-04 13:47:32 WARNING (Thread-6) [netdisco.ssdp] Error fetching description at http://172.16.0.1:8200/rootDesc.xml
2017-06-04 13:47:36 ERROR (Thread-1) [pynetgear] Error talking to API
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/requests/models.py”, line 369, in prepare_url
scheme, auth, host, port, path, query, fragment = parse_url(url)
File “/srv/homeassistant/lib/python3.4/site-packages/urllib3/util/url.py”, line 199, in parse_url
raise LocationParseError(url)
urllib3.exceptions.LocationParseError: Failed to parse: None:None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/homeassistant/.homeassistant/deps/pynetgear/init.py”, line 113, in _make_request
self.soap_url, headers=headers, data=message, timeout=10)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/api.py”, line 112, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/api.py”, line 58, in request
return session.request(method=method, url=url, **kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py”, line 499, in request
prep = self.prepare_request(req)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py”, line 431, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File “/srv/homeassistant/lib/python3.4/site-packages/requests/models.py”, line 303, in prepare
self.prepare_url(url, params)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/models.py”, line 371, in prepare_url
raise InvalidURL(*e.args)
requests.exceptions.InvalidURL: Failed to parse: None:None
2017-06-04 13:47:37 ERROR (Thread-1) [homeassistant.components.device_tracker.netgear] Failed to Login
2017-06-04 13:47:37 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform netgear

After reading the netgear.py code, I kept only the following line in my configuration.xml. Then it works

device_tracker:
platform: netgear
password: xxxxxxx

I left other using the default value from netgear.py. (the default use routerlogin.net as host and admin as user)

See whether that works for you (NOTE: I still have those fetching description error) But now the devices show up on the status page.

I think that I have a comparable issue. I tried everything you recommended in this thread but it doesn’t work for me. I always get this error message on startup:

2017-11-12 23:59:51 ERROR (MainThread) [homeassistant.components.device_tracker]                                                                                                                                                              Error setting up platform netgear
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/                                                                                                                                                             device_tracker/__init__.py", line 148, in async_setup_platform
    platform.get_scanner, hass, {DOMAIN: p_config})
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/                                                                                                                                                             device_tracker/netgear.py", line 41, in get_scanner
    scanner = NetgearDeviceScanner(host, username, password, port)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/                                                                                                                                                             device_tracker/netgear.py", line 58, in __init__
    results = self._api.get_attached_devices()
  File "/srv/homeassistant/lib/python3.5/site-packages/pynetgear/__init__.py", l                                                                                                                                                             ine 66, in get_attached_devices
    response).group(1).split(";")
AttributeError: 'NoneType' object has no attribute 'group'

My configuration.yaml:

device_tracker:
  - platform: netgear
    port: 80
    password: !secret netgear_password
    interval_seconds: 15
    consider_home: 200
    track_new_devices: true

Any ideas?

Edit: I have a Netgear R7800

Looks like you are missing your username in the Netgear config

Hi, let me know how it goes. I have the same router, but gave up after a while. Mine seems to be disconnecting several times after it connects. After a day or so it even refuses connections from HA, but works again after a HA reboot.

Having the same problem with my R7800.

Any luck figuring it out?