Code Monkey home page Code Monkey logo

tplink-omada-api's Introduction

What's this?

A basic Python client for calling the TP-Link Omada controller API.

Installation

pip install tplink-omada-client

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

Tested with OC200 on Omada Controller Version 5.5.7 - 5.7.6. 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.

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.

Contributing

There is a VS Code development container, which sets up all of the requirements for running the package.

License

MIT Open Source license.

tplink-omada-api's People

Contributors

d-j-see avatar fabaff avatar guillempages avatar markgodwin avatar mheath avatar milothomas avatar odouville avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.