problems with totalizer energy produced

Talks about metering
Post Reply
miki8989
Posts: 4
Joined: Thu Sep 28, 2017 1:15 pm

problems with totalizer energy produced

Post by miki8989 » Thu Sep 28, 2017 1:29 pm

Hello
I'm using version 1.7.0 of 123solar and I have a problem with the data they send sent to metern (v 0.8.4).
in practice everything works regularly except when I reboot with the photovoltaic power off.
with the photovoltaic energized the value of total energy produced has a value, with the photovoltaic off has another value (lower than about 300 kw)
this produces errors in meter charts with negative input values.
I have seen all the cvs and the value with off photovoltaic I do not find it ..
the only difference I see and that in information counters is equal to 28098.6 while in admin-debugger the value KWHT1 equals 28468,712.
How can I fix the problem??
if I reinstall it all solve ??
thank you

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

Re: problems with totalizer energy produced

Post by jeanmarc » Thu Sep 28, 2017 2:01 pm

Hi,
What inverter are you using ?
Maybe trace with this pool123s

Code: Select all

#!/usr/bin/php
<?php
if (isset($_SERVER['REMOTE_ADDR'])) {
    die('Direct access not permitted');
}
// This script will output a 123solar counter into a meterN compatible format
// Configure, then ln -s /srv/http/comapps/pool123s.php /usr/bin/pool123s
// Request Main command with 'pool123s -energy' and live command 'pool123s -power'
$log        = '123scomtest.log';
// 123solar config
$pathto123s = '/srv/http/123solar';
$invtnum    = 1;
// meterN config
$pathtomn   = '/srv/http/metern';
$METERID    = 'solar';
$INVTmetnum = 4; // meter number

// No edit is needed below
if (isset($argv[1])) {
    define('checkaccess', TRUE);
    include("$pathto123s/config/config_main.php");
    include("$pathto123s/config/config_invt$invtnum.php");
    include("$pathto123s/config/memory.php");
    date_default_timezone_set($DTZ);
    $stamp      = date('d/m/Y H:i:s');    
    $KWHT = null;
    if (file_exists($LIVEMEMORY)) {
        $data     = file_get_contents($LIVEMEMORY);
        $memarray = json_decode($data, true);
        $nowUTC   = strtotime(date("Ymd H:i:s"));
        if ($argv[1] == '-power') {
            if ($nowUTC - $memarray["SDTE$invtnum"] < 30) {
                $GP = $memarray["G1P$invtnum"] + $memarray["G2P$invtnum"] + $memarray["G3P$invtnum"];
                $GP = round($GP, 1);
            } else { // Too old
                $GP = 0;
            }
            echo "$METERID($GP*W)\n";
        } elseif ($argv[1] == '-energy') {
            if ($nowUTC - $memarray["SDTE$invtnum"] < 600) {
                if (isset($memarray["KWHT$invtnum"])) {
                    $KWHT = round($memarray["KWHT$invtnum"] * 1000); // Wh
                    echo "$METERID($KWHT*Wh)\n";
                } else {
                    $data = "$stamp Abording: KWHT not defined\n";
                }
                if ($memarray["KWHT$invtnum"] < 1000) {
                    $KWHT = round($memarray["KWHT$invtnum"] * 1000); // Wh
                    $data = "$stamp Abording: KWHT low $KWHT\n";
                }
                
            } else {
                $data = "$stamp Abording: Too late value\n";
            }
        } else {
            $data = "$stamp Abording: no valid argument given\n";
        }
        file_put_contents($log, $data, FILE_APPEND);
    } else { // 123s ain't running
        die("Abording: Empty SHM\n");
    }
    
} else {
    die("Usage: pool123s { power | energy }\n");
}
?>
There is no need to reinstall, the problem is because your inverter or the com app return a wrong value.

miki8989
Posts: 4
Joined: Thu Sep 28, 2017 1:15 pm

Re: problems with totalizer energy produced

Post by miki8989 » Thu Sep 28, 2017 2:21 pm

Thank you for the reply..
my inverter is a pura3000out aurora
It all happened to me for a few months ...
thank you

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

Re: problems with totalizer energy produced

Post by jeanmarc » Thu Sep 28, 2017 3:14 pm

ok try to reboot when the inverter is off and see what it is return..

miki8989
Posts: 4
Joined: Thu Sep 28, 2017 1:15 pm

Re: problems with totalizer energy produced

Post by miki8989 » Sat Sep 30, 2017 9:14 am

Hello
last night or restarted with the inverter switched off ...
I took the data of three moments

