[Custom Component] TP-Link Router Integration

SUCCESS!!!
The problem was indeed because the router had been set up for “Cloud”, which only means that I can “manage” it from outside of my network. THIS, to me, is a security RISK, so I’m happy to be rid of it! (But, as it’s password only, I’ve changed the password to something much more robust)
N.B. The TP-Link App still works from “within” my network, and if I want to use it from outside of my network, I use my VPN. Much more secure.

To “resolve” the issue, all I did was to “unbind” the Cloud account, whereupon I was logged out, and had to log in again. CAUTION: this “Local Password” is different from the “Cloud” one. Make sure you have it before doing this. Make a backup of your config, first, just in case.

So, back in “password-only” mode, I followed your instructions, @AlexandrErohin, and they worked perfectly! I’m so pleased, I came back immediately to write this reply, so that no further time was wasted on it.
You can add the Archer C5400 to your “Supported” list (unless you’d rather wait until I’ve tested it further; DM me if you’d like me to test anything specific)
Thanks so much for your support!

I haven’t had a chance to play with it, but here is a screenshot of what I have so far:

Thanks, @Braakie , for your input, but it’s a bit more complicated than that. I’ve always used the tpinkwifi.net URL, for convenience, but it’s equivalent to the actual IP. This address is how it “advertises” itself to the network, and this has nothing to do with “Local” versus “Cloud”.
Please see my next reply for more details, and how I finally resolved the issue:
[Custom Component] TP-Link Router Integration - #182 by Assisted

Thank you for this integration!!
I needed to have a button for rebooting the router for in case I’m not available and the family needs to do it. One question though, Its added only the main deco I think, so when I hit reboot, it would only reboot the main deco or would it reboot all?

I guess I should try it when the family isn’t home xD

Also, is there a way to turn off the device tracking, I had to do this for each individual device added to the integration which was a long process heh

xe75 pro 2.0

Can confirm, it reboots all decos on the network

Yes - very keen to get parental controls if anyone has had any success with this!?

v1.16.0 Released

Changelog

1 Like

TP-link AX6600 Tri-Band WiFi6 Router (hardware version AX90 V1.20) Seems to work.

For logging, it works fine I guess, but I still need to regularly log into the Router to add or remove users.

This would be SO usefull IF the API would allow at least 2 concurrent logins.
The people at TP-Link say it would be dangerous if two users attempt to change settings at the same time.
Perhaps they should allow one admin user with all persmissions, and one other user for just checking status.
It would only limit the functionality of your HA integration a very little bit.

2 Likes

Tested it with Archer A9 V6 And it seems to be working correctly

1 Like

I would add a pause button - so the integration stop scan for 5 minutes

An additional feature I would like is to turn off the tracking ability so have it as a toggle option, not sure if this is able to be accomplished.

good evening, I still have a configuration error with my Deco XE75pro.
I enter the IP address and the password, the addition is done normally but at the end I get an error. Here’s what’s in the log

TplinkRouter - TPLinkDecoClient - An unknown response - Expecting value: line 1 column 1 (char 0); Request admin/client?form=client_list - Response <h1>Bad Gateway</h1>The process did not produce any response
Error setting up entry http://192.168.1.4 for tplink_router
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tplink_router/__init__.py", line 47, in async_setup_entry
    firmware, status = await hass.async_add_executor_job(TPLinkRouterCoordinator.request, client, callback)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tplink_router/coordinator.py", line 56, in request
    data = callback()
           ^^^^^^^^^^
  File "/config/custom_components/tplink_router/__init__.py", line 43, in callback
    stat = client.get_status()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/client.py", line 570, in get_status
    data = self.request('admin/client?form=client_list', dumps(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/client.py", line 111, in request
    raise ClientError(error)
tplinkrouterc6u.exception.ClientError: TplinkRouter - TPLinkDecoClient - An unknown response - Expecting value: line 1 column 1 (char 0); Request admin/client?form=client_list - Response <h1>Bad Gateway</h1>The process did not produce any response

Where does this come from?
Thanks

Fixed after update of the firmware.
Sorry

v1.18.0 Released

Changelog

1 Like

Many thanks for this amazing Project keep up a good work! :smiling_face_with_three_hearts:
I have 5x TP-Link Routers / 2x SW / 3x Powerline Adapter, 2x Repeater :nerd_face:
AX73 / C80 / C3150 / C7 / MR600
For sure i will try it out, especially on C80 looks like NOT supported, but i’m pretty sure it will work! :star_struck:

You can try just
document.getElementById(“password”).value;

its worked me on AX73

v1.19.0 Released

Changelog

1 Like

Hi, I’m new to HA and trying to use this component for presence detection to determine whether I’m home or away by whether or not my phone is connected to my router’s Wifi.

I notice that the device_tracker is constantly toggling between home and away every few minutes when I’m home. Is there a setting I can configure to give a longer grace period before setting myself to away?

Seems to be working for Archer BE3600, dual band Wifi 7 devices. I have two of them, each running in un-meshed access point mode only. Firmware 1.1.1 build 5553 on each.

Features tested:

  • Reboot
  • Toggle 2.4ghz main
  • Toggle 5ghz main

I am not using guest or IOT SSID features yet, so did not test those at all.

Your integration does not provide toggles for turning on or off the MLO networks. If you toggle off either 2.4ghz or 5ghz main network, the MLO SSID MACs stop broadcasting too. Once both are toggled back on, the MLO MACs are visible again to client devices. Seems pretty straightforward to me, but I can see someone getting confused by this in the future.

Also, this router does not have 6ghz band at all, but toggles were created for it by the assistant. The do come up in “unavailable” state as one would expect, and are easily enough disabled through the HA UI. But it might be smarter to not create those toggle entities for a router that could not use them, again for end user confusion prevention purposes.

Thanks for this integration.

@fhteagle Thanks for the info. Could you tell what is your router hardware version?

Sticker on the bottom says “Model: Archer BE3600 (USW) Ver 1.6” . That what you were looking for?

1 Like

Hello, i have a TP-Link archer C6 router, but hardware version says it’s 4.0, firmware 1.13.6 Build 240430 Rel.54880n(4555), when trying to add it to HA it says this is not supported.

Could it be added?