[Custom Component] TP-Link Router Integration (supports also Mercusys router)

@AlexSandra

Please temporarily disable the integration before accessing the router admin page. TP-Link admin page only allows one user at a time. This integration will log you out of the admin page every time it scans for updates (every 30s by default).

1 Like

Hello, I’m having trouble enabling and disabling the guest network with my router. I’m using the Deco BE11000/BE65 v2.0 Firmware 1.1.7 Build 20250324 Rel. 32980.
The error displayed in the browser is:

“Failed to perform the action switch/turn_on. TplinkRouter - TPLinkDecoClient - An unknown response - Extra data: line 1 column 2 (char 1); Request admin/wireless?form=wlan - Response 1NvJjj8gn2cjK8MT2mpsiHZsAhzo8kOndgSXS2h7FF/BT2A2I/XSV7/pPuQGkuzs+NOjbrrtA6oQ3nKz0vibEhyY/KXIH0AHI66taWRV4RclzPudgJw/Gk4MMlRmqm0Dk+1nHbTiUPdNDJXYgwSIysSPKXw70gBmYMXcIrvriJdlQfuq8apngx98Z/p5/myKvN0RGzjj2wGgkmNoE2h7YoJd+rPC9Ubo/i7QgzW4Ch1ng4cbtrkegmsGTnYQ8ah2jYkmmkbK00TA1nS4/XkYHDtVk/U1x2IcL4cbQmMKCjDVq2Makv8nIJCkPCX15GPZE3+tTqaDaqYjvoDBzf4kIs9QJXweAJjKSpTRsGhBy9tbFS+m/HHvbVKW6fd9y6CDqfD12UKjo1iTYQKjjpts9c5MaoNyaqvS8q7Is4xwKtuPJAORSTuAMHdq3xkzX4ghzSF2385hE2T/+ekZ9wtcIc2v0jFksnJcC9yU5j5Fmb0KjPhoi2ieMJ4VINF8F8QhOmQ/pukn7cxIboYg9xKY3xkfKuMwoxMxH+jOTE8aZ9M=”

Logs:

2025-08-20 10:41:37.111 ERROR (MainThread) [custom_components.tplink_router] Unexpected error fetching tplink_router data
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 392, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/tplink_router/coordinator.py”, line 77, in _async_update_data
self.status = await self.hass.async_add_executor_job(TPLinkRouterCoordinator.request, self.router,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self.router.get_status)
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/concurrent/futures/thread.py”, line 59, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/tplink_router/coordinator.py”, line 58, in request
data = callback()
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/deco.py”, line 86, in get_status
data = self.request(‘admin/wireless?form=wlan’, dumps({‘operation’: ‘read’}))
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/deco.py”, line 158, in request
return self._retry_request(super().request, path, data, ignore_response, ignore_errors)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/deco.py”, line 164, in _retry_request
return callback(*args)
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/c6u.py”, line 74, in request
raise ClientError(error)
tplinkrouterc6u.common.exception.ClientError: TplinkRouter - TPLinkDecoClient - An unknown response - ord() expected a character, but string of length 0 found; Request admin/wireless?form=wlan - Response {‘data’: ‘’}

2025-08-20 10:44:12.320 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547029850432] Unexpected exception
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 264, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…<7 lines>…
)
^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2835, in async_call
response_data = await coro
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2878, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 850, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 922, in _handle_entity_call
result = await task
^^^^^^^^^^
File “/config/custom_components/tplink_router/switch.py”, line 149, in async_turn_on
await self.entity_description.method(self.coordinator, True)
File “/config/custom_components/tplink_router/coordinator.py”, line 70, in set_wifi
await self.hass.async_add_executor_job(TPLinkRouterCoordinator.request, self.router, callback)
File “/usr/local/lib/python3.13/concurrent/futures/thread.py”, line 59, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/tplink_router/coordinator.py”, line 58, in request
data = callback()
File “/config/custom_components/tplink_router/coordinator.py”, line 68, in callback
self.router.set_wifi(wifi, enable)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/deco.py”, line 46, in set_wifi
self.request(‘admin/wireless?form=wlan’, dumps({‘operation’: ‘write’, ‘params’: params}))
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/deco.py”, line 158, in request
return self._retry_request(super().request, path, data, ignore_response, ignore_errors)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/deco.py”, line 164, in _retry_request
return callback(*args)
File “/usr/local/lib/python3.13/site-packages/tplinkrouterc6u/client/c6u.py”, line 74, in request
raise ClientError(error)
tplinkrouterc6u.common.exception.ClientError: TplinkRouter - TPLinkDecoClient - An unknown response - Extra data: line 1 column 2 (char 1); Request admin/wireless?form=wlan - Response 1NvJjj8gn2cjK8MT2mpsiHZsAhzo8kOndgSXS2h7FF/BT2A2I/XSV7/pPuQGkuzs+NOjbrrtA6oQ3nKz0vibEhyY/KXIH0AHI66taWRV4RclzPudgJw/Gk4MMlRmqm0Dk+1nHbTiUPdNDJXYgwSIysSPKXw70gBmYMXcIrvriJdlQfuq8apngx98Z/p5/myKvN0RGzjj2wGgkmNoE2h7YoJd+rPC9Ubo/i7QgzW4Ch1ng4cbtrkegmsGTnYQ8ah2jYkmmkbK00TA1nS4/XkYHDtVk/U1x2IcL4cbQmMKCjDVq2Makv8nIJCkPCX15GPZE3+tTqaDaqYjvoDBzf4kIs9QJXweAJjKSpTRsGhBy9tbFS+m/HHvbVKW6fd9y6CDqfD12UKjo1iTYQKjjpts9c5MaoNyaqvS8q7Is4xwKtuPJAORSTuAMHdq3xkzX4ghzSF2385hE2T/+ekZ9wtcIc2v0jFksnJcC9yU5j5Fmb0KjPhoi2ieMJ4VINF8F8QhOmQ/pukn7cxIboYg9xKY3xkfKuMwoxMxH+jOTE8aZ9M=

1 Like

Is it possible in the integration to provide for the display of clients connected to the router and their IP addresses? Or is it already there and I haven’t looked carefully?

Yes, the integration displays the clients and the data queried on the router. From what I’ve seen so far, only the button to enable the guest network is faulty.

1 Like

The number of clients is shown in the integration, but I’m talking about more detailed information. For example, the dashboard shows that 7 clients are connected, but there is no information about who these clients are and what IP addresses they have.

Sorry for the confusion, I thought you were talking about the issue I’m having. I believe it doesn’t show the list of connected IPs, only the outputs presented in the integration documentation (GitHub - AlexandrErohin/TP-Link-Archer-C6U: Python package for API access and management for TP-Link and Mercusys Routers. See supported routers list) :

Sensors

  • Total amount of wired clients
  • Total amount of IoT clients
  • Total amount of host wifi clients
  • Total amount of guest wifi clients
  • Total amount of all connected clients
  • CPU used
  • Memory used
  • Connection Type

Hi @AlexandrErohin I’m still having this issue. awaiting for your suggestion to fix this issue. thanks

1 Like

Hi I have been using this integration for months now without fault until I updated the firmware on my Archer AXE75 v1 router to ver 1.4.1 Build 20250717 rel.40472(4555). Now the integration won’t login anymore I get this error message “TplinkRouter - TplinkRouter - Cannot authorize! Error - Expecting value: line 1 column 1 (char 0); Response -”. Any help much appreciated thanks.

@TheDarrenn This error means that your router API is not supported Would be great if you could add support for your router. Here are the examples how to do it TP-Link-Archer-C6U/CONTRIBUTING.md at 107a856efdd73d8d2a9879300c0b14dcb9aeaf79 · AlexandrErohin/TP-Link-Archer-C6U · GitHub

@bobsylas It looks like the update changed router API. As I cannot install this update - it would be great if you could add support for it.

@AlexandrErohin I have no idea how to add support for my router? I have clicked on the link above but have no experience using github apart from downloading files.

Is there any instructions on how to do it?

I have the same problem with the update of my “Archer AXE75 v1.0” to “1.4.1 Build 20250717 rel.40472(4555)”.
Unfortunately I also have no clue how to add support for it to:

It fails on line 130, in authorize(): data = response.json() with “simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)”
Using the error I can only decipher that there is simply no response body.
I do not really know how to add support from here.

@AlexandrErohin can you help me with this point?

1 Like

Has anyone figured out a way to see if the router has an Internet connection or not? I’m on an MR200 and it switches “Connection Type” to LTE immediately after a reboot, whether I even have a SIM card in there or not…

New user, just adding all my devices. Getting the same problem with being unable to log in with my BE550. Just adding to the database of routers it no longer supports with newer firmwares.

Same problem here.
I lost the HA integration with my Archer AX55 after updating to 1.4.1 last night

Please check this Cannot authorize! Error after Firmware update · Issue #220 · AlexandrErohin/home-assistant-tplink-router · GitHub

v2.10.0 Released

Changelog

  • For LTE Routers added sensors - LTE Enabled, LTE Connection Status, LTE Network Type, LTE SIM Status, LTE Total Statistics, LTE Current RX Speed, LTE Current TX Speed, Unread SMS, LTE Signal Level, LTE RSRP, LTE RSRQ, LTE SNR, LTE ISP Name
  • Added TL-MR100-Outdoor v1.0 to the supported list
  • Added TL-MR150 v2 to the supported list
  • Added Archer C64 1.0 to the supported list
  • Added MERCUSYS H47BE 2.0 to the supported list
  • Added MERCUSYS Halo H3000x 1.0 to the supported list

This weird workaround works on my BE550, but surely this can be automated in code? Every time my router reboots this needs to be done again?