Skip to content

Provides basic functionality for the Philllips Hue debug API

License

Notifications You must be signed in to change notification settings

yndlingsfar/phillips-hue-connection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packagist License Build Status Latest Stable Version

phillips-hue-connection

Provides basic functionality for the Philllips Hue debug API

Installation

composer require dsteiner23/phillips-hue-connection

Autoloading

Register vendor autoloader and doctrine somewhere in your bootstraping file

require __DIR__ . '/vendor/autoload.php';

Configuration

The configuration is optional and can be used to overwrite caching defaults

$config = [
    'cache_enabled' => false, // default to true
    'cache_dir' => __DIR__ . '/yourDir' // default to ROOT_DIR/cache
];

Usage

$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

About

Provides basic functionality for the Philllips Hue debug API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages