Skip to content

r00tusrDE/yeelightctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yeelightctl

Python script to control your Xiaomi Yeelight bulbs.

Built With

Prerequisites

  • 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

Getting started

  1. Clone this repo
$ git clone https://github.com/r00tusrDE/yeelightctl.git
  1. Install Dependencies
$ pip install -Ur requirements.txt
  1. 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.

Usage

Basic usage

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>
  1. Turn on the bulb
# using IP
$ python yeelightctl.py 192.168.178.10 on

# using name
$ python yeelightctl.py lr on
  1. Turn off the bulb
# using IP
$ python yeelightctl.py 192.168.178.10 off

# using name
$ python yeelightctl.py lr off

License

Distributed under the GPLv3 License. See LICENSE for more information.

About

Python script to control your Xiaomi Yeelight bulbs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages