https://github.com/arronwoods/php-hive-v6
Hive home heating and smart devices PHP SDK
https://github.com/arronwoods/php-hive-v6
british-gas britishgas hive php sdk-php smarthome
Last synced: 2 months ago
JSON representation
Hive home heating and smart devices PHP SDK
- Host: GitHub
- URL: https://github.com/arronwoods/php-hive-v6
- Owner: arronwoods
- License: mit
- Created: 2017-03-05T23:01:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-30T22:03:55.000Z (almost 9 years ago)
- Last Synced: 2025-11-30T13:58:19.525Z (3 months ago)
- Topics: british-gas, britishgas, hive, php, sdk-php, smarthome
- Language: PHP
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-hive-v6
Hive home heating and smart devices PHP SDK
## Install
`$ composer require rb-cohen/php-hive-v6:dev-master`
## List devices
### Using the CLI script
`$ php bin/devices.php --username test@test.com --password 12345`
### Using the SDK
```php
$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 --on`
### Using the SDK
```php
$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 --brightness 50 --colour rgb(255, 221, 211) --on`
### Using the SDK
```php
$authentication = new Credentials($username, $password);
$client = new Client($authentication);
$bulb = new BulbColour($id, $client);
$bulb->on()
->setBrightness(50)
->setColour('#ff0000')
->apply();
```