Skip to content

Add Configuration of Room Heating System Function (CRHSF) use case#241

Open
andig wants to merge 8 commits into
enbility:devfrom
evcc-io:feat/ca-crhsf
Open

Add Configuration of Room Heating System Function (CRHSF) use case#241
andig wants to merge 8 commits into
enbility:devfrom
evcc-io:feat/ca-crhsf

Conversation

@andig

@andig andig commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Adds the Configuration of Room Heating System Function (CRHSF) use case (EEBus UC TS V1.0.0) as a Configuration Appliance client actor in usecases/ca/crhsf.

Scenario 1 (mandatory): set the room heating operation mode on an HVACRoom entity.

Public API:

  • OperationModes: the heating operation modes supported by the room (via hvacSystemFunctionOperationModeRelationListData + mode descriptions)
  • CurrentOperationMode: the currently active heating operation mode
  • WriteOperationMode: write currentOperationModeId via hvacSystemFunctionListData, gated by isOperationModeIdChangeable

Per spec, the client subscribes to the HVAC server feature (no binding) and requests descriptions, relations and data on connect.

Stacked on #239 (Hvac and Setpoint client features) — only the last commit is specific to this PR.

🤖 Generated with Claude Code

andig and others added 3 commits July 17, 2026 12:22
Groundwork for the HVAC system function and temperature use cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
andig and others added 5 commits July 20, 2026 17:13
…rate an omitted changeability flag

WriteOperationMode blocked the write whenever IsOperationModeIdChangeable
was nil and resolved the requested mode against the global operation-mode
descriptions, writing the first match. Only an explicit false should
block the write, and the mode must be resolved through the
HvacSystemFunctionOperationModeRelation so a mode that exists globally
but is not related to the room-heating system function is rejected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point 5: WriteOperationMode discarded the message counter and reported
success as soon as the request was sent. Return the message counter and
accept a resultCB so a non-zero ResultData.ErrorNumber surfaces as a
device rejection, matching the OPEV/LPC/OHPCF write pattern.

Point 6: systemFunctionId returned the first matching entry. Return
ErrDataNotAvailable unless exactly one heating system function matches,
so the wrong entry is never controlled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Hvac and Setpoint write helpers issued a write command without
checking whether the remote server feature advertises the Write()
operation for the corresponding function. Guard each write helper so it
returns api.ErrNotSupported unless the remote advertises Write(),
matching the existing LoadControl/DeviceConfiguration behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Hvac and Setpoint write helpers sent a list containing only the
modified entry. Servers that interpret the payload as a full replacement
would then drop unrelated system functions, overruns or setpoints.

Send a proper partial write when the remote advertises WritePartial().
Otherwise copy the cached list, merge the modified entries and write the
complete list, matching the LoadControl/DeviceConfiguration behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Now that the Write() advertisement gate is present in the Hvac feature
helper, the test fixture must advertise the Write operation for existing
write tests to pass, and a dedicated test verifies WriteOperationMode
returns ErrNotSupported when the remote advertises the system-function
list as read-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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