diff --git a/CONTRACT.md b/CONTRACT.md index 5934f86..77bab34 100644 --- a/CONTRACT.md +++ b/CONTRACT.md @@ -7,7 +7,7 @@ Hand-maintained for Phase 4; the `## Inputs` table is generated from | Canonical | Aliases (deprecated) | Payload | Effect | |---|---|---|---| -| `set.mode` | `setMode` | `string` — one of `prioritycontrol`, `optimalcontrol`, `dynamiccontrol`, … | Switches the control strategy via `source.setMode(payload)`. | +| `set.mode` | `setMode` | `string` — one of `optimalControl`, `priorityControl`, `maintenance` (schema-validated) | Switches the control strategy via `source.setMode(payload)`. | | `child.register` | `registerChild` | `string` — the child node's Node-RED id | Resolves the child via `RED.nodes.getNode` and registers it through `childRegistrationUtils.registerChild(childObj.source, msg.positionVsParent)`. | | `set.demand` | `Qd` | numeric (number or numeric string) | Calls `source.handleInput('parent', parseFloat(payload))`. On success, replies on Port 0 with `topic = source.config.general.name`, `payload = 'done'`. Non-numeric payloads log `error` and are skipped. | diff --git a/src/commands/index.js b/src/commands/index.js index 6d58af0..7a8b6b6 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -12,7 +12,7 @@ module.exports = [ topic: 'set.mode', aliases: ['setMode'], payloadSchema: { type: 'string' }, - description: 'Switch the machine group between auto / manual modes.', + description: 'Switch the operating mode. Allowed: `optimalControl`, `priorityControl`, `maintenance` (schema-validated in `machineGroupControl.json` → `mode.current`).', handler: handlers.setMode, }, {