{"id":20339866,"url":"https://github.com/uditkarode/wikari","last_synced_at":"2025-04-11T23:16:32.132Z","repository":{"id":61494257,"uuid":"552011498","full_name":"uditkarode/wikari","owner":"uditkarode","description":"💡 A NodeJS TS library to control Philips WiZ bulbs.","archived":false,"fork":false,"pushed_at":"2024-06-23T17:34:29.000Z","size":49,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T23:16:26.104Z","etag":null,"topics":["bulb","iot","library","philips","smart-bulb","ts","types","typescript","wiz"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uditkarode.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}},"created_at":"2022-10-15T16:02:26.000Z","updated_at":"2025-01-03T14:58:08.000Z","dependencies_parsed_at":"2022-10-18T21:00:29.649Z","dependency_job_id":null,"html_url":"https://github.com/uditkarode/wikari","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditkarode%2Fwikari","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditkarode%2Fwikari/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditkarode%2Fwikari/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditkarode%2Fwikari/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uditkarode","download_url":"https://codeload.github.com/uditkarode/wikari/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492884,"owners_count":21113163,"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","iot","library","philips","smart-bulb","ts","types","typescript","wiz"],"created_at":"2024-11-14T21:18:49.750Z","updated_at":"2025-04-11T23:16:32.114Z","avatar_url":"https://github.com/uditkarode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wikari\n\nA Node JS library to control **Philips WiZ smart bulbs**, written in TypeScript.\n\nWikari is very strongly typed!\n\n# Installation\n```bash\n$ npm i wikari\n```\n\n# API\n\nThe library is fairly simple to use, since you're mostly going to deal with `Bulb` objects:\n\n```typescript\nimport { discover, SCENES } from \"wikari\";\n\nconst bulbs = await discover({});\n\nconst bulb = bulbs[0];\n\nif (!bulb) return console.log(\"No bulbs found!\");\n\n// get the current state of the bulb\n// WiZ calls the bulb state \"pilot\"\n// so you have \"setPilot\" and \"getPilot\"\nconsole.log(await bulb.getPilot());\n\n// whenever the bulb sends a message, log it to the console\nbulb.onMessage(console.log);\n\n// turn the bulb on\nawait bulb.turn(true);\n\n// set the color to red\nawait bulb.color(\"#f44336\");\n\n// set the color to some cool and some warm white\nawait bulb.color({ c: 40, w: 40 });\n\n// set the scene to \"TV Time\"\nawait bulb.scene(SCENES[\"TV Time\"]);\n\n// set the bulb to 10_000K white\nawait bulb.white(10_000);\n\n// set the bulb brightness to 40%\nawait bulb.brightness(40);\n\n// toggle the bulb (turns it off since it was already on)\nawait bulb.toggle();\n\nbulb.closeConnection();\n```\n\n# Subscription\n\nIt's possible to subscribe to updates from the bulb.\n\n```typescript\nawait bulb.subscribe();\n\nbulb.onSync(syncPilotMsg =\u003e {\n\t// syncPilotMsg is the updated state of the bulb\n\t// it sends a syncPilot message on state change.\n\t// so for example, if you change the state using\n\t// the WiZ app on your phone, the changes will\n\t// show up here as well.\n});\n```\n\n# TSDoc\n\nMost of the functions have TSDoc comments, so you can either hover over them and your IDE will display it,\nor just skim through the library source code to find it.\n\n# Advanced Usage\n\nIf you want complete control over the bulb, or want to mix and match various settings, you can try using the `setPilot` or `sendRaw` functions.\nHowever, you should mostly find the functions in the example above to be enough.\n\n---\n### What's Wikari?\nIt's supposed to be WiZ + Hikari (光, \"light\" in Japanese)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuditkarode%2Fwikari","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuditkarode%2Fwikari","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuditkarode%2Fwikari/lists"}