Add support for Janitza UMG806 (via UMG604 Master)
Overview
This pull request adds support for the Janitza UMG806 energy meter.
In our setup, the UMG806 is connected as a Modbus RTU device behind a Janitza UMG604 acting as the master.
OpenEMS communicates with the UMG604 via Modbus TCP, and the UMG806 registers are accessed through this chain. When using a UMG604 as a gateway, the configuration must use the IP address of the UMG604 and the Modbus unit ID, which references the RTU input ID of the UMG806.
The implementation has been fully tested with real hardware (UMG806 + UMG604) at our demonstration site.
This development was carried out within the OMEI project, funded by the German Federal Ministry for Digital and Transport (BMDV).
Included Functionality
- Full Modbus-based device integration for the UMG806
- Register mapping and parsing of essential electrical measurements
- Compatibility with the UMG604 acting as a Modbus RTU → TCP gateway
- Integration of measured values into the existing OpenEMS data model
Technical Notes
- UMG806 operates as a Modbus RTU slave behind the UMG604
- OpenEMS communicates only via Modbus TCP, but transparently reads the UMG806 registers
- When using the UMG604 as a gateway, OpenEMS must be configured with the UMG604 IP and the Modbus unit ID corresponding to the RTU device
- Register structure and measurement formats follow the Janitza specifications
- All functionality was validated using live hardware
Testing
- Successful Modbus TCP communication with UMG604
- Access to UMG806 registers via the RTU path
- Approximate verification of voltages, currents, power, and energy readings
- Stable operation in a real OpenEMS setup
Credits
A big thank you goes to @himiflo, Ralf and @schiegg for creating, integrating, and evaluating this component.
References
- Janitza UMG806: https://www.janitza.com/de-de/produkte/umg-806
Just because I am curious - is it also possible to Connect to the UMG806 directly without the Master?
Just because I am curious - is it also possible to Connect to the UMG806 directly without the Master?
The Janitza UMG 806 meter itself does not support Modbus TCP, as it does not have an RJ45 interface. It is possible to achieve this using the UMG806-EC1 expansion module or as done via a master-slave architecture with a UMG604 as the master providing the ethernet connection.
Just because I am curious - is it also possible to Connect to the UMG806 directly without the Master?
The Janitza UMG 806 meter itself does not support Modbus TCP, as it does not have an RJ45 interface. It is possible to achieve this using the UMG806-EC1 expansion module or as done via a master-slave architecture with a UMG604 as the master providing the ethernet connection.
Well possibly we should then mention this somewhere as this is not documented yet, right?
we should then mention this somewhere as this is not documented yet, right?
Where do you suggest to document it? That the extension is needed is described on the product page of Janitza already?
That the extension is needed is described on the product page of Janitza already?
I actually would suggest to write a Hint in the Readme of the Janitza Package or in the Config. It may be, that Janitza's Documentation does state this Info - still we have MANY Users, who just activate a Component and wonder why it won't work - opening an Issue on GitHub just because.
still we have MANY Users, who just activate a Component and wonder why it won't work - opening an Issue on GitHub just because.
Comprehensible 😉 A hint at the modbus bridge would then be appropriate I guess, e.g. "ID of Modbus bridge to use. This type of meter can by default only be connected via Modbus TCP enabled master device like the UMG604."
Ah... unfortunately I cannot fix the conflicts myself. Please update this PR to develop.
Please also add JUnit tests if possible for both implementations.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:exclamation: There is a different number of reports uploaded between BASE (22cf89e) and HEAD (05f4404). Click for more details.
HEAD has 1 upload less than BASE
Flag BASE (22cf89e) HEAD (05f4404) java 1 0
Additional details and impacted files
@@ Coverage Diff @@
## develop #3449 +/- ##
==============================================
- Coverage 59.54% 29.13% -30.40%
==============================================
Files 2901 291 -2610
Lines 124935 8116 -116819
Branches 9357 1386 -7971
==============================================
- Hits 74381 2364 -72017
+ Misses 47737 5629 -42108
+ Partials 2817 123 -2694
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Please update this PR to develop.
Done with https://github.com/OpenEMS/openems/pull/3449/commits/d95698e6f8251bf3c65eaa622de4873bcfef0da6, hope that helps.
Checkstyle problems were addressed with https://github.com/OpenEMS/openems/pull/3449/commits/7f0d927d41b562e01c8725f6b35113fcb6537161. For the missing whitespace in the last check I could't amend to my last commit as I had to synchronize our repos so there is also https://github.com/OpenEMS/openems/pull/3449/commits/793b76141a41fec636a81131a407f0b1399a353b.