JFox-sk / plugp100

Work in progress implementation of tapo protocol in python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plug P100

This is a fork of original work of @K4CZP3R

The purpose of this fork is to provide the library as PyPi package.

How to install

pip install plugp100

Code example

import asyncio
from plugp100 import TapoApiClient


async def main():
    # create generic tapo api
    sw = TapoApiClient("<ip>", "<email>", "<passwd>")
    await sw.login()
    await sw.on()
    await sw.set_brightness(100)
    print(await sw.get_state())

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_until_complete(asyncio.sleep(0.1))
loop.close()

About

Work in progress implementation of tapo protocol in python.

License:GNU General Public License v3.0


Languages

Language:Python 99.0%Language:Shell 1.0%