Skip to main content

A Python library for controlling YeeLight RGB bulbs.

Project description

Description

image

image

image

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:

  • With pip (preferred), run pip install yeelight.
  • With setuptools, run easy_install yeelight.
  • To install from source, download it from https://gitlab.com/stavros/python-yeelight and run 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.

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

Supported Devices

See the documentation for a list of supported devices.

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]{.title-ref}. [pre-commit]{.title-ref} 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.11.tar.gz (58.8 kB view details)

Uploaded Source

Built Distribution

yeelight-0.7.11-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yeelight-0.7.11.tar.gz
  • Upload date:
  • Size: 58.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for yeelight-0.7.11.tar.gz
Algorithm Hash digest
SHA256 faf1f1e316c93ff61c5b977d04ee853e4123473905b5a46d2ab1b5ae0e10d5ac
MD5 4c00386621f8cc2217e7e5d18d514df3
BLAKE2b-256 9dc09af3306e0b42f08ce6f8e5a5b9d23a46e6bc18c4011078aaa5940a2ef94c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yeelight-0.7.11-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for yeelight-0.7.11-py3-none-any.whl
Algorithm Hash digest
SHA256 18c7c85320d71a8a29ce860eb4db87ef173af0704e518f030700b44973d8c44f
MD5 99d1a4bfd3a7ef01493c1826fe874622
BLAKE2b-256 22305fd6b9d6ac22aa4e0a9c9731ce64a2657ffdec327cf3689a846b1fc8c4ea

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