[Custom Component] TP-Link Router Integration

v1.3.0 Released

Changelog

1 Like

Thanks for this custom component @AlexandrErohin !!

I am very interested in this feature:

Device Tracker

  • Track clients by MAC address across 2.4Ghz, 5Ghz guest and main wifi with connection information

Is it possible to use above for presence detection (home/away) in HA automations, by checking if specific phone’s MAC address is connected to wifi router? Thanks.

Go to Developer tools and search for your MAC address - you’ll find sensor device_tracker.YOUR_MAC or device_tracker.YOUR_PHONE_NAME.

It seems like if you have TP Link Cloud enabled then even if you are hitting the router’s admin page locally it requires you to login with the TP link ID rather than the admin user and local password.

Hitting the local-ip and logging in with the TP link ID details works from the browser, but for the integration neither these details, nor the old admin/password seem to work.

I’d love to use this, but right now there seems to be no way for me to have the integration log in to the router.

Is there any errors in Settings → System → Logs?

2024-01-15 16:33:39.547 ERROR (MainThread) [custom_components.tplink_router.config_flow] TplinkRouter Integration Exception - Unknown error for pwd - 'data'; Response - {"errorcode":"no such callback","success":false}

The integration supports only local connection to router

Any chance this can be extended to the mesh-type systems, genre Deco XE75 ?
Because right now nothing seems to be available in terms of control for these devices …

As I dont have any of Deco routers - I could not add support for this. It has completely different api

v1.3.2 Released

Changelog

  • Removed username field as it was confused with TP-Link ID

TP-Link Archer AX6000 V1 and Archer AX50 v1.0 supports are confirmed

Archer AX20 v1.0 confirmed thank you

1 Like

C2300 (V1, firmware 2.0.7) doesn’t work, unfortunately, seems like the problem is in a different login process (obtaining a seq failing)

v1.4.0 Released

Changelog

  • Added multiple simultaneous integration support IMPORTANT! After update to this version device_trackers from this integration will be duplicated as unique id will be changed! You may delete old unused device_trackers or just remove and re-add your router to avoid this

As I don’t have an opportunity to test your router, it would be great if you could add support for your router to this client GitHub - AlexandrErohin/TP-Link-Archer-C6U: Python package for API access and management for TP-Link Router

v1.5.0 Released

Changelog

  • Added Archer AX21 v1.20 to list of supported Hardware
  • Increased client timeout for Archer A7 v5.0

I’m getting ;Failed to set up’ error using this with my AX10 v1, Firmware Version:

1.3.9 Build 20230728 Rel. 45716(4555)

The log shows the following.

BlockquoteLogger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 20:40:51 (4 occurrences)
Last logged: 20:53:20

Error setting up entry http://192.168.1.77 for tplink_router
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 406, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/tplink_router/init.py”, line 56, in async_setup_entry
coordinator = TPLinkRouterCoordinator(hass, device, entry.data[CONF_SCAN_INTERVAL], info, _LOGGER, entry.entry_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/tplink_router/coordinator.py”, line 25, in init
self.firmware = info[0]
~~~~^^^
TypeError: ‘NoneType’ object is not subscriptable

Any ideas what the problem could be?
Many thanks.

Could you give also logs like [custom_components.tplink_router] TplinkRouter Integration Exception - … from Logs?
And there was a bug with wan_macaddr - I have fixed it. Please reinstall version v1.5.1 and try again.

v1.5.1 Released

Changelog

Thanks so much, integration works perfectly now after the update.