定制 turbopixel/deye-inverter-status 二次开发

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

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

turbopixel/deye-inverter-status

最新稳定版本:1.1.0

Composer 安装命令:

composer require turbopixel/deye-inverter-status

包简介

Simple library for reading Deye inverter status information.

README 文档

README

Simple library for reading Deye inverter status information.

Reads the current deye inverter status and returns all information in an array. This script accesses the inverter and reads out the status.html page, which contains all necessary information from the inverter.

Works with DEYE SUN600 / SUN800.

Features

  • Lightweight - Portable with only one file
  • Easy - Easy to use, minimal requirements.
  • Free - Open source and licensed under MIT license

Requirement

  • PHP Version >= 8.2
  • PHP Modules ext-curl, ext-dom

Installation

Install via composer

Add turbopixel/deye-inverter-status to the composer.json file.

composer require turbopixel/deye-inverter-status

And update composer

composer update

Alternative clone this repository:

git clone git@github.com:turbopixel/deye-inverter-status.git

Example

It is important that the inverter is connected to the same network!

The library is designed to be very simple. Copy the following code, adjust the variables and execute the PHP file on the console.

example.php (open)

<?php

require_once "vendor/autoload.php";

$DeyeObj = new \Deye\Deye();
$DeyeObj->setCredentials("admin:admin");
$DeyeObj->setInverterIp("192.168.1.19");

$resultset = $DeyeObj->inverterStatus();

print_r($resultset); // <- returns the inverter status information data as an Array.

Run on console:

php -f example.php

Example output

[
  {
    "var": "webdata_sn",
    "content": ""
  },
  {
    "var": "webdata_msvn",
    "content": ""
  },
  {
    "var": "webdata_ssvn",
    "content": ""
  },
  {
    "var": "webdata_pv_type",
    "content": ""
  },
  {
    "var": "webdata_rate_p",
    "content": ""
  },
  {
    "var": "webdata_now_p",
    "content": ""
  },
  {
    "var": "webdata_today_e",
    "content": ""
  },
  {
    "var": "webdata_total_e",
    "content": ""
  },
  {
    "var": "webdata_alarm",
    "content": ""
  },
  {
    "var": "webdata_utime",
    "content": ""
  },
  {
    "var": "cover_mid",
    "content": ""
  },
  {
    "var": "cover_ver",
    "content": ""
  },
  {
    "var": "cover_wmode",
    "content": ""
  },
  {
    "var": "cover_ap_ssid",
    "content": ""
  },
  {
    "var": "cover_ap_ip",
    "content": ""
  },
  {
    "var": "cover_ap_mac",
    "content": ""
  },
  {
    "var": "cover_sta_ssid",
    "content": ""
  },
  {
    "var": "cover_sta_rssi",
    "content": ""
  },
  {
    "var": "cover_sta_ip",
    "content": ""
  },
  {
    "var": "cover_sta_mac",
    "content": ""
  },
  {
    "var": "status_a",
    "content": ""
  },
  {
    "var": "status_b",
    "content": ""
  },
  {
    "var": "status_c",
    "content": ""
  }
]

Deye variable description

Variable name Type Description
webdata_sn int serial no
webdata_msvn ? Firmware version (main)
webdata_ssvn ? Firmware version (slave)
webdata_pv_type ? Inverter model
webdata_rate_p ? Rated power
webdata_now_p int Current power
webdata_today_e float Yield today
webdata_total_e float Total yield
webdata_alarm int Alerts
webdata_utime int Last updated
cover_mid int Device serial number
cover_ver string Firmware version
cover_wmode string ?
cover_ap_ssid string Wireless SSID
cover_ap_ip string Wireless IP address
cover_ap_mac string Wireless MAC address
cover_sta_ssid string Router SSID
cover_sta_rssi string Signal Quality
cover_sta_ip string IP address
cover_sta_mac string MAC address
status_a int Remote server A
status_b int Remote server B
status_c int Remote server C

License

Open LICENSE file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-10