====== Architecture ====== Wonder Controlz follows a **centralized logic, decentralized I/O** approach — inspired by industrial automation (PLC + fieldbus). ┌──────────────────────┐ │ Node-RED │ ← Central game logic │ (Main PC) │ All scenarios in one place └──────────┬───────────┘ │ CAN bus ────────┼──────── HTTP REST (I/O modules) │ (media, lights) │ ┌──────────┬──────────┬──────┼──────┬───────────┬───────────┐ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ┌────────┐ ┌────────┐ ┌──────┐ ┌──────────┐ ┌───────────┐ ┌───────────┐ │er-01- │ │er-dio- │ │er- │ │ er-audio │ │ er-lights │ │mpv-control│ │rev-a │ │01 │ │rfid │ │ audio │ │ lighting │ │ video │ └────────┘ └────────┘ └──────┘ └──────────┘ └───────────┘ └───────────┘ ===== Zero Field Logic ===== The core design principle of Wonder Controlz. **No device in the room contains any game logic.** I/O modules, media players, and lighting controllers only execute commands and report events. All decision-making lives in one place: [[https://nodered.org/|Node-RED]] on the [[glossary#main_pc|Main PC]]. This means: * A broken module can be replaced in 2 minutes — plug in a new one, set the address, done. No reprogramming, no re-teaching * Scenarios can be changed remotely — no need to physically access any device * Full room backup is a simple Node-RED flow export — restore the entire room on new hardware in minutes * All debugging happens from one screen — input states, output states, CAN traffic, all visible in real time ===== Communication ===== ==== CAN Bus — I/O Modules ==== All [[glossary#i_o_module|I/O modules]] connect to the Main PC via a **single 4-wire CAN bus** cable (24V + GND + CAN_H + CAN_L). The cable carries both power (24V) and data (500 kbps). Messages use the custom [[glossary#er-frame|ER-Frame]] protocol. ==== HTTP REST — Software Products ==== Software products ([[products:er-audio|er-audio]], [[products:mpv-control|mpv-control]], [[products:er-lights|er-lights]]) are controlled via HTTP REST API. All endpoints use GET requests for seamless integration with Node-RED's HTTP request node. ==== Ethernet UDP — Lighting Hardware ==== The [[products:er-lights|er-lights]] hardware controller receives lighting data over Ethernet (UDP port 5568) using the ERLED480 or sACN/E1.31 protocol.