a15lam / php-iot
PHP library for controlling household IoT devices.
0.1.3
2017-07-02 04:46 UTC
Requires
- php: >=5.6
- a15lam/php-wemo: ~0.2.0
- a15lam/workspace: ~0.1.0
This package is auto-updated.
Last update: 2024-12-29 05:10:26 UTC
README
PHP library to control Wemo devices and Sonoff with custom firmware found here.
Currently supports...
- Wemo light bulb - on/off/dimming/status
- Wemo light switch - on/off/status
- Wemo switch (socket) - on/off/status
- Wemo insight switch - on/off/params/status
- Sonoff switch (custom firmware) - on/off/status
- Grouped devices under wemo bridge
- Device discovery
Getting started:
git clone https://github.com/a15lam/php-iot.git cd php-iot composer install php example/console.php // An example command line app to control your wemo devices.
Usage:
$lightSwitch = \a15lam\PhpIot\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();
Check the example directory for more usage. Run example/console.php from command line to control your devices.