This commit is contained in:
znetsixe
2026-03-11 11:13:26 +01:00
parent 33f3c2ef61
commit 6b2a8239f2
16 changed files with 2850 additions and 146 deletions

View File

@@ -1,49 +1,53 @@
# RotatingMachine Example Flows
These flows are import-ready Node-RED examples focused on the `rotatingMachine` node.
These flows are import-ready Node-RED examples for the `rotatingMachine` node.
In Node-RED: **Import > Examples > EVOLV** to find them.
## Files
## Example Flows
- `basic.flow.json`
Purpose: quick manual control + local visualization.
Includes:
- mode selection
- startup/shutdown/emergency buttons
- setpoint control
- simulated upstream/downstream pressure input
- local charts for predicted flow/power/ctrl
### 01 - Basic Manual Control
**Dependencies:** EVOLV only (no dashboard)
- `integration.flow.json`
Purpose: richer scenario testing from dashboard controls.
Includes:
- sequence controls (startup/shutdown/maintenance)
- direct setpoint + flowMovement commands
- simulated pressure inputs
- charts for flow, power, NCog%
- state snapshot text
Inject-based flow demonstrating all core functionality:
- Mode switching (auto / virtualControl / fysicalControl)
- Startup/shutdown/emergency sequences
- Speed setpoint control (30%, 60%, 100%)
- Pressure simulation (upstream + downstream)
- Maintenance mode enter/leave
- Debug outputs on all 3 ports
- `edge.flow.json`
Purpose: intentionally send invalid/boundary inputs and observe behavior.
Includes:
- invalid mode command
- negative setpoint command
- disallowed source sequence command
- unsupported simulated measurement type
- debug outputs for process/influx/parent channels
### 02 - Integration with Machine Group
**Dependencies:** EVOLV only (no dashboard)
## Requirements
Parent-child relationship demo:
- machineGroupControl parent with 2x rotatingMachine children
- Auto-registration via Port 2 on deploy
- Independent pump control with group-level aggregation
- Pressure simulation on individual pumps
- EVOLV rotatingMachine node installed/available in Node-RED.
- FlowFuse Dashboard 2 nodes installed (`ui-base`, `ui-page`, `ui-group`, etc.).
### 03 - Dashboard Visualization
**Dependencies:** EVOLV + @flowfuse/node-red-dashboard
Interactive FlowFuse dashboard with:
- Mode dropdown, startup/shutdown/emergency buttons
- Speed setpoint input, pressure simulation inputs
- Real-time charts: flow, power, ctrl%, NCog, state code, pressure
## Legacy Files
The following files are from the original flow set and will be removed in a future release:
- `basic.flow.json` → replaced by `01 - Basic Manual Control.json`
- `integration.flow.json` → replaced by `02 - Integration with Machine Group.json`
- `edge.flow.json` → edge-case testing (inject-based)
## Import
1. In Node-RED, use `Import` and select one of the `*.flow.json` files.
2. Deploy.
3. Open the dashboard page path configured in the flow.
1. In Node-RED, use **Import > Examples > EVOLV** (auto-discovered)
2. Or manually: **Import > Clipboard** and paste the `.json` file contents
3. Deploy
## Notes
- These examples are manual by design: no auto-start on deploy.
- Pressure simulation uses `msg.topic = "simulateMeasurement"` handled by the rotatingMachine wrapper.
- Output graphs are based on the rotatingMachine process output payload fields.
- Tier 1 and 2 examples have zero dashboard dependencies — they work on any Node-RED install with EVOLV
- Tier 3 requires `@flowfuse/node-red-dashboard` (included in EVOLV's package.json dependencies)
- All examples use `enableLog: true` so you can observe behavior in the Node-RED debug panel