Delta Solivia

others protocols
jeanmarc
Posts: 1580
Joined: Thu Aug 29, 2013 7:16 am

Re: Delta Solivia

Post by jeanmarc » Mon Jul 20, 2015 6:15 am

Thanks. Please always provide the full error. Don't start 123s yet and try first from the command line php delta.php, you may uncomment the lines to see if the output is correct.

:idea: It seem like this script reads live values from your inverter and is more appropriate.

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Delta Solivia

Post by TonyP62 » Thu Aug 27, 2015 8:52 am

Hello Dear JeanMarc.
During this week, I have try to configure my friend's 123solar and i have see that in the web configuration there is a place in which insert the RS485 ID. If you see the file that i have send you, you can observe that the python script don't use the RS485 ID. As a matter of fact, the script hosted in github that you suggested, don't work because it want the rs485 id. There is a way to bypass this ? It's important that the web configurator, don't need the RS485 ID, on the contrary, the communication Test has always an error and 123solar don't starts.
Any suggestion ?
Thanks in advance.
Regards, Tony

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

Re: Delta Solivia

Post by jeanmarc » Thu Aug 27, 2015 11:53 am

Hello,
You may leave the RS485 adresse to 0. The protocol won't use it anyway and it's not mandatory for the test.
Make sure DeltaPVOutput.py is executable by your http user.
You may simply request the scripts/protocols/delta.php page from your browser and uncomment thes lines to test.

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Delta Solivia

Post by TonyP62 » Thu Aug 27, 2015 3:24 pm

Hello JeanMarc.
All files in 123solar directory has www-data owner . All in running well but if i try to browse the link you suggested : http://localhost/123solar/scripts/protocols/delta.php page, it returns "Direct access not permitted".
The same answer , if i try to " php delta.php" on a command line.
I set to 0 the RS485 ID but it' always the same problem.
I can't understand in which way i can solve this.
Regards,
Tony

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

Re: Delta Solivia

Post by jeanmarc » Thu Aug 27, 2015 4:36 pm

Quote the die line..

Code: Select all

<?php
if (!defined('checkaccess')) {
// comment this line to test from command line
    die('Direct access not permitted');
}..

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Delta Solivia

Post by TonyP62 » Sat Aug 29, 2015 7:57 am

Hello JeanMarc.
I have try as you suggest on a command line "php delta.php" and now it returns some values but at the end say:
" PHP Notice: Undefined offset: 16 in /var/www/123solar/scripts/protocols/delta.php on line 24 " .
I think it don't recognize the array " if ($dataarray[16] == 'OK') {" as a value in the script .

Code: Select all

php delta.php
Date: d=20150829, Time: t=09:05
Energy Today: v1=4655Wh, Instantaneous Power: v2=1621W
Volts: v6=237, Temp: v5=40 oC
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    67  100    20  100    47     20     49  0:00:01 --:--:--  0:00:01    82
Array
(
    [0] => OK
    [1] => 200:
    [2] => Added
    [3] => Status
)
PHP Notice:  Undefined offset: 16 in /var/www/123solar/scripts/protocols/delta.php on line 24

I think that this scripts cannot receive the correct values for arrays from the python script so if the array 16 is null , all values can't be printed.

I don't know how i can resolve it. Any other suggestion ?
Regards,
Tony

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

Re: Delta Solivia

Post by jeanmarc » Sat Aug 29, 2015 10:06 am

Hello,
Could you request that test page from your browser and return the output ?

Code: Select all

<?php
if (!defined('checkaccess')) {
// comment this line to test from command line
//    die('Direct access not permitted');
}
// For Delta Inverters using https://github.com/rsltrifork/DeltaPVOutput

$CMD_RETURN = '';
$dataarray[16] = '';
$CMD_POOLING = 'python DeltaPVOutput.py -v';
$CMD_RETURN = exec($CMD_POOLING);

/* Test line
$CMD_RETURN = "
Date: d=20150719, Time: t=10:36
Energy Today: v1=8142Wh, Instantaneous Power: v2=2570W
Volts: v6=239, Temp: v5=47 oC
OK 200: Added Status";
*/

