• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

enbility / eebus-go
95%

Build:
DEFAULT BRANCH: dev
Repo Added 05 Dec 2022 04:29PM UTC
Files 90
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH dev
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • 188-update-controlboxhems-examples-positive_failsafe_limits
  • 188-update-controlboxhems-examples-to-write-negative-appl-values
  • bugfix/remote-uc-removal
  • chore/bump-spine-go-to-prepare-for-releases
  • dev
  • feat/implement-mu-mpc
  • feat/rebased-mu-mpc-mgcp
  • feature/binding-handling
  • feature/examples-clarification
  • feature/improve-data
  • feature/improve-disconnect-handling
  • feature/improved-register-handling
  • feature/jsonrpc2
  • feature/minor-maintenance
  • feature/mu-mpc--gcp-mgcp--smartmeter-demo
  • feature/shippairing-integration
  • fix/cs-lpc-lpp-0-duration
  • fix/eg-lpc-lpp-missing-constraints-setup
  • fix/event-firing-consistency
  • fix/loadcontrol-phase-parameter-description
  • fix/lpc-lpp-dependencies
  • fix/missing-pointer-nil-checks
  • fix/report-per-phase-measurements-for-correct-phase
  • fix/use-correct-eg-lpc-lpp-characteristic-types
  • implement-cem-ohpcf
  • implement-gcp-mgcp
  • main
  • push-zxvruxpyxtuv
  • result-callback-with-message-counter
  • wip/failsafe-limit-write-approval

09 Jun 2026 08:52AM UTC coverage: 95.268% (-0.02%) from 95.286%
27195008224

push

github

web-flow
Fix wrong parameter description selection in LoadControlLimits (#218)

Fixes #217.

Asked Claude for a fix since
[evcc-io/evcc](https://github.com/evcc-io/evcc) uses both opev and
oscev. Fix is LGTM.

## Problem

`LoadControlLimits` and `WriteLoadControlPhaseLimits` in
`usecases/internal/loadcontrol.go` looked up
`ElectricalConnectionParameterDescription` entries filtered only by
`AcMeasuredPhases` and then blindly used `elParamDesc[0]`. If a remote
device exposes more than one description per phase (e.g. current and
voltage), the wrong entry could be picked and the limit would be
resolved against an unrelated `MeasurementId` / `ParameterId`.
Additionally, `*elParamDesc[0].ParameterId` was dereferenced without a
nil guard on the write side, which could panic against a conformant
remote that omits the optional `ParameterId`.

Not observed on Elli, Porsche MCC, or SMA HEM 2.0 (they only expose
current descriptions), but a conformant device is allowed to expose more
— and the bug surfaces whenever a non-current description is listed
first.

## Fix

Walk all parameter descriptions for the phase and pick the one whose
`MeasurementId` is referenced by one of the limit descriptions, then use
that description's `ParameterId` for the permitted-value lookup /
adjustment. Adds the missing `ParameterId` nil guard on the write path.

The four public entry points are all thin wrappers over the two internal
helpers and inherit the fix:

- `opev.OPEV.LoadControlLimits` / `opev.OPEV.WriteLoadControlLimits`
- `oscev.OSCEV.LoadControlLimits` / `oscev.OSCEV.WriteLoadControlLimits`

28 of 30 new or added lines in 1 file covered. (93.33%)

1 existing line in 1 file now uncovered.

7248 of 7608 relevant lines covered (95.27%)

12.41 hits per line

Relevant lines Covered
Build:
Build:
7608 RELEVANT LINES 7248 COVERED LINES
12.41 HITS PER LINE
Source Files on dev
  • Tree
  • List 90
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
27195008224 dev Fix wrong parameter description selection in LoadControlLimits (#218) Fixes #217. Asked Claude for a fix since [evcc-io/evcc](https://github.com/evcc-io/evcc) uses both opev and oscev. Fix is LGTM. ## Problem `LoadControlLimits` and `WriteLoad... push 09 Jun 2026 08:54AM UTC web-flow github
95.27
27195019205 dev Add missing nil/length guards before pointer dereferences (#219) Follow-up to #218. While fixing #217, I audited the codebase for the same class of bug — a slice element subfield dereferenced without a nil guard, or `[0]` indexing without a `len... push 09 Jun 2026 08:54AM UTC web-flow github
95.24
25732358492 fix/loadcontrol-phase-parameter-description Merge a55d13fc1 into 1a17729d8 Pull #218 09 Jun 2026 08:42AM UTC web-flow github
95.32
25732989933 fix/missing-pointer-nil-checks Merge ac324e4e5 into 1a17729d8 Pull #219 09 Jun 2026 08:35AM UTC web-flow github
95.31
27193764769 feat/rebased-mu-mpc-mgcp Merge 4aad63b72 into 11bc53084 Pull #224 09 Jun 2026 08:30AM UTC web-flow github
93.21
27133915929 implement-cem-ohpcf Merge abdcf864d into 11bc53084 Pull #223 08 Jun 2026 11:16AM UTC web-flow github
94.23
27132933867 implement-cem-ohpcf Merge 00c54db39 into 11bc53084 Pull #223 08 Jun 2026 10:57AM UTC web-flow github
94.22
26174189335 dev Bump spine-go version to start preparing for new releases (#221) This closes #203 and #202 push 20 May 2026 03:58PM UTC web-flow github
95.29
26173128063 chore/bump-spine-go-to-prepare-for-releases Merge 381ec5240 into f3de5f549 Pull #221 20 May 2026 03:39PM UTC web-flow github
95.29
26169322344 dev Add write approval callbacks for Failsafe values of CS-LPC usecase (#150) This is a work-in-progress proposal for adding write approval callbacks for the failsafe values of the CS-LPC usecase. Code changes should be functional, but are not yet f... push 20 May 2026 02:32PM UTC web-flow github
95.29
See All Builds (475)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc