Closed ThatJRadGuy closed 2 years ago
netgear documentation netgear source (message by IssueLinks)
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)
@ThatJRadGuy please check the error in the log and post it here. Are you also 100% sure that you are using the correct host, username and password (if you go to that IP in a webbrowser, are you able to login using that username and password?) Please also try rebooting the router and see if you can then setup the integration.
I'm 100% sure the details are correct, I log into my router several times a day. I've also tried rebooting without luck. I just tried again and the log is as below.
Logger: pynetgear Source: /usr/local/lib/python3.9/site-packages/pynetgear/init.py:633 First occurred: 3:45:20 PM (4 occurrences) Last logged: 3:45:20 PM
Error talking to API Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output self.send(msg) File "/usr/local/lib/python3.9/http/client.py", line 980, in send self.connect() File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f758ea7a550>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 440, in send resp = conn.urlopen( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen retries = retries.increment( File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.1', port=5000): Max retries exceeded with url: /soap/server_sa/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f758ea7a550>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pynetgear/init.py", line 591, in _make_request response = self._post_request(headers, message) File "/usr/local/lib/python3.9/site-packages/pynetgear/init.py", line 553, in _post_request return requests.post( File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 117, in post return request('post', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 529, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 645, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.1', port=5000): Max retries exceeded with url: /soap/server_sa/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f758ea7a550>: Failed to establish a new connection: [Errno 111] Connection refused'))
@ThatJRadGuy do you see any other errors in the log related to Netgear? There schould be a "login using all known port-ssl combinations failed." error if indeed all port-ssl combinations are beeing refused by the router, but I don't see that in the current log.
I also see there are 4 ocurrences of the error you posted (by default HomeAssistant only shows the most recent). Could you press the blue "Load full homeassistant-log" button at the bottom of the log page in homeassistant (after rebooting HomeAssistant to have a clean log and then trying to setup the Netgear integration). Please post all the log messages related to the Netgear integration (I know they can be lengthy).
Yeah sorry that error is in there too:
Logger: pynetgear Source: /usr/local/lib/python3.9/site-packages/pynetgear/init.py:138 First occurred: 5:46:10 PM (1 occurrences) Last logged: 5:46:10 PM
login using all known port-ssl combinations failed.
Below is everything in the full log when i search "netgear" after a reboot. I have been able to add my XR700 as a UPnP device, so there's a fair bit of 'netgear' related stuff in the logs.
2022-04-30 17:44:46 DEBUG (MainThread) [async_upnp_client.traffic.ssdp] Received packet from ('192.168.1.1', 1900): b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=120\r\nDATE: Sat, 30 Apr 2022 08:14:45 GMT\r\nST: upnp:rootdevice\r\nUSN: uuid:uuid:4d696e69-444c-164e-9d42-3c37862e42ac::upnp:rootdevice\r\nEXT:\r\nSERVER: Netgear_Router UPnP/1.1 MiniUPnPd/2.2.0-RC0\r\nLOCATION: http://192.168.1.1:56688/rootDesc.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 1636149090\r\nBOOTID.UPNP.ORG: 1636149090\r\nCONFIGID.UPNP.ORG: 1337\r\n\r\n'
2022-04-30 17:44:46 DEBUG (MainThread) [async_upnp_client.traffic.ssdp] Received packet from ('192.168.1.1', 1900): b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=120\r\nDATE: Sat, 30 Apr 2022 08:14:45 GMT\r\nST: upnp:rootdevice\r\nUSN: uuid:uuid:4d696e69-444c-164e-9d42-3c37862e42ac::upnp:rootdevice\r\nEXT:\r\nSERVER: Netgear_Router UPnP/1.1 MiniUPnPd/2.2.0-RC0\r\nLOCATION: http://192.168.1.1:56688/rootDesc.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 1636149090\r\nBOOTID.UPNP.ORG: 1636149090\r\nCONFIGID.UPNP.ORG: 1337\r\n\r\n'
2022-04-30 17:44:46 DEBUG (MainThread) [async_upnp_client.traffic.ssdp] Received packet from ('192.168.1.1', 1900): b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=120\r\nDATE: Sat, 30 Apr 2022 08:14:45 GMT\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nUSN: uuid:uuid:4d696e69-444c-164e-9d42-3c37862e42ac::urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nEXT:\r\nSERVER: Netgear_Router UPnP/1.1 MiniUPnPd/2.2.0-RC0\r\nLOCATION: http://192.168.1.1:56688/rootDesc.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 1636149090\r\nBOOTID.UPNP.ORG: 1636149090\r\nCONFIGID.UPNP.ORG: 1337\r\n\r\n'
2022-04-30 17:44:46 DEBUG (MainThread) [async_upnp_client.traffic.ssdp] Received packet from ('192.168.1.1', 1900): b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=120\r\nDATE: Sat, 30 Apr 2022 08:14:45 GMT\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nUSN: uuid:uuid:4d696e69-444c-164e-9d42-3c37862e42ac::urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nEXT:\r\nSERVER: Netgear_Router UPnP/1.1 MiniUPnPd/2.2.0-RC0\r\nLOCATION: http://192.168.1.1:56688/rootDesc.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 1636149090\r\nBOOTID.UPNP.ORG: 1636149090\r\nCONFIGID.UPNP.ORG: 1337\r\n\r\n'
Server: Netgear_Router UPnP/1.1 MiniUPnPd/2.2.0-RC0
b'<?xml version="1.0"?>\r\n
@ThatJRadGuy it really seems like the password/username is just wrong.
You need the password/username of the router admin console itself, not from your netgear account.
(I think the username is always "admin" and the password you set under ADVANCED > Administration > Set Password
).
Does your password contain special characters? Maybe try chaging the password to only numbers and letters withouth special characters?
If the above still does not help, could you try the following python script (fill in PASSWORD and USERNAME and IP):
import logging
from time import sleep
logging.basicConfig(level=logging.DEBUG, format='%(message)s')
from pynetgear import Netgear
netgear = Netgear(password="PASSWORD", user="USERNAME", host="192.168.1.IP", port=80, ssl=False)
success, response = netgear._make_request(
"DeviceConfig:1",
"SOAPLogin",
{
"Username": netgear.username,
"Password": netgear.password
},
None,
False
)
print(success)
print(response.status_code)
print(response.headers)
print(response.text)
print(netgear.login_v2())
print(netgear.login_v1())
print(netgear.login())
You can run the script on a normal PC (for instance windows).
@starkillerOG I changed my password to the simplest form it would allow (numbers, letters, and a special character) and the integration has been able to connect. My previous password did have a lot more special characters as it was generated by a password manager. For reference if it is of any help to you, the characters that were in my previous password (in no particular order) were: }+*%- My new password that has worked is only using a . Thanks very much for your help!
I have the same issue trying to connect to a Netgear Nighthawk M5 router. After reading this post i have reset my password to ONLY numbers and it still doesnt connect. Not sure what else to try , any tips please ?
Logger: pynetgear.router Source: /usr/local/lib/python3.9/site-packages/pynetgear/router.py:397 First occurred: 8:49:18 AM (1 occurrences) Last logged: 8:49:18 AM
login using all known port-ssl combinations failed.
PS: if i go to the address directly i have no issues, just get this issue via trying to get the intergration working
@LazzaAU I would recommand at least to start with a Letter in the password and then only use letters and numbers. Only numbers might also be interpeted wrong.
@ThatJRadGuy thank you very much for the feedback, I will start looking if I can fix the issues with the special caracters you indicated.
@ThatJRadGuy I have tried changing my password to include }+*%-, but for me it worked just fine even with those carachters in the password. So I don't know why it was not working for you. Of course I don't know if it was some combination of characters or a particular caracter in the front or something weird, but I could not reproduce the issue with my Orbi RBK753.
@LazzaAU have you already tried rebooting the router?
@starkillerOG that's odd. Unfortunately I don't know what the exact password was now that it's been deleted from my password manager, sorry.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
I am unable to connect to my Netgear XR700 using Home Assistant. I'm a new user and have been unable to get passed the initial setup. I'm currently running firmware XR700 V1.0.1.48
What version of Home Assistant Core has the issue?
core-2022.4.5
What was the last working version of Home Assistant Core?
No response
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/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response