{"id":49077455,"url":"https://github.com/teegre/ylight-suite","last_synced_at":"2026-04-20T10:34:29.025Z","repository":{"id":109847141,"uuid":"277186715","full_name":"teegre/ylight-suite","owner":"teegre","description":"Utilities to control Yeelight® bulbs","archived":false,"fork":false,"pushed_at":"2024-03-01T19:19:26.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-01T20:31:32.290Z","etag":null,"topics":["bash","bulb","iot-application","linux","yeelight"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teegre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-07-04T21:18:48.000Z","updated_at":"2022-04-09T17:02:32.000Z","dependencies_parsed_at":"2024-03-01T20:30:55.434Z","dependency_job_id":"4af97e68-d788-4cda-bb79-236c1fd6950b","html_url":"https://github.com/teegre/ylight-suite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teegre/ylight-suite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teegre%2Fylight-suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teegre%2Fylight-suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teegre%2Fylight-suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teegre%2Fylight-suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teegre","download_url":"https://codeload.github.com/teegre/ylight-suite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teegre%2Fylight-suite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32043162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T10:33:29.490Z","status":"ssl_error","status_checked_at":"2026-04-20T10:32:30.107Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bulb","iot-application","linux","yeelight"],"created_at":"2026-04-20T10:34:28.103Z","updated_at":"2026-04-20T10:34:28.978Z","avatar_url":"https://github.com/teegre.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YLIGHT SUITE\n\nA. YLIGHT utility to control Yeelight® bulbs  \nB. YSUNLIGHT set color temperature to time of the day\n\n*Depends on: bash, coreutils, curl, jq, openbsd-netcat, socat*\n\n## Installation\n\nClone this repository:  \n`git clone https://github.com/teegre/ylight-suite.git`\n\nthen:  \n`./install.sh`\n\n\n## A. YLIGHT version 0.8 (2022-04)\n\nYLIGHT - utility to control Yeelight® bulbs\n\n### 1. Usage\n\nLAN Control has to be enabled via Yeelight® mobile application:  \n[https://www.yeelight.com/faqs/lan_control](https://www.yeelight.com/faqs/lan_control)\n\nWhen done, bulbs on your local network have to be discovered. Enter:  \n```\n$ ylight --discover\nylight: OK\n```\n\n*If you get an error message, wait a few seconds and invoke the command again.*\n\nShow bulb status:  \n\n```\n$ ylight --status\nname:       bulb\nhost:       xxx.xxx.x.xxx\nport:       xxxxx\npower:      off\nbrightness: 100%\ncolor temp: 6500K\neffect:     smooth\ntransition: 500 ms\n```\n\nIn case you own more than one bulb:  \n```\n$ ylight --list\nbulb1:xxx.xxx.x.xxx:xxxxx\nbulb2:xxx.xxx.x.xxx:xxxxx\n```\n\nThe first of the list will be used as default.\nSo, if you want to turn *bulb2* on:  \n```\n$ ylight --name bulb2 --on\n```\n\nTo set *bulb2* as default:  \n```\n$ ylight --set-default bulb2\ndefault bulb set to: 'bulb2'\n```\n\n### 2. Options\n\nOPTIONS:\n\n|Option                       |Description                                                  |\n|:----------------------------|:------------------------------------------------------------|\n| --discover                  | retrieve and save bulbs IP and port on local network        |\n| --set-name NAME             | set device name                                             |\n| --set-default DEVICE_NAME   | set DEVICE_NAME as default device                           |\n| -a, --name DEVICE_NAME      | send command to DEVICE_NAME                                 |\n| -l, --list                  | print saved bulbs                                           |\n| -s, --status                | display bulb status                                         |\n| -n, --on                    | turn light **on**                                           |\n| -f, --off                   | turn light **off**                                          |\n| -t, --toggle                | **toggle** power                                            |\n| -b, --brightness [+/-]VALUE | set **brightness** (1..100)                                 |\n| -c, --color-temp [+/-]VALUE | set **color temperature** (1700..6500)                      |\n| -T, --timer [DURATION]      | enable **timer** for a given duration                       |\n|                             | (from 1 to 120 minutes). 0 to turn off current timer;       |\n|\t                          | if no argument is present, each call to the function        |\n|\t                          | set the timer with a preset duration                        |\n|\t                          | (30, 60, 90, 120 minutes or off, respectively)              |\n| -S, --smooth [DURATION_MS]  | smooth transition time when changing settings (100..10000)  |\n| -u, --sudden                | changes are applied immediately (ignore -S)                 |\n| -N, --notify                | display a notification                                      |\n| -h, --help                  | print this help and exit                                    |\n| -V, --version               | print program version and exit                              |\n\n### 3. Some examples\n\nTurn light on, set brightness to 50% and color temperature to 4500K:  \n`ylight -n -b 50 -c 4500`\n\nDecrease brightness by 10% and turn light off:  \n`ylight -b -10 -f`\n\n## B. YSUNLIGHT version 0.6 (2020-11)\n\nYSUNLIGHT - set color temperature according to time of the day.\n\nOnce per day, **ysunlight** connects to this website [https://sunrise-sunset.org](https://sunrise-sunset.org)  \nto retrieve sunrise and sunset times in your city, then it sets the right color temperature.  \nIf the light is currently turned off, color temperature will be set once you turn the light on.\n\n| Period  | Color temperature |\n|:--------|:------------------|\n| Sunset | 1700K→6500K |\n| Sunrise | 6500K→4500K |\n| Night (user defined) | 4500K→1700K |\n\n### 1. Configuration\n\nTo be able to work, **ysunlight** needs to know:\n\n * Timezone\n * Latitude\n * Longitude\n\n#### 1.1 Timezone\n\nType this command:  \n\n```\n$ timedatectl\n               Local time: ven. 2020-07-03 11:34:50 CEST\n           Universal time: ven. 2020-07-03 09:34:50 UTC\n                 RTC time: ven. 2020-07-03 09:34:50\n                Time zone: Europe/Paris (CEST, +0200)\nSystem clock synchronized: yes\n              NTP service: active\n          RTC in local TZ: no\n\n```\nWhat you need is **Europe/Paris**\n\n#### 1.2 Latitude and longitude\n\nFollow the link: [https://latitude.to](https://latitude.to)  \nand enter your *city name*, for instance, Paris\n\n#### 1.3 Configuration file\n\nEdit the file: `$HOME/.config/ylight/ysunlight.conf`  \nand enter the previous info, ie.:  \n```\ntimezone=Europe/Paris\nlatitude=48.85\nlongitude=2.35\n```\n\nOther settings can also be found:  \n```\nnight_time=11:00 PM\nsunrise_duration=600\nsunset_duration=600\nsunrise_step_duration=60\nsunset_step_duration=60\n```\n\n*All durations are in seconds.*\n\n### 2. Enable and start ysunlight.service\n\n```\n$ systemctl --user enable ysunlight\n```\n\n```\n$ systemctl --user start ysunlight\n```\n\nIf everything went fine, you should see a notification  \nindicating time of the day.\n\nIf something went wrong, check the log file at: `$HOME/.config/ylight/ysunlight.log`  \nand also: `systemctl --user status ysunlight`\n\n## C. TODO\n\n[] YLIGHT: ability to send commands to more than one bulb at a time.\n\n[] YSUNLIGHT: Make color temperature configurable.\n\n[] YSUNLIGHT: Check if night_time value is valid.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteegre%2Fylight-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteegre%2Fylight-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteegre%2Fylight-suite/lists"}