dev-master
9999999-devPhillips Hue API integration
MIT
The Requires
- php >=5.5.9
- guzzlehttp/guzzle ~6.0
- jms/serializer ^1.1
The Development Requires
by Daniel Steiner
hue phillips
Wallogit.com
2017 © Pedro Peláez
Phillips Hue API integration
Provides basic functionality for the Philllips Hue debug API, (*2)
Installation, (*3)
composer require dsteiner23/phillips-hue-connection
Autoloading, (*4)
Register vendor autoloader and doctrine somewhere in your bootstraping file, (*5)
require __DIR__ . '/vendor/autoload.php';
Configuration, (*6)
The configuration is optional and can be used to overwrite caching defaults, (*7)
$config = [
'cache_enabled' => false, // default to true
'cache_dir' => __DIR__ . '/yourDir' // default to ROOT_DIR/cache
];
Usage, (*8)
$lightSwitch = \DSteiner23\Light\Factory\LightSwitchFactory::build(
'192.168.100.1',
'abcedefghijklmno',
$config
);
// Change saturation, brightness and color of a single bulb
$lightSwitch->switchState($id, $saturation, $brightness, $hue);
// Switches a single bulb on
$lightSwitch->switchOn($id);
// Switches a single bulb off
$lightSwitch->switchOff($id);
// Get an instance of DSteiner23\Light\Models\Lights, representing all Bulbs connected to the Bridge
$lightSwitch->getLights();
*$id: The unique Id of your Bulb
*$saturation: integer 0-255
*$brightness: integer 0-255
*$hue: The color 0 - 65000
Phillips Hue API integration
MIT
hue phillips