Skip to content

Nairobi · East Africa

Case study · Manufacturing

Cutting Unplanned Downtime 62% Across Three Plants with Automation

Predictive maintenance and automated spare-parts reordering for a three-plant Kenyan manufacturer, linking PLC data to ERP and live dashboards.

Client
Multi-plant FMCG manufacturer (name withheld under NDA)
Location
Nairobi Industrial Area, Thika & Mombasa, Kenya
Duration
16 weeks
Services
Business Process Automation, Software Development, Industrial IoT, Managed IT Support
Technician grinding a machine part with sparks flying on a factory floor

-62%

Unplanned downtime

+11 pts

Overall equipment effectiveness

2.4 h

Mean time to repair

-85%

Critical spares stockouts

Challenge

Machine failures were found only when lines stopped, maintenance requests travelled by phone and paper, and critical spares were often out of stock when needed.

Solution

We connected PLCs at all three plants to edge gateways streaming over MQTT to a central rules engine that raises maintenance tickets and reorders spares in the client's ERP.

Impact

Unplanned downtime fell by 62% and OEE rose 11 points within six months, with stockouts of critical spares almost eliminated.

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

  1. Collect live machine data from every production line without replacing or reprogramming existing PLCs.
  2. Detect early warning signs of failure (vibration, temperature, current draw, cycle-time drift) and raise maintenance work automatically.
  3. Keep spare-parts stock levels accurate in Odoo and trigger purchase requests before stock runs out.
  4. Give plant and group management a single, trusted view of OEE and downtime causes.
  5. 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

LayerComponentsPurpose
Plant floorExisting Siemens and Allen-Bradley PLCs, 46 retrofit vibration and temperature sensorsSource of machine data
EdgeIndustrial edge gateways (one per 4 to 6 lines), on UPS, on a dedicated OT VLANProtocol conversion, local buffering, MQTT publishing
MessagingEclipse Mosquitto MQTT broker with TLS and per-gateway credentialsSecure, lightweight transport between plants and the core
ProcessingNode-RED rules engine, TimescaleDB time-series storeCondition rules, trend detection, data history
Business systemsOdoo Maintenance, Inventory and Purchase modulesAutomatic tickets, stock checks, purchase requests
VisibilityGrafana dashboards, SMS and email alertsOEE, downtime Pareto, open work orders per plant

Analytics dashboard showing production and downtime charts on a screenThe 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

PhaseWeeksKey deliverables
Discovery & audit1–3Asset and PLC inventory, downtime analysis, OT network assessment
Design & build4–6Gateway configuration, MQTT broker, rules engine, Odoo integration
Pilot (Thika)7–108 lines connected, shadow-mode tuning, technician training
Rollout (Nairobi)11–1310 lines connected, OT VLAN, group dashboards
Rollout (Mombasa)14–154 lines connected, stock minimums recalculated
Handover16Runbooks, admin training, transition to managed support

Results

MetricBeforeAfterChange
Unplanned downtime (hours/month, all plants)4115.5-62%
Overall equipment effectiveness61%72%+11 pts
Mean time to repair6.5 h2.4 h-63%
Critical spares stockouts per quarter132-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.

Talk to an engineer

Ready to make IT the predictable part of your business?

Tell us what you're planning. A solutions engineer will scope it and send a fixed-price proposal in USD.

Chat on WhatsApp

Prefer a call? +254 711 974 716

WhatsApp