Skip to main content

A Python library for controlling YeeLight RGB bulbs.

Project description

https://gitlab.com/stavros/python-yeelight/badges/master/pipeline.svg https://gitlab.com/stavros/python-yeelight/badges/master/coverage.svg https://img.shields.io/pypi/v/yeelight.svg Documentation Status

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:

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.

The library also contains a (currently undocumented) asyncio interface.

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


Download files

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

Source Distribution

yeelight-0.7.2.tar.gz (47.6 kB view details)

Uploaded Source

Built Distribution

yeelight-0.7.2-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file yeelight-0.7.2.tar.gz.

File metadata

  • Download URL: yeelight-0.7.2.tar.gz
  • Upload date:
  • Size: 47.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.11

File hashes

Hashes for yeelight-0.7.2.tar.gz
Algorithm Hash digest
SHA256 d2bfe88f1d40bbb175dd00636b0ee675d71e5a0d6e758a1114512119055b5dd0
MD5 02a9761a01bd123f5c7ada57c5bfc7a7
BLAKE2b-256 b18c8b9a5dc99d82ae7e3fdd7616e028ecbae19af452ecc28b19cecf41065c2c

See more details on using hashes here.

File details

Details for the file yeelight-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: yeelight-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.11

File hashes

Hashes for yeelight-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9427c3e913b7859f5c2cedcd5ecae3df9b7d92e368b4bb027f90e2887cda0064
MD5 a9ef0a397b90f56a38179692429be248
BLAKE2b-256 6ac04538a19c72634170be906f565d1ea87496adc06a0b7abc2820d627865b77

See more details on using hashes here.

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