Giter VIP home page Giter VIP logo

tapop100's Introduction

Tapo P100

Tapo P100 is a Python library for controlling the Tp-link Tapo P100/P105/P110 plugs and L530/L510E bulbs.

Installation

Use the package manager pip to install PyP100.

pip3 install PyP100

Usage

Plugs - P100, P105 etc.

from PyP100 import PyP100

p100 = PyP100.P100("192.168.X.X", "[email protected]", "Password123") #Creating a P100 plug object

p100.handshake() #Creates the cookies required for further methods
p100.login() #Sends credentials to the plug and creates AES Key and IV for further methods

p100.turnOn() #Sends the turn on request
p100.turnOff() #Sends the turn off request
p100.getDeviceInfo() #Returns dict with all the device info

Bulbs - L510E, L530 etc.

from PyP100 import PyL530

l530 = PyL530.L530("192.168.X.X", "[email protected]", "Password123") #Creating a L530 bulb object

l530.handshake() #Creates the cookies required for further methods
l530.login() #Sends credentials to the plug and creates AES Key and IV for further methods

#All the bulbs have the PyP100 functions and additionally allows for setting brightness, colour and white temperature
l530.setBrightness(100) #Sends the set brightness request
l530.setColorTemp(2700) #Sets the colour temperature to 2700 Kelvin (Warm White)
l530.setColor(100, 100) #Sends the set colour request

Energy Monitoring - P110

from PyP100 import PyP110

p110 = PyP110.P110("192.168.X.X", "[email protected]", "Password123") #Creating a P110 plug object

p110.handshake() #Creates the cookies required for further methods
p110.login() #Sends credentials to the plug and creates AES Key and IV for further methods

#PyP110 has all PyP100 functions and additionally allows to query energy usage infos
p110.getEnergyUsage() #Returns dict with all the energy usage

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Contributers

K4CZP3R
Sonic74
shadow00
mochipon
realzoulou
arrival-spring
wlp7s0

License

MIT

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.