Test with KOSTAL PIKO 7 inverter

others protocols
server2006
Posts: 32
Joined: Tue May 23, 2017 7:54 am

Re: Test with KOSTAL PIKO 7 inverter

Post by server2006 » Tue May 22, 2018 4:34 pm

ow to access www-data for piko.pu
in the console the answer is normal.
And the web does not want.

Code: Select all

root@orangepipcplus:~# sudo -u www-data piko --host=192.168.0.102 -s -p -t -i -d
Inverter Status : 3 (Running-MPP)
Inverter Error  : 0
Total energy    : 156539 Wh
Today energy    : 5539 Wh
DC Power        :  455 W
AC Power        :  406 W
Efficiency      : 89.2%
DC String 1     : 315.5 V   0.94 A    298 W   T=a100 (44.29 C)  S=4009
DC String 2     : 387.7 V   0.40 A    157 W   T=a100 (44.29 C)  S=c00a
DC String 3     :   0.0 V   0.00 A      0 W   T=a100 (44.29 C)  S=0003
AC Phase 1      : 218.4 V   0.00 A      0 W   T=a2c0 (43.29 C)
AC Phase 2      : 243.5 V   0.00 A      0 W   T=a2c0 (43.29 C)
AC Phase 3      : 242.5 V   1.91 A    406 W   T=a2a0 (43.36 C)
AC Status       : 16 (0010 ---L--3)
root@orangepipcplus:~#

Code: Select all

piko --host=192.168.0.102 -s -p -t -i -d return : 

error : / 

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: Test with KOSTAL PIKO 7 inverter

Post by jeanmarc » Tue May 22, 2018 4:50 pm

you might request that test.php page from your browser

Code: Select all

<?php
$CMD_POOLING = "piko --host=192.168.0.102 -s -p -t -i -d";
$datareturn = exec($CMD_POOLING);
echo $datareturn;
?>
If the return is empty, check your webserver log for details.

server2006
Posts: 32
Joined: Tue May 23, 2017 7:54 am

Re: Test with KOSTAL PIKO 7 inverter

Post by server2006 » Tue May 22, 2018 4:58 pm

displays on the screen

Code: Select all

AC Status : 16 (0010 ---L--3)

server2006
Posts: 32
Joined: Tue May 23, 2017 7:54 am

Re: Test with KOSTAL PIKO 7 inverter

Post by server2006 » Tue May 22, 2018 5:24 pm

Log apache2

Code: Select all

192.168.0.105 - - [22/May/2018:16:03:03 +0000] "GET /123solar/test.php HTTP/1.1" 200 239 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: Test with KOSTAL PIKO 7 inverter

Post by jeanmarc » Tue May 22, 2018 9:04 pm

Maybe :

Code: Select all

<?php
$CMD_POOLING = "piko --host=192.168.0.102 -s -p -t -i -d";
exec($CMD_POOLING, $output);
print_r($output);
?>

server2006
Posts: 32
Joined: Tue May 23, 2017 7:54 am

Re: Test with KOSTAL PIKO 7 inverter

Post by server2006 » Tue May 22, 2018 9:23 pm

So there is a conclusion

Code: Select all

Array ( [0]
 => Inverter Status : 0 (Off) [1] 
 => Inverter Error : 0 [2] 
 => Total energy : 156794 Wh [3] 
 => Today energy : 5794 Wh [4] 
 => DC Power : 0 W [5] 
 => AC Power : 0 W [6] 
 => Efficiency : 0.0% [7] 
 => DC String 1 : 0.0 V 0.00 A 0 W T=0000 (99.99 C) S=0000 [8] 
 => DC String 2 : 0.0 V 0.00 A 0 W T=0000 (99.99 C) S=0000 [9] 
 => DC String 3 : 0.0 V 0.00 A 0 W T=0000 (99.99 C) S=0000 [10] 
 => AC Phase 1 : 0.0 V 0.00 A 0 W T=0000 (99.99 C) [11] 
 => AC Phase 2 : 0.0 V 0.00 A 0 W T=0000 (99.99 C) [12] 
 => AC Phase 3 : 0.0 V 0.00 A 0 W T=0000 (99.99 C) [13] 
 => AC Status : 0 (0000 -------) ) 
