Skip to content

io.openems.edge.bridge.modbus.ascii - adding support for Modbus/ASCII over serial#3632

Open
janklostermann wants to merge 12 commits intoOpenEMS:developfrom
janklostermann:feature/modbus-ascii
Open

io.openems.edge.bridge.modbus.ascii - adding support for Modbus/ASCII over serial#3632
janklostermann wants to merge 12 commits intoOpenEMS:developfrom
janklostermann:feature/modbus-ascii

Conversation

@janklostermann
Copy link
Copy Markdown
Contributor

This PR adds a Modbus/ASCII bridge to openems to support devices that communicate through this protocol via a serial port (one example would be the ABL eMH1).

It is implemented as a separate component to not interfere with the existing modbus bridge, which implements the Modbus/RTU protocol over serial under the name BridgeModbusSerialImpl.java.

It might be a good idea to integrate this code into the io.openems.edge.bridge.modbus component. There could be even an abstraction be made to separate-out common code for the serial RTU and ASCII implementations (both use j2mod for the heavy-lifting) and rename the current Serial to SerialRtu.
If you wish I can adjust this PR accordingly.
(I chose the path of separating them to simplify evaluation and merging, and avoid the risk of mixing things up in the field-proven modbus bridge.)

Unfortunatetely I was not able to bring this component into the section device interfaces alongside the other bridges. I would be happy to fix this if I knew how.

…existing Modbus/RTU bridge.

co-authored by: claude@anthropic.com
…i protocol (`>` instead of `:` to start message when responding)
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 52.33161% with 92 lines in your changes missing coverage. Please review.

❌ Your patch check has failed because the patch coverage (52.34%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3632      +/-   ##
=============================================
+ Coverage      58.52%   58.56%   +0.05%     
  Complexity       104      104              
=============================================
  Files           3095     3099       +4     
  Lines         134205   134398     +193     
  Branches        9870     9881      +11     
=============================================
+ Hits           78528    78695     +167     
- Misses         52761    52774      +13     
- Partials        2916     2929      +13     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@janklostermann
Copy link
Copy Markdown
Contributor Author

Sorry, cbd5948 was definitely premature. I am going to fix the issues and integrate some further improvements of the PR. I will come back soon.

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.

1 participant