Problems connecting to new router

Hi everybody,

Backstory: I have an Intel Nuc 8i5 with OMV5 and docker installed. Home Assistant was running fine in a docker container. OS drive crashed, i had no backup, but config files for HA were saved. I decided to install new router before setting up OMV5 server with Docker and HA again. I used to have a Netgear R6700v2, now i have a Netgear R6700v3.

After installing HA again in a Docker container using my old config files everything is working fine except my integrations with my router. Which makes sense since i changed routers. Problem is, HA recognized the new integration and asks me to setup the new router. so far so good. But once the installation is complete and i check the device and entities it, it sees the 1 device, but when i click on it all the entities are Unavailable. I see no way to enable them at all.

Before changing routers I also had a netgear device tracker set up for my phone, so i could use that for an integration turning my lights on when i get home.

But since the change in router it does not see my phone anymore on the network.
I use the following code to get the device tracker:

#Netgear tracker
platform: netgear
password: !secret netgear_pwd
host: 192.168.66.1
#port: 80
interval_seconds: 10
consider_home: 180
devices:

  • Pixel 3a

This used to work but now it stopped working completely.

Can anybody point me in the right direction to fix this? Any help would be greatly appreciated.

Just some more information.
I did remove the old integration and rebooted. After the reboot HA recognized the new router via the UPnP integration. It goes through the setup fine, but afterwards i run in the problem described above. I can see the device, but none of the entities are available

You sure that you use the same Integration? Upnp and Netgear are not the same.

I probably didn’t explain that well.
Both integrations are not working anymore.

But i assume they are somehow related as they both get info from the router.
I use the UPnP integration to check download and upload speeds on my router
I use the Netgear integration to check if certain devices are connected to the network.

But somehow the automatic integration seems to work well, it detects the new router and sets it up, but no entities are available after that.

An I assume there are no obvious errors in the log. Can it bee that there is some issue with login information. Could it be some security setting within the router?

I’ll check the log when i get back home from work.
Login info should be ok. the UPnp integration doesn’t even ask for a pwd or login.
The netgear integration does, but I made sure the pwd is the same as the one from the old router.

I have no idea about some possible security setting on the router itself. I’ll look for that too, but that’s what i was hoping somebody here would post :smile:

So i checked the log in Home Assistant and there is an error for the UPnP setup with the NETGEAR router.

This is the error info:

Logger: homeassistant.components.upnp
Source: helpers/update_coordinator.py:153
Integration: UPnP (documentation, issues)
First occurred: 11:00:50 PM (1 occurrences)
Last logged: 11:00:50 PM

Error requesting R6700v3 (Gateway) data: Server disconnected

I also found some settings on the router relating to UPnP, they look like this:

They seem to look ok but i’m not sure.

The device you see connected is not my Home Assistant, it’s another device on my network, a Nvidia Shield tv box.

On a positive note though, my netgear integration started working again, so i can see now if my phone is connected to the router or not, so my routines for coming home work again. One step in the right direction

How exactly have you setup HA. Do you run Hassio or a self build Docker container? Could it be, that you are blocking some ports with your docker setup? If I remember correctly Hassio runs in host mode, and thus there should be no issue, but I could be wrong here.

I run Home Assistant as a docker container
One of the settings in the docker stack that i use is to set the container in host mode so it’s on the same IP range as the other devices.

The UPnP integration picks up the new router, but then it somehow gets disconnected again.

I would have assumed that the router i have is pretty common and should work just fine. I’m super confused about this, the previous version of the router that i had installed without a hitch

Hi. I am having the same problem with the same router. I was able to set up the Netgear router for attached devices (device trackers). The UPNP doesn’t seem to work. It identifies the router automatically. I have added upnp: to the configuration. I’ve also added the router address. The packet information does not appear. I have done this several times, which is why I am here looking for an answer.

The server has UPNP option is which is enabled on my router. What is interesting is that I have other UPNP devices on my network and the router isn’t recognizing those either. I’ve uploaded my UPNP page info from my router. I’m also uploading a picture of where the statistics can be seen. Maybe that will help.


I changed those values myself
Advertisement Period and Advertisement Time to Live.

I have a Nvidia Shield and that get’s picked up by the router in the UPnP portmap table

1 Like

So i’ve tried 2 different ways of adding the router via UPnP. Neither work, but both give different results.

If i don’t add

upnp:
local_ip: 192.168.66.1

then the UPnP integration picks up the Router, asks what area it belongs too and then it adds a device and 9 entities, but all entities are unavailable.

These are the errors in the log:

Logger: homeassistant.components.device_tracker
Source: components/device_tracker/legacy.py:320
Integration: Device tracker (documentation, issues)
First occurred: 8:27:20 PM (1 occurrences)
Last logged: 8:27:20 PM

Updating device list from legacy took longer than the scheduled scan interval 0:00:10

and

