{"id":36293812,"url":"https://github.com/antalaron/tapo-php","last_synced_at":"2026-01-11T10:01:31.462Z","repository":{"id":324019500,"uuid":"1095677601","full_name":"antalaron/tapo-php","owner":"antalaron","description":"PHP library for controlling TP-Link Tapo smart devices","archived":false,"fork":false,"pushed_at":"2025-11-13T12:52:37.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-16T15:25:56.157Z","etag":null,"topics":["iot","smart-home","tapo","tp-link"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/antalaron.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T11:22:06.000Z","updated_at":"2025-11-13T12:51:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/antalaron/tapo-php","commit_stats":null,"previous_names":["antalaron/tapo-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/antalaron/tapo-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antalaron%2Ftapo-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antalaron%2Ftapo-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antalaron%2Ftapo-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antalaron%2Ftapo-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antalaron","download_url":"https://codeload.github.com/antalaron/tapo-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antalaron%2Ftapo-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28299709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T08:21:30.231Z","status":"ssl_error","status_checked_at":"2026-01-11T08:21:26.882Z","response_time":60,"last_error":"SSL_read: 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":["iot","smart-home","tapo","tp-link"],"created_at":"2026-01-11T10:00:33.777Z","updated_at":"2026-01-11T10:01:31.448Z","avatar_url":"https://github.com/antalaron.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tapo PHP\n\nA PHP library for controlling TP-Link Tapo smart devices.\n\n[![CI](https://github.com/antalaron/tapo-php/workflows/CI/badge.svg)](https://github.com/antalaron/tapo-php/actions)\n\n## Acknowledgements\n\nThe implementation of this library was inspired by:\n- [almottier/TapoP100](https://github.com/almottier/TapoP100) - Original PHP implementation concept\n- [mihai-dinculescu/tapo](https://github.com/mihai-dinculescu/tapo) - Device support reference\n\n## Requirements\n\n- PHP 7.1 or higher\n\n## Installation\n\nInstall via Composer:\n\n```bash\ncomposer require antalaron/tapo\n```\n\n## Usage\n\n### Basic Example\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\nuse Antalaron\\Tapo\\Device;\n\n// Create a device instance\n$device = new Device('192.168.1.100', 'your-email@example.com', 'your-password');\n\n// Get device information\necho 'Model: '.$device-\u003egetModel().\"\\n\";\necho 'Name: '.$device-\u003egetDeviceName().\"\\n\";\n\n// Get device status (true = ON, false = off)\necho 'Device is '.($device-\u003egetStatus() ? 'ON' : 'OFF').\"\\n\";\n\n// Turn the device on\n$device-\u003eturnOn();\n\n// Turn the device off\n$device-\u003eturnOff();\n```\n\n## Supported Devices\n\nThe library supports a wide range of Tapo devices:\n\n### Smart Plugs\n- **P100, P105** - Basic smart plugs (on/off control)\n- **P110, P110M, P115** - Smart plugs with energy monitoring\n- **P300, P306, P304M, P316M** - Power strips with multiple outlets\n\n### Smart Bulbs\n- **L510, L520, L610** - Dimmable white bulbs\n- **L530, L535, L630** - Color bulbs with temperature control\n- **L900, L920, L930** - LED light strips (L920, L930 support lighting effects)\n\n## Available Methods\n\n### Common Methods (All Devices)\n\n```php\n// Get device information\n$info = $device-\u003egetDeviceInfo();\n$jsonInfo = $device-\u003egetDeviceInfoJson();\n\n// Device control\n$device-\u003egetDeviceName();\n$device-\u003egetDeviceUsage();\n$device-\u003erefreshSession();\n\n// Device management\n$device-\u003edeviceReboot();\n$device-\u003edeviceReset();\n```\n\n### Smart Plug Methods\n\n```php\n// Basic control\n$device-\u003eturnOn();\n$device-\u003eturnOff();\n\n// Delayed switching (countdown timer)\n$device-\u003eswitchWithDelay(true, 60); // Turn on after 60 seconds\n\n// Get countdown rules\n$rules = $device-\u003egetCountDownRules();\n```\n\n### Energy Monitoring (P110, P110M, P115)\n\n```php\n// Get current power consumption\n$power = $device-\u003egetCurrentPower();\n\n// Get energy data\n$energyData = $device-\u003egetEnergyData();\n$energyUsage = $device-\u003egetEnergyUsage();\n$powerData = $device-\u003egetPowerData();\n```\n\n### Smart Bulb Methods\n\n```php\n// Brightness control (all bulbs)\n$device-\u003esetBrightness(50); // 0-100\n\n// Color control (L530, L535, L630, L900, L920, L930)\n$device-\u003esetColor(120, 80); // hue (0-360), saturation (0-100)\n$device-\u003esetColor(120, 80, 75); // with brightness\n\n$device-\u003esetHueSaturation(180, 90);\n\n// Color temperature (L530, L535, L630, L900, L920, L930)\n$device-\u003esetColorTemperature(4000); // 2500-6500K\n$device-\u003esetColorTemperature(4000, 80); // with brightness\n\n// Lighting effects (L920, L930)\n$device-\u003esetLightingEffect('Aurora', ['brightness' =\u003e 80]);\n```\n\n### Power Strips (P300, P306, P304M, P316M)\n\n```php\n// Get child devices (individual outlets)\n$children = $device-\u003egetChildDeviceList();\n```\n\n## Feature Detection\n\nYou can check if a device supports a specific feature:\n\n```php\nif ($device-\u003esupportsFeature('set_color')) {\n    $device-\u003esetColor(240, 100);\n}\n```\n\n## Protocol Support\n\nThe library automatically detects and uses the appropriate protocol for your device. You can also specify a preferred protocol:\n\n```php\n// Force new protocol\n$device = new Device('192.168.1.100', 'email', 'password', 'new');\n\n// Force old protocol\n$device = new Device('192.168.1.100', 'email', 'password', 'old');\n```\n\n## Error Handling\n\nThe library throws `Antalaron\\Tapo\\Exception\\RuntimeException` when errors occur:\n\n```php\nuse Antalaron\\Tapo\\Exception\\RuntimeException;\n\ntry {\n    $device-\u003eturnOn();\n} catch (RuntimeException $e) {\n    echo sprintf('Error: %s', $e-\u003egetMessage());\n}\n```\n\n## License\n\nThis library is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantalaron%2Ftapo-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantalaron%2Ftapo-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantalaron%2Ftapo-php/lists"}