a15lam / php-wemo
PHP 库,用于控制 Wemo 设备。
0.2.2
2017-06-10 17:44 UTC
Requires
- php: >=5.6
- a15lam/workspace: ~0.1.0
- clue/ssdp-react: dev-master
This package is auto-updated.
Last update: 2024-08-29 04:36:45 UTC
README
PHP 库,用于控制 Wemo 设备。
当前支持...
- Wemo 灯泡 - 开/关/调光
- Wemo 开关 - 开/关
- Wemo 开关(插座) - 开/关
- Wemo 智能开关 - 开/关/参数
- 设备发现
- Wemo 桥接器下的分组设备
入门
git clone https://github.com/a15lam/php-wemo.git cd php-wemo composer update php example/console.php // An example command line app to control your wemo devices.
使用方法
$lightSwitch = \a15lam\PhpWemo\Discovery::getDeviceByName('Bed Room Light'); // Use your wemo device name as they show on your wemo app. Supports grouped devices $lightSwitch->On(); sleep(2); // Allow a moment to see the light turning on. $lightSwitch->Off(); // Get switch status echo $lightSwitch->status();
查看示例目录获取更多使用方法。通过命令行运行 example/console.php 以控制您的设备。