JMRI MCP

v1.0.0rc4
io.github.HO44-PROJECT/jmri-mcp Checked 18 hours ago Published 4 months ago

JMRI voice/chat control for DCC model railroads

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_systems

List every DCC power system known to JMRI, with its current power state. Use this to discover what systems exist before calling get_power, or to answer "what systems are there?". No side effects. Each system's "name" is JMRI's full connection name, often with a parenthetical describing what it's for (e.g. "zou (test)", "raijin (tracks)") — the user set these themselves in JMRI. If asked what a system is used for, this name is the answer; don't say that information isn't available.

get_power

Get the current power state (ON/OFF/UNKNOWN/IDLE) of one DCC system. Args: system: System name, prefix, or fragment (e.g. "ohara", "O"). Case-insensitive. Omit to use JMRI's default system. No side effects — this only reads state, it never changes power. The returned "name" is JMRI's full connection name, often with a parenthetical describing what the system is for (e.g. "zou (test)"). If the user asks what a system is used for rather than its power state, answer from this name.

ParameterTypeDescription
system

set_power

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…

ParameterTypeDescription
system *
turn_on *boolean

power_off_all

Cut power to EVERY DCC system at once — the real "stop absolutely everything" button. No arguments. Call for "cut the power", "cut everything", "kill the power", "coupe le courant", "coupe tout", "coupe l'alimentation" — any generic power-cut request with no specific system named. Use this even when the phrase sounds like a stop command — "coupe le courant" means THIS tool, not emergency_stop_all, since the user is naming power, not motion. For a genuine layout-wide emergency, this reaches every locomotive regardless of who…

power_on_all

Restore power to EVERY DCC system at once. No arguments. Call this for phrases like "turn everything on", "power everything on", "allume tout", "remets le courant" — any request to restore/turn on power generically, without a specific system named. The inverse of power_off_all — use this after a layout-wide power cut (power_off_all, or manually turning systems off) to bring every system back to ON in one call, rather than naming each system individually with set_power. IMPORTANT: restoring power does NOT make locomotives res…

system_status

One-call diagnostic: is JMRI reachable, and what state is it in? Reports JMRI reachability/version and every power system's state. Call this first when something isn't responding, instead of guessing which tool to retry. No side effects.

list_roster

List every locomotive in JMRI's roster: name, DCC address, road, road number, manufacturer, model, owner, last-modified date, roster groups, DCC system, and max speed percent. Use this to discover what locomotives exist and their DCC addresses before calling acquire_throttle/set_speed/etc. — this is currently the only way to find which address belongs to which named loco (e.g. "start the Autorail" but set_speed needs address=4). Any field can be empty if unfilled in JMRI — normal, not an error. "groups": JMRI Roster Groups (m…

find_locomotive

Resolve a locomotive's spoken/typed name to its DCC address. Use this whenever the user names a locomotive ("the Autorail", "141R", "start the Pacific") instead of giving a DCC address directly — call this first to get the address, then pass that address to acquire_throttle/set_speed/set_direction/set_function/ lights_on/lights_off/etc. Matching is tolerant: case-insensitive, accent-insensitive (useful for French names — "boite a sel" matches "Boite à Sel"), and accepts an exact name or an unambiguous partial match ("autora…

ParameterTypeDescription
name *string

get_locomotive_functions

