{"id":30112447,"url":"https://github.com/nidhhoggr/iot-device-controller","last_synced_at":"2025-08-10T06:18:53.812Z","repository":{"id":299113015,"uuid":"1002101486","full_name":"nidhhoggr/iot-device-controller","owner":"nidhhoggr","description":"A Node.js script to discover and control TP-Link Tapo smart devices using their local API with Lodash utilities and command-line filtering.","archived":false,"fork":false,"pushed_at":"2025-06-25T22:18:53.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-25T23:26:10.013Z","etag":null,"topics":["smart-plug","tapo","tp-link"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/nidhhoggr.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":"2025-06-14T18:04:44.000Z","updated_at":"2025-06-25T22:18:56.000Z","dependencies_parsed_at":"2025-06-14T19:27:01.307Z","dependency_job_id":"b2e7c5ce-2567-4da4-8864-7b98309078ea","html_url":"https://github.com/nidhhoggr/iot-device-controller","commit_stats":null,"previous_names":["nidhhoggr/iot-device-controller"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nidhhoggr/iot-device-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidhhoggr%2Fiot-device-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidhhoggr%2Fiot-device-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidhhoggr%2Fiot-device-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidhhoggr%2Fiot-device-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nidhhoggr","download_url":"https://codeload.github.com/nidhhoggr/iot-device-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidhhoggr%2Fiot-device-controller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269684895,"owners_count":24458987,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["smart-plug","tapo","tp-link"],"created_at":"2025-08-10T06:18:48.708Z","updated_at":"2025-08-10T06:18:53.786Z","avatar_url":"https://github.com/nidhhoggr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IOT Device Controller\n\nA Node.js script to discover and control TP-Link Tapo smart devices using their local API with Lodash utilities and command-line filtering.\n\n## Features\n\n- 🔍 Scan network for Tapo devices\n- 🎛️ Control device power states (on/off)\n- 🔎 Filter devices by nickname\n- 📊 Detailed device information logging\n- 🔄 Automatic retry mechanism for failed operations\n\n## Prerequisites\n\n- Node.js 18.x or higher\n- TP-Link Tapo compatible smart devices\n- Network access to device IPs\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/nidhhoggr/iot-device-controller.git\ncd iot-device-controller\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Create a `config.json` file:\n```json\n{\n  \"tapo\": {\n    \"email\": \"your@tapo.email\",\n    \"password\": \"yourPassword123\"\n  },\n  \"plug_probe\": {\n    \"networkPrefix\": \"192.168.0\",\n    \"expectedResponse\": \"\u003chtml\u003e\u003cbody\u003e\u003ccenter\u003e200 OK\u003c/center\u003e\u003c/body\u003e\u003c/html\u003e\",\n    \"cacheTtlMs\": 1800000,\n    \"concurrentRequests\": 30,\n    \"cacheFile\": \"/../../cache/ip-scanner-cache.json\"\n    \"scanTimeout\": 5000\n  }\n}\n```\n\n## Usage\n\n### Basic Command\n```bash\nnode toggle.js\n```\n\n### Filter by Device Nickname\n```bash\nnode toggle.js --nickname \"Basking Lamp\"\n```\n\n### Enable Debug Logging\n```bash\nnode toggle.js --debug\n```\n\n### Help Menu\n```bash\nnode toggle.js --help\n```\n\n## Command Line Options\n\n| Option | Description |\n|--------|-------------|\n| `-n, --nickname` | Filter devices by nickname (partial match) |\n| `-d, --debug` | Enable verbose debug logging |\n| `-h, --help` | Display help information |\n\n## Code Structure\n\n```\niot-device-controller/\n├── src/\n│   ├── toggle.js              # Main control script\n│   ├── utils/                 # Utility modules\n│   └── iot-probe/             # Device discovery\n├── config.json                # Configuration file\n├── cache/                     # Cache directory\n├── package.json\n└── README.md\n```\n\n## Advanced Configuration\n\nModify `config.json` to adjust:\n\n- IP range for scanning\n- Scan timeout duration\n- Operation delay intervals\n- Retry attempt counts\n\n## Error Handling\n\nThe script includes comprehensive error handling for:\n\n- Device connection failures\n- Authentication errors\n- Network timeouts\n- Power state mismatches\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Disclaimer\n\nThis project is not affiliated with TP-Link. Use at your own risk with compatible Tapo devices.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnidhhoggr%2Fiot-device-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnidhhoggr%2Fiot-device-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnidhhoggr%2Fiot-device-controller/lists"}