Hive home heating and smart devices PHP SDK
$ composer require rb-cohen/php-hive-v6:dev-master
$ php bin/devices.php --username [email protected] --password 12345
$authentication = new Credentials($username, $password);
$client = new Client($authentication);
$devices = new Devices($client);
$list = $devices->all();
$ php bin/smartPlug.php --username [email protected] --password 12345 --id <id> --on
$authentication = new Credentials($username, $password);
$client = new Client($authentication);
$plug = new SmartPlug($id, $client);
$plug->on()
->apply();
$ php bin/bulb.php --username [email protected] --password 12345 --id <id> --brightness 50 --colour rgb(255, 221, 211) --on
$authentication = new Credentials($username, $password);
$client = new Client($authentication);
$bulb = new BulbColour($id, $client);
$bulb->on()
->setBrightness(50)
->setColour('#ff0000')
->apply();