Your layout. Your sequences. Fired by the bus, the clock, or a tag.
User Reference — Build 15 (20 May 2026)
Your MegaPoints Route Processor is the brain of an automated System2 layout. It watches inputs — block detectors, panel buttons, RFID readers, the clock — and fires routes: short, timed sequences of point throws, signal aspects, brake releases and any other vPort writes you want.
The Route Processor brings four ideas together on one board:
Each up to 16 timed slots. Each slot writes one vPort with a value and a delay. Everything else — conditions, schedules, chains, timers — sits around that core idea.
Routes fire from a CAN vPort, an RFID tag, an exact clock time, or a regular interval — gated by up to four logical conditions and an optional schedule window.
Name a range of detector vPorts (a yard, a loop, a platform) and ask conditions about the whole group. Up to 32 groups; cleaner than listing every block.
Exact-time routes can run against a 1×–60× layout clock so your timetable cycles through a full day in a couple of real hours.
The Route Processor is built on the System2 platform — the same proven infrastructure that powers the Panel Controller, Servo-8, Solenoid Driver and the rest of the family. That means you get:
Whether you are running a fully-automatic exhibition layout or letting an operator pull the strings on a busy through station, the Route Processor sits quietly on the bus, listens, decides, and fires the right sequence at the right time.
The Route Processor is one of several System2 boards that share the same infrastructure. Each board does one thing well, then they cooperate over the CAN bus to drive a whole layout:
| Board | What it does |
|---|---|
| S2-Route — Route Processor | The brain. Holds 100 routes, 32 block groups, runs the trigger / condition / chain / schedule / timer engine. One per layout. |
| S2-Panel / S2-Mini | Operator console. Physical buttons and LEDs that read/write vPorts. Use as panel input or status output. |
| S2-IN32 | 32 detector inputs per board. Each input becomes a vPort SET on occupancy. |
| S2-OUT32 / S2-OUT64 | Bulk digital outputs — lamps, LEDs, accessory drivers. |
| S2-Servo-8 | Eight servo channels — points, semaphores, gates, anything that swings. |
| S2-Solenoid / S2-Stall | Two flavours of point-motor driver: solenoid (Peco-style twin coil) and stall (Tortoise / Cobalt slow-motion). |
| S2-Relay8 | Eight relay outputs. Brake sections, frog polarity, panel-LED supplies, anything mains-isolated. |
| S2-DCC | DCC accessory decoder bridge — lets a DCC handset address vPorts. |
| S2-RFIDr / S2-RFIDd | RFID readers for loco identification. Tags fire vPorts — the Route Processor takes it from there. |
Every System2 board shares the same Wi-Fi setup, CAN ID, cloud backup, OTA update path, status log and dashboard. Once you have learned one board's pages, you know all of them — only the per-product editor in the middle differs.
The Route Processor accepts 12 V DC on its barrel jack or screw terminals. Current draw is modest (under 200 mA) — any clean 12 V supply that powers your other System2 boards will do. The board has reverse-polarity protection but please make sure positive and ground are the right way around the first time.
The board has two CAN screw terminals (H and L) wired in parallel so you can daisy-chain through the board without a Y-splitter. Add a 120 Ω termination resistor at each end of the bus (see §26 Connecting Multiple Boards).
One yellow LED indicates power and one green LED indicates Wi-Fi association. After Wi-Fi association the green LED flashes briefly each time a CAN frame is received.
On first power-up — or any time the board has no saved Wi-Fi credentials — the Route Processor starts as a Wi-Fi access point so you can configure it from your phone or laptop.
MegaPoints-XXXXXX, where XXXXXX is the last 6 digits of its MAC address.http://192.168.4.1.http://<ip>/ — or to http://<hostname>.local/ on networks with mDNS.The Main page is the everyday view: one route on screen, with its slot table, trigger gating panel, the network row underneath, and a status log at the foot.
Across the top sit three blocks: the System2 logo / hostname on the left, the product photo in the centre (it doubles as a link straight to this guide), and a System2 Air / Location label box on the right. The chart panel toggles below the header strip.
The big blue number on the left is the route you are currently editing. Click the up/down arrows to step one at a time or the double arrows to step ten at a time. To the right of the number sit the route header fields: default delay, enable vPort, feedback vPort, RFID vPort and a 24-character name.
| Field | What it does |
|---|---|
| Default Delay | Per-route default for new slots (ms). Range 50–60000. Slots can still set their own delays individually. |
| Enable vPort | The vPort that triggers this route when it changes state. Leave blank if the route is only fired by RFID, timer, or chain. |
| Feedback vPort | Published as SET while the route is running, CLEAR when the slot list completes. Useful for "route active" lamps and for chaining-by-state. |
| RFID vPort | Optional. Set to a specific RFID-reader vPort and the route will also fire when a configured tag is read on that reader. |
| Name | Up to 24 characters. Pure documentation — nothing functional. Shown in the Route Report and the search results. |
Below the header is the slot table. Each row is one timed write: a vPort, an On/Off value, an action delay before the next slot fires, plus Move and Delete icons. The default layout is Wide (2×8) with two columns of eight slots side-by-side, or you can switch to Long (1×16) with all sixteen slots running down the page — whichever reads better for the sequence you are building. The choice sticks across reloads and reboots.
Underneath the slots: Trigger Route (fires this route once, on-demand), Duplicate (copies to another route number), Clear, Invert (flips every On/Off), Save Routes (persists every route to flash), Load Routes (re-reads from flash), Backup/Restore (local file), and Del All (zeros every route).
Click the Trigger gating heading to expand the gating panel: conditions, schedule, chain, trigger edge, defer TTL, timer, and the fast-clock panel. This is where the smart automation lives — see §9 Trigger Gating for the full tour.
Click Block Groups to expand the block-group editor. Define named ranges of detector vPorts here, then reference them from any condition. See §10.
Protocol picker (CAN / JMRI / MQTT), CAN auto-ID toggle and manual ID, Wi-Fi boot delay, roaming toggle, and the Share/Revoke/Erase credentials buttons. See §14–§15.
Save Changes (writes settings to NVS), Reload Values (discards unsaved edits), Reset to Defaults. The Backup/Restore/Cloud Backup/Reboot links sit just below.
Here is the shortest practical example: "When detector 101 goes SET, throw point 201 reverse and clear signal 301."
1; leave it there.101 (your detector).201 into Slot 1's vPort cell and click the On/Off toggle so it shows green (SET = REVERSE for points).300 — that's the pause after writing 201 before the next slot fires.301, leave On (CLEAR / OFF DANGER, depending on your signal driver's convention).Roaming is on by default. The board keeps an eye on all access points broadcasting your configured SSID and switches to the strongest one whenever the current signal drops below threshold. On a single-AP household this never kicks in; on layouts that span a garden room and a workshop with two APs sharing the same SSID/passphrase, roaming keeps the board on the better signal automatically.
If multiple System2 boards on the same power supply all boot together they can momentarily overload your router with simultaneous Wi-Fi associations. The Boot delay toggle adds a random 0–15 second hold before the Route Processor attempts to associate — spread across all your boards, that's enough to stagger the requests. Tick the box and set a maximum delay in seconds.
Once one board on the CAN bus has working Wi-Fi credentials, click Share on its Main page and every System2 board on the bus will receive those credentials on its next boot. The data is encrypted with a board-pair handshake; nothing leaks onto the bus in clear text. Revoke tells the bus to forget any shared credentials; Erase wipes credentials from this board only.
Release V15 (20 May 2026) rolls up the route-engine features from V11–V14 plus a complete overhaul of the backup and restore plumbing. Layouts upgrading from V10 keep every existing route. The new per-route fields default to "off" so nothing on your layout behaves differently until you decide to use them.
.txt backups still restore — the browser converts on the fly, so backups you've already saved still work.Your existing routes load unchanged. Trigger Gating, Block Groups, and the timer features show up as new sections in the route editor; ignore them and your routes keep firing exactly as before. The wide/narrow layout toggle defaults to long (1×16) to match the previous look.
Initial public release of the Route Processor firmware. 100 routes, 16 slots per route, CAN and RFID triggers, JMRI and Native MQTT protocols, OTA updates, dashboard, Wi-Fi sharing.
Between a route's trigger (the thing that decides it should fire) and the slot sequence (what actually happens) sits the gating panel. Five features live here:
Up to four conditions per route. Each one tests a vPort or a block group against SET, CLEAR or UNKNOWN. Combined with AND (all must pass) or OR (any one passes). Click + condition to add a row, pick the type, type the vPort or pick the group, choose the test.
| Logic | Effect |
|---|---|
| AND | Every condition must pass. |
| OR | Any one condition passes. |
If the conditions don't pass at trigger time, you get a choice:
The enable vPort can fire on rising, falling, or both edges:
Tick Schedule enable, set Start and End (HH:MM, local time). The route only fires when the current time is inside the window. If End is less than Start the window wraps midnight (e.g. 22:00 – 06:00 is overnight). Schedules apply to every trigger source: CAN, RFID, exact-time, interval and chain.
On completion, fire route N. The chained target goes through its own conditions / schedule / trigger gating, so the cascade is safe — if the chained route's own conditions don't pass, the chain is dropped or deferred according to its own on-fail setting, not the originating route's.
At the bottom of the gating panel sits a Dry-run preview: a client-side "what would happen now?" check against the live block-group state. Use it while authoring — it will catch off-by-one vPort numbers and condition typos without your having to send a real train.
A block group is a named range of vPorts that condition tests can refer to as a whole. The group is OCCUPIED if any vPort in the range is SET, CLEAR if every vPort is known to be CLEAR, and UNKNOWN if no vPort in the range has been observed since boot.
Block groups solve "is the yard occupied?" without listing the 22 detector vPorts that make up the yard. Up to 32 groups, configured on the Block Groups section of the Main page.
In the Trigger Gating panel, when you click + condition, set the type to Block group instead of vPort and pick the group name from the drop-down. The condition then evaluates against the group state.
| Condition | Passes when |
|---|---|
| Group X is CLEAR | Every vPort in X is known and reporting clear. |
| Group X is SET (= OCCUPIED) | At least one vPort in X is reporting set. |
| Group X is UNKNOWN | No vPort in X has been observed since boot (e.g. a detector board hasn't powered up yet). |
In addition to the enable, feedback and RFID triggers, a route can fire itself on the clock with no input change at all. Two flavours, both in the Trigger Gating panel:
Fire once per layout day at HHMM. Useful for the morning station opening sequence, the lights-on-at-dusk routine, or the scheduled 09:42 to Banchory.
Fire every N minutes (1 minimum, 1092 maximum). Useful for animated scenics that should cycle on a heartbeat — a level crossing demo every 3 minutes, a factory whistle every 15 minutes, a yard cycle every half hour.
Both timed triggers respect the route's schedule window:
The Fast Clock panel sits inside the gating section. Set the multiplier (1–60), click Start Session, and exact-time triggers compare against layout time, not wall time:
| Multiplier | Effect |
|---|---|
| 1× | Real time. Layout time = wall time. |
| 4× | 1 layout hour every 15 real minutes. Full day in 6 real hours. |
| 10× | 1 layout hour every 6 real minutes. Full day in 2 h 24 min. |
| 12× | 1 layout hour every 5 real minutes. Full day in 2 real hours. |
| 60× | 1 layout hour every minute. Full day in 24 real minutes. |
The multiplier is saved to flash on Save Changes and persists across reboots. The session epoch resets on each Start Session click — by design, so power-cycling between operators starts clean.
millis() directly and are not affected by the fast-clock multiplier. If you want a 10-minute layout-time interval at 12× fast clock, set the interval to 50 seconds in real time.
An S2-RFIDr or S2-RFIDd reader can fire a route when a specific tag passes its antenna. RFID triggers run independently of CAN-vPort triggers — one route can have both, either, or none.
If the route also has an enable vPort and conditions, those still apply — the tag-read triggers the route, and the conditions / schedule then decide whether it actually fires.
If you have read this far, the next thing you want is to see the Route Processor solving real layout problems. The companion Layout Automation Worked Examples document walks through five fully-worked configurations — complete with vPort allocation, route configurations, block groups, condition gating, and step-by-step sequence walkthroughs.
Open the Worked Examples document →Opens in a new tab. Also available at https://docs.megapointscontrollers.com/route/examples.html
| # | Title | What it teaches |
|---|---|---|
| 1 | Mega Loop | A simple two-platform passing loop, fully automatic, no manual controls. Interlock conditions refuse to release the brakes until both trains are standing in their platforms. Demonstrates: trigger edges, condition gating, ABC brake control via relay. |
| 2 | Bi-Directional Platform | A three-platform station with a shared middle road that can serve traffic from either direction. The direction interlock locks out the conflicting move until the platform clears. Demonstrates: complex condition logic, schedule windows. |
| 3 | Mega Sidings | An 8-road through fiddle yard with points-ladder routing for arrival at either end, per-road starter signals, and per-road ABC braking that releases automatically when the train is cleared to depart. Demonstrates: block groups, route chaining, panel-button overrides. |
| 4 | Automated Fiddle Yard Exit (Simple) | A one-point fiddle-yard throat where the next-train-out is chosen by which detector last cleared. Demonstrates: feedback vPorts, falling-edge triggers. |
| 5 | Automated Fiddle Yard Exit (Multiple points) | A multi-point throat with route-locking against return moves. Demonstrates: cascade locking via feedback vPorts, defer-TTL tuning. |
The examples document also includes a Common patterns reference card at the back — one-liners for the recurring building blocks (fire on arrival, fire on departure, always-RED-by-default signal, panel-button override, schedule-bound route).
The Route Processor talks to three external worlds:
The Route Processor's CAN ID can be picked automatically (Auto ID on) or set manually (1000–1999 range). Auto ID looks at the existing bus and picks the lowest unused address. Use manual ID when you want a predictable address for diagnostics.
Select JMRI as the protocol, save, and reboot. The Route Processor pretends to be a JMRI signal-and-sensor server — vPort SET/CLEAR frames map to JMRI sensors, slot writes correspond to JMRI turnouts and signal masts.
Select Native MQTT, point the broker hostname and port at your MQTT server, save, and reboot. The board publishes to system2/<hostname>/vport/<n> on changes and subscribes for inbound writes. QoS is picked with the Async / Sync toggle — Async (QoS 0) is fastest and recommended; Sync (QoS 1) gives broker-acknowledged delivery at the cost of speed and broker load.
| Protocol | Use when | Trade-offs |
|---|---|---|
| CAN | Pure System2 layout. No off-board control system. | Simplest. No external dependencies. No off-layout software needed. |
| JMRI | You already run JMRI for DCC control and want it to see / drive System2 vPorts. | One JMRI connection covers the whole System2 bus. JMRI must be running for off-layout commands to reach the board. |
| Native MQTT | You have an MQTT broker (Home Assistant, Node-RED, custom) and want full bi-directional vPort visibility. | Broker becomes a single point of failure. Async (QoS 0) is fine for most layouts; Sync (QoS 1) only if you cannot tolerate occasional dropped messages. |
The Route Processor keeps two separate kinds of persistent storage:
Save Routes writes every route to SPIFFS (a fixed-size binary file). The save button glows orange while there are unsaved edits; the glow clears on save. Load Routes re-reads from SPIFFS, discarding any unsaved edits in the browser.
The Backup button in the Route Editor downloads every route as a JSON file. The filename is <hostname>-routes-YYYY-MM-DD.json. The file is a complete, lossless snapshot — trigger gating, schedules, chains, timers, the lot. Save it somewhere safe or check it into a layout-config git repo.
The Restore button reads a previously downloaded file back. Both the new JSON format and older colon-text .txt backups are accepted — the browser converts legacy files on the fly. Routes are sent to the device in small batches so even a full 100-route restore is reliable and incremental: you can see "Sending 25 / 100 routes…" in the progress overlay rather than staring at a frozen page.
The bottom Reset to Defaults button wipes settings (NVS), but leaves the route store alone. Use it when settings are corrupted but you want to keep your routes.
Cloud backup keeps a server-side copy of your settings and routes. The first time you click Cloud Backup the board prompts for a name and email; that one-time handshake registers the board to your account. After that the Cloud Backup link opens straight onto a panel listing every backup that has ever been uploaded for this board.
The registration banner appears on the Main page on first boot. Enter your name and email and click Register. Cloud Backup is then available; the Cloud Backup link in the bottom bar goes from grey to blue. You can dismiss the banner with Not now — it will reappear on later boots until you register or click Don't ask me again.
The router auto-backs-up:
The backup runs through the browser's TLS stack (not the device's), so big route sets ship reliably without making the board appear to freeze.
Open Cloud Backup. The panel lists every backup with its timestamp and a Lock toggle. Click any backup to expand it, then Restore to push it back to the device.
Unlocked backups rotate — once you exceed five, the oldest is deleted to keep storage costs sane. Lock the ones that matter (a particularly good operating state, a snapshot before a major rework, the night before an exhibition) and they're preserved indefinitely.
If a board changes hands, the new owner clicks Change registered owner (the small grey link below the bottom action bar). The board returns to the registration banner state on the next boot.
Click Show Charts at the top of the Main page to expand four rolling 60-second strip charts:
Click any chart to enlarge it. Click outside the enlarged chart to dismiss.
The Route Processor pulls firmware over Wi-Fi. Updates are signed and version-checked — a corrupted or rolled-back image is rejected before being committed.
Browse to /update. The page shows:
/update in your browser.The new image is committed to flash but kept on probation for the first 30 seconds after boot. If the board crashes or the firmware sets an explicit "validation failed" flag during that probationary window, the bootloader rolls back to the previous image on the next boot. After 30 seconds of clean operation the validation flag is set and the image becomes permanent.
If you install an update and decide you preferred the previous version, the Update History panel has a Rollback button next to the previous version. Click it, confirm, and the board reboots into the old image. The skipped version is added to a do-not-auto-install list so the next "Check now" doesn't keep offering the version you just rolled back from.
If something goes catastrophically wrong — a corrupt SPIFFS, a wedged main image, an OTA that bricked Wi-Fi setup — the board falls back into Recovery Mode: a minimal firmware that brings up Wi-Fi, hosts a static page, and lets you OTA a known-good image. The Recovery image is also published to S3 and updates whenever the main image does.
Flip the Pre-release toggle to switch to the beta channel. Beta firmware is the next release candidate — new features are visible there first. Beta builds carry both stable and beta entries in the manifest, so you can roll back to the latest stable from any beta build.
The CAN Monitor page (/monitor) is a live trace of every CAN frame the Route Processor sees on the bus — the diagnostic equivalent of a packet sniffer. Open it when something on the bus isn't doing what you expect.
From any System2 page bottom-bar, click CAN Monitor. The view opens with the trace running — new frames appear at the top of the table as they arrive.
At the top of the page sits the filter bar. Type a vPort number to show only frames touching that vPort. Tick a command (SET / CLEAR / TOGGLE / PUBLISH…) to limit the display to that command type. Pause the live feed to take screenshots or share captures.
| Column | What it shows |
|---|---|
| Time | Local time of frame arrival, millisecond precision. |
| Source | CAN ID of the publishing board. |
| Cmd | Frame command (SET / CLEAR / TOGGLE / PUBLISH / etc.). |
| vPort | vPort the frame addresses. |
| Value | Payload (SET = 1, CLEAR = 0, TOGGLE = 2, plus extended values for analogue frames). |
| Note | Decoded annotation where the firmware knows what the frame means (e.g. "feedback for route 12"). |
The Dashboard (/dashboard) is a read-only at-a-glance health summary. Open it before starting an operating session and again when something doesn't smell right.
Uptime, free heap, free PSRAM (if present), flash usage, total reboots since first boot, and the active firmware version with build date.
SSID, RSSI, IP address, gateway, association uptime, and total reconnects since boot.
Configured CAN ID (auto or manual), frames received and transmitted since boot, bus errors, and the rolling-window frame rate.
Only meaningful in Native MQTT mode. Broker hostname, connection state, Tx / Rx / error counters, reconnections.
Total routes configured (1–100), routes fired since boot, conditions deferred since boot, conditions dropped since boot, timed-route fires since boot, fast-clock state and current layout time.
Collapsible section: partition layout, version history, last 32 boot-cause records (clean reboot / brown-out / WDT reset / etc.), and a link to the raw status log JSON.
The status log at the foot of the Main page is the Route Processor's running narrative. Every significant event is emitted as a single-line entry with a timestamp:
The log is reverse-chronological: newest at the top. Background colour indicates severity — green for normal operation, yellow for warnings, red for errors. Hover over any line to see the full timestamp and source.
The status log is the single best place to start when something isn't working. A common diagnostic flow:
The Contact page (/contact) lets you send feedback, bug reports, or feature requests straight from the board to MegaPoints. The page is purpose-built — no email account or copy-paste needed.
The text you type, plus a small device fingerprint: firmware version, free heap, uptime, configured protocol, total reboots. No route data is sent. No Wi-Fi credentials are sent.
The Contact page needs the board to be on a Wi-Fi network with internet access — the message goes out over the same HTTPS endpoint used for cloud backup. If the board is on an isolated Wi-Fi network, the form will say so before you waste effort typing.
Every Route Processor exposes a small REST API for scripting and integration. Use it from JMRI Jython, Home Assistant, Node-RED, a phone-side app, or any tool that can speak HTTP.
# Fire route 10 immediately curl -X POST http://route-bench.local/api/route/trigger/10 # Read current state of vPort 201 curl http://route-bench.local/api/vport/201 # Write vPort 311 to CLEAR curl -X PUT http://route-bench.local/api/vport/311 -d 'value=0' # Read live diagnostics curl http://route-bench.local/api/debug/stats # Start a fast-clock session at 12x curl -X POST http://route-bench.local/api/fc/start?mult=12
| Path | Method | Purpose |
|---|---|---|
/api/status | GET | Boot summary, version, uptime. Used by reboot-and-reload polling. |
/api/route/trigger/<n> | POST | Fire route N (1-100) immediately. Honours conditions and schedule. |
/api/route/<n> | GET | Return route N as JSON. |
/api/routes/backup | GET | Return every route + block group as a single JSON blob (same format as the Backup button). |
/api/routes/restore-batch | POST | Restore a batch of routes. Used by the chunked restore path. |
/api/vport/<n> | GET / PUT | Read / write a vPort. PUT body: value=0 or value=1. |
/api/block-group/<n> | GET | Return block group N state. |
/api/debug/stats | GET | Diagnostic counters (timed fires, fast-clock state, condition stats). |
/api/fc/start?mult=N | POST | Start fast-clock session at multiplier N (1–60). |
/api/fc/stop | POST | Stop fast clock. |
/api/reboot | POST | Reboot the board. |
The Route Processor runs on an ESP32 module with 4 MB of flash, partitioned for redundant OTA images plus SPIFFS storage. The CAN controller is a hardware MCP-class peripheral — not bit-banged — so frame timing is rock-solid.
millis() comparison uses the subtraction pattern, so the 49-day rollover doesn't disturb timed routes, intervals, or schedules.| Item | Value |
|---|---|
| MCU | ESP32 (dual-core, 240 MHz) |
| Flash | 4 MB |
| RAM | 520 KB SRAM |
| Routes | 100, each up to 16 slots |
| Block groups | 32 |
| Conditions per route | 4 |
| RFID tags per route | 10 (4-digit hex IDs) |
| Power input | 12 V DC, <200 mA |
| CAN bitrate | 125 kbit/s (System2 standard) |
| Wi-Fi | 2.4 GHz, WPA2-PSK |
| Operating temperature | 0°C — 50°C (typical indoor) |
The CAN bus is the layout's nervous system: every System2 board listens on it and any board can publish to it. Wiring is two screw terminals (H and L) plus a common ground reference between any two adjacent boards.
Each System2 board (including the Route Processor) has an on-board 120 Ω termination resistor with a slide-switch or jumper to enable/disable it. Look for the silkscreened TERM label near the CAN terminals.
TERM enabled.TERM disabled.| Version | Date | Changes |
|---|---|---|
| 1.0 (V15) | 20 May 2026 | Initial user guide covering firmware V15 features: Trigger Gating, Block Groups, Route Chaining, Schedules, Trigger Edge, Timed Triggers, switchable slot layout, reliable 100-route backup/restore, browser-direct cloud backup. Companion Worked Examples document linked from §13. |