1
1
Fork
You've already forked yeetlight
0
A lightweight Yeelight smartlights web control panel
  • Rust 65.5%
  • JavaScript 21.8%
  • HTML 9.3%
  • Dockerfile 1.9%
  • CSS 1.5%
Find a file
Wojciech Siewierski 6802dedd30
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Make the default docker-compose setting more sane
Now the default profile only starts the main application, so if
someone runs `docker compose up`, it will work. It can still operate
as a handy image builder like I used it before.
2024年10月01日 10:14:32 +02:00
.cargo Prepare the ARM64 Docker images 2024年10月01日 02:30:30 +02:00
examples Allow bulb connection reuse 2024年04月15日 02:18:38 +02:00
images Add the README etc. 2024年04月09日 11:58:34 +02:00
public Avoid using absolute paths to allow hosting under a prefix 2024年09月18日 01:01:08 +02:00
src Move the axum request handlers to a separate file 2024年05月03日 15:29:11 +02:00
tests Allow the mocks to listen on different address for concurrent tests 2024年04月16日 18:35:16 +02:00
.dockerignore Prepare the ARM64 Docker images 2024年10月01日 02:30:30 +02:00
.gitignore Add gitignore 2024年04月04日 02:15:00 +02:00
.pre-commit-config.yaml Add a timeout to pre-commit to handle deadlocks in tests 2024年04月16日 13:32:39 +02:00
.woodpecker.yaml Add configs for Podman and the CI 2024年08月07日 20:16:56 +02:00
Cargo.toml Log the alarm aborts 2024年04月23日 21:03:32 +02:00
docker-compose.yml Make the default docker-compose setting more sane 2024年10月01日 10:14:32 +02:00
Dockerfile Prepare the ARM64 Docker images 2024年10月01日 02:30:30 +02:00
LICENSE Add the README etc. 2024年04月09日 11:58:34 +02:00
README.md Add a CI badge 2024年08月07日 20:19:11 +02:00
rustfmt.toml Add rustfmt.toml 2024年04月04日 01:47:21 +02:00

Yeetlight

status-badge

Yeetlight is a lightweight Yeelight smartlights web control panel.

It was created as a way so that I wouldn't yeet my lights when interacting with their official smartphone app.

Features

Remote control of the Yeelight/Xiaomi smartlights including:

  • power on/off
  • brightness
  • color temperature
  • RGB support (albeit ugly)
  • multiple lights linked to each other and acting as a larger setup

Additional features:

  • simple UI
  • self-contained
  • full controls of multiple smartlights in a single panel; no subpanels per light as in the official app
  • responsive web design

Dependencies

A reasonably new Rust compiler is needed to build the application.

Usage

Before running the build you may want to edit public/config.json according to the intended smartlight setup. This file will get embedded into the resulting binary, though it's possible to override it with --config some/path/config.json.

Build and run with:

$ cargo build --release
$ ./target/release/yeetlight --iface 0.0.0.0:8080

The --iface ... argument may be omitted if the above example is the intended value, i.e. exposing the control panel on all network interfaces on 8080 TCP port.

Open http://localhost:8080 in a web browser.

Configuration

config.json should contain a JSON object with a bulbs key contain a list of bulbs. Each bulb has one of the following forms:

  • named bulb

     "Bulb name": {
     "addr": "192.168.xxx.xxx"
     }
    
  • anonymous bulb (the address is also the name)

     "192.168.xxx.xxx": {}
    

If a bulb is a part of a larger setup, it may contain a linked key with a list of names of other bulbs that will follow its state (controlled with a checkbox):

"192.168.xxx.xxx": {
 "linked": [ "Bulb name" ]
}

...or more verbosely (and with the checkbox pre-checked):

"192.168.xxx.xxx": {
 "linked": [
 {
 "name": "Bulb name",
 "enable": true
 }
 ]
}

To enable the RGB capabilities, add "rgb": true to the bulb's config.

Security considerations

Yeetlight was written with the assumption it's being run inside a fully trusted network on a device like Raspberry Pi, so no authentication is used at all. The bulbs themselves are not protected either so as long as Yeetlight is accessible only from the same network the bulbs are, it shouldn't create any additional security risks.