rroller / netgear

Netgear Home Assistant Integration
MIT License
14 stars 5 forks source link

Integration WAX214 #14

Open Elmout33 opened 2 years ago

Elmout33 commented 2 years ago

I need some help. After installation I go to "Configuration -> Integration -> Add Integration -> Netgear WAX".

I complete the forms with my informations :

But I get the error message : "Username, Password, or Address is wrong." The only info which can be wrong I think it's the port but how I can I check the port ? In the admin portal I don't find the info

Thanks a lot !

Elmout33 commented 2 years ago

@rroller ?

Jeepmb commented 1 year ago

Same issue here. WAX214 and can't get past the initial integration setup. Do we need to have any settings in the router turned on to allow this communication? Like SNMP?

Elmout33 commented 1 year ago

@Jeepmb I don't find any doc or thread which say that ... I try some changes like SNMP or CLI or API things but nothing works for now ...

VWFactor commented 1 year ago

Same issue, WAX218. Have a feeling that its something to do with the username input field. Its not required or changable on the device itself, and the integration requires the username field.

Integration logging in while attempting to pass a username to a device that will not accept it an issue?

I've tried my password in the integration setup as well, so I'm not really sure.

lusciouslukey commented 1 year ago

https://github.com/rroller/netgear/issues/12#issuecomment-1345523126

I was crestfallen already as you will see from my other post but scrolling these comments makes me realise that the only way forward is delete the download owing to the code owner not replying to anyone about not being able to get over the start line and log in!

MD1848 commented 1 year ago

Same behavior with my WAX630. Is there already a solution or workaround?

MarwanZeitoun commented 1 year ago

WAX610 same issue here!

kbrown01 commented 1 year ago

I also have the same issue with WAX218. I will bet that no matter what you do, it is expecting a secure connection. You say that https connection works, but I have never seen this work for mine or maybe I am missing a setting.

If I go to https://192.168.x.x for my AP, it shows the connection as insecure.

MD1848 commented 1 year ago

my solution is to completely delete the integration and do it again

Meatballs1 commented 1 year ago

It looks like a different authentication mechanism.

mine is a post to https://192.168.0.254/cgi-bin/luci

with the following url encoded form data:

username=admin&password=PASSWORD&agree=1&agree_info=on

/socketCommunication just 404s

martinhrpi commented 1 year ago

mine is a post to https://192.168.0.254/cgi-bin/luci

Do you connect to a WAX214? That would be interesting because luci is the name of the OpenWRT Web-Interface....

https://openwrt.org/docs/guide-user/luci/start

I will test that. As for WAX6XX - there is an issue with the newest Firmware, so let's hope the maintainer finds free time (see other issue here)

Meatballs1 commented 1 year ago

@martinhrpi yes WAX214 in use here.

I smushed together this monstrosity and ran it as a command line sensor as there's only one device I need to track when it was switching signal to the WAX rather than my main AP 😅

https://gist.github.com/Meatballs1/f0e2932cb65d1c848d65f62cd80668e8

rroller commented 1 year ago

Can you try pulling in the latest 0.1.5 release to see if it works? I just released a fix for newer device firmware versions and I'm wondering if that will help for some of these other WAX models.

rroller commented 1 year ago

Oh probably not, I see the post from @Meatballs1 and yeah that looks completely different.

robertboccia commented 1 year ago

Error on wac104 after updating to 0.1.5

Port 443 is refused even on browsing, perhaps allow default port? When I browse it's just 10.0.0.200

This error originated from a custom integration.

Logger: custom_components.netgear_wax Source: custom_components/netgear_wax/client_wax.py:200 Integration: Netgear WAX (documentation, issues) First occurred: 5:55:46 AM (1 occurrences) Last logged: 5:55:46 AM

Failed: Cannot connect to host 10.0.0.200:443 ssl:default [Connect call failed ('10.0.0.200', 443)] Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection sock = await self._connect_sock( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('10.0.0.200', 443)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/netgear_wax/config_flow.py", line 87, in _test_credentials state = await client.async_get_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/netgear_wax/client_wax.py", line 102, in async_get_state result = await self.async_post(request_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/netgear_wax/client_wax.py", line 203, in async_post response = await call() ^^^^^^^^^^^^ File "/config/custom_components/netgear_wax/client_wax.py", line 200, in call return await self._session.post(url=self._base_url + "/socketCommunication", data=data, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 10.0.0.200:443 ssl:default [Connect call failed ('10.0.0.200', 443)]

robertboccia commented 1 year ago

any update on possibly looking at opening up for other ports?

moritzifikation commented 1 year ago

same here. sad.

ml1nk commented 10 months ago

I looked it up on my WAX214v2 with V1.0.2.3.

Login:

POST https://\<ip>/sso_login.cgi?sysauth.htm timestamp=\<timestamp>

anticsrf=<csrf>&submitType=sso_login&username=admin&password=<password>
{ "status": 0, "ts": 1703698981 }

Cookie: jwt_local

Data retrieval (wifi_cannel of wifi1): POST https://\<ip>/apply.cgi?/device_status.htm timestamp=\<timestamp>

anticsrf=<csrf>&submitType=wifi_channel&wifi=1
[ { "channel": "5", "htmode": "HT40", "hwmode": "11axg" }, { "channel": "48\/80", "htmode": "HT80", "hwmode": "11axa" } ]

/socketCommunication ist 404

So it seems, at least this model needs separate post calls to handle data retrieval.

robertboccia commented 8 months ago

@rroller any update on being able to get wac104 to work, it seems the port to access that is not 443, so the integration doesn not work for wac104 on 443, but (i assume) it would work on port 80, but thats a guess based on me being able to hit the devices admin page

jorcat commented 1 week ago

Any update with Netgear AP WAX214 integration?

Attaching some evidences of the error:

HA: 2024.10.1 Netgear WAX Component: 0.1.6 NetgearAP: WAX214 (WAX214 - AX1800 WiFi 6 Dual Band PoE Wireless Access Point)

2024-10-14 13:02:17.337 ERROR (MainThread) [custom_components.netgear_wax] Failed: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/config/custom_components/netgear_wax/config_flow.py", line 87, in _test_credentials state = await client.async_get_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/netgear_wax/client_wax.py", line 102, in async_get_state result = await self.async_post(request_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/netgear_wax/client_wax.py", line 205, in async_post result = json.loads(text) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

rroller commented 1 week ago

I don't have a device to test with. It takes a lot of back and forth debugging to get things to work. Not sure how I can do it unless I buy a device to test with.