what do I need and where to fix it?

server2006
Posts: 32
Joined: Tue May 23, 2017 7:54 am

Re: Test with KOSTAL PIKO 7 inverter

Post by server2006 » Wed May 23, 2018 7:18 am

Good afternoon!
Help to make monitoring.
After opening in the browser test.php
Here today:

Code: Select all

Array ( [0] => Inverter Status : 3 (Running-MPP) [1] => Inverter Error : 0 [2] => Total energy : 159981 Wh [3] => Today energy : 3186 Wh [4] => DC Power : 2956 W [5] => AC Power : 2684 W [6] => Efficiency : 90.8% [7] => DC String 1 : 409.0 V 3.64 A 1489 W T=8520 (60.21 C) S=4009 [8] => DC String 2 : 406.0 V 3.61 A 1467 W T=8500 (60.29 C) S=c00a [9] => DC String 3 : 0.0 V 0.00 A 0 W T=8500 (60.29 C) S=0003 [10] => AC Phase 1 : 225.0 V 3.97 A 842 W T=92e0 (52.36 C) [11] => AC Phase 2 : 240.4 V 3.99 A 910 W T=92e0 (52.36 C) [12] => AC Phase 3 : 247.2 V 3.98 A 932 W T=92e0 (52.36 C) [13] => AC Status : 28 (001c ---L123) )
What to fix in piko.php ?
Thank you

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: Test with KOSTAL PIKO 7 inverter

Post by jeanmarc » Wed May 23, 2018 8:03 am

Got try this one :

Code: Select all

<?php
//if(!defined('checkaccess')){die('Direct access not permitted');}
// For Piko stats http://sourceforge.net/projects/piko/
// With the help of Frank Ulbrich 

if (!$DEBUG) {
    $CMD_POOLING = "piko --host=192.168.1.10 -s -p -t -i -d";
} else {
    $CMD_POOLING = "piko --host=192.168.1.10 -s -p -t -i -d";
}

exec($CMD_POOLING, $array);
//$array = array('Inverter Status : 3 (Running-MPP)', 'Inverter Error : 0', 'Total energy : 156794 Wh', 'Today energy : 5794 Wh', 'DC Power : 180 W',  'AC Power : 150 W', 'Efficiency : 60.1%', 'DC String 1 : 100.1 V 1.01 A 1 W T=0000 (99.99 C) S=0000 [8]', 'DC String 2 : 100.2 V 1.02 A 2 W T=0000 (99.99 C) S=0000' , 'DC String 3 : 100.3 V 1.03 A 3 W T=0000 (99.99 C) S=0000', 'AC Phase 1 : 230.1 V 0.01 A 1 W T=0000 (99.99 C)', 'AC Phase 2 : 230.2 V 0.02 A 2 W T=0000 (99.99 C)', 'AC Phase 3 : 230.3 V 0.03 A 3 W T=0000 (99.99 C)', 'AC Status : 0 (0000 -------)');
//print_r($array);

if (isset($array[13])) {
	$dataarray  = preg_split('/[[:space:]]+/', $array[7]);
    $I1V  = (float) $dataarray[4];
    $I1A  = (float) $dataarray[6];
    $I1P  = (float) $dataarray[8];
	$dataarray  = preg_split('/[[:space:]]+/', $array[8]);
    $I2V  = (float) $dataarray[4];
    $I2A  = (float) $dataarray[6];
    $I2P  = (float) $dataarray[8];
	$dataarray  = preg_split('/[[:space:]]+/', $array[9]);
    $I3V  = (float) $dataarray[4];
    $I3A  = (float) $dataarray[6];
    $I3P  = (float) $dataarray[8];
	$dataarray  = preg_split('/[[:space:]]+/', $array[10]);
    $G1V  = (float) $dataarray[4];
    $G1A  = (float) $dataarray[6];
    $G1P  = (float) $dataarray[8];
	$dataarray  = preg_split('/[[:space:]]+/', $array[11]);
    $G2V  = (float) $dataarray[4];
    $G2A  = (float) $dataarray[6];
    $G2P  = (float) $dataarray[8];
	$dataarray  = preg_split('/[[:space:]]+/', $array[12]);
    $G3V  = (float) $dataarray[4];
    $G3A  = (float) $dataarray[6];
    $G3P  = (float) $dataarray[8];
    $FRQ  = null;
    $EFF  = (float) preg_replace("/[^0-9.[:space:]]+/", '', $array[6]);
    $INVT = null;
    $BOOT = null;
    $KWHT = (float)  preg_replace("/[^0-9.[:space:]]+/", '', $array[2]);
    $RET  = 'OK';
} else {
    $RET = '';
}

