定制 ebaschiera/pvoutput 二次开发

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

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

ebaschiera/pvoutput

最新稳定版本:v1.2.0

Composer 安装命令:

composer require ebaschiera/pvoutput

包简介

PVOutput.org API implementation

README 文档

README

Implementation of PVOutput.org API. For more information, see http://www.pvoutput.org/help.html#api-spec

Methods currently implemented are:

This is a simple PHP class that can be used in a larger project to delegate communication with PVOutput. It is not a monitoring application.

Please note that not all API parameters are handled by this class methods. Parameters coverage is:

  • Add Output
  • d
  • g
  • e
  • pp
  • pt
  • c
  • Get Output
  • df
  • dt
  • a
  • limit
  • tid
  • sid1
  • Add Status
  • d
  • t
  • v2
  • v4

Missing parameters will be implemented in the future.

Installation

Composer

From the Command Line:

composer require ebaschiera/pvoutput:1.1.*

In your composer.json:

{
    "require": {
        "ebaschiera/pvoutput": "1.1.*"
    }
}

Manually

Just download the release package, put src/PVOutput.php inside your project tree and you are set.

Basic usage

Please note that not all API method parameters are handled by this class.

//during the day
$pvoutput = new \PVOutput\PVOutput($system_id, $api_key);
$pvoutput->addStatus(2500, 1500); //sends instant generation and consumption


//at the end of the day
$pvoutput = new \PVOutput\PVOutput($system_id, $api_key);
$pvoutput->addOutput(NULL, 9000, 3100, $peak_output_datetime, 8000, 1000);
//sends generated energy, peak generation power, peak generation datetime, consumed energy, exported energy


//get a full month aggregated output
$start_date = \DateTime::createFromFormat('Ymd', '20150401');
$end_date = \DateTime::createFromFormat('Ymd', '20150430');
$pvoutput = new \PVOutput\PVOutput($system_id, $api_key);
$pvoutput->getOutput($start_date, $end_date, 'm');

License

This software is provided as is, according to GPL-2. See the LICENSE file for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-03-16