DCC-EX Console
The DCC-EX Console provides direct access to your DCC-EX CommandStation. You can send raw commands, toggle power, check status, and monitor all command traffic in real time. This is the low-level interface for operators who need to debug, test, or perform operations not covered by the higher-level Roster, Turnouts, or Effects screens.
The console is available at /dccex and requires both authentication and an active DCC-EX device in your layout configuration.

Preset Command Buttons
The top of the console displays a row of preset command buttons, each mapped to a common DCC-EX operation:
| Button | Type | DCC Command | Description |
|---|---|---|---|
| Power | Toggle switch | <1> / <0> | Turn track power on or off. The toggle state reflects whether power is currently enabled. |
| Power MAIN | Toggle switch | <1 MAIN> / <0 MAIN> | Toggle power specifically on the main track output. |
| Reset | Button | <D RESET> | Send a hardware reset command to the CommandStation. |
| Status | Button | <=> | Query the CommandStation for its current status. The response is displayed in the log. |
| Save | Button | <E> | Write the current configuration to the CommandStation's EEPROM so it persists across power cycles. |
| List Outputs | Button | <Z> | Query and display all configured output pins on the CommandStation. |
Toggle Commands
The Power and Power MAIN controls render as toggle switches. The first click enables the feature (sending the "on" command), and the second click disables it (sending the "off" command). The toggle state is tracked locally in the component.
Button Commands
Reset, Status, Save, and List Outputs render as standard buttons. Click once to send the command.
Custom Command Input
The last entry in the preset row is a text input field labeled "DCC Command". Type any valid DCC-EX command string (without the angle brackets) and press Enter or click the send icon to transmit it. The angle bracket wrapping and newline termination are handled automatically by the server.
Examples of custom commands you might send:
| Command | What It Does |
|---|---|
t 3 50 1 | Set locomotive address 3 to speed 50, forward |
F 3 0 1 | Activate function F0 (headlight) on address 3 |
T 1 1 | Throw turnout index 1 |
Z 13 1 | Set output pin 13 HIGH |
s | Query all decoder slots |
After sending, the text field is cleared and ready for the next command.
Command Log
Below the preset buttons, the DCC Log section provides a real-time feed of all DCC commands sent and received through the WebSocket connection.
Enabling the Log
The log connects to the DEJA.js server via WebSocket. To enable it:
- Toggle the Enabled switch to on.
- Verify or update the WebSocket host field (default:
192.168.86.34:8082). This should match the IP address and port of your running DEJA.js server.
The WebSocket host setting is persisted in local storage (@DEJA/pref/ws-host) so you only need to configure it once.
Log Display
The log shows entries in reverse chronological order (newest at the top). Each entry includes:
- Action -- The command action type (e.g.,
dcc,throttle,function,portList). - Payload -- The command payload data.
- Timestamp -- When the command was sent or received.
LCD-Style Debug Panels
Below the log list, three LCD-style display panels provide at-a-glance monitoring:
| Panel | Color | Shows |
|---|---|---|
| DCC LOG | Green | Recent command entries formatted as action: payload |
| STATUS | Blue | The current WebSocket connection status |
| DATA | Amber | The most recent raw data message received |
These panels use the LCD display component, which renders text in a retro terminal style for quick visual scanning.

How Commands Flow
When you send a command from the console:
- The
sendDccCommandfunction fromuseDcc()writes the command to Firebase Realtime Database atdccCommands/{layoutId}. - The server's RTDB listener in
dejaCloud.tspicks up the new entry. - The server's DCC handler in
lib/dcc.tswraps the command in angle brackets and sends it over USB serial:<command>\n. - The CommandStation processes the command and sends any response back over serial.
- The server broadcasts the response to all connected WebSocket clients.
- The DCC Log displays the response in the console.
Common Use Cases
Debugging Decoder Issues
Send status queries and function commands directly to isolate whether a problem is in the decoder, the command flow, or the UI layer:
= # Get CommandStation status
t 3 0 1 # Stop locomotive 3 (speed 0, forward)
F 3 0 1 # Turn on headlight for address 3
F 3 0 0 # Turn off headlight for address 3
Testing Turnout Wiring
Send turnout commands directly to verify that your turnout index and pin mapping are correct:
T 1 1 # Throw turnout index 1
T 1 0 # Close turnout index 1
Checking Output Pins
Verify that a specific Arduino pin is toggling correctly:
Z 13 1 # Set pin 13 HIGH
Z 13 0 # Set pin 13 LOW
Saving Configuration
After making changes through the CommandStation's configuration commands, save to EEPROM so they persist:
E # Save to EEPROM
Related Pages
- Cloud App Overview -- Return to the main Cloud app guide.
- Layout Configuration -- Configure the devices and serial ports used by the console.
- Locomotive Roster -- Manage locomotives at a higher level of abstraction.