{"id":18390187,"url":"https://github.com/v-2841/tapo_socket_charging","last_synced_at":"2025-07-30T15:06:48.089Z","repository":{"id":227610028,"uuid":"771357470","full_name":"v-2841/tapo_socket_charging","owner":"v-2841","description":"This repository contains code for controlling a Tapo socket based on battery percentage of the host system","archived":false,"fork":false,"pushed_at":"2024-03-14T07:36:17.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T06:57:30.854Z","etag":null,"topics":["python3","pywin32"],"latest_commit_sha":null,"homepage":"","language":"Python","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/v-2841.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}},"created_at":"2024-03-13T06:37:11.000Z","updated_at":"2024-03-13T13:26:15.000Z","dependencies_parsed_at":"2024-03-14T08:52:47.811Z","dependency_job_id":null,"html_url":"https://github.com/v-2841/tapo_socket_charging","commit_stats":null,"previous_names":["v-2841/tapo_socket_charging"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-2841%2Ftapo_socket_charging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-2841%2Ftapo_socket_charging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-2841%2Ftapo_socket_charging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-2841%2Ftapo_socket_charging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v-2841","download_url":"https://codeload.github.com/v-2841/tapo_socket_charging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530583,"owners_count":21119595,"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":["python3","pywin32"],"created_at":"2024-11-06T01:46:39.280Z","updated_at":"2025-04-12T06:57:33.651Z","avatar_url":"https://github.com/v-2841.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Charging Control\nThis repository contains code for controlling a Tapo socket based on battery percentage of the host system. It ensures the socket is turned on when the battery falls below a certain threshold and turned off when the battery reaches a certain level while charging.\n\n## Setup\n1. Clone the repository and navigate to it in the command line:\n```bash\ngit clone git@github.com:v-2841/tapo_socket_charging.git\ncd tapo_socket_charging\n```\n2. Create and activate a virtual environment:\n```bash\npython -m venv venv\nsource venv/Scripts/activate\n```\n3. Install dependencies from the requirements.txt file:\n```bash\npip install -r requirements.txt\n```\n\n## Usage\nThe `charging.py` script monitors the battery percentage of the host system and controls the Tapo socket accordingly.\nTo use the script, run the following command in virtual environment:\n```bash\npython charging.py\n```\n\n### Command Line Arguments\n-   `--add-to-taskschd`: Adds the script to Windows Task Scheduler to run at user logon.\n-   `--remove-from-taskschd`: Removes the script from Windows Task Scheduler.\n\n## Code Structure\nThe code consists of two main Python scripts:\n1.  `charging.py`: This script monitors the battery percentage and controls the Tapo socket accordingly.\n2.  `taskschd.py`: This script contains functions to add and remove the main script from Windows Task Scheduler.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-2841%2Ftapo_socket_charging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv-2841%2Ftapo_socket_charging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-2841%2Ftapo_socket_charging/lists"}