This document is the full rebuild checklist for bringing this project onto a new Windows laptop and getting the frontend, backend, DAQ, PLC, and camera stack running again.
git clone <your-github-repo-url>
cd engine-control-consoleInstall these before trying to run the stack.
Core development/runtime tools:
- Git
- Node.js LTS
- Python 3.10 or newer
- npm (installed with Node.js)
Hardware and DAQ tools:
- LabJack LJM driver/runtime
- Kipling (LabJack utility)
- AGFRC servo programmer
- USB-to-serial drivers if the Arduino/adapter needs them
Camera and recording tools:
- MediaMTX
Recommended Windows utilities:
- A code editor such as VS Code
- A terminal you are comfortable using (
PowerShellorcmd)
cd backend
npm installcd ..\frontend
npm installcd ..\backend
python -m venv .venv
.venv\Scripts\activate
pip install labjack-ljmNote:
backend/requirements.txtis currently only placeholder comments, so the critical Python package here islabjack-ljm.
This project is currently configured to log to an external drive.
Create or verify these folders:
D:\Test DataD:\Recordings
These paths are defined in:
backend/config/system.config.jsmediamtx.yml
If the external storage is not mounted as D:, logging health will fail and CSV/video recording checks in the GUI will go red.
Open a terminal in the repo root, then:
cd backend
npm startWhat this starts:
- HTTP/WebSocket server on
ws://localhost:8080 - TCP receiver on port
9000for the Python DAQ service - PLC sequence poller
- Arduino serial reader
- CSV logger
Primary backend entry file:
backend/server.js
Open another terminal:
cd frontend
npm run devWhat this does:
- Starts the React + Vite frontend dev server
- Connects the GUI to
ws://localhost:8080
Frontend package file:
frontend/package.json
Open another terminal:
cd backend
.venv\Scripts\activate
python daq/labjack_reader.pyCurrent DAQ behavior:
- Connects to the LabJack T7 over Ethernet
- Sends newline-delimited JSON to
127.0.0.1:9000
Current key analog mappings in backend/daq/labjack_reader.py:
AIN0-> PT-1AIN1-> PT-2AIN2-> PT-3AIN3-> PT-4AIN4-> PT-5AIN5-> PT-6AIN6-> Load Cell 2AIN7-> Load Cell 1AIN8-> TT-1 thermocouple transmitter
If Ethernet LabJack access is not available, the connection mode in backend/daq/labjack_reader.py must be changed manually.
Camera streaming and recording are handled by MediaMTX.
Current camera sources in mediamtx.yml:
cam1->rtsp://admin:123456@192.168.1.6:554/Streaming/channels/101cam2->rtsp://admin:123456@192.168.1.7:554/Streaming/channels/101
Current recording configuration:
- enabled with
pathDefaults.record: yes - recordings written to:
D:/Recordings/%path/%Y-%m-%d_%H-%M-%S
To start MediaMTX:
cd C:\Users\Aditya Sharma\engine-control-console
mediamtx mediamtx.ymlOr, if you are using the downloaded executable directly:
"C:\path\to\mediamtx.exe" "C:\Users\Aditya Sharma\engine-control-console\mediamtx.yml"Expected endpoints after MediaMTX starts:
- WebRTC listener on
http://localhost:8889 - Camera pages used by the GUI are served from MediaMTX
What to verify in the MediaMTX console:
- both
cam1andcam2reportstream is available and online - recorder lines appear for each camera
The backend also listens for Arduino serial events.
Current serial config is in:
backend/config/system.config.js
Current setting:
arduinoSerial.port = "COM3"arduinoSerial.baudRate = 9600
If the new laptop assigns a different COM port, update this before starting the backend.
The PLC sequence poller is enabled by default.
Current PLC config:
- host:
192.168.1.1 - port:
502 - unit ID:
1
This is defined in:
backend/config/system.config.js
Before testing, verify the laptop can reach:
- PLC at
192.168.1.1 - camera 1 at
192.168.1.6 - camera 2 at
192.168.1.7 - LabJack on the same Ethernet network
Recommended checks:
- recreate any static IP settings from the old laptop
- verify firewall does not block local ports
8080,9000,8889,502
Use separate terminals.
- Start the backend
cd backend
npm start- Start the Python DAQ
cd backend
.venv\Scripts\activate
python daq/labjack_reader.py- Start MediaMTX
cd C:\Users\Aditya Sharma\engine-control-console
mediamtx mediamtx.yml- Start the frontend
cd frontend
npm run devbackend/config/system.config.js- COM port
- logging directories
- PLC host/settings
- sensor calibration if hardware changes
backend/daq/labjack_reader.py- LabJack connection mode
- DAQ channel mapping if wiring changes
mediamtx.yml- camera RTSP URLs
- recording path
Frontend:
- Displays the GUI
- Connects to backend WebSocket
- Does not read hardware directly
Backend:
- Owns live state
- Scales data
- Polls PLC
- Writes CSV logs
- Reports logging and continuity status to the GUI
Python DAQ:
- Reads LabJack analog and digital channels
- Sends raw DAQ packets to the backend
MediaMTX:
- Pulls RTSP streams from the cameras
- Serves camera streams to the GUI
- Records video files to disk
If the GUI loads but shows no live data:
- Confirm backend is running on port
8080 - Confirm Python DAQ is connected to port
9000 - Confirm the frontend was started from
frontendwithnpm run dev
If PT/load cell/TT-1 values are missing:
- Confirm the LabJack is reachable
- Confirm channel mappings in
backend/daq/labjack_reader.py - Confirm
sensors.availabilityinbackend/config/system.config.js
If camera windows are blank:
- Confirm MediaMTX is running
- Confirm both camera RTSP endpoints are reachable
- Confirm MediaMTX reports both paths as online
If CSV logging or camera logging shows red in the GUI:
- Confirm the external drive is mounted as
D: - Confirm
D:\Test Dataexists - Confirm
D:\Recordingsexists - Confirm the backend and MediaMTX both have access to those folders
Keep these backed up outside the laptop:
- this full repo
- MediaMTX executable and known-good version
- LabJack installer and LJM installer
- Node.js and Python version notes
- camera IPs and credentials
- Windows network adapter settings
- any hardware calibration sheets