{"id":21929199,"url":"https://github.com/achetronic/tapogo","last_synced_at":"2025-07-04T06:37:28.944Z","repository":{"id":211232986,"uuid":"728493578","full_name":"achetronic/tapogo","owner":"achetronic","description":"Control your Tapo SmartPlugs with Go","archived":false,"fork":false,"pushed_at":"2024-04-22T18:28:51.000Z","size":23,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T11:11:25.290Z","etag":null,"topics":["golang","library","smartplugs","tapo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/achetronic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-07T03:55:22.000Z","updated_at":"2025-03-26T10:41:08.000Z","dependencies_parsed_at":"2024-11-28T22:30:18.220Z","dependency_job_id":"9eef2af7-b17e-4086-9750-21543fd4fdde","html_url":"https://github.com/achetronic/tapogo","commit_stats":null,"previous_names":["achetronic/tapogo"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achetronic%2Ftapogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achetronic%2Ftapogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achetronic%2Ftapogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achetronic%2Ftapogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/achetronic","download_url":"https://codeload.github.com/achetronic/tapogo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249753088,"owners_count":21320664,"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":["golang","library","smartplugs","tapo"],"created_at":"2024-11-28T22:30:06.102Z","updated_at":"2025-04-19T17:51:52.606Z","avatar_url":"https://github.com/achetronic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tapogo\n\n![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/achetronic/tapogo)\n![GitHub](https://img.shields.io/github/license/achetronic/tapogo)\n[![Go Reference](https://pkg.go.dev/badge/github.com/achetronic/tapogo.svg)](https://pkg.go.dev/github.com/achetronic/tapogo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/achetronic/tapogo)](https://goreportcard.com/report/github.com/achetronic/tapogo)\n\n![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCeSb3yfsPNNVr13YsYNvCAw?label=achetronic\u0026link=http%3A%2F%2Fyoutube.com%2Fachetronic)\n![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/achetronic?style=flat\u0026logo=twitter\u0026link=https%3A%2F%2Ftwitter.com%2Fachetronic)\n\nA golang library (and CLI) to control your Tapo SmartPlugs `P100 / P110` with latest firmware versions\n\n\u003e At this moment, the library is not covering the whole API as it is discovered by reverse engineering\n\u003e If you want to cover more things, consider [contributing](#how-to-contribute)\n\n## Motivation\n\nI own several Tapo P100/P110 at home to control some appliances using custom automations \n[for example for the heater](https://github.com/achetronic/autoheater/). \nHonestly, I completely forgot to disable firmware updates, and before [Matter](https://csa-iot.org/all-solutions/matter/) \ndisabling updates is almost a requirement as automation manufacturers tends to modify their closed APIs in a way they \nchange almost everything from time to time, forcing you to do some reverse engineering.\n\nAs you can imagine, this project was created because of that, when some days ago, TPLink decided to switch from \n`securePassthrough` protocol to `KLAP` on `P100 / P110` plugs, and the library I use under the hood [does not seem\nto be actively maintained](https://github.com/richardjennings/tapo/issues/4#issuecomment-1840902314), \nso I decided to research and craft a new one on my own.\n\n\u003e This library does not pretend to cover all devices, not even all the protocol versions, but always the latest ones.\n\u003e As the project will use releases, you can select which version fit your needs\n\n## Library\n\n```golang\n    import (\n        \"github.com/achetronic/tapogo/pkg/tapogo\"\n    )\n\n    var tapoClient  *tapogo.Tapo\n    var err error\n\n    tapoClient, err = tapogo.NewTapo(\"192.168.0.100\", \"username\", \"password\", \u0026tapogo.TapoOptions{})\n\n    // Perform actions over the plug\n    response, err := tapoClient.TurnOn()\n    response, err  = tapoClient.TurnOff()\n\n    // Get data from device\n    response, err  = tapoClient.GetEnergyUsage()\n    response, err  = tapoClient.DeviceInfo()\n```\n\n## CLI\n\n`go install github.com/achetronic/tapogo`\n\n### Usage\n```\ntapogo \u003cip-address\u003e \u003cusername\u003e \u003cpassword\u003e [on, off, energy-usage, device-info]\n```\n\nFor example:\n\n```\ntapogo 192.168.0.100 email@address thepassword energy-usage\n{\n  \"error_code\": 0,\n  \"result\": {\n    \"current_power\": 0,\n    ...\n    \"month_energy\": 10000,\n    \"month_runtime\": 10000,\n    \"today_energy\": 400,\n    \"today_runtime\": 300\n  }\n}\n```\n\n## How to contribute\n\nOf course, we are open to external collaborations for this project. For doing it you must:\n\n* Open an issue to discuss what is needed and the reason\n* Fork the repository\n* Make your changes to the code\n* Open a PR. The code will be reviewed and tested (always)\n\n\u003e We are developers and hate bad code. For that reason we ask you the highest quality on each line of code to improve\n\u003e this project on each iteration.\n\n## License\n\nCopyright 2022.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n## Special mention\n\nThis project was done using IDEs from JetBrains. They helped us to develop faster, so we recommend them a lot! 🤓\n\n\u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png\" alt=\"JetBrains Logo (Main) logo.\" width=\"150\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachetronic%2Ftapogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fachetronic%2Ftapogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachetronic%2Ftapogo/lists"}