echo "
    <table width='50%' border=0 cellspacing=0 cellpadding=0 align='center'>
    <tr><td align='left'>
    <b>Arrays</b><br>
    I1V : $I1V I1A : $I1A I1P : $I1P<br>
    I2V : $I2V I2A : $I2A I2P : $I2P<br>
    I3V : $I3V I3A : $I3A I3P : $I3P<br>
    I4V : $I4V I4A : $I4A I4P : $I4P<br>
    <b>Grid</b><br>
    G1V : $G1V G1A : $G1A G1P : $G1P<br>
    G2V : $G2V G2A : $G2A G2P : $G2P<br>
    G3V : $G3V G3A : $G3A G3P : $G3P<br>
    <b>Inverter</b><br>
    FRQ : $FRQ EFF : $EFF INVT : $INVT BOOT : $BOOT KWHT : $KWHT<br>$CMD_POOLING
    </tr></td></table>";
?>

server2006
Posts: 32
Joined: Tue May 23, 2017 7:54 am

Re: Test with KOSTAL PIKO 7 inverter

Post by server2006 » Wed May 23, 2018 11:06 am

Thank you!
I have two Piko-7 inverters.
A minute that something showed.
And it was not right.
Here's what's in the log /var/www/123solar/data/123solar.err:

Code: Select all

 <table width='50%' border=0 cellspacing=0 cellpadding=0 align='center'>
    <tr><td align='left'>
    <b>Arrays</b><br>
    I1V : 0 I1A : 0 I1P : 0<br>
    I2V : 0 I2A : 0 I2P : 0<br>
    I3V : 0 I3A : 0 I3P : 0<br>
    I4V :  I4A :  I4P : <br>
    <b>Grid</b><br>
    G1V : 0 G1A : 0 G1P : 0<br>
    G2V : 0 G2A : 0 G2P : 0<br>
    G3V : 0 G3A : 0 G3P : 0<br>
    <b>Inverter</b><br>
    FRQ :  EFF : 6.265236 INVT :  BOOT :  KWHT : 0.024974<br>piko --host=192.168.0.101 -s -p -t -i -d
    </tr></td></table>PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko2.php on line 18
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko2.php on line 19
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko2.php on line 20
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko2.php on line 22
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko2.php on line 23
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko2.php on line 24
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko2.php on line 26
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko2.php on line 27
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko2.php on line 28
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko2.php on line 30
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko2.php on line 31
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko2.php on line 32
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko2.php on line 34
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko2.php on line 35
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko2.php on line 36
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko2.php on line 38
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko2.php on line 39
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko2.php on line 40

    <table width='50%' border=0 cellspacing=0 cellpadding=0 align='center'>
    <tr><td align='left'>
    <b>Arrays</b><br>
    I1V : 0 I1A : 0 I1P : 0<br>
    I2V : 0 I2A : 0 I2P : 0<br>
    I3V : 0 I3A : 0 I3P : 0<br>
    I4V :  I4A :  I4P : <br>
    <b>Grid</b><br>
    G1V : 0 G1A : 0 G1P : 0<br>
    G2V : 0 G2A : 0 G2P : 0<br>
    G3V : 0 G3A : 0 G3P : 0<br>
    <b>Inverter</b><br>
    FRQ :  EFF : 6.265236 INVT :  BOOT :  KWHT : 0.024974<br>piko --host=192.168.0.102 -s -p -t -i -d
    </tr></td></table>PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko.php on line 18
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko.php on line 19
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko.php on line 20
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko.php on line 22
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko.php on line 23
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko.php on line 24
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko.php on line 26
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko.php on line 27
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko.php on line 28
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko.php on line 30
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko.php on line 31
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko.php on line 32
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko.php on line 34
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko.php on line 35
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko.php on line 36
PHP Notice:  Undefined offset: 4 in /var/www/123solar/scripts/protocols/piko.php on line 38
PHP Notice:  Undefined offset: 6 in /var/www/123solar/scripts/protocols/piko.php on line 39
PHP Notice:  Undefined offset: 8 in /var/www/123solar/scripts/protocols/piko.php on line 40

