Library for controlling smart bulbs that are controlled by the DoIT protocol
Project description
DoHome API
Library for controlling smart bulbs that work using the DoIT protocol (DoHome app).
Installation
pip install dohome-api
Usage
Find the light bulbs that are on
from dohome_api import DoHomeGateway
from asyncio import run
async def main():
gateway = DoHomeGateway()
descriptions = await gateway.discover_lights()
for description in descriptions:
print(f"Found light: sid {descr['sid']}, ip {descr['sta_ip']}")
run(main())
Change the color of the light bulb
from dohome_api import DoHomeGateway
from asyncio import run
async def main():
gateway = DoHomeGateway()
light = await gateway.add_light("19eb") # last 4 symbols of mac address
await light.set_rgb(255, 0, 0) # red
run(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
dohome_api-0.0.3.tar.gz
(8.2 kB
view hashes)
Built Distribution
dohome_api-0.0.3-py3-none-any.whl
(11.0 kB
view hashes)
Close
Hashes for dohome_api-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffac52fa906b0fac519d360fe9b30e7f516992e9665b7e2b2b5f69f1d530b2d3 |
|
MD5 | 2fa18661e5c16bab3a70cc2587cf234a |
|
BLAKE2b-256 | 51d3a7bd76157e87ca76a635891194ec91caceddb0db9e01f4594c4c8a40e68f |