8000 Connection issue with netgear integration · Issue #57244 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Connection issue with netgear integration #57244

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
pierrejo opened this issue Oct 7, 2021 · 18 comments
Closed

Connection issue with netgear integration #57244

pierrejo opened this issue Oct 7, 2021 · 18 comments

Comments

@pierrejo
Copy link
pierrejo commented Oct 7, 2021

The problem

Hello everyone, I have an Orbi router, but I can't connect it with the Netgear integration. The integration works when I manually configure it but after a few moments, it stops working and cannot connect. The following are the steps taken.

I started by entering the following configuration:
login

My configuration is good and gives me all my devices:
succes
fff

But after a few seconds ... :
ddd

dqdd

Capture

I thank you in advance for your help!

What is version of Home Assistant Core has the issue?

core-2021.10.0

What was the last working version of Home Assistant Core?

/

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Netgear

Link to integration documentation on our website

https://www.home-assistant.io/integrations/netgear/

Example YAML snippet

it's an example of a YAML file, but i use the new Netgear integration.

device_tracker:
  - platform: netgear
    host: 192.168.1.1
    port: 80
    username: admin
    password: !secret netgear_password
    new_device_defaults:
    interval_seconds: 8
    consider_home: 60

Anything in the logs that might be useful for us?

2021-10-07 11:07:57 WARNING (MainThread) [homeassistant.config_entries] Config entry 'RBR750 - RBR750' for netgear integration not ready yet; Retrying in background
2021-10-07 11:08:02 ERROR (SyncWorker_7) [pynetgear] Invalid response
2021-10-07 11:08:02 ERROR (SyncWorker_7) [pynetgear] Invalid response
2021-10-07 11:08:02 ERROR (SyncWorker_3) [pynetgear] Invalid response
2021-10-07 11:08:02 ERROR (SyncWorker_3) [pynetgear] Invalid response

Additional information

My Orbi configuration :
Hardware Version: RBR750
firmware: V4.6.3.16_2.0.51 (the last one)

@probot-home-assistant
Copy link

netgear documentation
netgear source
(message by IssueLinks)

@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)

@starkillerOG
Copy link
Contributor

I think the problem here is that SSDP is discovering your orbi router and updating the port information.
That is overwriting your configured port and therefore it fails after a while.

@starkillerOG
Copy link
Contributor

This PR schould prevent the port from beeing overwritten: #57226
It also includes a debug log for the SSDP discovery information.
Could you test that PR?

@pierrejo
Copy link
Author
pierrejo commented Oct 7, 2021

This PR schould prevent the port from beeing overwritten: #57226 It also includes a debug log for the SSDP discovery information. Could you test that PR?

Thank you so much for your feedback.

Yes of course, how can I proceed to test this PR? (I am a beginner on Home Assistant).

@starkillerOG
Copy link
Contributor

Are you running HomeAssistant OS?

@pierrejo
Copy link
Author
pierrejo commented Oct 7, 2021

Are you running HomeAssistant OS?

Yes, on a Raspberry Pi 4

@pierrejo
Copy link
Author
pierrejo commented Oct 8, 2021

@starkillerOG Hello, I have just done the 10.1 update of HA Core :

hgfd

But I still have the same problem:

Capture
ddd

How can i debug this integration ? I've seen some logger configurations on the forum but I'm not sure what I need to do to get a relevant result.

@atlflyer
Copy link
Contributor
atlflyer commented Oct 8, 2021

