About the client
The client is a Kenyan fast-moving consumer goods manufacturer producing household cleaning products and packaged foods. It runs three plants: its main site in Nairobi's Industrial Area, a blending and filling plant in Thika, and a smaller packaging facility near the port in Mombasa. Together the plants employ around 650 staff across three shifts and operate 22 production lines, most of them built around Siemens S7 and Allen-Bradley CompactLogix PLCs installed over the past fifteen years.
The business had invested steadily in machinery but very little in the systems around it. Each plant ran its own maintenance team, its own spreadsheets and its own way of requesting spare parts.
The challenge
Maintenance was almost entirely reactive. A motor bearing or a filler pump would run until it failed, the line would stop, and only then would a supervisor phone the maintenance office. In the twelve months before the project, the group logged an average of 41 hours of unplanned downtime per month, and mean time to repair (MTTR) was 6.5 hours.
Much of that repair time was not spent repairing. Technicians often discovered that the replacement part was not in stock, which triggered an emergency purchase and, in several cases, air freight from Nairobi to Mombasa. Inventory in Odoo was updated in weekly batches, so the stock figures stores relied on were usually out of date. There were 13 recorded stockouts of critical spares per quarter.
Management had no reliable cross-plant view. Overall equipment effectiveness (OEE) was estimated at around 61%, but that figure was assembled by hand each Monday from three different spreadsheets, and plant managers openly disputed it. Frequent grid power interruptions in Thika added further stops that were rarely recorded consistently.
Objectives
- Collect live machine data from every production line without replacing or reprogramming existing PLCs.
- Detect early warning signs of failure (vibration, temperature, current draw, cycle-time drift) and raise maintenance work automatically.
- Keep spare-parts stock levels accurate in Odoo and trigger purchase requests before stock runs out.
- Give plant and group management a single, trusted view of OEE and downtime causes.
- Keep production running throughout deployment, with no line stopped outside a planned changeover window.
Our approach
Discovery & audit
We spent the first three weeks on site at all three plants. Our engineers catalogued every PLC, its firmware, available tags and network connectivity, and sat with maintenance teams to understand which failures cost the most hours. Twelve months of maintenance logs were cleaned and analysed, which showed that six asset types (filler pumps, conveyor gearboxes, capping heads, compressors, labellers and shrink tunnels) accounted for 70% of unplanned downtime. These became the first priority.
We also audited the plant networks. Two of the three plants had flat networks with PLCs sharing a segment with office PCs, so we built a small, separate OT segment for the gateways as part of the project.
Design
The design principle was to read from the PLCs, never write to them. Edge gateways at each plant poll PLC tags over native protocols (S7 and EtherNet/IP), take readings from a small number of retrofit vibration and temperature sensors where the PLC had no relevant signal, and publish data over MQTT with TLS to a central broker hosted in a Nairobi data centre.
Each gateway buffers up to 72 hours of data locally, so short internet or power interruptions do not lose readings. A rules engine built in Node-RED evaluates thresholds and trend rules agreed with each plant's maintenance lead, for example a sustained 15% rise in pump motor current over a shift. When a rule fires, the engine creates a maintenance ticket in Odoo with the asset, reading history and suggested parts attached, and checks stock for those parts.
Deployment
We deployed in three waves, starting with Thika as the pilot because it had the most failures and the most engaged maintenance team. Gateways were installed during scheduled weekend changeovers, and each PLC connection was tested read-only before go-live. Rules ran in shadow mode for two weeks at each plant, logging what they would have raised without creating tickets, so we could tune thresholds and avoid flooding technicians with false alarms. Nairobi and Mombasa followed once the Thika rules were stable.
Solution architecture
| Layer | Components | Purpose |
|---|---|---|
| Plant floor | Existing Siemens and Allen-Bradley PLCs, 46 retrofit vibration and temperature sensors | Source of machine data |
| Edge | Industrial edge gateways (one per 4 to 6 lines), on UPS, on a dedicated OT VLAN | Protocol conversion, local buffering, MQTT publishing |
| Messaging | Eclipse Mosquitto MQTT broker with TLS and per-gateway credentials | Secure, lightweight transport between plants and the core |
| Processing | Node-RED rules engine, TimescaleDB time-series store | Condition rules, trend detection, data history |
| Business systems | Odoo Maintenance, Inventory and Purchase modules | Automatic tickets, stock checks, purchase requests |
| Visibility | Grafana dashboards, SMS and email alerts | OEE, downtime Pareto, open work orders per plant |
The group OEE dashboard combines live line status, downtime causes and open maintenance tickets for all three plants.
Spare-parts reordering uses minimum stock levels calculated from actual consumption and supplier lead times, rather than the fixed numbers stores had used for years. Purchase requests are created in Odoo as drafts for approval by the procurement officer, so no order is placed without a human sign-off.
Implementation timeline
| Phase | Weeks | Key deliverables |
|---|---|---|
| Discovery & audit | 1–3 | Asset and PLC inventory, downtime analysis, OT network assessment |
| Design & build | 4–6 | Gateway configuration, MQTT broker, rules engine, Odoo integration |
| Pilot (Thika) | 7–10 | 8 lines connected, shadow-mode tuning, technician training |
| Rollout (Nairobi) | 11–13 | 10 lines connected, OT VLAN, group dashboards |
| Rollout (Mombasa) | 14–15 | 4 lines connected, stock minimums recalculated |
| Handover | 16 | Runbooks, admin training, transition to managed support |
Results
| Metric | Before | After | Change |
|---|---|---|---|
| Unplanned downtime (hours/month, all plants) | 41 | 15.5 | -62% |
| Overall equipment effectiveness | 61% | 72% | +11 pts |
| Mean time to repair | 6.5 h | 2.4 h | -63% |
| Critical spares stockouts per quarter | 13 | 2 | -85% |
Figures compare the twelve months before the project with the first six months after full rollout. The biggest gains came from catching filler pump and gearbox wear early enough to schedule repairs during planned changeovers. MTTR dropped mainly because parts were now in stock and tickets arrived with the fault history already attached. Emergency air freight for spares, previously around KES 2.1 million a year, has fallen to near zero.
What made the difference
- Read-only integration. Leaving PLC logic untouched removed the biggest risk for plant engineers and made approval from the operations team straightforward.
- Shadow mode before go-live. Two weeks of silent running per plant let us cut false alarms by more than half before technicians ever saw a ticket.
- Starting with six asset types. Focusing on the assets behind 70% of downtime produced visible wins in the pilot and built support for the wider rollout.
- Humans approve purchases. Automation drafts the purchase request, but procurement keeps control, which kept finance comfortable with the change.
What's next
TechBytes now provides managed support for the gateways, broker and rules engine, including 24/7 monitoring of data flows and quarterly rule reviews with each plant's maintenance lead. The next phase will add energy metering on the main compressors and chillers to bring power consumption, generator run hours and grid outages into the same dashboards, and will begin testing simple failure-prediction models on the eighteen months of data now available.