$dataarray = preg_split('/[[:space:]]+/', $CMD_RETURN);
// uncomment this line to test
print_r($dataarray);

if ($dataarray[16] == 'OK') {
    
    $KWHT = $dataarray[7];
    $KWHT = substr($KWHT, 3);
    settype($KWHT, 'float');
    
    $G1P = $dataarray[10];
    $G1P = substr($G1P, 3);
    settype($G1P, 'float');
    
    $G1V = $dataarray[12];
    $G1V = substr($G1V, 3);
    settype($G1V, 'float');
    
    $INVT = $dataarray[14];
    $INVT = substr($INVT, 3);
    settype($INVT, 'float');
    // uncomment this line to test
    echo "kwh $KWHT g1p $G1P g1v $G1V temp $INVT ";
    $RET = 'OK';
} else {
    $RET = 'NOK';
}
?>
ps: i still think you should look at that script.

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Delta Solivia

Post by TonyP62 » Sat Aug 29, 2015 6:06 pm

I obtain the same output with the script you've insert:

Code: Select all

 php delta1.php
Date: d=20150829, Time: t=19:01
Energy Today: v1=3194Wh, Instantaneous Power: v2=83W
Volts: v6=232, Temp: v5=45 oC
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    65  100    20  100    45     25     56 --:--:-- --:--:-- --:--:--   114
Array
(
    [0] => OK
    [1] => 200:
    [2] => Added
    [3] => Status
)
PHP Notice:  Undefined offset: 16 in /var/www/123solar/scripts/protocols/delta1.php on line 25
Can you explain me because this script don't give the right values to the arrays ?
I have test the other script you have suggested in link, and the result is:

Code: Select all

python powernow.py
1: AC Power: N/A W
1: DC Power: N/A W
1: DC Voltage: N/A V
1: DC Current: N/A A
6:1:4:15:1:0:0
Error unpacking response. cmdcontents: 6:1:4:15:1:0:0
1: Energy Day: None wh

2: AC Power: N/A W
2: DC Power: N/A W
2: DC Voltage: N/A V
2: DC Current: N/A A
6:1:4:15:1:0:0
Error unpacking response. cmdcontents: 6:1:4:15:1:0:0
2: Energy Day: None Wh
And if i put in the config.py the RS485 ID = 0 then :

Code: Select all

python powernow.py 
AC Power command failed: Invalid Response: Empty reply. RS485 id: 0
Retry count: 1 Reinitialize connection
AC Power command failed: Invalid Response: Empty reply. RS485 id: 0
Retry count: 2 Reinitialize connection
AC Power command failed: Invalid Response: Empty reply. RS485 id: 0
Retry count: 3 Reinitialize connection
Seems that can't connect to the inverter.
On the contrary, the python script that i have send you (perhaps for delta solve 5.0), can connect to the inverter and don't give any error.

And Now ? How we can solve problem ?

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

Re: Delta Solivia

Post by jeanmarc » Sat Aug 29, 2015 6:34 pm

The power-now script don't seem to output anything.
What this script return ?

Code: Select all

<?php
$CMD_RETURN = exec('python DeltaPVOutput.py -v');
$dataarray  = preg_split('/[[:space:]]+/', $CMD_RETURN);
print_r($dataarray);
?>

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Delta Solivia

Post by TonyP62 » Sat Aug 29, 2015 7:14 pm

Now it's dark and the inverter returns :

Code: Select all

php dtest.php
Array
(
    [0] => No
    [1] => response
    [2] => from
    [3] => inverter
    [4] => -
    [5] => shutdown?
    [6] => No
    [7] => Data
    [8] => sent
    [9] => to
    [10] => PVOutput.org

Code: Select all

python DeltaPVOutput.py 
No response from inverter - shutdown? No Data sent to PVOutput.org
Tomorrow morning i try and i write the output for your information. Thanks JeanMarc.
I hope that we can use your software for my friend's inverter.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest