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

One inverter is reporting incorrect energy total #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Data displayed and logged for Energy Total on one inverter is incorrect.

What is the expected output? What do you see instead?
I expect to see 8000+kWh and not 1500+kWh

What version of the product are you using? On what operating system?
Lastest source version on a Raspberry Pi B+ running Raspbian

Please provide any additional information below.

I'll attach some screenshots. AS Control via my PMU displays the correct 
values, eversolar-monitor doesn't (for one inverter). 

Original issue reported on code.google.com by wot...@gmail.com on 15 Nov 2014 at 2:48

Attachments:

GoogleCodeExporter commented 9 years ago
I think I know what is wrong, but I don't know how to fix it. Total kWh will be 
incorrect for all inverters that have more than 6553.5 kWh on them.

The next byte is not being used when the value is greater than 65535, 
Eversolar's AS Control reports it correctly though.

To get my total kWh I need to add 6553.5hours to the current value i.e. The 
screen shot above 1509kWh + 6553.5kWh = 8062.5kWh which is exactly what I 
expect it to be.

I don't have enough programming skills to try and tackle any changes, but if 
someone gives me some suggestions or changes to try, I'll test them out.

Original comment by wot...@gmail.com on 17 Nov 2014 at 7:26

GoogleCodeExporter commented 9 years ago
Nice catch, I haven't had that high production yet. It should be an easy fix, 
I'll look into it shortly

Original comment by henrik.m...@gmail.com on 19 Nov 2014 at 5:16

GoogleCodeExporter commented 9 years ago
This is most likely a duplicate issue - see #5. Can you enable debugging and 
send me a copy of a package read from the inverter? 

Henrik

Original comment by henrik.m...@gmail.com on 19 Nov 2014 at 6:14

GoogleCodeExporter commented 9 years ago
Hi Henrik,

I changed debug to 3 in the ini file and ran it for a while, log file is 
attached.

Thanks,

Steve.

Original comment by wot...@gmail.com on 20 Nov 2014 at 6:44

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, thanks for the debug data - unfortunately the issue appears to be buried 
even deeper - i fear it is in the actual communication with the inverter. On 
the positive side, you have AS control, and that clearly indicated that it is 
possible to extract data correctly through serial...

Luckily there should be some data displayed in the terminal - the code

                        if($config->options_debug) {
                                print "received packet from inverter: \n";
                                print_bytes($response, length($response));
                        }
Should write out the actual packages.

I should be able to do some testing saturday, if the sun is out :-)

Henrik

Original comment by henrik.m...@gmail.com on 20 Nov 2014 at 7:20

GoogleCodeExporter commented 9 years ago
I don't know if this helps Henrik, but here's a bit from the terminal I grabbed 
before heading off to work this morning. It's the packets sent to and received 
from the inverters.

Steve.

Original comment by wot...@gmail.com on 20 Nov 2014 at 8:45

Attachments:

GoogleCodeExporter commented 9 years ago
I've read the PMU protocol document twice now and cannot see how they cope with 
values that are greater than the 16 bits that are E-Total H and E-Total L could 
it be an undocumented feature that sets a bit somewhere when 65535 is exceeded?

It's strange that AS Control knows the total value but the protocol document 
only mentions the H & L 16 bits. 

Original comment by wot...@gmail.com on 21 Nov 2014 at 2:36

GoogleCodeExporter commented 9 years ago
This is a duplicate issue, as per the documentation we get the totals as two 
separate double byte answers and only decode one. Please modify the code as 
described in the other thread and let me know what you find

Henrik

Original comment by henrik.m...@gmail.com on 22 Jan 2015 at 7:45