List a locomotive's named decoder functions (e.g. "F2": "Rear lights"). JMRI lets the user label each loco's functions individually in its roster editor — call this BEFORE set_function whenever the user refers to a function by what it does ("turn on the rear lights", "blow the whistle") instead of an F-number, so you can look up the right number instead of guessing or asking. Only labels the user actually set are returned; most locos have few or none (an empty "functions" dict is normal, not an error — it means this loco has…

ParameterTypeDescription
name *string

acquire_throttle

Acquire control of a locomotive by its DCC address, and report its current state. Args: address: The locomotive's DCC address. prefix: Optional command station prefix (e.g. "O", "Z", "R") to target when more than one DCC system is connected. Omit to auto-detect from the roster's DccSystem attribute (see list_roster's "dcc_system" field), else JMRI's default station. Pass explicitly only to override auto-detection. You usually do NOT need to call this explicitly before set_speed/ st…

ParameterTypeDescription
address *integer
prefix

release_throttle

Release this session's control of a locomotive acquired with acquire_throttle. Args: address: The locomotive's DCC address. Good practice once you're done controlling a loco (frees it up for other JMRI clients/throttles to acquire without contention), but not required for correctness — JMRI releases it automatically when the MCP server's connection to JMRI closes, so a missed release_throttle does not leave the loco "stuck" for other clients across restarts. Turns off any still-active function (e.g. lights) first automati…

ParameterTypeDescription
address *integer

set_speed

Set a locomotive's speed as a percentage of its maximum (0-100%). Args: address: DCC address. Auto-acquires the throttle if needed. speed_percent: 0-100, clamped not rejected. direction: Optional "forward"/"reverse" (case-insensitive) — set together with speed_percent atomically ("avance à 40%") instead of a separate set_direction call. Omit to leave direction untouched. Flips instantly; for a ramped flip use set_speed_ramped instead. Returns actual speed as % of THIS loco's…

ParameterTypeDescription
address *integer
speed_percent *number
direction

set_speed_ramped

Change a locomotive's speed gradually — a smooth ramp up and/or down. Args: address: DCC address. Auto-acquires the throttle if needed. speed_percent: Target speed, 0-100%. Legacy shorthand: NEGATIVE toggles direction relative to current facing, ramps to |value|%. Prefer explicit direction for new calls — ignored as a sign once direction is given (only its clamped 0-100 magnitude used then). direction: Optional "forward"/"reverse" (case-insensitive), set atomically w…

ParameterTypeDescription
address *integer
speed_percent *number
direction
hold_seconds
rampdown_secondsnumber
rampup_secondsnumber

stop

Bring a locomotive to a controlled stop (speed 0%), like releasing the throttle. Args: address: DCC address. Auto-acquires the throttle if needed. For a panic/safety stop (derailment risk, collision course, "stop it NOW") use emergency_stop instead — a distinct decoder command (immediate motor power cut), not just "speed 0". Use this `stop` for a normal, intentional halt (end of run, waiting at a signal). Safe to call repeatedly, even when already stopped: JMRI silently ignores a redundant request, and a local speed cache…

ParameterTypeDescription
address *integer

emergency_stop

Emergency-stop a locomotive immediately (JMRI's decoder e-stop command). Args: address: DCC address. Auto-acquires the throttle if needed. Use ONLY for safety-critical stops: derailment risk, imminent collision, or any situation needing an immediate halt rather than smooth deceleration. This is JMRI's actual decoder e-stop (speed -1.0 on the wire, distinct from a normal speed command) — cuts power abruptly, rougher on the mechanism, so don't use as a synonym for routine `stop`. Returns `stopped: true` once confirm…

ParameterTypeDescription
address *integer

emergency_stop_all

Emergency-stop EVERY locomotive currently under this session's control at once. No arguments — panic button for "stop everything NOW" (derailment, collision risk, no time to name individual locomotives). Call for "stop everything"/"stop all trains"/"arrête tout"/"arrête toutes les locos" — stop MOTION generically, no locomotive named. Sends the same decoder e-stop as emergency_stop(address) to every address this session has acquired. NOT "cut the power"/"coupe le courant"/"coupe tout" — that means power_off_all (real pow…

set_direction

Set a locomotive's direction of travel: "forward" or "reverse". Args: address: DCC address. Auto-acquires the throttle if needed. direction: Exactly "forward" or "reverse" (case-insensitive) — the decoder's own front/back, not compass direction. For "turn it around"/"go the other way", flip the current reported direction rather than guessing. Best practice: stop a moving loco first — a direction change at speed can jolt or be ignored depending on the decoder; this tool doesn't enforce…

ParameterTypeDescription
address *integer
direction *string

set_function

Turn one of a locomotive's decoder functions (F0-F28) on or off. Args: address: DCC address. Auto-acquires the throttle if needed. function: 0-28 inclusive (validated locally; out-of-range returns an error without contacting JMRI). What each number controls is decoder/roster-specific — F0 is almost always headlight(s) (see lights_on/lights_off), F1-F28 vary loco to loco (bell, horn, sounds, couplers...). If the user names a function by effect ("turn on the bell", "rear…

ParameterTypeDescription
address *integer
function *integer
state *boolean

lights_on

Turn on a locomotive's headlight(s): shortcut for set_function(address, 0, True). F0 is almost universally the headlight function across DCC decoders (this is a very strong convention, not a JMRI/protocol guarantee), so this is the tool to reach for on a plain "turn the lights on" voice request without asking the user for a function number. Same auto-acquire and no-op-safe behavior as set_function. This is the locomotive's own headlight, NOT layout/scenery lighting (depot, street lamps, signals) — for those, use set_light instead.…

ParameterTypeDescription
address *integer

lights_off

Turn off a locomotive's headlight(s): shortcut for set_function(address, 0, False). See lights_on for why F0. Same auto-acquire and no-op-safe behavior as set_function. This is the locomotive's own headlight, NOT layout/scenery lighting (depot, street lamps, signals) — for those, use set_light instead.

ParameterTypeDescription
address *integer

set_loco_lights

Turn ON/OFF EVERY light-related function of ONE locomotive in a single call. Args: address: DCC address. Auto-acquires the throttle if needed. state: True to turn every light-related function on, False off. Different from lights_on/lights_off (F0 only). Reads the roster function LABELS (set by the user in JMRI's roster editor — see get_locomotive_functions) and switches every function whose label names a light: "light"/"lamp"/"headlight" (EN) or "lumière"/"feu"/ "lampe"/"phare" (FR), case/accent-insensitive. Example:…

ParameterTypeDescription
address *integer
state *boolean

set_all_locos_lights

Turn ON/OFF EVERY light-related function of EVERY currently-acquired locomotive at once. Args: state: True to turn every light-related function on for every locomotive, False to turn them all off. Call for "turn on/off all the lights of all the locos"/"allume/ éteins toutes les lumières de toutes les locos" — locomotives in bulk, no single one named. Never loop set_loco_lights/set_function yourself — this loops server-side in one call, over every locomotive this session has acquired. Same scope limitat…

ParameterTypeDescription
state *boolean

prepare_locomotive

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…

ParameterTypeDescription
address *integer
prefix

park_locomotive

Put ONE locomotive to rest for the session: smooth stop, forward, lights off, throttle released. Args: address: The locomotive's DCC address. Use for "éteins la loco"/"coupe les moteurs"/"put the 3 to bed"/ "park the autorail"/"shut down the autorail" — end-of-session shutdown for one locomotive, not a mid-run pause (use `stop`). NOT `stop`/`emergency_stop` (speed only, throttle stays acquired, lights untouched) and NOT `set_power` (DCC station's own power, JMRI-wide). This tool only touches this one locomotive's session…

ParameterTypeDescription
address *integer

park_all_locomotives

Put EVERY currently-acquired locomotive to rest at once: smooth stop, forward, lights off, released. Call for "éteins toutes les locos"/"coupe tous les moteurs"/"shut down every locomotive"/"put everything to bed" — the bulk counterpart to park_locomotive. Never loop park_locomotive yourself — this loops server-side in one call, running the same four-step sequence (proportional rampdown, face forward, lights off, release) independently per locomotive. NOT `emergency_stop_all` (motion-only, no lights/release) and NOT system…

list_lights

List every layout light known to JMRI, with its current ON/OFF state. These are JMRI `light` objects wired to the layout/scenery itself (depot lighting, street lamps, signal lamps, ...) — NOT a locomotive's headlight (that's F0, via set_function/lights_on on a DCC address). Use this to discover what lights exist before calling get_light/set_light, or to answer "what lights are there?". No side effects.

get_light

Get the current ON/OFF state of one layout light. Args: name: Light name (JMRI system name like "IL1", or its user-friendly label like "Depot Lighting") or an unambiguous fragment of the label. Case-insensitive. This is a layout light (scenery), not a locomotive headlight — for "is the Autorail's headlight on", use get_locomotive_functions instead. No side effects.

ParameterTypeDescription
name *string

set_light

Turn a layout light ON or OFF, and report the state actually observed. Args: name: Light name (JMRI system name like "IL1", or its user-friendly label like "Depot Lighting") or an unambiguous fragment of the label. Case-insensitive. turn_on: True to turn the light ON, False to turn it OFF. This is a layout light (scenery: depot, street, signal lamps, ...), distinct from a locomotive's F0 headlight function — if the user names a locomotive rather than a place/scene, use set_function or lights_on/…

ParameterTypeDescription
name *string
turn_on *boolean

set_layout_lights

Turn EVERY layout light ON or OFF at once (depot, street, signal lamps — JMRI Light objects). Args: turn_on: True to turn every layout light ON, False to turn every layout light OFF. These are JMRI `light` objects wired to the layout/scenery itself — NOT a locomotive's own headlight/cabin/rear-light functions. Call for a lighting request that does NOT name a locomotive ("turn on all the lights", "éteins toutes les lumières" with no loco mentioned). If the request DOES name a locomotive ("all of the Auto…

ParameterTypeDescription
turn_on *boolean

list_turnouts

List every turnout known to JMRI, with its current CLOSED/THROWN state. Use this to discover what turnouts exist before calling get_turnout/set_turnout, or to answer "what turnouts are there?"/ "which way is turnout X set?". No side effects. Each entry includes "has_feedback_sensor" (bool). When false, that turnout has no real position sensor wired up, and a state of INCONSISTENT is its normal/expected steady state — not an anomaly. Do not flag it to the user as a problem in that case; only state="INCONSISTENT" on a turnout wh…

get_turnout

Get the current CLOSED/THROWN state of one turnout. Args: name: Turnout name (JMRI system name like "IT100", or its user-friendly label like "Layout Turnout A") or an unambiguous fragment of the label. Case-insensitive. No side effects — this only reads state, it never changes the turnout. The result includes "has_feedback_sensor" (bool). When false, that turnout has no real position sensor wired up, and a state of INCONSISTENT is its normal/expected steady state — not an anomaly. Do not…

ParameterTypeDescription
name *string

set_turnout

Set a turnout CLOSED or THROWN, and report the state actually observed. Args: name: Turnout name (JMRI system name like "IT100", or its user-friendly label like "Layout Turnout A") or an unambiguous fragment of the label. Case-insensitive. thrown: True to THROW the turnout, False to CLOSE it. JMRI/ PanelPro's own terminology — not "open"/"closed" track, which would be ambiguous about which direction is which. This writes to JMRI (and moves a physical turnout motor on real hardwar…

ParameterTypeDescription
name *string
thrown *boolean

set_all_turnouts

Set EVERY turnout on the layout to the SAME state (all CLOSED, or all THROWN) in one call. Args: thrown: True to THROW every turnout, False to CLOSE every turnout. Applies this ONE state to ALL of them — NOT a "restore each turnout to its own previous/default position" operation, there is no such per-turnout memory. Call for "close/throw all turnouts"/"tous les aiguillages en position fermée/déviée". Never loop set_turnout yourself — this loops server-side in one call over every turnout JMRI re…

ParameterTypeDescription
thrown *boolean

list_sensors

List every sensor known to JMRI, with its current ACTIVE/INACTIVE state. Sensors report real-world state detected by JMRI's own hardware inputs — most commonly block occupancy ("is a train on block X?"), but also things like turnout motor feedback or a clock-running flag. Read-only, no side effects. Use this to discover what sensors exist before calling get_sensor, or to answer "what sensors are there?"/"is anything occupied right now?".

get_sensor

Get the current ACTIVE/INACTIVE state of one sensor. Args: name: Sensor name (JMRI system name like "RS22", or its user-friendly label like "Montagne B") or an unambiguous fragment of the label. Case-insensitive. Use this to answer "is block X occupied?" or similar real-world state questions ("is the clock running?" for the ISCLOCKRUNNING sensor JMRI always has). Read-only — there is no set_sensor tool, since a sensor reflects hardware JMRI detects, not a command this project should issue. No side e…

ParameterTypeDescription
name *string

list_signals

List every signal mast known to JMRI, with its current aspect. Use to discover what signal masts exist, or answer "what signals are there?"/"what aspect is signal X showing?". No side effects. Also reports "lit" — use signal_off(name) to darken a mast. Call list_signal_aspects(name) for a mast's valid aspects before set_signal with one you're unsure of.

get_signal

Get the current aspect of one signal mast. Args: name: Mast name (system name or userName) or unambiguous fragment. Case-insensitive. Also reports "lit" (bool, illuminated or dark — independent of aspect). No side effects.

ParameterTypeDescription
name *string

set_signal

Set a signal mast's aspect, and report the aspect actually observed. Args: name: Mast name (system name or userName) or unambiguous fragment. Case-insensitive. aspect: e.g. "Hp0"/"Hp1"/"Hp2" — signal-system-dependent, IS case-sensitive, NOT validated locally (rejection: "error"). Call list_signal_aspects(name) FIRST if unsure of spelling/case, e.g. when named by effect ("turn it red") — don't guess. "unlit"/"off" darkens the mast — prefer signal_off(name).…

ParameterTypeDescription
aspect *string
name *string

signal_off

Darken a signal mast: shortcut for set_signal(name, "off"). Args: name: Mast name (system name or userName) or unambiguous fragment. Case-insensitive. Depends on this mast's "can be unlit" setting in PanelPro — JMRI accepts "lit" regardless, so "confirmed": true doesn't guarantee unlit-capability.

ParameterTypeDescription
name *string

list_signal_aspects

List valid aspect names for one mast, to pick an exact spelling before set_signal. Args: name: Mast name (system name or userName) or unambiguous fragment. Case-insensitive. Aspects ARE case-sensitive ("Hp0", not "hp0"). Returns {"aspects": [...]}, this mast's real subset. Excludes "unlit"/"off" (use signal_off). No side effects; "error" for non-standard names.

ParameterTypeDescription
name *string

list_blocks

List every layout block known to JMRI, with its current OCCUPIED/UNOCCUPIED state. A block is a named section of track JMRI uses for occupancy detection and signaling logic — richer than a plain sensor: each block also reports which sensor drives its occupancy, and (on layouts with RFID/reporter-based detection, not just simple occupancy) a "value" identifying what's occupying it. Also includes static layout metadata set in PanelPro's block editor: "length" (track length), "curvature", "speed" (a named speed restriction, e.g. "…

get_block

Get the current OCCUPIED/UNOCCUPIED state of one layout block. Args: name: Block name (JMRI system name like "IB1", or its user-friendly label) or an unambiguous fragment of the label. Case-insensitive. Use this to answer "is block X occupied?" when the user names a layout block/section specifically (as opposed to a raw sensor id — if they instead name a sensor directly, use get_sensor). Read-only — there is no set_block tool, since a block reflects hardware JMRI detects via its linked sensor, not…

ParameterTypeDescription
name *string

set_executor_mode

Turn "executor mode" (concise, no-narration responses) on or off. ON by default. Args: enabled: False to switch to normal, explanatory responses for the rest of the conversation — call this when the user asks you to explain more / stop being so terse. True to switch back to terse/execution-only responses (already the default at the start of every conversation, so you only need this to undo a previous enabled=False). Concise responses are the standing default from the very first…

ParameterTypeDescription
enabled *boolean

get_executor_mode

Report whether executor mode (concise, no-narration responses) is currently on. No arguments. Executor mode is ON by default from the start of every conversation. Call this if you're unsure whether it's still active (e.g. at the start of a new turn after a long gap, or after the user asked for more explanation earlier and you want to check it wasn't re-enabled) — it re-delivers the same standing instruction as set_executor_mode for whichever state is current, since there's no system-prompt-level way for this server to keep remi…

enter_exhibition_mode

Turn ON exhibition mode: a restricted-safety mode for public demos (exhibitions, kids trying voice control). No arguments, no password needed — always freely callable, so this can be turned on quickly whenever the layout is about to be unsupervised or handed to the general public. Call for "mode exposition"/"exhibition mode"/"passe en mode démo"/"active la protection visiteurs" or similar. While active: power_on_all/set_power(turn_on=True) are refused (power_off_all and set_power(turn_on=False) still work — cutting power fo…

exit_exhibition_mode

Turn OFF exhibition mode, restoring full normal control. Requires the correct password. Args: password: Must match the password configured at .mcpb install time (EXHIBITION_PASSWORD env var; a playful default is used if the installer left it blank). Compared tolerantly (case/accent/whitespace-insensitive, via the same folding used for locomotive name matching) since this password is normally spoken aloud through voice transcription — this is a casual demo-mode guard against a…

ParameterTypeDescription
password *string

get_exhibition_mode

Report whether exhibition mode (restricted-safety public-demo mode) is currently on. No arguments. Call this if you're unsure whether it's still active (e.g. at the start of a new turn after a long gap) — it re-delivers the same standing restriction instruction as enter_exhibition_mode for whichever state is current.

layout_status

One-call overview of the whole layout: connectivity, power, active locomotives, blocks, sensors. Call for "what's happening on the layout?"/"is everything ready?"/"donne-moi l'état du layout" — a broad status question with no single named target. Never chain list_systems + list_roster + list_blocks + list_sensors yourself, this gathers them in one call. Different from system_status (reachability + DCC power only): this adds every locomotive THIS session holds a throttle for (with speed/direction), block occupancy, and sensor…

release_all_locomotives

Release this session's throttle on EVERY currently-acquired locomotive, without changing their state. Call for "release all locomotives"/"libère toutes les locos" — ending a session or handing off without stopping anything. Speed and direction stay untouched; only the throttle is released. Exception: any still-active function (e.g. lights) is turned off first automatically — releasing with one on can flip direction. NOT park_all_locomotives (also stops, faces forward, lights off before releasing) and NOT emergency_stop_all (stops m…

secure_layout

Put the whole layout into a known safe resting state — the end-of-session "I'm done for today" command. Args: release_throttles: True (default) to also release every locomotive's throttle at the end. False to stop/light-off every locomotive but keep throttles acquired. Call for "I'm done for today, secure the layout"/"sécurise le layout"/"on arrête pour aujourd'hui" — a broad end-of-session request naming the layout as a whole, not one locomotive. Never chain stop/set_loco_lights/set_layout_lights/relea…

ParameterTypeDescription
release_throttlesboolean

night_mode

Set the layout to night operation mode: turn on every layout light and every locomotive's lights. Call for "put the layout in night mode"/"mode nuit"/"il fait nuit" — a demonstration-style lighting scene, not a status/power command. Turns ON every layout light (JMRI Light objects — same as set_layout_lights(True)) and every acquired locomotive's light-related functions (same as set_all_locos_lights(True)), in one call. Does NOT change speed, direction, or throttle acquisition, and does NOT affect track power (set_power) or s…

day_mode

Set the layout to daytime operation mode: turn off every layout light and every locomotive's lights. Call for "put the layout in day mode"/"mode jour"/"il fait jour" — the inverse of night_mode. Turns OFF every layout light (JMRI Light objects — same as set_layout_lights(False)) and every acquired locomotive's light-related functions (same as set_all_locos_lights(False)), in one call. Does NOT change speed, direction, or throttle acquisition, and does NOT affect track power (set_power) or signal aspects (set_signal) — ligh…

start_session

Begin a driving session: power on every DCC system, then prepare every already-acquired locomotive. Call for "let's start"/"démarre la session"/"on commence" — the one-call opener. Steps: 1) power_on_all; 2) for every locomotive THIS session already holds a throttle for (usually none at session start — not an error), face forward + lights on, same as prepare_locomotive. Does NOT acquire locomotives untouched this session — follow up with prepare_locomotive/acquire_throttle by name once one is named. Refused in exhibition mode like…

end_session

End a driving session: stop, park and release every acquired locomotive, then cut power to every DCC system. Call for "let's stop"/"termine la session"/"on arrête" — the one-call closer, inverse of start_session. Strictly ordered so power is never cut mid-motion: 1) every locomotive THIS session holds a throttle for is ramped to stop, faced forward, lights off, released — same as secure_layout(release_throttles=True), one failure doesn't block the rest; 2) power_off_all. Layout lights are NOT touched — use secure_layout/day_mode f…