set_power
Turn a DCC system's power on or off and verify the actual state after the command, ensuring reliable control of your model railroad.
Instructions
Turn a DCC system's power ON or OFF, and report the state actually observed.
Args: system: System name, prefix, or fragment (e.g. "ohara", "O"). Case-insensitive. Omit to use JMRI's default system. turn_on: True to turn power ON, False to turn it OFF.
This writes to JMRI. The reported state is re-read ~1s after the command (JMRI's immediate POST response is transient/unreliable) — if the observed state doesn't match the request, "confirmed" will be false and the caller should say so honestly rather than assume success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| system | Yes | ||
| turn_on | Yes |