zoilomora/iberdrola

Communication with the Iberdrola API

1.1.1 2019-05-16 18:27 UTC

This package is auto-updated.

Last update: 2024-11-17 06:42:29 UTC


README

This library aims to help make integrations with the Iberdrola API.

Installation

  1. Install via composer
composer require zoilomora/iberdrola

Example

<?php
use ZoiloMora\Iberdrola\Iberdrola;

$limit = 3.4; // Hired potency (kW)

$iberdrola = new Iberdrola('test@test.com', '123456');
$reading = $iberdrola->getReading();
$floatValue = floatval($reading->valMagnitud);

if (($floatValue/1000) >= $limit) {
    // Send notification
}

You can see more in the examples folder.

License

Licensed under the MIT license

Read LICENSE for more information