dev-master
9999999-devPHP SDK for controlling Hive using the v6 API
MIT
The Requires
The Development Requires
by Arron Woods
Wallogit.com
2017 © Pedro Peláez
PHP SDK for controlling Hive using the v6 API
Hive home heating and smart devices PHP SDK, (*1)
$ composer require rb-cohen/php-hive-v6:dev-master, (*2)
$ php bin/devices.php --username test@test.com --password 12345, (*3)
$authentication = new Credentials($username, $password); $client = new Client($authentication); $devices = new Devices($client); $list = $devices->all();
$ php bin/smartPlug.php --username test@test.com --password 12345 --id <id> --on, (*4)
$authentication = new Credentials($username, $password);
$client = new Client($authentication);
$plug = new SmartPlug($id, $client);
$plug->on()
->apply();
$ php bin/bulb.php --username test@test.com --password 12345 --id <id> --brightness 50 --colour rgb(255, 221, 211) --on, (*5)
$authentication = new Credentials($username, $password);
$client = new Client($authentication);
$bulb = new BulbColour($id, $client);
$bulb->on()
->setBrightness(50)
->setColour('#ff0000')
->apply();
PHP SDK for controlling Hive using the v6 API
MIT