Library for controlling smart bulbs that are controlled by the DoIT protocol
Project description
DoHome API
![PyPI version](https://pypi-camo.freetls.fastly.net/d3384738dd5347a13ace76cdeb80426fc3fc1f48/68747470733a2f2f62616467652e667572792e696f2f70792f646f686f6d652d6170692e737667)
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.1.0.tar.gz
(9.4 kB
view hashes)
Built Distribution
dohome_api-0.1.0-py3-none-any.whl
(14.1 kB
view hashes)
Close
Hashes for dohome_api-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a1066307273c66cfb17943443f8919d484eb9c91675f9cb0f8499080e5038f |
|
MD5 | e9fd300eb242a95a5923ee16a89002a3 |
|
BLAKE2b-256 | df14ebad7985ca79ae7fbc43fddb7e92b64f83fb08cf34a69542def68453f854 |