TP-Link Router API (supports also Mercusys Router)
Python package for API access and management for TP-Link and Mercusys Routers. See Supported routersInstallation
pip install tplinkrouterc6u
Dependencies
- requests - pycryptodome - macaddressUsage
- Enter the host & credentials used to log in to your router management page. Username is
adminby default. But you may pass username as third parameter. Some routers have default username -user - EX series (and some password-only UIs such as EX920): use username
user—adminis rejected even when the web UI does not ask for a username - Use Local Password which is for Log In with Local Password. Login with TP-LINK ID doesnt work
- If you use
httpsconnection - You need to turn on "Local Management via HTTPS" (advanced->system->administration) in the router web UI
from tplinkrouterc6u import (
TplinkRouterProvider,
TplinkRouterV1_11,
TplinkRouterSG, # For routers like Archer BE3600, BE230, BE600 (SG crypto)
TplinkRouterAX72,
TplinkRouter,
TplinkC1200Router,
TplinkC5400XRouter,
TPLinkMRClient, # Class for MR series routers which supports old firmwares with AES cipher CBC mode
TPLinkMRClientGCM, # Class for MR series routers which supports AES cipher GCM mode
TPLinkMR200Client,
TPLinkMR6400v7Client,
TPLinkMR600Client, # Class for MR series that replaced the RSA key exchange with ECIES over NIST P-224
TPLinkVRClient,
TPLinkVR400v2Client,
TplinkVR1200vRouter,
TPLinkEXClient, # Class for EX series routers which supports old firmwares with AES cipher CBC mode
TPLinkEXClientGCM, # Class for EX series routers which supports AES cipher GCM mode
TPLinkEXClientGCMOAEP, # EX GCM + RSA-OAEP signatures (e.g. EX920)
TPLinkRClient, # For routers like TL-R470GP-AC
TPLinkXDRClient,
TPLinkDecoClient,
TplinkDecoE4RRouter,
TPLinkEAP115Client,
TPLinkCPE210Client,
TPLinkSG108EClient,
TplinkC80Router,
TplinkWDRRouter,
TPLinkC50Client,
TPLinkWR841NClient,
TplinkRE330Router,
TplinkRE365Router,
TplinkRE813XERouter,
TplinkRE235BERouter,
TplinkPGW2440Router,
TplinkC3200Router,
Connection
)
from logging import Logger
import traceback
Prefer the provider: it picks a matching client for your router
router = TplinkRouterProvider.get_client('http://192.168.0.1', 'password')
logger = Logger('test')
You may use a client class directly, e.g.:
router = TplinkRouter('http://192.168.0.1', 'password')
You may also pass username if it is different and a logger to log errors as
router = TplinkRouter('http://192.168.0.1', 'password', 'admin2', logger=logger)
C5400X: plain local password works with get_client() / TplinkC1200Router (PKCS#1 fallback).
TplinkC5400XRouter still needs the web-encrypted value (see Web Encrypted Password below).
router = TplinkC5400XRouter('http://192.168.0.1', 'WebEncryptedPassword', logger=logger)
RE813XE / RE700X / similar: use web encrypted password
router = TplinkRE813XERouter('http://192.168.0.1', 'WebEncryptedPassword', logger=logger)
RE365: local web password (plaintext); reboot / set_wifi / get_ipv4_status are NotImplementedError
router = TplinkRE365Router('http://192.168.0.1', 'password', logger=logger)
RE235BE: local web password (plaintext); same API as RE813XE over the classic LuCI encryption
router = TplinkRE235BERouter('http://192.168.0.1', 'password', logger=logger)
PGW2440 (powerline Wi-Fi extender): local web password (plaintext); set_wifi is NotImplementedError.
router = TplinkPGW2440Router('http://192.168.0.1', 'password', logger=logger)
try:
# Or: with router: # authorize on enter, logout on exit
router.authorize()
# Get firmware info - returns Firmware
firmware = router.get_firmware()
# Get status info - returns Status
status = router.get_status()
if not status.guest_2g_enable: # check if guest 2.4G wifi is disable
router.set_wifi(Connection.GUEST_2G, True) # turn on guest 2.4G wifi
# Get IPv6 status (not implemented on every client → NotImplementedError)
try:
ipv6_status = router.get_ipv6_status()
print(ipv6_status.wan_ipv6_addr, ipv6_status.wan_ipv6_gateway)
except NotImplementedError:
pass
# Get EasyMesh nodes (empty list when the router runs no mesh)
try:
for node in router.get_mesh_nodes():
print(f"{node.name:24} {node.model:16} {node.macaddr} {node.ipaddr:16s} "
f"{node.role:16} clients={node.client_num}")
except NotImplementedError:
pass
# Optional methods (not on every client)
try:
reservations = router.get_ipv4_reservations()
reservations.sort(key=lambda a: a.ipaddr)
for res in reservations:
print(f"{res.macaddr} {res.ipaddr:16s} {res.hostname:36} {'Permanent':12}")
except (AttributeError, NotImplementedError):
pass
try:
leases = router.get_ipv4_dhcp_leases()
leases.sort(key=lambda a: a.ipaddr)
for lease in leases:
print(f"{lease.macaddr} {lease.ipaddr:16s} {lease.hostname:36} {lease.lease_time:12}")
except (AttributeError, NotImplementedError):
pass
router.logout() # always logout; TP-Link Web Interface only supports up to 1 user logged in
except Exception as e:
logger.error(traceback.format_exc())
The TP-Link Web Interface only supports up to 1 user logged in at a time (for security reasons, apparently).
So before action you need to authorize and after logout. You can also use with router: (calls authorize() / logout() automatically).
Web Encrypted Password
For Archer C5400X (and firmwares that reject zero-padded RSA login), the plain local password works withTplinkRouterProvider.get_client() or TplinkC1200Router — the client retries with PKCS#1 v1.5 padding like the web UI. You do not need the browser-copied value for that path.
If you got exception - use web encrypted password instead. Check the documentation!
or you use TplinkC5400XRouter / TplinkRE813XERouter (RE813XE, RE700X, …) directly, get the web encrypted password by these actions:
- 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.
Safe, passive-first router discovery (opt-in)
The legacy TplinkRouterProvider.get_client(...) auto-selection is retained
for backward compatibility. It can try several authentication mechanisms and
is not appropriate for routers with strict login-lockout behavior, and the
client it returns is not authorized yet — call authorize() before use.
For a cautious first attempt, use TplinkRouterProvider.discover(host) to
fingerprint known LuCI variants without credentials or login attempts:
from tplinkrouterc6u import TplinkRouterProvider
result = TplinkRouterProvider.discover('http://192.168.0.1')
print(result.client_name, result.confidence, result.evidence)
Optionally authenticate just the one detected backend:
router = TplinkRouterProvider.get_client_safe(
'http://192.168.0.1', 'local-password')
The opt-in get_client_safe method selects a single SG, V1_11 or classic LuCI
backend (when fingerprinting is unambiguous) and attempts authentication at
most once, returning an already-logged-in session. It does not call
supports() or fall back to other logins if authentication fails. Unknown or
ambiguous firmware raises DetectionError; select a known client explicitly
rather than guessing. Key sizes are only a medium-confidence fingerprint, not
proof of a signing scheme, and supported model coverage remains limited
(families such as PGW2440 / RE235BE / RE813XE / MR / EX are not selected by
get_client_safe — use get_client() or construct the client class directly).
SG and AX72 both expose a 512-bit auth key, and some SG firmwares omit
SG/CE_RED certification (e.g. Archer BE600 US). Discovery therefore leaves a
512-bit auth key unresolved; use get_client(), or construct
TplinkRouterSG / TplinkRouterAX72 directly. Classic LuCI historically
retries login once after a malformed or 403 response; get_client_safe
disables that second try so a wrong password never burns two attempts — on a
few firmwares a correct password that gets a transient first 403 may therefore
need a manual retry.
Functions
Not every method is available on every client. Methods belowget_ipv6_status that are model-specific (reservations, VPN client, SMS/LTE, …) raise AttributeError / NotImplementedError or are simply missing on unsupported routers.
| Function | Args | Description | Return |
|---|---|---|---|
| get_firmware | | Gets firmware info about the router | Firmware |
| get_status | | Gets status about the router info including wifi statuses and connected devices info | Status |
| get_ipv4_status | | Gets WAN and LAN IPv4 status info, gateway, DNS, netmask | IPv4Status |
| get_ipv6_status | | Gets WAN IPv6 status info, gateway, DNS, site prefix (c6u/SG, MR/EX/VR, C80-style; others raise NotImplementedError) | IPv6Status |
| get_mesh_nodes | | Gets mesh nodes reported by the main router (EasyMesh on C6U/SG; Deco mesh units including the master). Returns an empty list on routers without mesh; clients that do not implement it raise NotImplementedError | [[MeshNode]](#MeshNode) |
| get_mesh_clients | | Gets EasyMesh clients grouped by access point (C6U/SG). Returns an empty list without EasyMesh; clients that do not implement it raise NotImplementedError | [[MeshApClients]](#MeshApClients) |
| get_ipv4_reservations | | Gets IPv4 reserved addresses (static) | [[IPv4Reservation]](#IPv4Reservation) |
| get_ipv4_reservations_info | | Gets IPv4 reserved addresses plus the table capacity (max_rules) reported by the router (Archer / LuCI clients) | IPv4ReservationsInfo |
| add_ipv4_reservation | macaddr: str, ipaddr: str, comment: str = '', enable: bool = True, verify: bool = True | Adds an IPv4 DHCP address reservation (Archer / LuCI clients). With verify it refuses a duplicate MAC/IP or a full table and checks the row was stored, raising ClientException otherwise (some firmware answers success without saving) | |
| update_ipv4_reservation | old_macaddr: str, macaddr: str = None, ipaddr: str = None, comment: str = None, enable: bool = None, verify: bool = True | Edits a reservation in place with the router's own update operation (Archer / LuCI clients); unset fields keep their value. With verify it checks the change was stored | IPv4Reservation |
| delete_ipv4_reservation | macaddr: str, verify: bool = True | Deletes an IPv4 DHCP address reservation (Archer / LuCI clients). With verify it checks the row is gone | |
| get_ipv4_port_forwards | | Gets IPv4 port forwarding (virtual server) rules (Archer / LuCI clients) | [[IPv4PortForward]](#IPv4PortForward) |
| add_ipv4_port_forward | name: str, external_port: str \| int, internal_port: str \| int, ipaddr: str, protocol: str = 'TCP', enable: bool = True | Adds an IPv4 port forwarding rule; external_port accepts a single port or a start-end range, protocol is TCP/UDP/ALL (Archer / LuCI clients) | |
| update_ipv4_port_forward | name: str, new_name: str = None, external_port: str \| int = None, internal_port: str \| int = None, ipaddr: str = None, protocol: str = None, enable: bool = None | Updates an IPv4 port forwarding rule identified by its name (Archer / LuCI clients) | |
| delete_ipv4_port_forward | name: str | Deletes an IPv4 port forwarding rule by name (Archer / LuCI clients) | |
| get_access_control | | Access Control enable flag and mode (blacklist / whitelist) (Archer C80 / C24, C6U / SG family) | [[AccessControlStatus]](#access_control_status) |
| set_access_control | enable: bool = None, mode: str = None | Turn Access Control on/off and/or set blacklist / whitelist mode; omit a field to leave it unchanged (Archer C80 / C24, C6U / SG family) | |
| get_blocked_devices | | Devices on the Access Control blacklist (Archer C80 / C24, C6U / SG family); the list is kept even while Access Control is off or in whitelist mode | [[BlockedDevice]](#blocked_device) |
| block_device | mac: str, name: str = '' | Add a device to the Access Control blacklist only; does not enable Access Control or change mode — use set_access_control for that (Archer C80 / C24, C6U / SG family). Already listed MACs are left as they are. On C6U / SG the list is reloaded afterwards and ClientException is raised if the router did not store the entry or the list is full | |
| unblock_device | mac: str | Remove a device from the Access Control blacklist; enable/mode stay as they are (Archer C80 / C24, C6U / SG family). On C6U / SG a MAC that is not listed is left alone, and ClientException is raised if the router kept the entry | |
| get_ipv4_dhcp_leases | | Gets IPv4 addresses assigned via DHCP | [[IPv4DHCPLease]](#IPv4DHCPLease) |
| set_ipv4_dhcps | enable: bool | Turn the LAN IPv4 DHCP server on or off | |
| set_wifi | wifi: Connection, enable: bool | Turn on/off host, guest, or IoT wifi bands | |
| get_port_modes | | Whether WAN aggregation, link aggregation and IPTV are on (Archer C5400X) | PortModes |
| nat_boost_status | | Is NAT Boost (hardware NAT acceleration) on (Archer C5400X); None if the firmware has none. While it is off the Traffic Monitor counts every client's traffic | bool, None |
| get_clients_per_band | status: Status = None | Clients per band, main and guest networks together (Archer C5400X). Pass a Status from a recent get_status() to avoid an extra poll; otherwise fetches one | ClientsPerBand |
| get_daily_traffic | | Bytes downloaded and uploaded per day by every client together, as the Traffic Monitor chart shows them (Archer C5400X; answers also while the monitor is off). Includes traffic between local clients | DailyTraffic |
| get_wan_speed | | Live internet rate from the Network Map, bytes/s (Archer C5400X) | WanSpeed |
| get_speed_test | | Result of the router's own speed test, Mbit/s (Archer C5400X) | SpeedTest |
| start_speed_test | | Starts the router's own speed test (Archer C5400X). Loads the WAN for a while — avoid binding to a casual HA button. Call get_speed_test until its status is idle or fail, without logging out in between (like the web page) | |
| get_wan_port_speed | | Internet port Speed & Duplex value (auto, 1000F, …) and the choices the router offers (Archer C5400X) | WanPortSpeed |
| get_qos | | Whether QoS is on and the total bandwidth it shares out, Mbit/s (Archer C5400X) | QoSSettings |
| get_firmware_update | | Installed firmware and, from TP-Link's cloud as the web UI shows it, the newest version and whether it is newer (Archer C5400X). Read only: it never starts the upgrade. Cloud fields stay empty/None without WAN or a TP-Link ID (local-only integrations should treat that as expected) | FirmwareUpdate |
| get_reboot_schedule | | The scheduled reboot: on/off, time, every day / week / month and which day (Archer C5400X) | RebootSchedule |
| set_reboot_schedule | enable: bool, time: str = None, cycle: str = None, day: str = None | Turn the scheduled reboot on or off (Archer C5400X); what is not given keeps its current value. The router applies it only when its time comes from the internet | |
| get_router_time | | The router clock, its time zone, NTP servers and daylight saving time (Archer C5400X) | RouterTime |
| get_system_log | | How many entries the system log has, per level; never their content, which names clients (Archer C5400X). The list follows the filter chosen on the System Log page | SystemLog |
| traffic_monitor_status | | Is the Traffic Monitor on (Archer C5400X) | bool, None |
| set_traffic_monitor | enable: bool | Turn the Traffic Monitor on or off (Archer C5400X) | |
| smart_connect_status | | Is Smart Connect (one network on every band) on (Archer C5400X) | bool, None |
| set_smart_connect | enable: bool | Turn Smart Connect on or off (Archer C5400X). Like the router web page, turning it on also gives the 5 GHz bands the 2.4 GHz name, security and password (URL intentionally has two form= params, as the web UI does); turning it off does not bring the old ones back | |
| get_usb_storage | | USB disks connected and, with a disk, its total, used and free space (Archer C5400X; sizes not yet checked with a disk) | UsbStorage |
| get_usb_sharing | | Whether Samba, FTP, FTP via internet, Media Sharing and Time Machine are on (Archer C5400X) | UsbSharing |
| print_server_status | | Is the USB print server on (Archer C5400X; read format taken from the web page, not yet checked) | bool, None |
| get_vpn_server_settings | | OpenVPN and PPTP server settings without certificates or accounts (Archer C5400X) | VpnServerSettings |
| get_wifi_networks | | Every WiFi network by form name (wireless_2g, wireless_5g, wireless_5g_2, guest_2g, guest_5g, guest_5g_2), without passwords; networks the router does not have are left out (Archer C5400X) | dictstr, [WifiNetwork] |
| wifi_schedule_status | | Wireless Off Time Schedule: on or off, number of off periods and which bands it has off right now (Archer C5400X) | WifiSchedule |
| set_wifi_schedule | enable: bool | Turn the Wireless Off Time Schedule on or off, keeping its off periods (Archer C5400X) | |
| set_wifi_off_periods | periods: list[WifiOffPeriod] | Replace the Wireless Off Time Schedule's off periods (whole hours; does not turn the schedule on or off) (Archer C5400X) | |
| set_wifi_off_period | start: int, end: int, days: list[str] | Change the first off period, keeping the others; arguments left out keep their value; with no period yet, one starts at 23 -> 7 every day (Archer C5400X) | |
| remove_wifi_off_period | | Remove the first off period, keeping the others (Archer C5400X) | |
| wps_status | | Is WPS on (Archer C5400X) | bool, None |
| guest_network_access | | Whether guests may access each other and the local network (Archer C5400X) | GuestNetworkAccess |
| get_security_settings | | Remote management, local HTTPS, DMZ, UPnP and its port mappings, port forwards, SPI firewall, ping from WAN/LAN and access control (Archer C5400X). Read only; counts, no client names or MACs. Fields of a page the firmware lacks are None | SecuritySettings |
| get_homecare_status | | HomeCare antivirus: its three protections, days protected and its database (Archer C5400X) | HomeCareStatus |
| get_blocked_threats | | How many threats HomeCare blocked, by kind, and the newest one's time, kind and category; never the client, owner, site or attacker (Archer C5400X) | BlockedThreats |
| get_ip_mac_binding | | Whether IP & MAC Binding is on and how many ARP entries and bindings there are (Archer C5400X) | IpMacBinding |
| reboot | | reboot router |
| pppoe_connect | | Connect PPPoE WAN (XDR/R series only; WAN must be configured for PPPoE) | |
| pppoe_disconnect | | Disconnect PPPoE WAN (XDR/R series only; WAN must be configured for PPPoE) | |
| set_ewan_connect | enable: bool | Ethernet WAN up/renew (True) or down/release (False): MR/VR and C6U/LuCI (DHCP WAN only) use DHCP RENEW/RELEASE; C80 uses wan -linkUp / wan -linkDown | |
| authorize | | authorize for actions |
| logout | | logout after all is done |
| get_vpn_status | | Gets VPN info for OpenVPN and PPTPVPN and connected clients amount | VPNStatus |
| set_vpn | vpn: VPN, enable: bool | Turn on/off VPN | |
| get_vpn_client_status | | Gets VPN client status including enabled state, configured servers, and whitelisted devices | VpnClientStatus |
| set_vpn_client | enable: bool | Turn VPN client on or off | |
| set_vpn_client_server | server_id: str, enable: bool | Toggle a VPN server on or off; the router handles deactivating all others when one is enabled | |
| set_vpn_client_device | mac: str, enable: bool | Enable or disable VPN client access for a device by MAC address | |
| send_sms | phone_number: str, message: str | Send sms for LTE routers | |
| send_ussd | command: str | Send USSD command for LTE routers | str |
| get_sms | | Get sms messages from the first page for LTE routers | [[SMS]](#sms) |
| set_sms_read | sms: SMS | Set sms message read from the first page for LTE routers | |
| delete_sms | sms: SMS | Delete sms message from the first page for LTE routers | |
| get_lte_status | | Get lte info for LTE routers | LTEStatus |
| get_lte_serving_cells | | Get serving cells info for EX series routers | [[ServingCell]](#serving_cell) |
| get_dsl_status | | Get DSL line status: sync rates, SNR margin, attenuation (MR/VR; also inherited by EX/VR1200v, EX DSL path untested on hardware; empty DSLStatus when there is no active DSL line) | DSLStatus |
| get_repeater_status | | Get the wireless backhaul of a range extender in repeater mode: upstream RSSI, PHY rates, BSSID/SSID, internet and mesh state (RE813XE family; forms the firmware does not have are skipped) | RepeaterStatus |
| get_wifi | wifi: Connection | Get wifi info | WifiStatus |
| backup_config | | Download router settings backup as bytes (VR1200v only; call authorize() first) | bytes |
| get_port_status | | Per-port link, speed, flow control, LAG and packet counters (TL-SG108E; call authorize() first) → PortStatus. Archer C5400X / C1200 and C6U / SG / V1_11 family (e.g. Archer BE230): link, speed and duplex of the Internet port (port 0) and LAN ports → RouterPortStatus | PortStatus / RouterPortStatus |
Dataclass
Firmware
| Field | Description | Type | | --- |----|----| | hardware_version | Returns like - Archer C6U | str | | model | Returns like - Archer C6U v1.0 | str | | firmware_version | Returns like - 1.1.3 Build 3425243 | str |Status
| Field | Description | Type | |---|---|---| | wan_macaddr | router wan mac address | str, None | | wan_macaddress | router wan mac address | macaddress.EUI48, None | | lan_macaddr | router lan mac address | str, None | | lan_macaddress | router lan mac address | macaddress.EUI48, None | | wan_ipv4_addr | router wan ipv4 address | str, None | | wan_ipv4_address | router wan ipv4 address | ipaddress.IPv4Address, None | | lan_ipv4_addr | router lan ipv4 address | str, None | | lan_ipv4_address | router lan ipv4 address | ipaddress.IPv4Address, None | | wan_ipv4_gateway | router wan ipv4 gateway | str, None | | wan_ipv4_gateway_address | router wan ipv4 gateway address | ipaddress.IPv4Address, None | | wan_ipv6_enabled | Is WAN IPv6 enabled | bool, None | | wan_ipv6_addr | router wan ipv6 address | str, None | | ewan_connected | Is Ethernet WAN connected (None if no eth WAN / not reported; MR/VR/C80; C6U/LuCI when WAN is DHCP) | bool, None |
| lan_ipv4_dhcp_enable | Is LAN IPv4 DHCP server enabled | bool, None |
| wired_total | Total amount of wired clients | int |
| wifi_clients_total | Total amount of host wifi clients | int |
| guest_clients_total | Total amount of guest wifi clients | int |
| clients_total | Total amount of all connected clients | int |
| iot_clients_total | Total amount of all iot connected clients | int, None |
| guest_2g_enable | Is guest wifi 2.4G enabled | bool, None |
| guest_5g_enable | Is guest wifi 5G enabled | bool, None |
| guest_5g_2_enable | Is guest wifi on the second 5G band enabled (tri-band) | bool, None |
| guest_6g_enable | Is guest wifi 6G enabled | bool, None |
| iot_2g_enable | Is IoT wifi 2.4G enabled | bool, None |
| iot_5g_enable | Is IoT wifi 5G enabled | bool, None |
| iot_6g_enable | Is IoT wifi 6G enabled | bool, None |
| wifi_2g_enable | Is host wifi 2.4G enabled | bool, None |
| wifi_5g_enable | Is host wifi 5G enabled | bool, None |
| wifi_5g_2_enable | Is host wifi on the second 5G band enabled (tri-band) | bool, None |
| wifi_6g_enable | Is host wifi 6G enabled | bool, None |
| wifi_mlo_2g_enable | Is MLO enabled on 2.4G (EX / C6U-SG when mlo_host_2g_enable is present) | bool, None |
| wifi_mlo_5g_enable | Is MLO enabled on 5G (EX / C6U-SG when mlo_host_5g_enable is present) | bool, None |
| wifi_mlo_6g_enable | Is MLO enabled on 6G (EX / C6U-SG when mlo_host_6g_enable is present) | bool, None |
| wan_ipv4_uptime | Internet Uptime | int, None |
| mem_usage | Memory usage in percentage between 0 and 1 | float, None |
| cpu_usage | CPU usage in percentage between 0 and 1 | float, None |
| conn_type | Connection type | str, None |
| clients_down_speed | What current devices receive, bytes/s (Archer C5400X, Traffic Monitor list; orphan/stale MAC rows are ignored). Includes traffic between local clients, so it is not exactly the internet speed | int, None |
| clients_up_speed | What current devices send, bytes/s, counted the same way as clients_down_speed | int, None |
| devices | List of all connected devices | list[Device] |
Device
| Field | Description | Type | | --- |---|---| | type | client connection type (2.4G or 5G, guest wifi or host wifi, wired) | Connection | | macaddr | client mac address | str | | macaddress | client mac address | macaddress | | ipaddr | client ip address | str | | ipaddress | client ip address | ipaddress | | hostname | client hostname | str | | packets_sent | total packets sent | int, None | | packets_received | total packets received | int, None | | down_speed | download / receive speed (Archer C5400X: bytes/s from Traffic Monitor; RE813XE family: currently the same PHY Mbps asrx_rate, for compatibility) | int, None |
| up_speed | upload / transmit speed (Archer C5400X: bytes/s from Traffic Monitor; RE813XE family: currently the same PHY Mbps as tx_rate, for compatibility) | int, None |
| tx_rate | transmit rate (Mbps) | int, None |
| rx_rate | receive rate (Mbps) | int, None |
| online_time | client online time (seconds) | float, None |
| traffic_usage | total traffic usage (bytes) | int, None |
| signal | Signal strength | int, None |
| active | Is active device | bool |
| ap_name | ap_name | str |
| ssid | ssid | str |
| frequency | frequency | str |
MeshNode
One node of a mesh network as reported by the main router. Families populate different subsets of fields; values absent from the router's answer stayNone.
EasyMesh (C6U / SG). The node whose role is main_router is the router itself; every other
node is a satellite whose parent_macaddr points at the node it uplinks through - that parent may
be another satellite in a multi-hop mesh. The main router reports no uplink; the bar level /
support_reboot are only sent by newer firmware (seen on BE series, absent on AX series).
signal_level is a firmware-dependent bar level (not dBm): observed as 1–3 on BE and up to 5 on AX.
Deco. Roles are master / slave (is_main_router accepts both vocabularies). Backhaul quality
is per-band dBm in signal_2g / signal_5g (plus rx/tx rates); connection state is in
group_status and is also copied to shared status so callers that only read status work across
families. internet_status, hardware/firmware versions and wired_ports are Deco-only.
| Field | Description | Type |
|---|---|---|
| macaddr | node mac address | str, None |
| macaddress | node mac address | macaddress.EUI48, None |
| ipaddr | node ip address | str, None |
| ipaddress | node ip address | ipaddress.IPv4Address, None |
| parent_macaddr | mac address of the node this one uplinks through | str, None |
| parent_macaddress | mac address of the node this one uplinks through | macaddress.EUI48, None |
| is_main_router | True when role is main_router (EasyMesh) or master (Deco) | bool |
| name | node name | str, None |
| model | node model, like - Archer AX55 / X50 | str, None |
| role | EasyMesh: main_router / satellite_router; Deco: master / slave | str, None |
| status | node status, like - connected (on Deco, mirrors group_status) | str, None |
| device_type | node type, like - WirelessRouter, RangeExtender | str, None |
| vendor | node vendor | str, None |
| location | node location as set in the router UI | str, None |
| connect_type | uplink type - wire or wireless | str, None |
| mesh_type | mesh flavour, like - easymesh | str, None |
| client_num | amount of clients connected to this node | int, None |
| signal_level | EasyMesh uplink quality as a firmware-dependent bar level (not dBm) | int, None |
| support_reboot | Can this node be rebooted from the main router (EasyMesh) | bool, None |
| hardware_version | Deco hardware version | str, None |
| firmware_version | Deco firmware version string | str, None |
| internet_status | Deco internet reachability, like - online | str, None |
| group_status | Deco mesh group state; same value as status | str, None |
| signal_2g / signal_5g | Deco backhaul RSSI in dBm | int, None |
| rx_rate_2g / rx_rate_5g | Deco backhaul RX rate | int, None |
| tx_rate_2g / tx_rate_5g | Deco backhaul TX rate | int, None |
| wired_ports | Deco wired port count | int, None |
MeshApClients
One EasyMesh access point with the clients it reports undermesh_sclient_detail
(C6U / SG via get_mesh_clients()).
| Field | Description | Type | |---|---|---| | name | AP name | str, None | | macaddr | AP mac address | str, None | | macaddress | AP mac address | macaddress.EUI48, None | | macaddr_24g / macaddr_5g / macaddr_6g | AP radio mac addresses when the firmware reports them | str, None | | macaddress_24g / macaddress_5g / macaddress_6g | AP radio mac addresses | macaddress.EUI48, None | | clients | clients associated with this AP | [[MeshClient]](#MeshClient) |
MeshClient
A client under one EasyMesh AP (mesh_nclient_list entry).
| Field | Description | Type |
|---|---|---|
| macaddr | client mac address | str, None |
| macaddress | client mac address | macaddress.EUI48, None |
| ipaddr | client ip address | str, None |
| ipaddress | client ip address | ipaddress.IPv4Address, None |
| hostname | client name | str, None |
| connection_type | connection type, like - 2.4G | str, None |
| guest | guest flag from the firmware, like - NON_GUEST | str, None |
| signal | signal strength | int, None |
| rx_rate / tx_rate | PHY rates (Mbps) when present | int, None |
| is_wired | whether the client is wired | bool, None |
IPv4Reservation
| Field | Description | Type | | --- |---|---| | macaddr | client mac address | str | | macaddress| client mac address | macaddress | | ipaddr | client ip address | str | | ipaddress | client ip address | ipaddress | | hostname | client hostname | str | | enabled | enabled | bool |IPv4ReservationsInfo
| Field | Description | Type | | --- |---|---| | reservations | reservations in router order | [[IPv4Reservation]](#IPv4Reservation) | | max_rules | table capacity reported by the router (others.max_rules), None if not reported | int, None |
| used | number of reservations | int |
| free | free slots, None if max_rules is unknown | int, None |
| is_full | whether the table is full (False when max_rules is unknown — not proof that slots remain) | bool |
IPv4DHCPLease
| Field | Description | Type | | --- |---|---| | macaddr | client mac address | str | | macaddress | client mac address | macaddress | | ipaddr | client ip address | str | | ipaddress | client ip address | ipaddress | | hostname | client hostname | str | | lease_time | ip address lease time | str |AccessControlStatus
| Field | Description | Type | | --- |---|---| | enable | Access Control is on | bool | | mode |blacklist or whitelist | str |
BlockedDevice
| Field | Description | Type | | --- |---|---| | macaddr | device mac address | str | | macaddress | device mac address | macaddress | | hostname | name stored with the blacklist entry | str |IPv4PortForward
| Field | Description | Type | | --- |---|---| | name | rule name (unique per router, used as the rule identifier) | str | | ipaddr | internal (LAN) ip address the ports forward to | str | | ipaddress | internal ip address | ipaddress | | external_port | WAN-side port, single (443) or range (8000-9000) | str |
| internal_port | LAN-side port | str |
| protocol | TCP, UDP or ALL | str |
| enabled | rule enabled | bool |
IPv4Status
| Field | Description | Type | | --- |---|---| | wan_macaddr | router WAN mac address | str, None | | wan_macaddress | router WAN mac address | macaddress.EUI48, None | | wan_ipv4_ipaddr | router WAN IPv4 address | str, None | | wan_ipv4_ipaddress | router WAN IPv4 address | ipaddress.IPv4Address, None | | wan_ipv4_gateway | router WAN gateway IP address | str, None | | wan_ipv4_gateway_address | router WAN gateway IP address | ipaddress.IPv4Address, None | | wan_ipv4_conntype | router connection type | str | | wan_ipv4_netmask | router WAN IP netmask | str, None | | wan_ipv4_netmask_address | router WAN IP netmask | ipaddress.IPv4Address, None | | wan_ipv4_pridns | router primary dns server | str, None | | wan_ipv4_pridns_address | router primary dns server | ipaddress.IPv4Address, None | | wan_ipv4_snddns | router secondary dns server | str, None | | wan_ipv4_snddns_address | router secondary dns server | ipaddress.IPv4Address, None | | lan_macaddr | router LAN mac address | str, None | | lan_macaddress | router LAN mac address | macaddress.EUI48, None | | lan_ipv4_ipaddr | router LAN IP address | str, None | | lan_ipv4_ipaddress | router LAN IP address | ipaddress.IPv4Address, None | | lan_ipv4_dhcp_enable | router LAN DHCP enabled | bool | | lan_ipv4_netmask | router LAN IP netmask | str, None | | lan_ipv4_netmask_address | router LAN IP netmask | ipaddress.IPv4Address, None | | remote | router remote | bool, None |IPv6Status
| Field | Description | Type | | --- |---|---| | wan_ipv6_enabled | Is WAN IPv6 enabled | bool, None | | wan_ipv6_conn_status | WAN IPv6 connection status (e.g. Connected, Disabled) | str, None | | wan_ipv6_conntype | WAN IPv6 connection type | str, None | | wan_ipv6_addr_type | WAN IPv6 address acquisition type (e.g. DHCPv6) | str, None | | wan_ipv6_addr | router WAN IPv6 address | str, None | | wan_ipv6_gateway | router WAN IPv6 gateway | str, None | | wan_ipv6_pridns | router primary IPv6 DNS server (unlike IPv4, returns address object, not str) | ipaddress.IPv6Address, None | | wan_ipv6_snddns | router secondary IPv6 DNS server (unlike IPv4, returns address object, not str) | ipaddress.IPv6Address, None | | ipv6_site_prefix | IPv6 site prefix | str, None | | ipv6_site_prefix_length | IPv6 site prefix length | str, None |Not all fields are filled by every client:
- c6u / SG / C5400X / C1200:
wan_ipv6_enabled,wan_ipv6_conntype,wan_ipv6_addr,wan_ipv6_gateway,wan_ipv6_pridns,wan_ipv6_snddns,wan_ipv6_conn_status,ipv6_site_prefix - MR / EX / VR / MR200 / C50 / WR841 / C3200:
wan_ipv6_enabled,wan_ipv6_conn_status,wan_ipv6_addr_type,wan_ipv6_conntype,wan_ipv6_addr,wan_ipv6_gateway,wan_ipv6_pridns,wan_ipv6_snddns,ipv6_site_prefix,ipv6_site_prefix_length - C80:
wan_ipv6_enabled,wan_ipv6_conn_status,wan_ipv6_addr_type,wan_ipv6_addr,wan_ipv6_gateway,wan_ipv6_pridns,wan_ipv6_snddns,ipv6_site_prefix,ipv6_site_prefix_length
VPNStatus
| Field | Description | Type | | --- |---|---| | openvpn_enable | OpenVPN is enabled | bool | | pptpvpn_enable | PPTPVPN is enabled | bool | | ipsecvpn_enable | IPSEC is enabled | bool | | openvpn_clients_total | OpenVPN clients connected | int | | pptpvpn_clients_total | PPTPVPN clients connected | int |VpnClientStatus
| Field | Description | Type | | --- |---|---| | enabled | VPN client is enabled | bool | | servers | Configured VPN client servers | [[VpnClientServer]](#vpn_client_server) | | devices | Devices in the VPN client whitelist | [[VpnClientDevice]](#vpn_client_device) |VpnClientServer
| Field | Description | Type | | --- |---|---| | id | Server identifier | str | | name | Server display name | str | | protocol | VPN protocol | VpnClientServerProtocol | | active | Is this server currently active | bool | | status | Connection status string from router (e.g. "connected") | str, None |VpnClientDevice
| Field | Description | Type | | --- |---|---| | macaddr | device mac address | str | | macaddress | device mac address | EUI48 | | name | device hostname | str | | enabled | Is device routed through VPN client | bool |SMS
| Field | Description | Type | | --- |---|---| | id | message index | int | | sender| sender | str | | content| sms text | str | | received_at| received datetime | datetime | | unread| is message unread | bool |LTEStatus
| Field | Description | Type | | --- |---|---| | enable | is enabled | int | | connect_status | connect status | int | | network_type | network type | int | | network_type_info | Example: 4G LTE | str | | sim_status | sim status | int | | sim_status_info | Example: SIM locked. | str | | total_statistics | total statistics in bytes | int | | cur_rx_speed | current download speed in bytes per second | int | | cur_tx_speed | current upload speed in bytes per second | int | | sms_unread_count | sms unread amount | int | | sig_level | signal level | int | | rsrp | RSRP | int | | rsrq | RSRQ | int | | snr | SNR | int | | isp_name | ISP name | str | | network_types | All possible network types - {0: "No Service", 1: "GSM", 2: "WCDMA", 3: "4G LTE", 4: "TD-SCDMA", 5: "CDMA 1x", 6: "CDMA 1x Ev-Do", 7: "4G+ LTE", 8: "5G NR"} | dict | | sim_statuses | All possible sim statuses - {0: "No SIM card detected or SIM card error.", 1: "No SIM card detected.", 2: "SIM card error.", 3: "SIM card prepared.", 4: "SIM locked.", 5: "SIM unlocked. Authentication succeeded.", 6: "PIN locked.", 7: "SIM card is locked permanently.", 8: "suspension of transmission", 9: "Unopened"} | dict |DSLStatus
| Field | Description | Type | | --- |---|---| | status | DSL line status as reported by the device. Example: Up | str, None | | is_up | is the line up | bool | | modulation | Example: VDSL2 | str, None | | annex | Example: Annex auto | str, None | | upstream_curr_rate | current upstream sync rate in kbps | int, None | | downstream_curr_rate | current downstream sync rate in kbps | int, None | | upstream_max_rate | maximum attainable upstream rate in kbps | int, None | | downstream_max_rate | maximum attainable downstream rate in kbps | int, None | | upstream_noise_margin | upstream SNR margin in dB | float, None | | downstream_noise_margin | downstream SNR margin in dB | float, None | | upstream_attenuation | upstream line attenuation in dB | float, None | | downstream_attenuation | downstream line attenuation in dB | float, None | | uptime | line uptime as reported by the device (X_TP_UpTime) | int, None |
ServingCell
| Field | Description | Type | | --- |---|---| | network_type | network type | int | | band| band number | int | | arfcn | absolute radio frequency channel number | int | | downlink_bandwidth | MHz | int | | downlink_frequency | MHz | int | | downlink_modulation | Downlink modulation scheme | str | | uplink_modulation | Uplink modulation scheme | str | | cqi | Channel quality indicator | int | | ri | Rank indicator | int | | resource_blocks | Number of resource blocks allocated in the NR cell | int | | rsrp | dBm | int | | rsrq | dBm | int |RepeaterStatus
| Field | Description | Type | | --- |---|---| | connection_2g / connection_5g | backhaul connection state per band as reported by the extender. Example: connected | str, None | | connected_2g / connected_5g | is the backhaul on this band connected;False also when the state is unknown (connection_* is None) | bool |
| internet_status | internet state as reported by the extender. Example: connected | str, None |
| ipconn_status | IP connection state as reported by the extender. Example: connected | str, None |
| ssid_2g / ssid_5g | SSID of the upstream access point | str, None |
| bssid_2g / bssid_5g | MAC address of the upstream access point radio | str, None |
| bssid_2g_macaddress / bssid_5g_macaddress | MAC address of the upstream access point radio | macaddress.EUI48, None |
| rssi_2g / rssi_5g | signal of the upstream access point in dBm; None unless connected_* is True | int, None |
| rx_rate_2g / rx_rate_5g | backhaul receive PHY rate in Mbps (not throughput); None unless connected_* is True | int, None |
| tx_rate_2g / tx_rate_5g | backhaul transmit PHY rate in Mbps (not throughput); None unless connected_* is True | int, None |
| mesh_enable | is mesh enabled on the extender | bool, None |
| mesh_sync_status | mesh sync state, raw firmware value. Kept separate from mesh_enable: mesh can be enabled but not synced | str, None |
WifiStatus
| Field | Description | Type | | --- |---|---| | enable | enable | bool | | ssid | ssid | str | | hidden | hidden | bool | | encryption | encryption | str | | psk_key | psk_key | str | | portal_enable | portal_enable | bool | | portal_password | portal_password | str | | channel | channel | int |PortStatus
| Field | Description | Type | | --- |---|---| | port | Physical port number (1-based) | int | | enabled | Port administratively enabled | bool, None | | link_up | Link is up | bool, None | | auto_negotiation | Auto-negotiation configured | bool, None | | configured_speed | Configured speed in Mbps (fixed mode) | int, None | | configured_duplex | Configured duplex (half / full) | str, None |
| negotiated_speed | Negotiated speed in Mbps | int, None |
| negotiated_duplex | Negotiated duplex (half / full) | str, None |
| flow_control_enabled | Flow control configured | bool, None |
| flow_control_active | Flow control active | bool, None |
| lag | LAG group number, if any | int, None |
| tx_good_packets | Transmitted good packets (not bytes; may reset) | int, None |
| tx_bad_packets | Transmitted bad packets | int, None |
| rx_good_packets | Received good packets | int, None |
| rx_bad_packets | Received bad packets | int, None |
RouterPortStatus
Link state of a router Internet/LAN port (Archer C5400X / C1200 Network Map; C6U / SG / V1_11 family such as Archer BE230). Separate from switch PortStatus (no admin enable, flow control, LAG or counters). | Field | Description | Type | | --- |---|---| | port | Port number (0 = Internet, then LAN 1–N) | int | | link_up | Link is up | bool, None | | negotiated_speed | Negotiated speed in Mbps | int, None | | negotiated_duplex | Negotiated duplex (half / full) | str, None |
PortModes
| Field | Description | Type | | --- |---|---| | wan_aggregation | A LAN port works as a second WAN port | bool, None | | link_aggregation | Two LAN ports are aggregated | bool, None | | iptv | IPTV/VLAN port setup is on | bool, None |UsbStorage
| Field | Description | Type | | --- |---|---| | disks | USB disks connected | int, None | | capacity | Total size of every volume, in bytes (K/M/G/T read as powers of 1000, like the web page) | int, None | | used | Used space, in bytes | int, None | | free | Free space, in bytes | int, None |UsbSharing
| Field | Description | Type | | --- |---|---| | samba | Samba (Network Neighborhood) sharing is on | bool, None | | ftp | FTP server is on | bool, None | | ftp_internet | FTP via internet is on | bool, None | | media_sharing | Media Sharing (DLNA) is on | bool, None | | time_machine | Time Machine backups are on | bool, None |VpnServerSettings
| Field | Description | Type | | --- |---|---| | openvpn_enabled | OpenVPN server is on | bool, None | | openvpn_protocol | OpenVPN service type (udp / tcp) | str, None |
| openvpn_port | OpenVPN service port | int, None |
| openvpn_access | What OpenVPN clients reach (home = home network only, internet = internet and home network) | str, None |
| pptp_enabled | PPTP server is on | bool, None |
| pptp_unencrypted_access | PPTP allows unencrypted connections | bool, None |
| pptp_samba_access | PPTP clients may reach Samba (Network Place) | bool, None |
ClientsPerBand
| Field | Description | Type | | --- |---|---| | wired | Wired clients | int, None | | wifi_2g | Clients on 2.4 GHz (main and guest networks) | int, None | | wifi_5g | Clients on 5 GHz (the first 5 GHz band on tri-band routers) | int, None | | wifi_5g_2 | Clients on the second 5 GHz band; None on routers without it | int, None |DailyTraffic
| Field | Description | Type | | --- |---|---| | downloads | Bytes downloaded per day, newest first (index 0 = today); up to 7 days | list[int, None] | | uploads | Bytes uploaded per day, same order | list[int, None] | | download_today | downloads[0] | int, None | | upload_today | uploads[0] | int, None |WifiNetwork
Guest networks only fillenable, ssid, hidden and encryption. There is no password field.
| Field | Description | Type |
| --- |---|---|
| enable | The network is on | bool, None |
| ssid | Network name | str, None |
| hidden | The name is hidden | bool, None |
| encryption | Security: psk, none… | str, None |
| channel | Configured channel: auto or a number | str, None |
| current_channel | Channel in use | int, None |
| hwmode | Wireless mode, e.g. bgn, anac_5 | str, None |
| htmode | Channel width, e.g. auto, 20, 40, 80 | str, None |
| txpower | Transmit power: low, middle, high | str, None |
| airtime_fairness | Airtime Fairness is on | bool, None |
| mu_mimo | MU-MIMO is on | bool, None |
WifiSchedule
| Field | Description | Type | | --- |---|---| | enable | The Wireless Off Time Schedule is on | bool, None | | off_periods | Number of off periods in the schedule | int, None | | off_now_2g | The schedule has the 2.4 GHz band off right now | bool, None | | off_now_5g | The schedule has the 5 GHz band off right now | bool, None | | off_now_5g_2 | The schedule has the second 5 GHz band off right now | bool, None | | periods | The off periods, in the router's order | list[WifiOffPeriod], None |WifiOffPeriod
| Field | Description | Type | | --- |---|---| | start | Hour the WiFi goes off, 0-24 | int | | end | Hour it comes back, 0-24; before start means overnight | int | | days | Router day names (sun .. sat); empty = every day | list[str] |
GuestNetworkAccess
| Field | Description | Type | | --- |---|---| | each_other | Guests may access each other | bool, None | | local_network | Guests may access the local network | bool, None |WanSpeed
| Field | Description | Type | | --- |---|---| | download | Internet download rate, bytes/s | int, None | | upload | Internet upload rate, bytes/s | int, None | | time | When the router took the sample | datetime, None |SpeedTest
| Field | Description | Type | | --- |---|---| | status |idle, down_test, up_test or fail | str, None |
| download | Download speed, Mbit/s (None while measuring or if it never ran) | float, None |
| upload | Upload speed, Mbit/s | float, None |
| time | When the test ran (None if never) | datetime, None |
WanPortSpeed
| Field | Description | Type | | --- |---|---| | value | Value as the router gives it, e.g.auto, 1000F, 100F | str, None |
| speed | Speed in Mbps from the value (None for auto) | int, None |
| duplex | full / half from the value | str, None |
| auto_negotiatio
... (README truncated for length)