{"id":13588716,"url":"https://github.com/plasticrake/tplink-smarthome-api","last_synced_at":"2025-05-15T09:05:11.990Z","repository":{"id":9746694,"uuid":"63196852","full_name":"plasticrake/tplink-smarthome-api","owner":"plasticrake","description":"TP-Link Smarthome WiFi API","archived":false,"fork":false,"pushed_at":"2023-11-15T17:17:52.000Z","size":3239,"stargazers_count":1034,"open_issues_count":14,"forks_count":143,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-04-07T03:17:55.472Z","etag":null,"topics":["kasa","smartbulb","smarthome","smartplug","tplink"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/plasticrake.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":"plasticrake"}},"created_at":"2016-07-12T22:34:02.000Z","updated_at":"2025-03-24T12:53:49.000Z","dependencies_parsed_at":"2023-01-16T19:45:58.553Z","dependency_job_id":"7bb1b6f6-f4ac-4738-9c69-2de0678e06b4","html_url":"https://github.com/plasticrake/tplink-smarthome-api","commit_stats":{"total_commits":453,"total_committers":9,"mean_commits":"50.333333333333336","dds":0.02428256070640178,"last_synced_commit":"c6bb459c69eb554b2001dc5f7f07bfe06c500229"},"previous_names":["plasticrake/hs100-api"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plasticrake","download_url":"https://codeload.github.com/plasticrake/tplink-smarthome-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248890669,"owners_count":21178483,"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":["kasa","smartbulb","smarthome","smartplug","tplink"],"created_at":"2024-08-01T15:06:52.972Z","updated_at":"2025-04-14T13:47:22.944Z","avatar_url":"https://github.com/plasticrake.png","language":"TypeScript","funding_links":["https://github.com/sponsors/plasticrake"],"categories":["TypeScript","others"],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD007 MD012 MD033 --\u003e\n\n# tplink-smarthome-api\n\n[![NPM Version](https://img.shields.io/npm/v/tplink-smarthome-api.svg)](https://www.npmjs.com/package/tplink-smarthome-api)\n[![Build Status](https://github.com/plasticrake/tplink-smarthome-api/workflows/CI/badge.svg?branch=main)](https://github.com/plasticrake/tplink-smarthome-api/actions?query=workflow%3ACI+branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/plasticrake/tplink-smarthome-api/badge.svg?branch=master)](https://coveralls.io/github/plasticrake/tplink-smarthome-api?branch=master)\n\nTP-Link Smarthome API\n\n**[Changelog](https://github.com/plasticrake/tplink-smarthome-api/tree/main/CHANGELOG.md)**\n\n## Known Supported Devices\n\n| Model                                                                                                    | Type               |\n| -------------------------------------------------------------------------------------------------------- | ------------------ |\n| HS100, HS103, HS105, HS107, HS110,\u003cbr/\u003eHS200, HS210, HS220, HS300, KP303, KP400\u003cbr/\u003eES20M, EP40, ...etc. | Plug               |\n| LB100, LB110, LB120, LB130, LB200, LB230, KL50, KL120, KL125\u003cbr/\u003e...etc.                                 | Bulb               |\n| KL430\u003cbr/\u003e...etc.                                                                                        | Bulb (light strip) |\n\nMany other TP-Link Plug and Bulb models may work as well. Note that Tapo devices are not supported.\n\n## Related Projects\n\n- [TP-Link Smarthome Device Simulator](https://github.com/plasticrake/tplink-smarthome-simulator) - Useful for automated testing\n- [TP-Link Smarthome Crypto](https://github.com/plasticrake/tplink-smarthome-crypto)\n- [TP-Link Smarthome Homebridge Plugin](https://github.com/plasticrake/homebridge-tplink-smarthome)\n\n## Examples\n\nSee more [examples](https://github.com/plasticrake/tplink-smarthome-api/tree/main/examples).\n\n```javascript\nconst { Client } = require('tplink-smarthome-api');\n\nconst client = new Client();\nconst plug = client.getDevice({ host: '10.0.1.2' }).then((device) =\u003e {\n  device.getSysInfo().then(console.log);\n  device.setPowerState(true);\n});\n\n// Look for devices, log to console, and turn them on\nclient.startDiscovery().on('device-new', (device) =\u003e {\n  device.getSysInfo().then(console.log);\n  device.setPowerState(true);\n});\n```\n\n## CLI\n\nInstall the command line utility with `npm install -g tplink-smarthome-api`. Run `tplink-smarthome-api --help` for help.\n\n## API\n\n[API docs can be found here.](https://plasticrake.github.io/tplink-smarthome-api/)\n\nFor functions that send commands, the last argument is `SendOptions` where you can set the `transport` ('tcp','udp') and `timeout`, etc.\n\nFunctions that take more than 3 arguments are passed a single options object as the first argument (and if its a network command, SendOptions as the second.)\n\n## Credits\n\nThanks to George Georgovassilis and Thomas Baust for [figuring out the HS1XX encryption](https://blog.georgovassilis.com/2016/05/07/controlling-the-tp-link-hs100-wi-fi-smart-plug/).\n\nSome design cues for Client based on [node-lifx](https://github.com/MariusRumpf/node-lifx/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasticrake%2Ftplink-smarthome-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplasticrake%2Ftplink-smarthome-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasticrake%2Ftplink-smarthome-api/lists"}