{"id":15639829,"url":"https://github.com/rytilahti/python-yeelightbt","last_synced_at":"2025-10-05T17:28:47.421Z","repository":{"id":57457738,"uuid":"80258923","full_name":"rytilahti/python-yeelightbt","owner":"rytilahti","description":"Python library for Yeelight's bedside (btle) and candela lamps","archived":false,"fork":false,"pushed_at":"2020-04-04T12:32:21.000Z","size":34,"stargazers_count":85,"open_issues_count":9,"forks_count":26,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-09-29T07:41:45.046Z","etag":null,"topics":["bluepy","home-assistant","python-library","yeelight"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rytilahti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-28T01:06:01.000Z","updated_at":"2024-11-23T21:35:29.000Z","dependencies_parsed_at":"2022-09-06T14:41:14.376Z","dependency_job_id":null,"html_url":"https://github.com/rytilahti/python-yeelightbt","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rytilahti/python-yeelightbt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytilahti%2Fpython-yeelightbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytilahti%2Fpython-yeelightbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytilahti%2Fpython-yeelightbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytilahti%2Fpython-yeelightbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rytilahti","download_url":"https://codeload.github.com/rytilahti/python-yeelightbt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytilahti%2Fpython-yeelightbt/sbom","scorecard":{"id":793169,"data":{"date":"2025-08-11","repo":{"name":"github.com/rytilahti/python-yeelightbt","commit":"2736245ebf4205f9e2962faa8c4007749d92064d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T08:09:21.099Z","repository_id":57457738,"created_at":"2025-08-23T08:09:21.100Z","updated_at":"2025-08-23T08:09:21.100Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486823,"owners_count":25995060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bluepy","home-assistant","python-library","yeelight"],"created_at":"2024-10-03T11:27:30.543Z","updated_at":"2025-10-05T17:28:47.394Z","avatar_url":"https://github.com/rytilahti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python library for Yeelight Bedside lamp\n\nThis library allows controlling Yeelight's bluetooth-enabled [bedside lamp](http://www.yeelight.com/en_US/product/yeelight-ctd) and [Candela](https://www.yeelight.com/en_US/product/gingko) devices.\n\n**Note that this library is not actively maintained, however, patches are very welcome.**\n\nCandelas support only setting the light on and off, and adjusting the brightness.\n\nCurrently supported features:\n* State\n* Color mode (white, color, flow)\n* Temperature\n* Brightness\n* Sleep, wakeup \u0026 scheduling (partially)\n\n# Installation\n\n```\npip install git+https://github.com/rytilahti/python-yeelightbt/\n```\n\nIn case you are getting \"No such file or directory\" error for bluepy-helper, you have to go into bluepy's directory and run make there.\nIt is also a good idea to let the helper to have capabilities for accessing the bluetooth devices without being root, e.g., by doing the following:\n\n```\nsetcap cap_net_admin,cap_net_raw+eip bluepy-helper\n```\n\nAnd then simply try if the scanning works. You can use pass '-dd' as option to the command to see the debug messages from bluepy in case it is not working.\n\n# Usage\n\nTry\n```\n$ yeelightbt --help\n```\nand\n```\n$ yeelightbt [command] --help\n```\n\nFor debugging you can pass -d/--debug, adding it second time will also print out the debug from bluepy.\n\n## Finding supported devices\n\n```\n$ yeelightbt scan\nScanning for 5 seconds\nDevices found:\n  f8:24:41:xx:xx:xx (XMCTD_XXXX), rssi=-83\n\n```\n\n## Reading status \u0026 states\n\nTo avoid passing ```--mac``` for every call, set the following environment variable:\n\n```\nexport YEELIGHTBT_MAC=AA:BB:CC:11:22:33\n```\n\n```\n$ yeelightbt\n\nMAC: f8:24:41:xx:xx:xx\n  Mode: LampMode.White\n  Color: (0, 0, 0)\n  Temperature: 5000\n  Brightness: 50\n```\n\n```\n$ yeelightbt temperature\n\nTemperature: 5000\n```\n\n```\n$ yeelightbt color 255 0 0\nSetting color: 255 0 0\n```\n\n# Home Assistant support\n\nThis repository also contains a basic [Home Assistant](https://home-assistant.io/) custom component.\n\n## Yeelightbt installation on Home Assistant (for Raspberry Pi)\n\n1) SSH into the host through port 22222 to get all necessary privileges (follow setup [there](https://developers.home-assistant.io/docs/hassio_debugging/)).  /!\\ Using the SSH add-on will not work, it gives access to port 22. Use Putty for instance: \n```\nssh root@192.168.XX.XX -p 22222\n```\nYou will be logged into the Home Assistant command line interface and type `login` to access the host system.\n \n 2) Access the bash:\n```\ndocker exec -it $(docker ps -f name=homeassistant -q) bash\n```\n\n3) Yeelightbt requires bluepy and the installer may not find where it is located. Therefore, navigate to the package:\n```\ncd /usr/local/lib/python3.7/site-packages/bluepy\n```\n\n4) Install as mentionned above:\n```\npip install git+https://github.com/rytilahti/python-yeelightbt/\n```\n\n5) Ensure the light is ON and the switch is on the bluetooth position (at least for the Candela). Detect the supported devices and check if the lamp can be turned on/off with the commands described above.\n\n## Custom Component Installation\n\nCopy `yeelight_bt` directory located under `custom_components` over to `~/.homeassistant/custom_components/`.\n\n## Configuration\n\n```\nlight:\n  - platform: yeelight_bt\n    devices:\n      Bedside:\n        mac: 'f8:24:41:xx:xx:xx'\n```\n\n## Limitation\nWith the current custom component version, Home Assistant may lose the connection with the devices after a few minutes or hours. Home Assistant has to be restarted to reestablish this connection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frytilahti%2Fpython-yeelightbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frytilahti%2Fpython-yeelightbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frytilahti%2Fpython-yeelightbt/lists"}