I'm also having this issue, even after updating to 2021.10.1. Here are more detailed logs. It looks like it connects fine at first, but then starts getting an error message from the router that suggested the requests are malformed or unexpected in some way. I'm using Home Assistant OS on a Raspberry Pi and an Orbi RBR850. I was going to try the PR you suggested, but I can't recreate this issue on my dev instance (running in WSL). I think maybe because it is not auto-discovering the NetGear integration, but I don't know why that would be. (The dev instance isn't auto-discovering anything else on my network either)

2021-10-07 18:39:50 DEBUG (SyncWorker_14) [pynetgear] Login v1
2021-10-07 18:39:51 DEBUG (SyncWorker_16) [pynetgear] Get Info
2021-10-07 18:39:51 DEBUG (SyncWorker_4) [pynetgear] Login v1
2021-10-07 18:39:51 DEBUG (SyncWorker_4) [pynetgear] Get Info
2021-10-07 18:39:51 DEBUG (SyncWorker_0) [pynetgear] Get attached devices 2
2021-10-07 18:39:56 DEBUG (MainThread) [homeassistant.components.netgear.router] Netgear scan result:
[Device(name='homeassistant', ... <JSON device dump removed> ... )]
2021-10-07 18:39:56 DEBUG (MainThread) [homeassistant.components.netgear.router] Netgear tracker: new device found
2021-10-07 18:40:26 DEBUG (SyncWorker_25) [pynetgear] Get attached devices 2
2021-10-07 18:40:31 DEBUG (MainThread) [homeassistant.components.netgear.router] Netgear scan result:
[Device(name='homeassistant', ... <JSON device dump removed> ... )]
2021-10-07 18:40:39 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry RBR850 - orbi for device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 443, in async_unload
    result = await component.async_unload_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/config_entry.py", line 37, in async_unload_entry
    return await component.async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 181, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2021-10-07 18:40:39 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry RBR850 - orbi for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 443, in async_unload
    result = await component.async_unload_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 134, in async_unload_entry
    return await component.async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 181, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2021-10-07 18:40:39 DEBUG (SyncWorker_18) [pynetgear] Login v1
2021-10-07 18:40:39 ERROR (SyncWorker_18) [pynetgear] Invalid response
2021-10-07 18:40:39 DEBUG (SyncWorker_18) [pynetgear] 500
{'Content-Type': 'text/xml; charset="utf-8"', 'Connection': 'close', 'Content-Length': '398', 'Server': 'OpenWRT/OpenWrt UPnP/1.0 MiniUPnPd/1.9', 'Ext': ''}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>401</errorCode><errorDescription>Invalid Action</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
2021-10-07 18:40:39 DEBUG (SyncWorker_18) [pynetgear] Login v2
2021-10-07 18:40:39 ERROR (SyncWorker_18) [pynetgear] Invalid response
2021-10-07 18:40:39 DEBUG (SyncWorker_18) [pynetgear] 500
{'Content-Type': 'text/xml; charset="utf-8"', 'Connection': 'close', 'Content-Length': '398', 'Server': 'OpenWRT/OpenWrt UPnP/1.0 MiniUPnPd/1.9', 'Ext': ''}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>401</errorCode><errorDescription>Invalid Action</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
2021-10-07 18:40:39 WARNING (MainThread) [homeassistant.config_entries] Config entry 'RBR850 - orbi' for netgear integration not ready yet; Retrying in background
2021-10-07 18:40:44 DEBUG (SyncWorker_20) [pynetgear] Login v1
2021-10-07 18:40:44 ERROR (SyncWorker_20) [pynetgear] Invalid response
2021-10-07 18:40:44 DEBUG (SyncWorker_20) [pynetgear] 500
{'Content-Type': 'text/xml; charset="utf-8"', 'Connection': 'close', 'Content-Length': '398', 'Server': 'OpenWRT/OpenWrt UPnP/1.0 MiniUPnPd/1.9', 'Ext': ''}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>401</errorCode><errorDescription>Invalid Action</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
2021-10-07 18:40:44 DEBUG (SyncWorker_20) [pynetgear] Login v2
2021-10-07 18:40:44 ERROR (SyncWorker_20) [pynetgear] Invalid response
2021-10-07 18:40:44 DEBUG (SyncWorker_20) [pynetgear] 500
{'Content-Type': 'text/xml; charset="utf-8"', 'Connection': 'close', 'Content-Length': '398', 'Server': 'OpenWRT/OpenWrt UPnP/1.0 MiniUPnPd/1.9', 'Ext': ''}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>401</errorCode><errorDescription>Invalid Action</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>

@starkillerOG
Copy link
Contributor

@pierrejo well on HomeAssistant OS it is a bit difficult.
The PR is already merged and will be included in the next version 2021.10.2.
So I suggest waiting a few days untill that is released, then update and then turn on logging.
(With 2021.10.2 you schould be able to set it up manually and it schould keep the correct port).

@starkillerOG
Copy link
Contributor

@atlflyer The problem is is almost certain that the discovery is overwriting the correct port when configured manually.
HA 2021.10.2 will fix that.
However auto-discovery will still be using the wrong port, to fix that I am looking into the debug logs of the discovery.
Please post those debug logs once you are on HA 2021.10.2, it schould have a new log message about the SSDP discovery information

@atlflyer
Copy link
Contributor
atlflyer commented Oct 8, 2021

Here's my logging config, though I don't think the first one is doing anything. Are there any other components I need to add?

logger:
  default: warning
  logs:
    homeassistant.components.netgear: debug
    pynetgear: debug

@starkillerOG
Copy link
Contributor

No this is good, I already have the nessesary logs from here #57196
I will try to write some code this weekend.

@atlflyer
Copy link
Contributor
atlflyer commented Oct 9, 2021

2021.10.2 resolved the issue for me with manual configuration. Let me know if you need any more logs from discovery or anything. Thanks!

@pierrejo
Copy link
Author

2021.10.2 resolved the issue with manual configuration for me too 👌.

Thanks !

@starkillerOG
Copy link
Contributor

@atlflyer and @pierrejo the fix for the auto-discovery will be in HomeAssistant 2021.10.4, when that comes out in a few days, would you be willing to remove the netgear integration from your config, restart HomeAssistant and see if you can now set it up using auto-discovery (withouth specifing the port)?
(You can always make a snapshot before removing and restore that afterwards).

@pierrejo
Copy link
Author

@starkillerOG I updated Home Assistant to version 2021.10.4 and reconfigured with the auto-discovery module. It works very well for me (Orbi RB750).

It takes the right IP address and the right port. Many thanks to you for these different fixes! 👍

@starkillerOG
Copy link
Contributor

@pierrejo thank you for testing this out!
Glad to hear everything is now working

@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 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