solmoller / eversolar-monitor

Script to capture data and create statistics from Eversolar/zeversolar Solar Inverters. Includes easy install image files for Raspberry Pi. Working edition since 2012 :-)
https://github.com/solmoller/eversolar-monitor/blob/wiki/Introduction.md
MIT License
30 stars 20 forks source link

2 inverters one needs 1 string the other needs 2 set in ini file #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have 2 inverters T1 4000E1.00 TL4300  works correctly with 2 strings set in 
eversolar.ini 

I also have an  1500E1.00 TL1500 AS which needs 1 String set in the ini.

I cant have both working at the same time,

Would it be easy enough set the strings based on what type of inverter it is 
instead of in the config>option
s

cheers

Original issue reported on code.google.com by baywindc...@gmail.com on 20 Aug 2013 at 8:29

GoogleCodeExporter commented 9 years ago
i have added the %DATA_BYTES= under 
foreach $inverter (keys(%inverters)) {

simply checking against my serial numbers to decide which config to use.

cheers.

foreach $inverter (keys(%inverters)) {
        $response = send_request($inverter, $CTRL_FUNC_CODES{"READ"}{"QUERY_NORMAL_INFO"});
        if($response) {
            # good response - reset response_timeout_count
            $inverters{$inverter}{"response_timeout_count"} = 0;

            $serial = ($inverters{$inverter}{"serial"});

            if($serial == "8891500A40B05707"){
            print "Serial: $serial\n";

            %DATA_BYTES = (
            "TEMP"        => 0,
            "E_TODAY"     => 1,
            "VPV"         => 2,
            "IPV"         => 3,
            "IAC"         => 4,
            "VAC"         => 5,
            "FREQUENCY"   => 6,
            "PAC"         => 7,
            "IMPEDANCE"   => 8,
            "NA_1"        => 9,
            "E_TOTAL"     => 10,
            "NA_2"        => 11,
            "HOURS_UP"    => 12,
            "OP_MODE"     => 13
            );

            }

            if($serial == "A984300A128P0066"){
            print "Serial: $serial\n";

            %DATA_BYTES = (    
            "TEMP"      => 0,
            "E_TODAY"   => 1,
            "VPV"       => 2,
            "VPV2"      => 3,
            "IPV"       => 4,
            "IPV2"      => 5,
            "IAC"       => 6,
            "VAC"       => 7,
            "FREQUENCY" => 8,
            "PAC"       => 9,
            "NA_0"      => 10,
            "NA_1"      => 11,
            "E_TOTAL"   => 12,
            "NA_2"      => 13,
            "HOURS_UP"  => 14,
            "OP_MODE"   => 15
            );

            }

Original comment by m...@baywind.com.au on 22 Aug 2013 at 1:19

GoogleCodeExporter commented 9 years ago
Well spotted, I'll see if I can come up with a more sturdy solution for mixing 
single string inverters with multiple string inverters in the next iteration

Original comment by henrik.m...@gmail.com on 9 Sep 2013 at 7:20

GoogleCodeExporter commented 9 years ago

Original comment by henrik.m...@gmail.com on 9 Sep 2013 at 7:21

LeighAS commented 2 years ago

I will be needing this enhancement soon as I put up my third array. Thanks

solmoller commented 2 years ago

I doubt I'll find time to look at this for you, but I can assist if you attempt to change the code

LeighAS commented 2 years ago

ok I will see how I go. My languages are c++ and c# so perl is a bit foreign. will be next week before I get my new panels and I have to build a pergola for them too but after that I will definitely be looking into this. I was also wondering about a 3rd or 4th inverter but again I will have to try it for myself.