ylc
is a command-line interface (CLI) tool designed to control your Yeelight
smart bulbs. With ylc
, you can manage, control, and configure your bulbs
effortlessly from your terminal.
- Discover new bulbs: Automatically discover and update known bulbs on your network
- Control brightness: Set the brightness level of your bulbs
- Toggle power: Turn your bulbs on or off
- Set RGB color: Change the color of your bulbs using RGB values
- Adjust color temperature: Modify the color temperature of your bulbs
- Manage bulbs: List and delete known bulbs
You can install ylc
using one of the following methods.
- Go to the releases page
- Download the appropriate release for your operating system
- Extract the downloaded file and move the executable to a directory included in your system's PATH
If you have Go installed, you can easily install ylc
with the following command:
go install github.com/pugkong/ylc@latest
Below are some common commands you can use with ylc
.
Discover new bulbs or update known bulbs on your network:
ylc discover
List all known bulbs:
ylc list
Display detailed information about a specific bulb:
ylc info [BULB NAME]
Set the brightness level of a bulb:
ylc bright [BULB NAME] [BRIGHTNESS]
[BRIGHTNESS]
should be a value between 1 and 100.
Toggle the power state of a bulb:
ylc power [BULB NAME]
Set the RGB color of a bulb:
ylc rgb [BULB NAME] [COLOR]
[COLOR]
should be a hexadecimal value (e.g.,ff0000
for red).
Set the color temperature of a bulb:
ylc temperature [BULB NAME] [TEMPERATURE]
[TEMPERATURE]
should be a value between 1700 and 6500.
Delete a bulb from the known bulbs list:
ylc delete [BULB NAME]
Many commands in ylc
support additional options:
--bg
: Apply the command to the background light of the bulb--effect
,-e
: Set the effect for the command (smooth
orsudden
)--duration
,-d
: Set the duration of the effect in milliseconds
For example, to set the brightness of a bulb with a smooth effect over 1000 milliseconds:
ylc bright [BULB NAME] [BRIGHTNESS] --effect smooth --duration 1000
-
Clone the repository:
git clone https://github.com/pugkong/ylc.git cd ylc
-
Build the project:
go build
-
Move the compiled binary to a directory included in your system's PATH.
Contributions are welcome! Feel free to open issues or submit pull requests on the GitHub repository.
ylc
is licensed under the UNLICENSED License.
See the LICENSE file for
more information.