Possible bug reading high loads/values on external grid meter

After deploying our system used for backing up the “critical loads” of my home, my next goal was to capture the power of the whole home within VRM by connecting an external grid meter to the non-critical loads panel.

I installed and configured a Carlo Gavazzi EM530 with two CTs and connected it to my Cerbo GX using the Victron RS485 USB cable. The meter was detected and displaying proper values after minimal configuration.

Days later, I went to ‘Settings > ESS’ and changed the ‘Grid metering’ setting to “External meter”. The view in VRM updated, and everything appeared to be working well. Later that day, the non-critical loads panel was under “high” loads (somewhere over 3,000 watts or so), and all of the sudden, I saw what I later described as “erratic behavior” because the numbers I was seeing in VRM where WAY out of whack.

I didn’t observe the behavior for long because I was panicked by what I saw so I went in and changed the grid meter setting back to “Inverter/Charger” and things went back to ‘normal’ again. By “erratic”, I meant that I saw the grid reading in VRM was displaying a NEGATIVE reading of over 3,000 watts! Because the system thought there was excess power feeding in to the grid, it started charging my batteries off the grid (understandable, but not wanted/expected). For reference, my “Grid Setpoint” setting was set at 400 watts at the time as I cannot export to the grid (yet) because my meter currently reads positive values.

Days later I made a post to help others with a similar home setup by explaining my experiences and lessons learned: Home ESS with US 400A (2 x 200A Panel) Service

After explaining my goal, It was recommended that I read the values from the EM530 myself so I could use a python script to adjust the values to better represent my home’s overall grid usage. I took on the challenge and recently completed it. It’s working beautifully! I’ll make a post explaining the details another day. But while I was reading in the values from the EM530, I ran in to an issue where I was getting negative values from the meter whenever it was under large loads!

After lots of research (I’ve never used the modbus protocol before), I discovered the problem and was able to fix it for my script. To try and keep it brief without getting too technical:

Many of the modbus registers for EM530 are stored using an INT32 data format. My script was pulling all the modbus registers as INT16 which worked fine as long as the values remained small enough to fit within one register. Once the values get too large, they split the data in to two registers. So If you’re only reading in one, and decode the data, its all wrong (normally negative this case).

If I’m not mistaken, I believe that the GX may be reading the proper INT32 values when grid metering is set to “Inverter/Charger”, but reading them as INT16 when grid metering is set to “External meter”.

I hope someone finds this helpful.

When you select Inverter/Charger, the values displayed in VRM are the ones measured at the AC IN of the multiplus - hence a all different measurement that has nothing to do with the meter.

Only when you select “External Meter”, the values of the meter are taken into account.

That is not what I experienced. From what I saw, that the system can have multiple grid meters but it will only display the values of one meter. Once an external grid meter is connected, VRM seems to prefer the values given by the external meter. There were times where it seemed to flip over and display the internal inverter values (if loads were higher there than on the external meter I think). Only when the external meter is offline/not connected, the values would revert to the internal meter.

This was the case despite the “Grid metering” setting. The only (observable) change that setting made, was rearranging the display in the system/VRM to separate the external AC Loads from the Critical Loads.

In my specific case, I needed to combine the power usage of the external meter with the internal meter to get the true overall power utilization of my home. My script now combines the data received from both meters and presents that to the GX as the only external meter. Its been running for a few days now and everything has been working perfectly so far.

I’m not the only one that I saw looking for a solution to aggregate two or more meters together. Perhaps I’ll make a separate post specifically to make a feature request for combining/grouping selected meters.

This visual change is just a consequence of actually using the external meter:

  • if the external meter is used, the system can compare the meter values with the values from the multiplus’ AC-IN - and therefore conclude the AC-consumer values shown.
  • if the external meter is not just, the values shown for “Grid / AC-IN” are the ones from the multiplus’ ac-in (and therefore, there is no more ac load box, because these loads are now basically out of the measured area)

At least this is my experience with the ess-assistant. (Without assistant, there is not even an option to change between meter and inverter measuring)

Be that as it may, the bug I’m referring to is still valid. How the system interprets data depending on a setting is one thing. When I say that the values are wrong, I don’t mean that they’re a little off. I mean that when the total wattage of the loads is actually 7,000+ watts (like when I charge my car), the grid values go from being accurate, to EXTREMELY off, displaying over -3000 watts.

This is not a minor misinterpretation of the data. This is an extreme deviation due to reading the values improperly (INT16 data type). I only know this from invertedly discovering the same issue after unplugging the meter from the GX and plugging it in to a Raspberry Pi so I could read the modbus registers myself over USB.

The fact that I was able to correct the issue after adjusting my code to pull the data in the proper format, proves that it was not an issue with the meter itself, but the way the data is read from the meter.

The GX can read the meter values correctly (even under high loads) when the grid metering setting is on “Inverter/Charger”. When it’s set to “External meter”, the values are accurate until they cross a certain threshold. That’s when they flip negative, which is not even close to what is happening in real life by any measure.

Ofc, if the readouts are wrong, that’s a bad thing -

BUT: you are saying:

And the Victron Table says for the EM530 along with CT clamps: Max current 5A / phase.

If I read that table right, honestly don’t understand why a meter would have such a low limit :man_shrugging:

Maybe that’s what’s causing issues “with high loads”?

See:


Edit: Na, never mind. That most likely refers to the max current of the CTs, not the measured current. Can’t imagine a usecase, where 5A would be sufficent. :man_shrugging:

Edit2: Yes, that means the CTs should deliver a maximum of 5A

So, maybe check if your’s exceeding 5A?