current data
Live memory (/dev/shm/123s_LIVEMEMORY.json)
Array ( [SDTE1] => 1506710246 [I1V1] => 0 [I1A1] => 0 [I1P1] => 0 [I2V1] => 0 [I2A1] => 0 [I2P1] => 0 [I3V1] => 0 [I3A1] => 0 [I3P1] => 0 [I4V1] => 0 [I4A1] => 0 [I4P1] => 0 [G1V1] => 0 [G1A1] => 0 [G1P1] => 0 [G2V1] => 0 [G2A1] => 0 [G2P1] => 0 [G3V1] => 0 [G3A1] => 0 [G3P1] => 0 [FRQ1] => 0 [EFF1] => 0 [INVT1] => 0 [BOOT1] => 0 [SSR1] => 0 [KWHT1] => 28485.186 )

Infos - counter - Total production:
28.114,9 kWh

csv metern:
Time,Production(Wh),consumption(Wh),Withdrawals(Wh),Entries(Wh),Internal_consumption(Wh)
20:40,28485186,14003653,28762573,21698304,74669130

given after rebooting off with photovoltaic power off
Live memory (/dev/shm/123s_LIVEMEMORY.json)
Array ( [SDTE1] => 1506718612 [I1V1] => 0 [I1A1] => 0 [I1P1] => 0 [I2V1] => 0 [I2A1] => 0 [I2P1] => 0 [I3V1] => 0 [I3A1] => 0 [I3P1] => 0 [I4V1] => 0 [I4A1] => 0 [I4P1] => 0 [G1V1] => 0 [G1A1] => 0 [G1P1] => 0 [G2V1] => 0 [G2A1] => 0 [G2P1] => 0 [G3V1] => 0 [G3A1] => 0 [G3P1] => 0 [FRQ1] => 0 [EFF1] => 0 [INVT1] => 0 [BOOT1] => 0 [SSR1] => 0 )

Infos - counter - Total production:
0,0 kWh

csv metern:
Time,Production(Wh),consumption(Wh),Withdrawals(Wh),Entries(Wh),Internal_consumption(Wh)
22:55,28114879,14005084,29134053,21698304,74298823

given to the photovoltaic resumption
Live memory (/dev/shm/123s_LIVEMEMORY.json)
Array ( [SDTE1] => 1506755218 [I1V1] => 365.042969 [I1A1] => 1.449274 [I1P1] => 529.047424 [I2V1] => 365.337311 [I2A1] => 1.425106 [I2P1] => 520.644531 [I3V1] => [I3A1] => [I3P1] => [I4V1] => [I4A1] => [I4P1] => [G1V1] => 241.152328 [G1A1] => 4.230093 [G1P1] => 1025.251709 [G2V1] => [G2A1] => [G2P1] => [G3V1] => [G3A1] => [G3P1] => [FRQ1] => 49.977009 [EFF1] => 97.671684 [INVT1] => 32.224201 [BOOT1] => 27.93247 [SSR1] => [KWHT1] => 28485.999 )

Infos - counter - Total production:
28.115,7 kWh

csv metern:
Time,Production(Wh),consumption(Wh),Withdrawals(Wh),Entries(Wh),Internal_consumption(Wh)
07:05,28485186,14009458,29134090,21698304,74298823

the values of the total cvs of production, withdrawal, and self-consumption are wrong with very high values and negligent self-consumption

It all happens for a few months, before some update.

thanks for support

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

Re: problems with totalizer energy produced

Post by jeanmarc » Sat Sep 30, 2017 10:32 am

current data
Live memory (/dev/shm/123s_LIVEMEMORY.json)
difference [KWHT1] => 28485.186 vs Infos - counter - Total production: 28.114,9 kWh
You set a "Correction factor" != 1
csv metern value is ok 20:40 28485186

given after rebooting
Live memory (/dev/shm/123s_LIVEMEMORY.json) is obviously empty

csv metern have Production value ! 22:55,28114879
don't use use latest pool123s ? :roll: It must be empty and return "KWHT not defined"

Please return "123scomtest.log" and use this version, i am not able to guess the com app you are using.

miki8989
Posts: 4
Joined: Thu Sep 28, 2017 1:15 pm

Re: problems with totalizer energy produced

Post by miki8989 » Sat Sep 30, 2017 8:32 pm

THANK YOU .....
I put the correction factor to 1 and now the values ​​are aligned ...
I covered the pool123s.php (I already had that upgraded) and now I restarted with photovoltaic power off and no longer issues (maybe it was corrupt ..)

thank you

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests