This is a modified fork of a tiny class to facilitate controlling the Yeelight WiFi bulbs by Xiaomi in PHP.
Function names are dynamic and correspond to the API endpoints.
This script has no external dependencies other than some PHP 5.x version and the sockets extension.
See the WIKI for more information.
You will need to enable wifi "LAN" mode for any bulbs you wish to control via the API from the Yeelight control applet.
For more information about Yeelight API: https://www.yeelight.com/en_US/developer
NOTE: It currently is not very PHP8 friendly - fixes coming soon.
- setDelay(value) sets the delay between commands, default is 100 as in the original. Delay can be reset with setDelay()
- setDebug(true/false) enables/disables debug messages for troubleshooting.
- setReuse(true/false) enables/disables using the same connection. (See Yeelight Bugs for potential issues enabling this)
- The constructor now uses the default port of 55443
- The constructor now accepts additional parameters (timeout,debug,reuse)
- Arrays can now be sent as arguments per Yeelight spec.
- Documentation via the repo WIKI.