定制 bentools/qivivo-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bentools/qivivo-php

Composer 安装命令:

composer require bentools/qivivo-php

包简介

Unofficial PHP client for Qivivo Thermostat API

README 文档

README

Installation

composer require bentools/qivivo-php

Usage

<?php
$clientId = 'myClientId';
$clientSecret = 'myClientSecret'; // To obtain those credentials, please contact Qivivo support.
$qivivo = new \BenTools\Qivivo\Client(new \GuzzleHttp\Client(), $clientId, $clientSecret);


// Retrieve main thermostat UUID
$thermostatId = $qivivo->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

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固