What's this?
A basic Python client for calling the TP-Link Omada controller API.
Installation
pip install tplink-omada-client
Note: Version 1.4 requires Python 3.11. Note: Version 1.5 and later requires Python 3.13.
Supported features
Only a subset of the controller's features are supported:
- Automatic Login/Re-login
- Basic controller information
- List sites
- Within site:
- List Devices (APs, Gateways and Switches)
- Basic device information
- Get firmware information and initiating automatic updates
- Port status and configuraton for Switches
- Lan port configuration for Access Points
- Gateway port status and WAN port Connect/Disconnect control
Tested with OC200 on Omada Controller Version 5.5.7 - 6.2.x. Other versions may not be fully compatible. Version 5.0.x is definitely not compatible.
CLI
This package provides a simple CLI for interacting with one or more Omada Controllers. To start using the CLI, you must first target a Controller.
$ omada -t NAME target --url https://your.omada.controller.here --user admin --password password --site MySite --set-default
Where NAME is a name of your choosing to identify the targeted controller. --site defaults to the Omada
default site name, 'Default'. If you do not provide a password as an argument, you will be prompted for a
password.
Once you have successfully targeted a controller you can test that things are working by running:
$ omada devices
This will list all the devices being managed by your controller.
DHCP
List, create, modify, and delete DHCP reservations:
$ omada dhcp list
$ omada dhcp create --mac AA:BB:CC:11:22:33 --ip 192.168.1.100 --net-id <network-id> --name "my-device"
$ omada dhcp modify --mac AA:BB:CC:11:22:33 --ip 192.168.1.101
$ omada dhcp delete --mac AA:BB:CC:11:22:33
To find the network ID for --net-id, list LAN networks:
$ omada devices # list devices including their networks
To see a list of all the available commands, run:
$ omada -h
You can set up multiple targets (controllers and sites), and specify the target with the -t <NAME> parameter.
If you don't specify a target, the default will be used, if that has been set.
The CLI is still young so if there is any functionality you need, please create an issue and let us know.
Future
The available API surface is quite large. More of this could be exposed in the future. There is an undocumented Websocket API which could potentially be used to get a stream of updates. However, I'm not sure how fully featured this subscription channel is on the controller. It seems to be rarely used, so probably doesn't include client connect/disconnect notifications.
The Omada platform is transitioning to a new OpenAPI API which this library will need to switch over to using eventually. We will try to avoid breaking changes when this happens, but some will be unavoidable - particularly authentication.
For now, we can use the OpenAPI endpoint with the old authentication style, just like the front-end UI does. Eventually, we need to switch over to OAuth, but probably once all of the APIs have been migrated.
Contributing
There is a VS Code development container, which sets up all of the requirements for running the package.
License
MIT Open Source license.
Metadata
Release files for tplink-omada-client 1.5.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tplink_omada_client-1.5.13.tar.gz | 107.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tplink_omada_client-1.5.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 175.0 kB
Release files / tplink_omada_client-1.5.13.tar.gz
| Download URL | tplink_omada_client-1.5.13.tar.gz |
|---|---|
| Size | 107.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
867a9646ce0ee1b0d31e77942c6937d512d246ce94cefc888281dbb269163e14
|
|
BLAKE2b-256 checksum How to use checksums |
a40fc90c30221e7212d2000efbb880899500f0764d26290147d0a824503548e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tplink_omada_client-1.5.13-py3-none-any.whl
| Download URL | tplink_omada_client-1.5.13-py3-none-any.whl |
|---|---|
| Size | 67.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bd0166d6c39e17144b4be7e281cf793efc5800849f4c7f887ecb4193a259c5f
|
|
BLAKE2b-256 checksum How to use checksums |
ae105452026115625456607127d7996cf9162fbb020cfc8275561dd3f8563ecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|