2017 © Pedro Peláez
 

library php-hive-v6

PHP SDK for controlling Hive using the v6 API

image

rb-cohen/php-hive-v6

PHP SDK for controlling Hive using the v6 API

  • Friday, March 31, 2017
  • by rb-cohen
  • Repository
  • 2 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

php-hive-v6

Hive home heating and smart devices PHP SDK, (*1)

Install

$ composer require rb-cohen/php-hive-v6:dev-master, (*2)

List devices

Using the CLI script

$ php bin/devices.php --username test@test.com --password 12345, (*3)

Using the SDK

$authentication = new Credentials($username, $password);
$client = new Client($authentication);

$devices = new Devices($client);
$list = $devices->all();

Control smart plug

Using the CLI script

$ php bin/smartPlug.php --username test@test.com --password 12345 --id <id> --on, (*4)

Using the SDK

$authentication = new Credentials($username, $password);
$client = new Client($authentication);

$plug = new SmartPlug($id, $client);
$plug->on()
     ->apply();

Control colour bulb

Using the CLI script

$ php bin/bulb.php --username test@test.com --password 12345 --id <id> --brightness 50 --colour rgb(255, 221, 211) --on, (*5)

Using the SDK

$authentication = new Credentials($username, $password);
$client = new Client($authentication);

$bulb = new BulbColour($id, $client);
$bulb->on()
     ->setBrightness(50)
     ->setColour('#ff0000')
     ->apply();

The Versions

31/03 2017

dev-master

9999999-dev

PHP SDK for controlling Hive using the v6 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arron Woods