Skip to main content

Controller for TP-Link Tapo P100 and other devices

Project description

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, TapoApiClientConfig, LightEffect


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

    # light effect example
    await sw.set_light_effect(LightEffect.rainbow())
    state = await sw.get_state()
    print(state.get_unmapped_state())

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

if __name__ == "__main__":
    main()

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plugp100-2.2.0.tar.gz (24.5 kB view hashes)

Uploaded Source

Built Distributions

plugp100-2.2.0-py3-none-any.whl (30.6 kB view hashes)

Uploaded Python 3

plugp100-2.2.0-cp310-cp310-musllinux_1_1_aarch64.whl (32.5 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ ARM64

plugp100-2.2.0-cp310-cp310-manylinux2014_armv7l.whl (32.5 kB view hashes)

Uploaded CPython 3.10

plugp100-2.2.0-cp310-cp310-manylinux2014_aarch64.whl (32.5 kB view hashes)

Uploaded CPython 3.10

plugp100-2.2.0-cp39-cp39-musllinux_1_1_aarch64.whl (32.5 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ ARM64

plugp100-2.2.0-cp39-cp39-manylinux2014_armv7l.whl (32.5 kB view hashes)

Uploaded CPython 3.9

plugp100-2.2.0-cp39-cp39-manylinux2014_aarch64.whl (32.5 kB view hashes)

Uploaded CPython 3.9

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page