Skip to content

Story 18: map SRNE off-grid inverter lifecycle - #4

Open
tushabe wants to merge 2 commits into
agent/story-17-srne-metersfrom
agent/story-18-srne-offgrid-state
Open

Story 18: map SRNE off-grid inverter lifecycle#4
tushabe wants to merge 2 commits into
agent/story-17-srne-metersfrom
agent/story-18-srne-offgrid-state

Conversation

@tushabe

@tushabe tushabe commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an SRNE OffGridBatteryInverter component
  • read machine state 0x0210 and active power over FC03
  • map stable machine states to OpenEMS grid mode and expose lifecycle state
  • keep control and FC16 writes explicitly deferred to Story 19
  • document that only state 2 is live-validated so far

Verification

  • ./gradlew :io.openems.edge.ess.srne:test
  • ./gradlew :io.openems.edge.ess.srne:check buildEdge buildAntoraDocs

Tracks Nearly-Free-Energy/nfe-modbus-energy-logger#18

Stacked on PR #3; rebase the base to develop after PR #3 merges.

@tushabe
tushabe force-pushed the agent/story-18-srne-offgrid-state branch from 64582d6 to 73a6cb8 Compare July 24, 2026 10:17
@tushabe
tushabe marked this pull request as ready for review July 24, 2026 10:21
@tushabe
tushabe requested a review from arindahills July 24, 2026 10:21

@arindahills arindahills left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OffGridBatteryInverter + StateMachine (machine-state → GridMode, only state 2 validated, transition/unknown states don't claim a mode) is exactly right and respects the live-validation discipline. Read-only + targetGridMode plumbing for story 19 is the right call. One change, same as #2:

ACTIVE_POWER here is also mapped from 0x021B (load power) — same issue: it's the load, not the inverter's power, and phase-A only. Derive it from battery DC power (0x0101 × 0x0102). There is no inverter/ESS power register on this model (verified deep-dive: https://bookstack.nearlyfreeenergy.com/books/product/page/srne-asp48120sh3-modbus-register-map-validated).

@tushabe
tushabe force-pushed the agent/story-17-srne-meters branch from ece8b6d to c777082 Compare July 27, 2026 09:14
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.

2 participants