Add a water_heating type sharing a flow5d heater #142

Merged
Claude merged 4 commits from feat/yaml-water into feat/yaml-nodes 2026-10-17 19:46:36 +00:00
Collaborator

YN-24, reworked after review. Stacks on #141 (YN-23), so the diff also shows that PR's commits (and #140, #139, #137 under it) until they merge.

New output type water_heating: a switch that heats water through the same flow5d as space heating. Fields are heater (label of the flow5d, same node only), delta (°C to one decimal place, 0 to 20, or the label of a same-node setting of setting_type: temperature), binds and disabled_modes. It has no pin, and a node can have one. It reports as a Switch, so strategyFor already covers it and toggle and follow binds work through its setOn.

WaterHeating and HeaterDemandArbiter moved from src/node_heater into lib/autoterm, with the Flow 5D code whose output they manage, and from heater:: to autoterm::. They are specific to that heater, so they do not belong in the runtime. The hand-written heater node changes its includes (angle brackets) and the two namespaces and nothing else, and test_water_heating changes only the namespace. No behaviour change.

When a water_heating exists the generator declares an autoterm::HeaterDemandArbiter on flow5d and gives the heater endpoint heaterDemand.spaceHeating() as its device instead of flow5d; without the type the output is unchanged. Water heating takes heaterDemand.waterHeating(), the delta setting, and the coolant and return readings. Its warm threshold is the blower's threshold setting when the node has a heater_blower, otherwise the heater's warm-up wait setting (index 10, "Target coolant temp"); the README says which. A literal delta becomes an unregistered SettingEndpoint, as a literal blower threshold does, through one shared path. The water heating object is declared after all endpoints, so list order does not matter.

Schema regenerated (heater and delta required, delta as number or label). README gets the type row and a Water heating section. The heater fixture gains one, with a setting label for the delta and a toggle bind.

Tested: Python 133 and native 639, none skipped locally. Tests cover the heater-label resolution, the cross-node and second-instance rejections, both delta forms and ranges, the arbiter wiring appearing only when the type is present, and the threshold choice with and without a blower; dropping the arbiter wiring fails them. All fixtures and pio run build.

