https://github.com/bpolaszek/qivivo-php
Unofficial PHP client for Qivivo Thermostat API
https://github.com/bpolaszek/qivivo-php
Last synced: 10 months ago
JSON representation
Unofficial PHP client for Qivivo Thermostat API
- Host: GitHub
- URL: https://github.com/bpolaszek/qivivo-php
- Owner: bpolaszek
- License: mit
- Created: 2016-12-07T10:27:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-08T10:16:08.000Z (about 9 years ago)
- Last Synced: 2025-01-10T09:59:27.747Z (12 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bentools/qivivo-php - Unofficial PHP client for Qivivo Thermostat API
===============
Installation
-----
```
composer require bentools/qivivo-php
```
Usage
-----
```php
execute($qivivo->device()->getThermostatId());
var_dump($thermostatId); // string "5dcb767f-d652-446a-a7d4-c8b22f77a7e8"
// Retrieve current temperature
var_dump($qivivo->execute($qivivo->thermostat()->getTemperature($thermostatId))); // float 19.7
// Change temperature
$qivivo->execute($qivivo->thermostat()->setTemperature($thermostatId, 21.5, 45)); // Sets the temperature to 21.5°C for 45 minutes
```
Contribute
------
This is a very early draft to wrap the Qivivo API.
Don't hesitate to contribute and add some tests.
License
------
MIT