Add a flow5d type for the Autoterm Flow 5D heater #140

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

YN-21. Stacks on #139 (YN-20), which stacks on #137 (YN-19), so the diff also shows their commits until those merge.

New output type flow5d: rx and tx pins, label, optional diagnostics (default false) and binds. It must be the endpoint at index 0 and is a block that occupies 0 to 25 (its span is 26, so the next endpoint without an index takes 26). It registers the same children at the same indices with the same labels as src/node_heater/main.cpp: heater 0, exchanger 1, supply 2, second coolant 3, coolant return 4, minutes since start 5, blower flag 6, run time 7, preheater wait 9, warm-up wait 10, coolant 23, and with diagnostics: true the eight diagnostics 17 to 22, 24 and 25 (marked with setDiagnostic()). Their indices stay reserved when diagnostics are off, and 8 and 11 to 16 stay free. Another endpoint on a reserved index fails naming the child ("3 is already used by the 'Coolant temperature 2' child of the flow5d"), and a registered child's label is reserved too. XIAO boards only; the LOLIN32 is rejected, and the schema refuses it too.

The generator emits what main.cpp has: the shared PreferencesStore, the three SettingEndpoints (keys s7, s9, s10), autoterm::Flow5D, the statusOf/reading helpers, the readouts and the two FlagInputs, Serial1.begin(2400, ...) and flow5d.begin() in setup, and the Serial1 feed plus flow5d.loop in loop. HeaterEndpoint takes flow5d as its device, and its measured reading is can::SensorScalar{} (Unknown) until the measure bind exists. The blower motor, climate sensor, water heating and arbiter are not part of the type. The blower output and link children can be bind sources by label or index.

Runtime: two small touches so binds can target a heater. strategyFor gains EndpointType::Heater, and HeaterEndpoint::isOn() reports whether heat is wanted, which is what mode() reports as Heat, so a toggle bind stops a heater it started as well as starting it. The endpoint takes no disabled_modes; binds keep theirs.

Schema regenerated (rx/tx enums per board), README gets a Flow 5D section with the child table, and a new heater.yaml fixture compiles the block with diagnostics and a following bind.

Tested: Python 113 (was 100) and native 639, none skipped locally. Native tests cover a follow bind starting and stopping the device, and a toggle bind starting it then stopping it; removing the isOn() override fails the toggle test. Hiding the diagnostics wrongly fails two Python tests. All fixtures and pio run build.

YN-21. Stacks on #139 (YN-20), which stacks on #137 (YN-19), so the diff also shows their commits until those merge. New output type `flow5d`: `rx` and `tx` pins, `label`, optional `diagnostics` (default false) and `binds`. It must be the endpoint at index 0 and is a block that occupies 0 to 25 (its `span` is 26, so the next endpoint without an `index` takes 26). It registers the same children at the same indices with the same labels as src/node_heater/main.cpp: heater 0, exchanger 1, supply 2, second coolant 3, coolant return 4, minutes since start 5, blower flag 6, run time 7, preheater wait 9, warm-up wait 10, coolant 23, and with `diagnostics: true` the eight diagnostics 17 to 22, 24 and 25 (marked with `setDiagnostic()`). Their indices stay reserved when diagnostics are off, and 8 and 11 to 16 stay free. Another endpoint on a reserved index fails naming the child ("3 is already used by the 'Coolant temperature 2' child of the flow5d"), and a registered child's label is reserved too. XIAO boards only; the LOLIN32 is rejected, and the schema refuses it too. The generator emits what main.cpp has: the shared `PreferencesStore`, the three `SettingEndpoint`s (keys `s7`, `s9`, `s10`), `autoterm::Flow5D`, the `statusOf`/`reading` helpers, the readouts and the two `FlagInput`s, `Serial1.begin(2400, ...)` and `flow5d.begin()` in setup, and the `Serial1` feed plus `flow5d.loop` in loop. `HeaterEndpoint` takes `flow5d` as its device, and its measured reading is `can::SensorScalar{}` (Unknown) until the measure bind exists. The blower motor, climate sensor, water heating and arbiter are not part of the type. The blower output and link children can be bind sources by label or index. Runtime: two small touches so binds can target a heater. `strategyFor` gains `EndpointType::Heater`, and `HeaterEndpoint::isOn()` reports whether heat is wanted, which is what `mode()` reports as Heat, so a `toggle` bind stops a heater it started as well as starting it. The endpoint takes no `disabled_modes`; binds keep theirs. Schema regenerated (`rx`/`tx` enums per board), README gets a Flow 5D section with the child table, and a new `heater.yaml` fixture compiles the block with diagnostics and a following bind. Tested: Python 113 (was 100) and native 639, none skipped locally. Native tests cover a follow bind starting and stopping the device, and a toggle bind starting it then stopping it; removing the `isOn()` override fails the toggle test. Hiding the diagnostics wrongly fails two Python tests. 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
rob force-pushed feat/yaml-flow5d from 22aab89772
All checks were successful
Build and test / build (pull_request) Successful in 2m8s
Build and test / release (pull_request) Has been skipped
to 27d24bd9bb
All checks were successful
Build and test / build (pull_request) Successful in 5m38s
Build and test / release (pull_request) Has been skipped
2026-10-17 16:46:19 +00:00
Compare
rob approved these changes 2026-10-17 19:39:36 +00:00
Claude merged commit df217549e6 into feat/yaml-nodes 2026-10-17 19:46:30 +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!140
No description provided.