[Edge] Carlo Gavazzi EM100 meter: fix modbus registers for Energy#3215
[Edge] Carlo Gavazzi EM100 meter: fix modbus registers for Energy#3215sfeilmeier merged 5 commits intoOpenEMS:developfrom
Conversation
Codecov ReportAttention: Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3215 +/- ##
=============================================
- Coverage 59.16% 59.15% -0.01%
Complexity 139 139
=============================================
Files 2682 2682
Lines 115840 115840
Branches 8533 8533
=============================================
- Hits 68523 68508 -15
- Misses 44757 44771 +14
- Partials 2560 2561 +1 🚀 New features to boost your workflow:
|
Sn0w3y
left a comment
There was a problem hiding this comment.
Just a general Question - why don't we also integrate a "Invert" Function as in the other Meters so one can swap Production and Consumption aswell ?
| /** | ||
| * See Modbus definition PDF-file in doc directory and | ||
| * https://www.galoz.co.il/wp-content/uploads/2014/11/EM341-Modbus.pdf | ||
| * https://www.gavazziautomation.com/fileadmin/images/PIM/OTHERSTUFF/COMPRO/EM111_EM112_ET112_CP.pdf |
There was a problem hiding this comment.
There was a problem hiding this comment.
Inverting the values is already implemented for this meter (line 101):
if (this.config.invert()) { energyChannelId300017 = ElectricityMeter.ChannelId.ACTIVE_CONSUMPTION_ENERGY; energyChannelId300033 = ElectricityMeter.ChannelId.ACTIVE_PRODUCTION_ENERGY; } else { energyChannelId300017 = ElectricityMeter.ChannelId.ACTIVE_PRODUCTION_ENERGY; energyChannelId300033 = ElectricityMeter.ChannelId.ACTIVE_CONSUMPTION_ENERGY; }
There was a problem hiding this comment.
Official and latest Link for EM100:
Thank you, link and file are updated.
|
@sfeilmeier: Thank you for reviewing. Now the energy is calculated as expected: |

The modbus registers in the previous implementation for production and consumption energy are not correct.
They had to be changed to 300017 and 300033. See on page 8:
https://www.gavazziautomation.com/fileadmin/images/PIM/OTHERSTUFF/COMPRO/EM111_EM112_ET112_CP.pdf