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
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.
$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.