Python script to control your Xiaomi Yeelight bulbs.
- Install Python 3 and Pip
# Ubuntu / Debian
$ sudo apt install python3 python3-pip
# CentOS / Fedora
$ sudo yum install python36 python3-pip
# Arch
$ sudo pacman -S python python-pip
# openSUSE
$ sudo zypper install python3 python3-pip
- Clone this repo
$ git clone https://github.com/r00tusrDE/yeelightctl.git
- Install Dependencies
$ pip install -Ur requirements.txt
- You can set names for your bulbs so you don't need to always type out the ip of the bulb that you want to control. To set names open the bulbs.csv file (contained in this repo) and use one line per bulb. Use the following syntax in the CSV file:
<bulb_name>,<bulb_ip>
Here is a example for a bulb in the living room and one in the bedroom:
name,ip
lr,192.168.178.10
br,192.168.178.11
See Usage
to know how to use these names.
You can either use the ip or the name of your bulb (See Getting started
for more information on how to set up names for your bulbs)
$ python yeelightctl.py <bulb_ip|bulb_name> <function>
- Turn on the bulb
# using IP
$ python yeelightctl.py 192.168.178.10 on
# using name
$ python yeelightctl.py lr on
- Turn off the bulb
# using IP
$ python yeelightctl.py 192.168.178.10 off
# using name
$ python yeelightctl.py lr off
Distributed under the GPLv3 License. See LICENSE
for more information.