Building IoT Shop-Floor Monitoring Software: What No One Tells You
The hardware works. The integration is where shop-floor IoT projects die. Here's the full picture before you start.
Shop-floor IoT sounds simple in the pitch: install sensors on machines, stream data to the cloud, build a dashboard. The hardware vendors make it look easy. The reality is that most projects fail on integration, not hardware.
The hardware works. The software integration between the shop floor and your business systems is where projects die.
The OT/IT Divide: Why PLC Data is Hard to Get
Manufacturing equipment runs industrial networks, not IT networks. Your PLCs (programmable logic controllers) don’t speak HTTP. They speak Modbus, Profinet, OPC UA. They run on 24/7 uptime, not reboots.
This is the first problem:
- Physical isolation — PLCs are on a closed industrial network; they’re not connected to your corporate IT network for security
- No REST APIs — PLCs don’t expose data via endpoints. They’re designed for real-time automation, not API requests
- Latency sensitivity — a 500ms delay in a PLC response can halt production. Cloud API calls are 100–1000ms away
- Proprietary protocols — your Siemens equipment uses different communication than your ABB equipment, which differs from your legacy controllers from 1998
- No standardisation — the same machine type from 1995 and 2015 require different integration approaches
Bridging this gap is not a hardware problem. It’s a software integration problem.
MQTT: The Industrial IoT Protocol
MQTT is the de facto standard for IoT because it solves the core problem: how do devices on unreliable networks publish data without blocking?
Here’s why MQTT works for shop-floor IoT:
- Publish/Subscribe model — sensors publish data; applications subscribe to topics. No point-to-point wiring
- QoS levels — guarantee delivery “at most once,” “at least once,” or “exactly once” on spotty networks
- Lightweight — runs on embedded systems with 512MB RAM; doesn’t require enterprise infrastructure
- Decoupled from transport — doesn’t care if the underlying network is Wi-Fi, 4G, or wired. Just needs TCP
- Standard broker software — Mosquitto (open-source), HiveMQ, or cloud providers offer managed MQTT
Your integration strategy:
- Edge gateway at the PLC — an industrial PC or dedicated gateway (Siemens S7-1200, Allen-Bradley CompactLogix) collects data from local equipment
- Gateway publishes to MQTT — data flows out every 1–5 seconds to an MQTT broker
- Applications subscribe to topics — your dashboards, analytics, and ERP connectors listen for updates
- Write operations reversed — your systems publish commands; the gateway executes them on the PLC
This keeps everything decoupled. When one application is slow, other systems still get data.
Time-Series Databases: Store and Query Sensor Data
You can’t store 100,000 machines × 50 sensors × 60 data points per hour in a traditional SQL database. That’s 300 billion rows per year. You need a time-series database.
TimescaleDB (PostgreSQL extension)
Best if you already use Postgres:
- Automatic partitioning by time
- Compression built-in (20–50x reduction)
- Query speeds are fast even on 10 years of history
- Single binary; no separate infrastructure
InfluxDB
Purpose-built for metrics:
- Writes are extremely fast (millions of points/second)
- Downsampling built-in (keep raw data 30 days, then 1-hour rolls)
- Strong downside: query language is different; migrations are manual
Prometheus (Scrape model)
If you’re already in the Kubernetes ecosystem:
- Pull metrics from HTTP endpoints instead of push
- Less suitable for high-frequency data from edge devices
- Excellent for infrastructure and application metrics
Pick based on your existing stack. Most shop-floor systems benefit from TimescaleDB or InfluxDB because they handle write-heavy workloads and compress well.
Edge Computing vs Cloud Aggregation: Where Processing Happens
The question: do you process data at the gateway (edge) or send it to the cloud?
Edge Processing (Recommended for Real-Time)
Run logic on the gateway itself:
- Anomaly detection — if a motor runs at 2x normal temp, alert immediately
- Threshold breaches — if pressure drops below min, trigger an alarm
- Downtime tracking — count tool changes, idle time
- Data filtering — only send anomalies to cloud; ignore noise
Benefits:
- Zero latency; production decisions are instant
- Survives cloud outages; keeps running independently
- Lower bandwidth; cloud receives 1/10th the raw data
Cost:
- Gateway must be powerful enough (Raspberry Pi with 4GB RAM: ~$100; industrial-grade: $500–2000)
- Requires embedded engineers or deployed Python/Go
- Testing is harder; you debug across multiple layers
Cloud Aggregation (Easier to Build)
Send all data to cloud; process there:
- Simpler architecture; write one analytics pipeline
- Easier dashboards and reporting
- Scale with managed cloud services
Downsides:
- Latency kills real-time control (network round-trip is 100–500ms)
- Network failures black out the shop floor
- Data costs if you’re at scale (10 Gbps of sensor data = expensive ingestion)
Reality: Most manufacturers do hybrid. Real-time decisions happen at the edge. Historical analysis happens in the cloud.
Alert Fatigue and Threshold Design
This is where most IoT projects become liability instead of asset.
Factory managers get 300 alerts per day. After a week, they mute them all. Equipment breaks and nobody notices.
Prevent this:
- Meaningful thresholds — set based on historical norms, not arbitrary guesses. If a motor normally runs 65–75°C, alert at 85°C (not 50°C)
- Context matters — a 90-second delay during setup is normal; during production run, it’s an error. Gate alerts based on shift state
- Alert correlation — if the compressor pressure is high AND the dryer temp is high, it’s one problem, not two separate alerts
- Escalation paths — first alert goes to operator dashboard. After 5 minutes unacknowledged, escalate to supervisor. After 30 minutes, page the plant manager
Build this into your alerting rules from day one. Retrofit it later and you’ll have already trained people to ignore the system.
A Working Architecture End to End
Here’s what a production shop-floor IoT system looks like:
[PLC/Equipment]
↓ (Modbus/OPC-UA)
[Edge Gateway: collect data, run anomaly detection, publish to MQTT]
↓ (MQTT over 4G/wired)
[MQTT Broker: message hub]
↓
[Time-Series Database: ingest and store]
[Real-Time Dashboard: subscribe to MQTT topics directly]
[Analytics Engine: query historical data]
[ERP/MES: consume alerts and status updates]
Each layer is independent. If the dashboard crashes, data still flows to the database. If the network hiccups, the gateway buffers locally and retransmits.
The Full Project Timeline
- Month 1–2 — hardware audit, gateway selection, pilot on 1–2 machines
- Month 2–3 — edge logic (anomaly detection, thresholding), MQTT broker setup, time-series DB
- Month 3–4 — basic dashboard, alert system, testing
- Month 4–6 — full rollout to all equipment, threshold tuning, operator training
- Month 6+ — analytics, predictive maintenance, integration with ERP/MES
The hardware costs 20% of the budget. The software integration costs 80%.
Where to Start
Pick your most expensive equipment or your most problematic process. Pilot there first. Get 3 months of data. Build alerts based on what you learned. Then scale.
Don’t try to boil the ocean. The difference between a failed IoT project and a valuable one is usually just picking the right starting point.