Over the past months I've been developing a lightweight MES-style system to monitor production machines in real time — from the PLC floor all the way up to a live analytics dashboard.

Most shop floors still track performance on paper or a spreadsheet that gets updated once a shift, which means every decision is made on data that's already hours old. This system polls PLCs directly, streams live machine state to a web dashboard, and calculates Availability, Performance and Quality continuously, so the number on screen always matches what the machine is doing right now.
It runs as a single Docker container: a polling engine reads tags off the machines in parallel threads, and a FastAPI server exposes that state to the dashboard over REST and WebSocket, with role-gated access for operators, engineers and admins.


A driver-factory pattern keeps protocol logic isolated from the core engine, adding a new machine or brand means writing one driver, not touching the polling loop, the OEE math, or the dashboard.

OEE is only meaningful if the shift math is right — this engine handles configurable shift patterns, per-shift breaks, and shifts that cross midnight, with per-shift baselines so counts reset cleanly at each handover.
Availability is planned time minus logged downtime; Performance compares actual parts against target_ppm; Quality is good parts over total parts for the current shift. All three recompute every polling cycle.
Shift reports: historical good/reject counts and final OEE logged automatically at every shift handover.


LegacySync Automation LTD
Register Address: 167-169 Great Portland Street, 5th Floor.
Copyright © 2026 LegacySync Automation - All Rights Reserved.
LegacySync Automation Ltd | 17178297