Fronius Inverter Solar API V1
Re: Fronius Inverter Solar API V1
Hi jeanmarc,
yes,I had corrected the IP address.
After I come home, I try and tell you what happens
Thanks again.
yes,I had corrected the IP address.
After I come home, I try and tell you what happens
Thanks again.
Re: Fronius Inverter Solar API V1
Hi jeanmarc,
this is the error:
"PHP Fatal error: Call to undefined function curl_init() in /var/www/123solar/scripts/protocols/fronius.php on line 14"
this is the error:
"PHP Fatal error: Call to undefined function curl_init() in /var/www/123solar/scripts/protocols/fronius.php on line 14"
Re: Fronius Inverter Solar API V1
You need to enable Json, Calendar and Curl extensions in php.ini, it's mandatory to run 123s or meterN.
Edit /etc/php/php.ini and uncomment extension=calendar.so extension=curl.so
Then you may need restart the PHP service.
Edit /etc/php/php.ini and uncomment extension=calendar.so extension=curl.so
Then you may need restart the PHP service.
Re: Fronius Inverter Solar API V1
Hi jeanmarc,
I reinstalled php5 "sudo apt-get install php5-curl", and this is the answer of the test comunication:
Communication is ok !
Arrays
I1V : 352.5 I1A : 1.4 I1P : 493.5
I2V : I2A : I2P :
I3V : I3A : I3P :
I4V : I4A : I4P :
Grid
G1V : 232.6 G1A : 2.23 G1P : 462
G2V : G2A : G2P :
G3V : G3A : G3P :
Inverter
FRQ : 49.96 EFF : 93.62 INVT : BOOT : KWHT : 1149.817
but 123solar don't start, the botton on the admin page remains OFF
Metern is ok
Thanks
I reinstalled php5 "sudo apt-get install php5-curl", and this is the answer of the test comunication:
Communication is ok !
Arrays
I1V : 352.5 I1A : 1.4 I1P : 493.5
I2V : I2A : I2P :
I3V : I3A : I3P :
I4V : I4A : I4P :
Grid
G1V : 232.6 G1A : 2.23 G1P : 462
G2V : G2A : G2P :
G3V : G3A : G3P :
Inverter
FRQ : 49.96 EFF : 93.62 INVT : BOOT : KWHT : 1149.817
but 123solar don't start, the botton on the admin page remains OFF
Metern is ok
Thanks
Re: Fronius Inverter Solar API V1

Re: Fronius Inverter Solar API V1
Hi jeanmarc,
this is the error log:
19/05/2017 09:07:38 Starting 123Solar
PHP Warning: include(protocols/fronius_checks.php): failed to open stream: No such file or directory in /var/www/123solar/scripts/123solar.php on line 529
PHP Warning: include(): Failed opening 'protocols/fronius_checks.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/123solar/scripts/123solar.php on line 529
PHP Fatal error: Cannot redeclare is_json() (previously declared in /var/www/123solar/scripts/protocols/fronius.php:8) in /var/www/123solar/scripts/protocols/fronius.php on line 12
this is the error log:
19/05/2017 09:07:38 Starting 123Solar
PHP Warning: include(protocols/fronius_checks.php): failed to open stream: No such file or directory in /var/www/123solar/scripts/123solar.php on line 529
PHP Warning: include(): Failed opening 'protocols/fronius_checks.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/123solar/scripts/123solar.php on line 529
PHP Fatal error: Cannot redeclare is_json() (previously declared in /var/www/123solar/scripts/protocols/fronius.php:8) in /var/www/123solar/scripts/protocols/fronius.php on line 12
Re: Fronius Inverter Solar API V1
ok, so we are progressing
try this
scripts/protocols/fronius.php
scripts/protocols/fronius_checks.php
fronius_startup.php

scripts/protocols/fronius.php
Code: Select all
<?php
if (!defined('checkaccess')) {
// die('Direct access not permitted');
}
// For Fronius https://github.com/victronenergy/dbus-fronius
$CMD_RETURN = ''; // Always initialize
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID=1&DataCollection=CommonInverterData');
//curl_setopt($ch, CURLOPT_URL, 'http://localhost/scripts/test.php');
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$CMD_RETURN = strip_tags(curl_exec($ch));
curl_close($ch);
$dataarray = json_decode($CMD_RETURN, TRUE);
if (json_last_error() == JSON_ERROR_NONE) {
// print_r($dataarray);
// Grid values
$G1V = $dataarray['Body']['Data']['UAC']['Value'];
settype($G1V, 'float');
$G1A = $dataarray['Body']['Data']['IAC']['Value'];
settype($G1A, 'float');
$G1P = $dataarray['Body']['Data']['PAC']['Value'];
settype($G1P, 'float');
$G2V = null;
$G2A = null;
$G2P = null;
$G3V = null;
$G3A = null;
$G3P = null;
$FRQ = $dataarray['Body']['Data']['FAC']['Value'];
settype($FRQ, 'float');
// Strings
$I1V = $dataarray['Body']['Data']['UDC']['Value'];
settype($I1V, 'float');
$I1A = $dataarray['Body']['Data']['IDC']['Value'];
settype($I1A, 'float');
$I1P = round($I1V * $I1A, 2);
settype($I1P, 'float');
$I3V = null;
$I3A = null;
$I3P = null;
$I4V = null;
$I4A = null;
$I4P = null;
// Inverter
$EFF = round(($G1P / $I1P) * 100, 1);
$INVT = null;
$BOOT = null;
$KWHT = $dataarray['Body']['Data']['TOTAL_ENERGY']['Value'];
$KWHT /= 1000;
settype($KWHT, 'float');
$RET = 'OK';
} else {
$RET = 'NOK';
}
?>
Code: Select all
<?php
if(!defined('checkaccess')){die('Direct access not permitted');}
// State
$STATE = 'no invt status';
// Alarms
$ALARM = null;
$MESSAGE = null;
// Riso, iLeak - Peak Powers
$RISO = 0;
$ILEAK = 0;
$PPEAK = 0;
$PPEAKOTD = 0;
?>
Code: Select all
<?php
if(!defined('checkaccess')){die('Direct access not permitted');}
// Info file
// $CMD_INFO = '';
// Sync inverter
// $CMD_SYNC = '';
?>
Re: Fronius Inverter Solar API V1
Hi jeanmarc,
yes, it's running all
Thanks very very much
Now I try to load the historical data, downloading them from the inverter
yes, it's running all
Thanks very very much



Now I try to load the historical data, downloading them from the inverter
Re: Fronius Inverter Solar API V1
Neat
Is the pooling refreshing time fast ? The local network load isn't too busy with the requests ?

Re: Fronius Inverter Solar API V1
Hi jeanmarc,
yes, I think so.Is the pooling refreshing time fast ?
it does not seem to me, but there is a system to understand thatThe local network load isn't too busy with the requests ?
Who is online
Users browsing this forum: No registered users and 0 guests