2017 © Pedro Peláez
 

project steca-grid

Collects data from StecaGrid inverter.

image

mstroink/steca-grid

Collects data from StecaGrid inverter.

  • Thursday, July 12, 2018
  • by mstroink
  • Repository
  • 2 Watchers
  • 1 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

StecaGrid

Dislaimer: i don't own a StecaGrid Inverter, (*1)

Install

composer require mstroink/steca-grid, (*2)

run tests, (*3)

vendor/bin/phpunit, (*4)

Usage

Create inverter client

use MStroink\StecaGrid\Inverter;

require_once 'vendor/autoload.php';

$inverter = Inverter::create('192.168.178.10'); // host

Measurements

$measurements = $inverter->getMeasurements();

$measurements->getAcCurrent();
$measurements->getAcFrequency();
$measurements->getAcPower();
$measurements->getAcVoltage();
$measurements->getDcCurrent();
$measurements->getDcPower();
$measurements->getDcVoltage();
$measurements->getTemp();

// Measurement object
echo $measurements->getDcVoltage()->getValue(); // 123.123;
echo $measurements->getDcVoltage()->getUnit(); // V;
echo $measurements->getDcVoltage()->getType(); // DC_Voltage;

// As string
echo (string) $measurements->getDcVoltage(); // '123.123 V'

// As array
print_r($measurements->toArray()); // ['dc_voltage' => ['value' => 123.123, 'unit' => DC_Voltage, 'type' => 'V']]
print_r($measurements->toList()); // ['dc_voltage' => 123.123, 'ac_power' => 12.12]

Daily

$yield = $inverter->getYieldToday();
$yield->getTotal(); // 123.45;

//As string
echo (string) $yield; // "123.45 kWh"

Tests

```sh vendor/bin/phpunit ````, (*5)

The Versions

12/07 2018

dev-master

9999999-dev

Collects data from StecaGrid inverter.

  Sources   Download

The Requires

 

The Development Requires