turbopixel / deye-inverter-status
Simple library for reading Deye inverter status information.
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Type:framework
Requires
- php: ^8.2
- ext-curl: *
- ext-dom: *
This package is auto-updated.
Last update: 2024-10-10 14:09:46 UTC
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
License
Open LICENSE file.