{"id":23817853,"url":"https://github.com/lsongdev/node-yeelight","last_synced_at":"2025-06-23T13:35:26.877Z","repository":{"id":57403487,"uuid":"78356238","full_name":"lsongdev/node-yeelight","owner":"lsongdev","description":":bulb: A Node.js Library for the Yeelight smart bulb ","archived":false,"fork":false,"pushed_at":"2024-04-29T14:50:00.000Z","size":63,"stargazers_count":88,"open_issues_count":1,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-22T21:52:19.808Z","etag":null,"topics":["bulb","hardware","iot","iot-application","ssdp","yeelight"],"latest_commit_sha":null,"homepage":"https://npmjs.org/yeelight2","language":"JavaScript","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/lsongdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"github":"song940","patreon":"song940","open_collective":"song940","ko_fi":"song940","tidelift":"npm/yeelight2","custom":"https://git.io/fjRcB"}},"created_at":"2017-01-08T16:41:00.000Z","updated_at":"2025-05-26T17:15:14.000Z","dependencies_parsed_at":"2024-04-29T16:06:10.949Z","dependency_job_id":null,"html_url":"https://github.com/lsongdev/node-yeelight","commit_stats":{"total_commits":21,"total_committers":5,"mean_commits":4.2,"dds":"0.38095238095238093","last_synced_commit":"01220d82b616cb4fa27b065998c782fee845529f"},"previous_names":["lsongdev/node-yeelight","song940/node-yeelight"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lsongdev/node-yeelight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsongdev%2Fnode-yeelight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsongdev%2Fnode-yeelight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsongdev%2Fnode-yeelight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsongdev%2Fnode-yeelight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsongdev","download_url":"https://codeload.github.com/lsongdev/node-yeelight/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsongdev%2Fnode-yeelight/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261487401,"owners_count":23166079,"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","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":["bulb","hardware","iot","iot-application","ssdp","yeelight"],"created_at":"2025-01-02T05:48:54.559Z","updated_at":"2025-06-23T13:35:21.864Z","avatar_url":"https://github.com/lsongdev.png","language":"JavaScript","funding_links":["https://github.com/sponsors/song940","https://patreon.com/song940","https://opencollective.com/song940","https://ko-fi.com/song940","https://tidelift.com/funding/github/npm/yeelight2","https://git.io/fjRcB"],"categories":[],"sub_categories":[],"readme":"## Yeelight ![Yeelight2](https://img.shields.io/npm/v/yeelight2.svg)\n\n\u003e A Node.js lib for the yeelight bulb\n\n### Installation\n\n```bash\n$ npm i yeelight2 --save\n```\n\n### Simple example\n\n```js\nconst Yeelight = require('yeelight2');\n\n(async () =\u003e { \n  const light = await Yeelight.find();\n  console.log(light.name);\n  light.toggle();\n})();\n```\n\nDiscover all devices in the network.\n\n```js\nconst Yeelight = require('yeelight2');\n\nYeelight.discover(function(light){\n\n  console.log(light.name);\n\n  function blink(){\n    light.toggle();\n  }\n\n  setInterval(blink, 2000);\n\n  // `Yeelight.discover` can discover multiple devices untill the ssdp close.\n  // So you need to close it manually. DO NOT FORGET IT.\n  // Here is an example to close it after find the first device.\n  // const discover = this;\n  // discover.close(); // stop searching\n});\n```\n\nHere is an example to close it after 10 seconds.\n\n```js\nconst discover = Yeelight.discover(light =\u003e {\n  console.log(light.name);\n});\n\nsetTimeout(() =\u003e {\n  discover.close(); // stop searching\n}, 10000);\n```\n\nFor a complete example look at \u003cexample/index.js\u003e .\n\n\n### Debug\n\n```shell\nNODE_DEBUG=yeelight\n```\n\nThen start your app.\n\n### Documentation\n\nsee https://lsong.org/node-yeelight\n\n### Contributing\n- Fork this Repo first\n- Clone your Repo\n- Install dependencies by `$ npm install`\n- Checkout a feature branch\n- Feel free to add your features\n- Make sure your features are fully tested\n- Publish your local branch, Open a pull request\n- Enjoy hacking \u003c3\n\n### Golang Implementation\n\n\u003e Golang API for Yeelight\n\u003e \n\u003e https://github.com/song940/yeelight-go\n\n### MIT\n\nCopyright (c) 2016 Lsong \u0026lt;song940@gmail.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsongdev%2Fnode-yeelight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsongdev%2Fnode-yeelight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsongdev%2Fnode-yeelight/lists"}