samaphp/lifxlan

LIFX LAN protocol library

0.1.4 2019-12-13 21:46 UTC

This package is auto-updated.

Last update: 2024-05-14 07:11:52 UTC


README

LifxLan protocol. (Work in progress)

Note: This library is not ready for use in production. And does not cover all API capabilities. I just built it for my self to

Setting light color by name:

$light_ip = '192.168.1.x';
$Light = new Light($light_ip);
$brightness = 40;
$Light->setColorByName('white_warm', $brightness);

// Set light power on.
$Light->setPowerStatus('on');

// Set light power off.
$Light->setPowerStatus('off');

Advanced use:

// Set a custom value for the connection timeout.
$Light->setTimeout(2);

// Custom timeout per method.
$Light->setTimeout(1)->setColorByName('white_cool', 10);