PHP code example of zoilomora / iberdrola
1. Go to this page and download the library: Download zoilomora/iberdrola library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zoilomora / iberdrola example snippets
use ZoiloMora\Iberdrola\Iberdrola;
$limit = 3.4; // Hired potency (kW)
$iberdrola = new Iberdrola('[email protected]', '123456');
$reading = $iberdrola->getReading();
$floatValue = floatval($reading->valMagnitud);
if (($floatValue/1000) >= $limit) {
// Send notification
}