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

enbility / eebus-go
95%

Build:
DEFAULT BRANCH: dev
Repo Added 05 Dec 2022 04:29PM UTC
Files 93
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: dev
CHANGE BRANCH
x
Reset
  • dev
  • 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
  • feat/implement-mu-mpc
  • feat/ma-mdt
  • 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/ohpcf-register-event-handler
  • fix/regenerate-mocks
  • 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
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
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
26032164866 dev Bump ship-go version (#220) push 18 May 2026 12:02PM UTC web-flow github
95.29
26031653122 dev SHIP Pairing Service Integration (#212) # SHIP Pairing Service Integration This PR introduces breaking API changes to accommodate the latest ship-go module updates, featuring the integration of the new SHIP Pairing Service. ## Core changes: - S... push 18 May 2026 11:51AM UTC web-flow github
95.29
24498756629 dev Revert LPP Failsafe values back to positive values in the examples (#214) Per the spec, the values are always >= 0 because their name already indicates the production direction Only the APPL value itself (the LoadLimit.Value in SetProductionLimit... push 16 Apr 2026 07:54AM UTC web-flow github
95.34
24498705071 dev 🐛 fix: ensure events only fire when public methods return valid data - Fix DeviceConfiguration OR/AND precedence bug in CheckEventPayloadDataForFilter (item.KeyId match was OR'd with item.Value != nil instead of AND'd, causing the filter to a... push 16 Apr 2026 07:53AM UTC DerAndereAndi github
95.36
24441648537 dev Revert LPP Failsafe values back to positive values in the examples (#214) Per the spec, the values are always >= 0 because their name already indicates the production direction Only the APPL value itself (the LoadLimit.Value in SetProductionLimit... push 15 Apr 2026 07:19AM UTC web-flow github
95.34
24332230586 dev Fixed examples for LPP in HEMS and Controlbox (#213) LPP use case shall use negative numbers to show that the stack does not transform positive numbers to negative numbers. push 13 Apr 2026 07:58AM UTC web-flow github
95.34
See All Builds (481)
  • 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