Home Assistant component for TP-Link and Mercusys routers administration based on the TP-Link Router API
Warning
A new router firmware update breaks the compatibility. Please try this fix
Warning
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).
- tplink_router_new_device: Fired when a new device appears in your network
- tplink_router_device_offline: Fired when a device becomes offline
- tplink_router_device_online: Fired when a device becomes online
- tplink_router_new_sms: Fired when a new sms received by LTE router
- Router Reboot
- Router data fetching - you may disable router data fetching before accessing the router, so it wont logging your out. If you forget to enable it back - it would be automatically enable after 20 minutes
- 2.4Ghz host wifi Enable/Disable
- 5Ghz host wifi Enable/Disable
- 6Ghz host wifi Enable/Disable
- 2.4Ghz guest wifi Enable/Disable
- 5Ghz guest wifi Enable/Disable
- 6Ghz guest wifi Enable/Disable
- 2.4Ghz IoT wifi network Enable/Disable
- 5Ghz IoT wifi network Enable/Disable
- 6Ghz IoT wifi network Enable/Disable
- 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
- WAN IPv4 Address
- LAN IPv4 Address
For LTE Routers
- 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
- Track connected to router devices by MAC address with connection information
To find your device - Go to Developer tools and search for your MAC address - you’ll find sensor like device_tracker.YOUR_MAC or device_tracker.YOUR_PHONE_NAME.
It will also fire Home Assistant event when a device connects to router
- Send SMS message - Available only for MR LTE routers
To receive notifications of appearing a new device in your network, or becoming device online\offline add following lines to your configuration.yaml file:
automation:
- alias: "New network device"
trigger:
platform: event
event_type: tplink_router_new_device
action:
service: notify.mobile_app_<device_name>
data:
content: >-
New device appear {{ trigger.event.data.hostname }} with IP {{ trigger.event.data.ip_address }}Available events:
- tplink_router_new_device: Fired when a new device appears in your network
- tplink_router_device_offline: Fired when a device becomes offline
- tplink_router_device_online: Fired when a device becomes online
All available fields in trigger.event.data:
- hostname
- ip_address
- mac_address
- connection
- band
- packets_sent
- packets_received
- up_speed
- down_speed
- tx_rate
- rx_rate
- online_time
- traffic_usage
- signal
To receive notifications of receiving a new sms add following lines to your configuration.yaml file:
automation:
- alias: "New sms"
trigger:
platform: event
event_type: tplink_router_new_sms
action:
service: notify.mobile_app_<device_name>
data:
content: >-
A new SMS from {{ trigger.event.data.sender }} wth text: {{ trigger.event.data.content }}Available events:
- tplink_router_new_sms: Fired when a new sms received by LTE router
All available fields in trigger.event.data:
- sender
- content
- received_at
To send SMS add following lines to your automation in yaml:
...
action:
- service: tplink_router.send_sms
data:
number: "+1234567890"
text: "Hello World"
device: pass_tplink_router_device_id_hereDevice id is required because user may have several routers that could send SMS - so you need to select the needed router. You can get the ID from the URL when you visit the tplink device page
Have HACS installed, this will allow you to update easily.
or go to Hacs and search for TP-Link Router.
- Locate the
custom_componentsdirectory in your Home Assistant configuration directory. It may need to be created. - Copy the
custom_components/tplink_routerdirectory into thecustom_componentsdirectory. - Restart Home Assistant.
TP-Link Router is configured via the GUI. See the HA docs for more details.
The default data is preset already.
- Go to the Settings->Devices & services.
- Click on
+ ADD INTEGRATION, search forTP-Link Router. - Fill Password.
- Click
SUBMIT
If you got an error please try to use HTTPS connection first
NOTE!
- If you use
httpsconnection - You need to turn on "Local Management via HTTPS" (advanced->system->administration) in the router web UI - If you use
httpsconnection to your router you may get errorcertificate verify failed: EE certificate key too weak. To fix this - unsetVerify ssl - Use Local Password which is for Log In with Local Password. Login with TP-LINK ID doesnt work
- If you got error -
check if the default router username is correctThe default username for most routers isadmin. Some routers have the default username -user. - If you got error -
use web encrypted password insteadRead web encrypted password - The TP-Link Web Interface only supports upto 1 user logged in at a time (for security reasons, apparently). So you will be logged out from router web interface when the integration updates data
If you got error - use web encrypted password instead. Check the documentation!
- Go to the login page of your router. (default: 192.168.0.1).
- Type in the password you use to login into the password field.
- Click somewhere else on the page so that the password field is not selected anymore.
- Open the JavaScript console of your browser (usually by pressing F12 and then clicking on "Console").
- Type
document.getElementById("login-password").value; - Copy the returned value as password and use it.
You may edit configuration data like:
- Router url
- Password
- Scan interval
- Verify https
To do that:
- Go to the Settings->Devices & services.
- Search for
TP-Link Router, and click on it. - Click on
CONFIGURE - Edit the options you need and click
SUBMIT
- Archer A10 v1
- Archer A20 v1.0
- Archer A6 (2.0, 4.0)
- Archer A7 V5
- Archer A8 (1.0, 2.20)
- Archer A9 V6
- Archer AX10 v1.0
- Archer AX11000 V1
- Archer AX12 v1.0
- Archer AX17 v1.0
- Archer AX1800
- Archer AX20 (v1.0, v3.0)
- Archer AX21 (v1.20, v3.0, v4.6)
- Archer AX23 (v1.0, v1.2)
- Archer AX3000 V1
- Archer AX50 v1.0
- Archer AX53 (v1.0, v2)
- Archer AX55 (v1.0, V1.60, v4.0)
- Archer AX58 v1.0
- Archer AX6000 V1
- Archer AX72 V1
- Archer AX73 (V1, V2.0)
- Archer AX75 V1
- Archer AX90 V1.20
- Archer AX95 v1.0
- Archer AXE16000
- Archer AXE5400 v1.0
- Archer AXE75 V1
- Archer BE220 v1.0
- Archer BE230 (v1.0, v2.0)
- Archer BE3600 (v1.0, v1.2, v1.6)
- Archer BE400 v1.0
- Archer BE550 v1.0
- Archer BE800 v1.0
- Archer BE805 (v1.0, v1.20)
- Archer C1200 (v1.0, v2.0)
- Archer C2300 (v1.0, v2.0)
- Archer C24 (1.0, 2.0)
- Archer C3200 v1
- Archer C5400X V1
- Archer C6 (v2.0, v3.0, v3.20, 4.0)
- Archer C60 v2.0
- Archer C64 1.0
- Archer C6U v1.0
- Archer C7 (v4.0, v5.0)
- Archer C80 (1.0, 2.20)
- Archer GX90 v1.0
- Archer MR200 (v2, v5, v5.3, v6.0)
- Archer MR550 v1
- Archer MR600 (v1, v2, v3)
- Archer NX200 (v1.0, v2.0)
- Archer VR1200v v1
- Archer VR2100v v1
- Archer VR2800 v1
- Archer VR400 (v2, v3)
- Archer VR600 v3
- Archer VR900v
- Archer VX1800v v1.0
- Archer VX231v v1.0
- BE11000 2.0
- CPE210 v2.0
- Deco BE25 1.0
- Deco M4 2.0
- Deco M4R 2.0
- Deco M5 v3
- Deco M9 Plus 1.0
- Deco M9 Pro
- Deco P7
- Deco X20
- Deco X50 v1.3
- Deco X50-5G (1.20, 2.0)
- Deco X55 1.0
- Deco X60 V3
- Deco X90
- Deco XE75 (v1.0, v2.0)
- Deco XE75PRO (v3.0)
- EAP115 v2.0
- EX511 v2.0
- HX510 v1.0
- M8550 v1
- NE200-Outdoor v1.0
- NE211-Outdoor v1.0
- NX510v v1.0
- NX600 v2.0
- RE305 4.0
- RE315 1.0
- RE330 v1
- TD-W9960 (v1, V1.20)
- TL-7DR6430 1.0
- TL-7DR7270 1.0 (firmware 1.0.18+)
- TL-MR100 v2.0
- TL-MR100-Outdoor v1.0
- TL-MR105
- TL-MR110-Outdoor v1.0
- TL-MR150 v2
- TL-MR6400 (v5, v5.3, v7)
- TL-MR6500v
- TL-R470GP-AC 4.0
- TL-R488GPM-AC 2.0
- TL-SG108E v6.0
- TL-WA1201 3.0
- TL-WA3001 v1.0
- TL-WDR3600 V1
- TL-XDR3010 V2
- TL-XDR5410 1.0
- TL-XDR6088 v1.0.30
- VX420-G2h v1.1
- VX800v v1
- XC220-G3v v2.30
- AC10 1.20
- Halo H25BE 1.0
- Halo H3000x 1.0
- Halo H47BE 2.0
- Halo H60XR 1.0
- Halo H80X 1.0
- ME30 1.0
- MR47BE v1.0
- MR50G 1.0
Please let me know if you have tested integration with any other model. Open an issue with info about router's model, hardware and firmware versions.
Guidelines CONTRIBUTING.md