YN-24, reworked after review. Stacks on #141 (YN-23), so the diff also shows that PR's commits (and #140, #139, #137 under it) until they merge. New output type `water_heating`: a switch that heats water through the same `flow5d` as space heating. Fields are `heater` (label of the flow5d, same node only), `delta` (°C to one decimal place, 0 to 20, or the label of a same-node `setting` of `setting_type: temperature`), `binds` and `disabled_modes`. It has no pin, and a node can have one. It reports as a `Switch`, so `strategyFor` already covers it and `toggle` and `follow` binds work through its `setOn`. `WaterHeating` and `HeaterDemandArbiter` moved from `src/node_heater` into `lib/autoterm`, with the Flow 5D code whose output they manage, and from `heater::` to `autoterm::`. They are specific to that heater, so they do not belong in the runtime. The hand-written heater node changes its includes (angle brackets) and the two namespaces and nothing else, and `test_water_heating` changes only the namespace. No behaviour change. When a `water_heating` exists the generator declares an `autoterm::HeaterDemandArbiter` on `flow5d` and gives the heater endpoint `heaterDemand.spaceHeating()` as its device instead of `flow5d`; without the type the output is unchanged. Water heating takes `heaterDemand.waterHeating()`, the delta setting, and the coolant and return readings. Its warm threshold is the blower's threshold setting when the node has a `heater_blower`, otherwise the heater's warm-up wait setting (index 10, "Target coolant temp"); the README says which. A literal `delta` becomes an unregistered `SettingEndpoint`, as a literal blower threshold does, through one shared path. The water heating object is declared after all endpoints, so list order does not matter. Schema regenerated (`heater` and `delta` required, `delta` as number or label). README gets the type row and a Water heating section. The heater fixture gains one, with a setting label for the delta and a toggle bind. Tested: Python 133 and native 639, none skipped locally. Tests cover the heater-label resolution, the cross-node and second-instance rejections, both delta forms and ranges, the arbiter wiring appearing only when the type is present, and the threshold choice with and without a blower; dropping the arbiter wiring fails them. All fixtures and `pio run` build.
Make endpoint index optional with auto-increment
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
a105a004cd
Rename next_index and restore the README wrapping
All checks were successful
Build and test / build (pull_request) Successful in 5m46s
Build and test / release (pull_request) Has been skipped
2448011705
Add temperature_setting and humidity types to YAML nodes
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
117844c82a
List the climate checks in the schema description and wrap the README
Some checks failed
Build and test / release (pull_request) Has been cancelled
Build and test / build (pull_request) Successful in 6m49s
b6806810a9
Rewrap the settings paragraph
All checks were successful
Build and test / build (pull_request) Successful in 6m57s
Build and test / release (pull_request) Has been skipped
77e437053f
Add a flow5d type for the Autoterm Flow 5D heater
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
d450f32169
Split the flow5d writer from its helpers and note the omitted arbiter
All checks were successful
Build and test / build (pull_request) Successful in 5m23s
Build and test / release (pull_request) Has been skipped
93f8be36cf
Report a wanted heat as the heater endpoint's on state
All checks were successful
Build and test / build (pull_request) Successful in 2m8s
Build and test / release (pull_request) Has been skipped
22aab89772
Add a heater_blower type driven by a flow5d heater
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
f3cab85aca
Say the generated blower has no cabin temperature yet
All checks were successful
Build and test / build (pull_request) Successful in 6m58s
Build and test / release (pull_request) Has been skipped
1f2107d6ed
Add a water_heating type sharing a flow5d heater
All checks were successful
Build and test / build (pull_request) Successful in 5m16s
Build and test / release (pull_request) Has been skipped
41b2f52eb9
rob requested changes 2026-10-17 16:29:34 +00:00
Dismissed
@ -0,0 +1,50 @@
#pragma once
Owner

This file shouldn't be part of the runtime as it's hardware specific. Put it with the flow5d as it's code to manage the output from that

This file shouldn't be part of the runtime as it's hardware specific. Put it with the flow5d as it's code to manage the output from that
rob force-pushed feat/yaml-water from 41b2f52eb9
All checks were successful
Build and test / build (pull_request) Successful in 5m16s
Build and test / release (pull_request) Has been skipped
to 37e9bea090
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
2026-10-17 16:59:25 +00:00
Compare
Claude left a comment

Two minor points.

  • scripts/yaml_node.py: flow5dWarmUpWait = 10 repeats the index already keyed in flow5dSettings. Derive it from there, or it drifts silently.
  • scripts/tests/test_yaml_node.py: no test that delta rejects a label of the wrong setting type (e.g. a toggle or duration setting). Only a missing label and a non-setting endpoint are covered. This is the "wrong kind can't satisfy the reference" case.
Two minor points. - scripts/yaml_node.py: `flow5dWarmUpWait = 10` repeats the index already keyed in `flow5dSettings`. Derive it from there, or it drifts silently. - scripts/tests/test_yaml_node.py: no test that `delta` rejects a label of the wrong setting type (e.g. a toggle or duration setting). Only a missing label and a non-setting endpoint are covered. This is the "wrong kind can't satisfy the reference" case.
Test a delta label of the wrong setting type
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
53bd1353c7
Use a free index for the wrong-type delta test
All checks were successful
Build and test / build (pull_request) Successful in 5m22s
Build and test / release (pull_request) Has been skipped
a9ae461f22
rob approved these changes 2026-10-17 19:41:54 +00:00
Claude merged commit ecbc1a0d1e into feat/yaml-nodes 2026-10-17 19:46:36 +00:00
Sign in to join this conversation.
No reviewers
rob
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
CamperCan/CampervanControlSystems!142
No description provided.