Skip to content

A tool for controlling your Yeelight bulb written in Rust.

License

Notifications You must be signed in to change notification settings

stormyyd/yeelight-bulb-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yeelight Bulb Controller

A tool for controlling your Yeelight bulb written in Rust.

Background

I wrote this tool for making it easier to control my lamp.

Because of the limited size of my desk, when I use my laptop with a monitor at the same time, I can hardly get the button of my lamp. So, I can hardly control my lamp. Then I thought this lamp can be controlled by Mi Home or Yeelight app, that means I can also control it by using the API they provide.

And then I found Yeelight WiFi Light Inter-Operation Specification. With those APIs, I wrote this tool.

Now, I use this tool with AutoHotkey to control my lamp by keyboard.

Compile

First, make sure you have installed Rust.(Install Rust)

Then:

git clone https://github.com/stormyyd/yeelight-bulb-controller.git
cd yeelight-bulb-controller
cargo build --release

You will get binary file in ./target/release/ .

Usage

First, you need to enable "LAN Control" feature of your bulb by following steps.

Basic

# On Windows
yeelight-bulb-controller.exe [BULB_ADDRESS] [METHOD] [PARAM1] [PARAM2] ...
# On Linux or macOS
./yeelight-bulb-controller [BULB_ADDRESS] [METHOD] [PARAM1] [PARAM2] ...

Examples

Toggle your bulb:

yeelight-bulb-controller.exe 192.168.1.123:55443 toggle

Set bright to 50 for your bulb smoothly:

yeelight-bulb-controller.exe 192.168.1.123:55443 set_bright 50 smooth 500

Turn on your bulb smoothly:

yeelight-bulb-controller.exe 192.168.1.123:55443 set_power on smooth 500

Turn off your bulb smoothly:

yeelight-bulb-controller.exe 192.168.1.123:55443 set_power off smooth 500

For more usage, please read Yeelight WiFi Light Inter-Operation Specification.

With AutoHotKey

See yeelight-bulb-controller.ahk and Quick Reference | AutoHotkey.

License

ISC License © Yingdong Yang

About

A tool for controlling your Yeelight bulb written in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published