server2006
Posts: 32
Joined: Tue May 23, 2017 7:54 am

Re: Test with KOSTAL PIKO 7 inverter

Post by server2006 » Wed May 23, 2018 11:22 am

One works correctly!
How to run two?

Code: Select all

    FRQ :  EFF : 91.9 INVT :  BOOT :  KWHT : 280244<br>piko --host=192.168.0.101 -s -p -t -i -d
    </tr></td></table>
    <table width='50%' border=0 cellspacing=0 cellpadding=0 align='center'>
    <tr><td align='left'>
    <b>Arrays</b><br>
    I1V : 380.6 I1A : 5.78 I1P : 2202<br>
    I2V : 382.6 I2A : 6.67 I2P : 2553<br>
    I3V : 0 I3A : 0 I3P : 0<br>
    I4V :  I4A :  I4P : <br>
    <b>Grid</b><br>
    G1V : 255.1 G1A : 6.18 G1P : 1532<br>
    G2V : 231.1 G2A : 6.2 G2P : 1396<br>
    G3V : 238.7 G3A : 6.23 G3P : 1440<br>
    <b>Inverter</b><br>
    FRQ :  EFF : 91.9 INVT :  BOOT :  KWHT : 280244<br>piko --host=192.168.0.101 -s -p -t -i -d
    </tr></td></table>
    <table width='50%' border=0 cellspacing=0 cellpadding=0 align='center'>
    <tr><td align='left'>
    <b>Arrays</b><br>
    I1V : 380.6 I1A : 5.78 I1P : 2202<br>
    I2V : 382.6 I2A : 6.67 I2P : 2553<br>
    I3V : 0 I3A : 0 I3P : 0<br>
    I4V :  I4A :  I4P : <br>
    <b>Grid</b><br>
    G1V : 255.1 G1A : 6.18 G1P : 1532<br>
    G2V : 231.1 G2A : 6.2 G2P : 1396<br>
    G3V : 238.7 G3A : 6.23 G3P : 1440<br>
    <b>Inverter</b><br>
    FRQ :  EFF : 91.9 INVT :  BOOT :  KWHT : 280244<br>piko --host=192.168.0.101 -s -p -t -i -d
    </tr></td></table>
    <table width='50%' border=0 cellspacing=0 cellpadding=0 align='center'>
    <tr><td align='left'>
    <b>Arrays</b><br>
    I1V : 380.6 I1A : 5.78 I1P : 2202<br>
    I2V : 382.6 I2A : 6.67 I2P : 2553<br>
    I3V : 0 I3A : 0 I3P : 0<br>
    I4V :  I4A :  I4P : <br>
    <b>Grid</b><br>
    G1V : 255.1 G1A : 6.18 G1P : 1532<br>
    G2V : 231.1 G2A : 6.2 G2P : 1396<br>
    G3V : 238.7 G3A : 6.23 G3P : 1440<br>
    <b>Inverter</b><br>
    FRQ :  EFF : 91.9 INVT :  BOOT :  KWHT : 280244<br>piko --host=192.168.0.101 -s -p -t -i -d
    </tr></td></table>

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest