8000 Can't change the port number for netgear integration · Issue #57196 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can't change the port number for netgear integration #57196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yiweiyu32 opened this issue Oct 6, 2021 · 25 comments
Closed

Can't change the port number for netgear integration #57196

yiweiyu32 opened this issue Oct 6, 2021 · 25 comments

Comments

@yiweiyu32
Copy link

The problem

With 2021.10, netgear migration has moved from yaml to UI. However the port number defaults to 5000 and there's no option to set it to a different port to account for products like orbi routers.

What is version of Home Assistant Core has the issue?

core-2021.10.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Netgear

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@SNoof85
Copy link
Contributor
SNoof85 commented Oct 6, 2021

I have no netgear at home but can try to setup the integration with UI config flow and I get this :
image
where i can definitely change the port.

@yiweiyu32
Copy link
Author

I'm seeing a different pop up screen.
image

@probot-home-assistant
Copy link

Hey there @hacf-fr, @Quentame, @starkillerOG, mind taking a look at this issue as it has been labeled with an integration (netgear) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


netgear documentation
netgear source
(message by IssueLinks)

@starkillerOG
Copy link
Contributor

@yiweiyu32 if the device is automatically discovered you can't change the port, but it schould be the correct port actually.
However if you need to change the port, simply ignore the automatically discovered device and configure it manually.
(Hit the + icon on the bottom right and search for Netgear) than it schould give you the option to specify the port.

@yiweiyu32
Copy link
Author

@starkillerOG Agree on the 2nd part. Was able to configure it manually. In my case the automatically discovered default port (5000) is not correct since I'm using a Orbi router (port 80) and that's what this issue is about.

@starkillerOG
Copy link
Contributor

I included a debug log for the SSDP discovery information in this PR: #57226
Could you test that and put the log level of the netgear integration to debug and then report the discovery infromation here?

@yiweiyu32
Copy link
Author

