SCADALite is a lightweight, Python-based SCADA-style dashboard that reads telemetry from either:
- Simulation mode (fake data)
- A COM/Serial device (Arduino, microcontrollers, PLCs, etc.)
It supports:
- Live trending
- Pause/Resume
- Alarm detection (HI/LO)
- Configurable alarms
- Historical log loading
- Config-driven graph selection
- Tkinter is single threaded, so one thread is allocated for GUI and other for background reading to prevent freezes.
- Safe shutdown of thread using stop event
- Unified record parser, everything is parsed by one function and into one structure (TagRecord)
- Streams do not store or process data to prevent race conditions
scadalite/
│
├── app.py ← GUI
├── streams.py ← simulation + COM
├── parser.py ← TagRecord + parse_line
├── alarms.py ← alarm_rules + active_alarms + detect_alarm
├── storage.py ← history + latest + log_record + handle_record
├── config.py
└── main.py
git clone https://github.com/colinli02/scadalite
cd scadalite
pip install -r requirements.txtModify config.yaml with the tags you want to use. See the current config for examples.
SCADALite parses every incoming telemetry line into a TagRecord with the following fields:
- TAG — name of the measurement
- TYPE — the kind of signal
- PV — process value (numeric reading)
- SP — setpoint (optional)
- UNIT — engineering units (optional)
- TS — timestamp
| Type | Meaning |
|---|---|
| ai | Analog input (sensor value, e.g., speed, temperature, level) |
| do | Digital output (0/1 command, e.g., heater on/off) |
| CONST | Constant value defined in config.yaml |
SCADALite supports multiple input formats depending on how much information you want to send.
TYPE defaults to ai.
TAG PV
PUMP1_SPEED 1500
TYPE = aiPV = 1500SP = (empty)UNIT = (empty)
Explicitly specify TYPE, SP, and UNIT.
TAG=PUMP1_SPEED;TYPE=ai;PV=1332.8;SP=1500;UNIT=RPM;
TYPEPVSPUNIT
TAG,TYPE,PV,SP,UNIT
PUMP1_SPEED,ai,1332.8,1500,RPM
You can define constant tags directly in config.yaml.
constants:
TARGET_SPEED: 1500
TARGET_LEVEL: 80These appear with:
TYPE = CONSTPV = your constant valueSP = (empty)
Constants are graphed by default.
Run from the project root (cd)
py -m scadalite.mainOr run the .bat file directly on Windows