A Python library for controlling YeeLight RGB bulbs.
Project description
yeelight is a simple Python library that allows you to control YeeLight WiFi RGB LED bulbs through your LAN.
For a command-line utility that uses this library, see yeecli.
Installation
There are many ways to install yeelight:
With pip (preferred), do pip install yeelight.
With setuptools, do easy_install yeelight.
To install from source, download it from https://gitlab.com/stavros/python-yeelight and do python setup.py install.
Usage
To use yeelight, first enable “development mode” on your bulb through the YeeLight app. Then, just import the library into your project like so:
>>> from yeelight import Bulb
Afterwards, instantiate a bulb:
>>> bulb = Bulb("192.168.0.5") >>> bulb.turn_on()
That’s it!
Refer to the rest of the documentation for more details.
Contributing
If you’d like to contribute to the code, thank you! To install the various libraries required, run (preferably in a virtualenv):
$ pip install -Ur requirements_dev.txt
In order for your MR to pass CI, it needs to be checked by various utilities, which are managed by pre-commit. pre-commit will be installed by the above command, but you also need to install the pre-commit hook:
$ pre-commit install
The hook will run on commit. To run it manually (e.g. if you’ve already committed but forgot to run it, just run):
$ pre-commit run -a
Thanks again!
License
yeelight is distributed under the BSD license.
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
Built Distribution
File details
Details for the file yeelight-0.6.1.tar.gz
.
File metadata
- Download URL: yeelight-0.6.1.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57bec2d6d5ab37d455d4ea51181942f6a4507bdef83bff576f7ecfecddeadf66 |
|
MD5 | 15be5603852bb443ef3c5b8abea40d59 |
|
BLAKE2b-256 | b44ee720a680db10415c18ace4c11c8a51d8c59416462a46382da4466cf27b24 |
File details
Details for the file yeelight-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: yeelight-0.6.1-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15640a157b41f9086ee54405a90781f4516661f28717de9d97cfdc4f2110488c |
|
MD5 | c9a688d5797369f7ea10285b97dbc55a |
|
BLAKE2b-256 | 41da62fc998bd0d67049fdc6a567504864f9892f1675dee97655bdf7ce831d52 |