Logger: homeassistant.components.upnp
Source: helpers/update_coordinator.py:153
Integration: UPnP (documentation, issues)
First occurred: 8:27:23 PM (1 occurrences)
Last logged: 8:27:23 PM

Error requesting R6700v3 (Gateway) data: Server disconnected

If i do add the little bit of code from above to the configuration,yaml file,
then the UPnP integration again picks up the router, but it doesn’t add any devices or entities at all

The error i get in the log is the following:

Logger: homeassistant.config_entries
Source: components/upnp/device.py:49
First occurred: 8:38:48 PM (1 occurrences)
Last logged: 8:38:48 PM

Error setting up entry R6700v3 (Gateway) for upnp
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 236, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/usr/src/homeassistant/homeassistant/components/upnp/init.py”, line 116, in async_setup_entry
device = await async_discover_and_construct(hass, udn, st)
File “/usr/src/homeassistant/homeassistant/components/upnp/init.py”, line 48, in async_discover_and_construct
discovery_infos = await Device.async_discover(hass)
File “/usr/src/homeassistant/homeassistant/components/upnp/device.py”, line 49, in async_discover
discovery_infos = await IgdDevice.async_search(source_ip=local_ip, timeout=10)
File “/usr/local/lib/python3.8/site-packages/async_upnp_client/profiles/profile.py”, line 55, in async_search
await async_search(async_callback=on_response, source_ip=source_ip, timeout=timeout)
File “/usr/local/lib/python3.8/site-packages/async_upnp_client/search.py”, line 32, in async_search
sock.bind((source_ip.compressed, 0))
OSError: [Errno 99] Address not available

This is my Home Assistant Info:

System Health

version: 2021.1.5
installation_type: Home Assistant Container
dev: false
hassio: false
docker: true
virtualenv: false
python_version: 3.8.7
os_name: Linux
os_version: 5.9.0-0.bpo.5-amd64
arch: x86_64
timezone: America/Tegucigalpa

logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok

dashboards: 2
mode: auto-gen
resources: 9

I’m looking at this. It looks like there is a dedicated page for the information, which we should be able to pull from. Please note: I am not a programmer, I just know enough to make myself dangerous. It appears that a key is being passed and is exposed in the website. The key being after the question mark.

If we can figure out the authentication method to pass the login id and password, we should be able to pull in the statistics, router status and data from the traffic meter.

example site:
http://192.168.1.1/RST_statistics.htm?y7bRbp=rE0aZnvmVYdhPRrWcfxIcXrzx4xWIgGRGCrtgCkXIytr6DQoHlYJWGN7njEJ_2Zagl7WYoQ48mEQco7mle7.TVKJPyn3PZWNWfLwfmeVOsso7d6iPI_ZCmJM442oXs9bLqGUU4cN4xpplUZyUs3fZu.lAcR

It’s likely that a git issue will have to be recorded, but I want to provide more information here in case it will help. Below are errors found in the log.

Logger: homeassistant.components.upnp
Source: helpers/update_coordinator.py:158
Integration: UPnP (documentation, issues)
First occurred: 10:10:03 PM (1 occurrences)
Last logged: 10:10:03 PM

Error requesting R6700v3 (Gateway) data: Server disconnected
Logger: homeassistant.components.sensor
Source: /usr/local/lib/python3.8/asyncio/events.py:81
Integration: Sensor (documentation, issues)
First occurred: 10:10:11 PM (1 occurrences)
Last logged: 10:10:11 PM

Setup of sensor platform upnp is taking over 10 seconds.
1 Like

those are the exact same errors i get

have you tried deleting the integration, add the upnp bit of code to configuration.yaml
then restart and add the UPnP integration again.
Do you get a completely different error then?
Does it still add the device and entities?

Yes. I’ve tried it. It says its successful, but then it still errors out with the same error.

I was researching another Netgear api info to see if there was a way for us to pull the info, but what I found is that our router is not supported. I wonder if that is what the issue is here. I don’t think the UPNP is going to work for our model.

What I have found is that the websites are static so I am working on a Node Red component to pull out the info. There is a Cheerios node that is supposed to make it easier, but it’s a learning curve for me as most of the examples are just .js code and not how to configure it in the visual component of Node Red. I’ll let you know if I get somewhere.

I just don’t understand why this model would have any issues connecting, it’s one of the most sold routers on Amazon. It’s a popular router, you would think those work out of the box

I was looking at this site.

I was looking at this based on the underlying scripts being based on python.

That seems to be doing much of the same stuff as the netgear integration.

On top of that i would have no idea how to integrate that into HA?

Hi. Sorry, Just coming back to this issue.

The link I shared regarding Python indicates that the underlying Python scripts are not compatible with our router. I am going to do some further digging for the Cheerios node red option. Either way, we will need a custom solution to have our information pass data.

In the meantime, I am going to raise this issue up to development so that someone more dedicated and much more smarter than me can fix it faster.