Frequently Asked Questions
Everything you need to know about setting up and running DEJA.js.
General Overview
What is DEJA.js?
DEJA.js (DCC-EX JavaScript API) is a modern, comprehensive suite of applications designed to transform your model railroad into a connected, intelligent system. It provides all the tools you need to control, monitor, and interact with your DCC-EX CommandStation.
How does DEJA.js compare to older software like JMRI?
DEJA.js is built as a modern alternative, utilizing newer technology than JMRI to provide a seamless, real-time, cloud-synced experience across all devices. It features modern web technologies like Vue 3, TypeScript, MQTT, and WebSocket communication.
Where do I start?
First, create an account on DEJA Cloud. Next, install the DEJA.js Server on your computer and connect it to your DCC-EX CommandStation via USB. Once you add a locomotive to your roster in the Cloud app, you can open the Throttle app in any browser on your network and start driving.
Hardware & Technical Requirements
What hardware do I need to run the DEJA.js Server?
You need a computer or laptop. The DEJA.js Server is highly versatile and can run on Windows, Mac, Linux, or a Raspberry Pi.
Are there specific software prerequisites for the Server?
Yes, to run the server locally, you will need Node.js (v22 or higher), pnpm (v9 or higher), and Git installed on your machine.
What devices can I use as a throttle?
The DEJA.js Throttle app can be run on an iPhone, iPad, Android device, or directly through a Web browser.
What microcontrollers are supported for expanding my layout?
DEJA.js IO provides ready-to-use, plug-and-play code for Arduino devices (like the Arduino Mega) and CircuitPython devices (like the Raspberry Pi Pico W).
Connections & Setup
How does the system physically connect to my layout?
The DEJA.js Server acts as the central bridge for your setup. It connects directly to your DCC-EX CommandStation using a standard USB connection. From there, all your apps (Throttle, Cloud, Monitor) sync instantly in real-time through the DEJA Cloud.
What communication protocols do external devices use to connect?
While your CommandStation connects via USB, additional devices on your layout (like Arduinos or Raspberry Pis) can connect to the DEJA Cloud via Websocket or MQTT.
How difficult is it to configure new hardware like an Arduino for lights or sensors?
It is designed to be user-friendly. When you add an Arduino Mega to your layout to control lights, sensors, servos, or relays, each pin can be designated as an input or output, and the DEJA.js Server will automatically detect the devices and configure them for you.
DEJA.js Cloud App Features & Usage
What is the DEJA.js Cloud App and where do I access it?
The DEJA.js Cloud App is a web-based application accessible at https://cloud.dejajs.com. It serves as the central hub for layout management, device monitoring, and multi-user coordination.
How do I create an account and start using DEJA Cloud?
You can sign up on the DEJA Cloud website using an email/password, Google, or GitHub account. Once you sign up, your account will temporarily be placed in a "Pending Approval" status. After an admin approves your account, you will be automatically redirected to an onboarding wizard to finish your setup.
How do I create and configure my layout in the Cloud App?
During the onboarding wizard, you will be prompted to create your layout by giving it a name and a unique Layout ID (which must contain only lowercase letters, numbers, and hyphens). The app will then generate your specific LAYOUT_ID and VITE_FIREBASE_* credentials. You must copy these values and paste them into your local server's .env.local configuration file so your local setup can communicate with the Cloud.
How do I register my DCC-EX CommandStation in the Cloud App?
To let the Cloud know your CommandStation exists, open your layout in the DEJA Cloud, navigate to the Devices tab, and click Add. Select "DCC-EX CommandStation", choose "USB" as the connection type, and click Submit. It will show as "disconnected" until you start your local DEJA.js Server and connect it via the Monitor app.
How do I add locomotives so I can drive them?
To add trains to your system, navigate to the Roster section in the Cloud App and click "Add Loco". Enter the locomotive's DCC address and a name. Once added, the locomotive will instantly be available to drive in the DEJA.js Throttle app.
What other layout features can I manage through the Cloud App?
Beyond locomotives, the Cloud App allows you to manage external microcontrollers like Arduinos and Raspberry Pis, or anything else that can connect via Websocket or MQTT. Through the app, you can configure these devices to manage layout inputs and outputs, including lights, sound effects, relays, sensors, servos, signals, and track turnouts.
Can the system handle multiple operators at once?
Yes, DEJA.js features multi-throttle support for multiple simultaneous operators, making it an ideal solution for club layouts or exhibition setups where multiple people need to coordinate and operate trains at the same time.
Using the Apps & Troubleshooting
I'm having connectivity or command issues on my layout. How can I debug them?
If you run into issues, you can use the DEJA.js Monitor app. It provides live dashboards and logs for telemetry, events, and command traces, making it much easier to debug and optimize your layout.
Is the mobile Throttle app easy to use on small touch screens?
Yes, the app was designed with accessibility in mind and features "EZ-touch chonky buttons" to make controlling your trains on a mobile screen easy and precise.
Can I automate trains or set up automated demonstrations?
Yes! The DEJA.js Tour app allows you to set up guided tours, presets, and automated sequences to showcase specific routes or demonstrations on your layout.
How do I keep track of all my different devices, locos, and turnouts?
DEJA.js features a custom color-coding system to help you stay organized. You can assign swatches, tag colors, or custom colors to your devices, locomotives, turnouts, and effects in the DEJA Cloud. Whenever that item appears across any of the DEJA apps, your custom color will be applied for quick identification.