Skip to content

[Feature] Add read-only ecoMain Modbus TCP interfacer - #240

Open
enecess wants to merge 1 commit into
openenergymonitor:masterfrom
enecess:feature/ecomain
Open

enecess wants to merge 1 commit into
openenergymonitor:masterfrom
enecess:feature/ecomain

Conversation

@enecess

@enecess enecess commented Sep 4, 2026

Copy link
Copy Markdown

Overview

Hello OpenEnergyMonitor team,

We are the enecess team. First of all, thank you for your continued work on OpenEnergyMonitor and its open energy monitoring ecosystem.

We would like to contribute a Modbus TCP integration for ecoMain to emonHub.

ecoMain can measure a three-phase main circuit and 10 branch circuits. Up to three ecoSub units can be added, extending the system to a total of 40 branch circuits. The new EmonHubEcoMainInterfacer reads these measurements and publishes them to Emoncms through the existing emonHub data flow.

Main features

  • Read power, voltage, current, power factor, and imported and exported cumulative active energy from the three-phase main circuit
  • Configure ecoMain or ecoSub branch circuits as single-phase or three-phase logical meters
  • Correct the current transformer installation direction for individual phases
  • Publish measurements to Emoncms using the configured node names
  • Include an example configuration, English documentation, and automated tests

The integration is strictly read-only and only uses Modbus function code 03. It does not write registers, change device settings, or control external devices. It also does not change the behavior of the emonHub core framework.

Validation

  • 67 automated tests pass
  • Tested with real ecoMain hardware and Emoncms running on a Raspberry Pi
  • Measurements are displayed correctly and continuously updated on the Emoncms Inputs page

Documentation

Thank you for taking the time to review this pull request. We welcome your feedback and are happy to refine the implementation in line with emonHub's project conventions.

Add read-only ecoMain and ecoSub measurement support with logical meter configuration, device identity validation, documentation, examples, and tests.
@glynhudson

Copy link
Copy Markdown
Member

Thanks for the PR. Does ecoMain uses standard modbus TCP? If so, it would be best to make use of the existing modbusTCP interfacer: https://github.com/openenergymonitor/emonhub/tree/master/conf/interfacer_examples/modbus

Modifications or extensions to the existing modbusTCP interfacer would be prefered rather than adding a whole new interfacer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants