prepare_locomotive
Prepare a locomotive for a session by acquiring throttle, setting direction forward, and turning on all lights.
Instructions
Prepare ONE locomotive for a session: acquire, face forward, lights on.
Args: address: The locomotive's DCC address. prefix: Optional command station prefix (e.g. "O", "Z", "R"), passed straight through to acquire_throttle — including its DccSystem roster auto-detection when omitted.
Use for "prépare la loco"/"prepare the 3"/"get the autorail ready" — counterpart to park_locomotive, beginning a session rather than a normal "go" mid-run.
NOT stop/emergency_stop (speed only, active session) and NOT
set_power (DCC station power, JMRI-wide). Only touches this
locomotive's session state (throttle + lights), never power or
speed/motion.
Three steps, one call: (1) acquire the throttle (safe if already held); (2) set direction forward (session-start convention, matching park_locomotive's end-of-session state); (3) turn on every light-related function, same as set_loco_lights(address, True).
Does NOT set a speed. Follow with set_speed/set_speed_ramped if the user also asked it to move.
Never call acquire_throttle, set_direction, and set_loco_lights yourself in sequence for a "prepare" request — use this tool.
Returns {"address", "acquired": bool, "direction": "forward", "lights": }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prefix | No | ||
| address | Yes |