This average mismatches may happen when we send power value to pvoutput and also send energy value together (v1 and v2). Imagine that during the 5 minutes period your power varies and once it is time to send data to pvoutput we capture the value of current power on that moment. Pvoutput uses that power value to calculate how much energy have been produced over that 5 minute period. Hence, with a power of 1000W over a 5 minutes period the energy produced should be 83Wh. However, we know that it was not constant over the last 5 minutes and hence we send the energy accumulator value in the v1 parameter, let´s say that this v1 increased 80Wh since last report (below the 83 calculated previously). In this situation your green line (power) will be on the 1000W point but your yellow line (average power) is actually 960W (80Wh over 5 minutes period), hence, yellow would be below green. In the next 5 minutes the situation reverses and you report current power (v2) as 960W but energy accumulator (v1) as 83Wh, now your yellow line would be on 1000W point and green on the 960W (green below yellow). The point is everytime you report power and energy together than maybe a little divergence between yellow and green lines.
Now about the Growatt:
I don´t know if every Growatt is like mine but mine (and as far as I know @bobboulby´s unit also) only accumulate energy in 100Wh increments. This is a design decision (firmware) and improbably to change over model´s lifetime. The implication of this “low precision” increment is that, if you report v1 (energy accumulator) every 5 minutes, in a situation with less than 1200W average power over 5 minutes the increments to V1 will occur only at a 10 minutes intervals. In this scenario, the average power (yellow line) will drop to zero every other 5 minutes. On relatively small system like 1500W inverter or 3000W inverter like mine, during early morning hours or late afternoon (from 7am to 10am and after 15pm in my region) it is pretty common to have less than 1200W average power over 5 minutes period. At the end, there is a lot of Zero average power in the pvouput over the day. To avoid that I put a condition in the code, if the energy accumulator (v1) has not changed since last report code will not report v1, only v2. In this way, pvoutput figures v1 by itself and no zero average. However, at the end of the day it may drift a little from the actual energy produced since v2 is the current power not the last 5 minutes average. To avoid the drift, every time v1 changes from last report we send it to pvoutput, if a drift has occurred it will be correct shortly in the next v1 report.
By graphics you posted I see that one inverter might be reporting v1 and second might not (since the second graph has average equal to actual power I suppose it is only reporting power v2 but no energy accumulator v1). I will take a look in the code, when adding support for multiple inverters I probably messed with this logic.
Nice! You might need to “interpret” the data on each register. For holding registers in your post, take the first one with value 257
, it is holding register 00; by Growatt documentation you read:
Register Number: 00
Variable name: OnOff
Description: The Inverter On/Off state and the auto start state, The low byte is the on/off(1/0), the high byte is the auto start state or not(1/0).
Customer Write: W
Value: 0x0000; 0x0001; 0x0100; 0x0101
Unit:
Initial Value: 0x0101
Note: Auto start means the auto power AC when next power on inverter.
(I broke the table into lines for readability since cannot paste tables here - or at least don´t know how)
We know that every register has 16 bits and, as per description, in a 0x0101 the bold part is the auto-start and ITALIC PART represents the on/off state, in this example 01 for autostart means autostart is enabled, and 01 for on/off, the inverter is on. In your reading you have 257
base decimal, convert it to 16-bits hexadecimal you have 0x101
(or pretty formatted 0x0101
). So we conclude this inverter you read values from is set with auto-start enable and on/off state of On.
Following the table, jump to the 4th value, the value of 100
. This is the register number 03, as per Growatt documents, this is the maximum active power output rate of the inverter. The value of 100
decimal base here converts to 0x0064 hexadecimal, but since this registers varies only between 0 and 100 we can interpret it directly, hence 100% active power output set for this inverter. Next register, the 5th value on the list, is tricky because it also varies from 0~100 as per documentation and it represents the maximum reactive power output rate. For a 100% active power it should be 0% reactive power right? I think so but you unit reports 255 and Growatt documents says it should fall in between 0~100 range. I guess that 255 is kind of “invalid” state for this register but cannot guarantee that. I bet that this would set if the active power was set to another value first but it is only and educated guess.
Next value, the 6th in the vector, is register number 5 or the power factor; document says it falls in the range 0 ~20000 and any value between 0~10000 is underexcited and others overexcited. Decimal value of 65535
is out of range again and, again, I guess this is not being used or not initialized. Keep in mind that every Growatt inverter will have all the registers but some of them maybe not implemented on a particular model, for instance, a single phase inverter will have the registers for 2nd and 3rd phases but it does not use it, hence it will report any invalid value since not used/initialized.
You can follow the Growatt documentation for interpret every value in the reading you have above or get to the exact one you are looking for. Some information will require more than 16-bits to be properly represented and on that case you need to shift the bits to make sense. (look into my code to see how I compute version and other strings from holding registers)
Any thing you could not figure out post here and I try to help.