@starkillerOG
async_step_ssdp: discovery_info: {'CACHE-CONTROL': 'max-age=60', 'DATE': 'xxx', 'ssdp_st': 'urn:schemas-upnp-org:device:InternetGatewayDevice:1', 'ssdp_usn': 'uuid:xxxx::urn:schemas-upnp-org:device:InternetGatewayDevice:1', 'ssdp_ext': '', 'ssdp_server': 'OpenWRT/OpenWrt UPnP/1.0 MiniUPnPd/1.9', 'OPT': '"http://schemas.upnp.org/upnp/1/0/"; ns=01', '01-NLS': 'xxxx', 'BOOTID.UPNP.ORG': 'xxxx', 'CONFIGID.UPNP.ORG': 'xxxx', '_location_original': 'http://192.168.1.1:5000/rootDesc.xml', 'ssdp_location': 'http://192.168.1.1:5000/rootDesc.xml',
...
'manufacturer': 'NETGEAR, Inc.', 'manufacturerURL': 'http://www.NETGEAR.com', 'modelDescription': 'NETGEAR CBR40 802.11ac Wireless Router',
...

@starkillerOG
Copy link
Contributor

@yiweiyu32 so this basically only shows 5000 as the port, but no where does it refrence the correct port: 80.
Can you look how the http://192.168.1.1:5000/rootDesc.xml file looks like?

@yiweiyu32
Copy link
8000 Author

<root> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <device> <deviceType> urn:schemas-upnp-org:device:InternetGatewayDevice:1 </deviceType> <friendlyName>CBR40 (Gateway)</friendlyName> <manufacturer>NETGEAR, Inc.</manufacturer> <manufacturerURL>http://www.NETGEAR.com</manufacturerURL> <modelDescription>NETGEAR CBR40 802.11ac Wireless Router</modelDescription> <modelName>CBR40</modelName> <modelNumber>1</modelNumber> <modelURL>http://www.netgear.com</modelURL> <serialNumber>xxxx</serialNumber> <UDN>uuid:xxxx</UDN> <serviceList> <service> <serviceType>urn:schemas-upnp-org:service:Layer3Forwarding:1</serviceType> <serviceId>urn:upnp-org:serviceId:Layer3Forwarding1</serviceId> <controlURL>/ctl/L3F</controlURL> <eventSubURL>/evt/L3F</eventSubURL> <SCPDURL>/L3F.xml</SCPDURL> </service> </serviceList> <deviceList> <device> <deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType> <friendlyName>CBR40 (Gateway)</friendlyName> <manufacturer>NETGEAR, Inc.</manufacturer> <manufacturerURL>http://www.NETGEAR.com</manufacturerURL> <modelDescription>NETGEAR CBR40 802.11ac Wireless Router</modelDescription> <modelName>CBR40</modelName> <modelNumber>1</modelNumber> <modelURL>http://www.netgear.com</modelURL> <serialNumber>xxxx</serialNumber> <UDN>xxxx</UDN> <UPC>xxxx</UPC> <serviceList> <service> <serviceType> urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1 </serviceType> <serviceId>urn:upnp-org:serviceId:WANCommonIFC1</serviceId> <controlURL>/ctl/CmnIfCfg</controlURL> <eventSubURL>/evt/CmnIfCfg</eventSubURL> <SCPDURL>/WANCfg.xml</SCPDURL> </service> </serviceList> <deviceList> <device> <deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType> <friendlyName>CBR40 (Gateway)</friendlyName> <manufacturer>NETGEAR, Inc.</manufacturer> <manufacturerURL>http://www.NETGEAR.com</manufacturerURL> <modelDescription>NETGEAR CBR40 802.11ac Wireless Router</modelDescription> <modelName>CBR40</modelName> <modelNumber>1</modelNumber> <modelURL>http://www.netgear.com</modelURL> <serialNumber>xxxx</serialNumber> <UDN>uuid:xxxx</UDN> <UPC>xxxx</UPC> <serviceList> <service> <serviceType>urn:schemas-upnp-org:service:WANIPConnection:1</serviceType> <serviceId>urn:upnp-org:serviceId:WANIPConn1</serviceId> <controlURL>/ctl/IPConn</controlURL> <eventSubURL>/evt/IPConn</eventSubURL> <SCPDURL>/WANIPCn.xml</SCPDURL> </service> </serviceList> </device> </deviceList> </device> </deviceList> <presentationURL>http://192.168.1.1/</presentationURL> </device> </root>
@starkillerOG

@starkillerOG
Copy link
Contributor

well I don't see the correct port 80 in here as well.
You can't find anywhere port 80 in some of the commented out parts right?
Then I guess that we will need to match model for the Orbi series and set the port from a lookup dict.

@yiweiyu32
Copy link
Author

Yea, I can't find any mentioning of port 80. Just so you're aware this (Orbi's having a different default port) is pointed out in this page https://www.home-assistant.io/integrations/netgear/ but I'm not sure if that list is exhaustive.

@yiweiyu32
Copy link
Author
yiweiyu32 commented Oct 8, 2021

Another way to look at this is that since port 80 is the default http port, if there's no mention of port 5000 in some specific places (in some http urls) maybe we should set the default port to 80

@starkillerOG
Copy link
Contributor

Yes I am aware, I re-wrote that whole page :)
I have a prety exaustive list already of the orbi models since I needed that to determine which API method to use.

@starkillerOG
Copy link
Contributor

All other models exept the orbi range use port 5000.
Apperently also the Orbi models list port 5000 in the SSDP information, so that does not help much.

I think using the model from SSDP information and matching to known orbi models here

MODELS_V2 = [
"Orbi",
"RBK",
"RBR",
"RBS",
"RBW",
"LBK",
"LBR",
"CBK",
"CBR",
"SRC",
"SRK",
"SRR",
"SRS",
"SXK",
"SXR",
"SXS",
]

is the best option.

@yiweiyu32
Copy link
Author

Awesome. Will help test it out once the cha 8000 nge's been released. Thanks!

@starkillerOG
Copy link
Contributor

@yiweiyu32 I think this PR will fix the auto-discovery: #57432
Would be nice if you could test it and report back

@starkillerOG
Copy link
Contributor

@yiweiyu32 the fix will be in HomeAssistant 2021.10.4, could you test that once it comes out in a few days and see if auto-discovery now works withouth specifying the port?

@yiweiyu32
Copy link
Author

@starkillerOG upgraded 2021.10.4, restarted home assistant and it's still showing that the auto discovered port is 5000.

@starkillerOG
Copy link
Contributor

@yiweiyu32 are you sure you are on 2021.10.4?
It did work for two other people using orbi routers that now use the correct port 80.
Did you remove your existing Netgear integration before restarting?

In the discovery debug log you posted here #57196 (comment), not everything was included. Specifically I match the "modelNumber" to the known Orbi models.

Could you provide the "modelNumber" as listed in the discovery debug log?

@yiweiyu32
Copy link
Author

@starkillerOG Checked the hass version, removed the existing integration, restarted hass and I'm still seeing the wrong port (5000).
'modelNumber': '1'

@starkillerOG
Copy link
Contributor

Alright, so normally the modelNumber reports the model of the device, apperently for you this is not the case, that is why the fix did not work.
I will also check for modelName which does report the correct model in your router.

@starkillerOG
Copy link
Contributor

This PR will also check the modelName tag: #57904

@yiweiyu32
Copy link
Author

Thanks! Will retest it. What would the fix version be? @starkillerOG

@starkillerOG
Copy link
Contributor

@yiweiyu32 it will be in 2021.10.7
That will probably be released in a few days.

@yiweiyu32
Copy link
Author

Tested this in core-2021.11.4. The integration can now discover the correct port for my orbit router.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants
0