{"id":39990712,"url":"https://github.com/jkbenaim/hs100","last_synced_at":"2026-01-19T00:38:26.478Z","repository":{"id":56408364,"uuid":"147573394","full_name":"jkbenaim/hs100","owner":"jkbenaim","description":"CLI tool for TP-Link and Kasa WiFi smart plugs.","archived":false,"fork":false,"pushed_at":"2025-04-30T19:37:47.000Z","size":53,"stargazers_count":74,"open_issues_count":9,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-30T20:42:48.523Z","etag":null,"topics":["c","iot","smartplug","tp-link-hs100","tp-link-hs105","tp-link-hs110"],"latest_commit_sha":null,"homepage":"","language":"C","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/jkbenaim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-09-05T20:05:42.000Z","updated_at":"2025-04-30T19:37:51.000Z","dependencies_parsed_at":"2025-04-30T20:37:23.260Z","dependency_job_id":"e3d826af-de1f-4eaa-b621-5b8d83b2ccba","html_url":"https://github.com/jkbenaim/hs100","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jkbenaim/hs100","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbenaim%2Fhs100","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbenaim%2Fhs100/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbenaim%2Fhs100/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbenaim%2Fhs100/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkbenaim","download_url":"https://codeload.github.com/jkbenaim/hs100/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbenaim%2Fhs100/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28554749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T23:48:35.235Z","status":"ssl_error","status_checked_at":"2026-01-18T23:47:49.178Z","response_time":98,"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":["c","iot","smartplug","tp-link-hs100","tp-link-hs105","tp-link-hs110"],"created_at":"2026-01-19T00:38:25.833Z","updated_at":"2026-01-19T00:38:26.473Z","avatar_url":"https://github.com/jkbenaim.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hs100\n\nA tool for using TP-Link HS100/HS103/HS105/HS110/HS300 wi-fi smart plugs.\nYou can turn them on and off, reboot them, and so on. You can even set them up without using TP-Link's app (see Initial Setup).\n\nTested to work on Linux, OSX, IRIX, and Windows under WSL.\n\nLoosely based on [pyHS100](https://github.com/GadgetReactor/pyHS100) and\n[research from softScheck](https://www.softscheck.com/en/reverse-engineering-tp-link-hs110/).\n\n## Usage\n\n`hs100 \u003cip\u003e \u003ccommand\u003e`\n\nCommands:\n- `associate \u003cssid\u003e \u003ckey\u003e \u003ckey_type\u003e`: set wifi AP to connect to. get your\nkey\\_type by doing a scan\n- `info`: get device information including device IDs\n- `emeter`: realtime power consumption (works with HS110 and HS300)\n- `factory-reset`: reset the plug to factory settings\n- `off`: turn the power off\n- `on`: turn the power on\n- `reboot`: reboot the plug\n- `scan`: scan for nearby wifi APs (probably only 2.4 GHz ones)\n- `set_server \u003curl\u003e`: set cloud server to \\\u003curl\\\u003e instead of TP-Link's\n- Alternatively, you can supply a JSON string to be sent directly to the\ndevice. Note that the JSON string must be quoted, like so:\n`hs100 \u003cip\u003e '{\"system\":{\"set_relay_state\":{\"state\":1}}}'`\n\n### Use with Outlet Strips (such as HS300)\n\nThe `emeter`, `off` and `on` commands can be used on the individual outlets of multiple outlet strips.\n\n- use the `info` command to get the ID string of the outlet you want to control\n- append the ID string to the command line for `emeter`, `off` or `on` like so:\n`hs100 \u003cip\u003e on 80062947BE0A1339DC7914B75B24A6A51FB6977E02`\n\n## Initial Setup\n\nAccording to TP-Link, initial setup of the plugs is performed by installing\ntheir \"Kasa\" app on your smartphone (free account required), and using its\nsetup tool. This sucks and I do not recommend it. Instead, follow these\nalternative instructions.\n\nYou want to get the plug into the \"blinking amber and blue\" state, in which\nit will spin up its own AP and await commands. If you have a brand new plug,\nthen it should do this automatically. Otherwise, hold down one of the buttons\n(depending on your model) for about 5 seconds, until its light blinks amber\nand blue.\n\nYou should see a wifi AP called \"TP-Link\\_Smart Plug\\_XXXX\" or similar.\nConnect to this AP. You will be given an IP of 192.168.0.100, with the plug\nat 192.168.0.1.\n\nIssue the following commands to the plug:\n- Factory reset the plug to get rid of any settings from a previous owner:\n`hs100 192.168.0.1 factory-reset`. You will be disconnected from its wifi AP.\nOnce the factory reset is done (usually a few seconds), reconnect to the\nplug's AP.\n- Disable cloud nonsense by setting a bogus server URL: `hs100 192.168.0.1 set_server localhost`\n- Scan for your wifi AP using `hs100 192.168.0.1 scan`. Find your AP in the\nlist and note its `key_type`; you will need this to associate.\n- Associate with your AP using `hs100 192.168.0.1 associate \u003cssid\u003e \u003cpassword\u003e \u003ckey_type\u003e`\n. Your key\\_type is a number that indicates the kind of wifi security that\nyour AP is using. You can find it by doing a wifi scan (see previous step).\n\nIf the light turns solid amber, then it was unable to associate-- factory\nreset the plug and try again. Otherwise, the light on your plug will change\nfirst to blinking blue, then to solid blue indicating that it has successfully\nconnected to your AP.\n\n## Build\n\nUbuntu instructions\nYou will need `build-essential` installed. Then run `make`. This will produce a `hs100` binary which you can use. E.g. `./hs100 192.168.0.1 off`\n\n## Todo\n\n- better error checking\n- plug discovery\n\nThis program is very basic. Patches welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkbenaim%2Fhs100","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkbenaim%2Fhs100","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkbenaim%2Fhs100/lists"}