Offline-first monitoring of knitting machines
Sub-second machine events over MQTT, without losing a single data point when the network goes down: the SD card is the source of truth.
Runs on: ESP32 PLC — Arduino sketches (.ino).
The application
A knitting mill with two production floors wanted visibility of stops and production on its Terrot machines without depending on the factory WiFi. Each ESP32 PLC counts production pulses, publishes every input change instantly over MQTT and stores everything on SD in daily files; if the network goes down, nothing is lost and the history is recovered over HTTP. Real time via RTC+NTP, OTA through an embedded web server and one Node-RED concentrator per floor.
Architecture
- Machine inputs + pulse counter → ESP32 PLC
- Event on every input change → immediate MQTT with a unique messageID
- Full snapshot every 20 s + ALWAYS written to SD (daily file)
- History recovery via authenticated HTTP POST
- Node-RED concentrator per floor: validation, backup, dashboard
Bill of materials
- ESP32 PLC — Industrial Shields controller
- Industrial microSD card — offline buffering
- Concentrator (Raspberry Pi + Node-RED + Mosquitto) — per floor
What is in the pack
http-client-xml-terrot.inomodbus-rtu-master-32bit.inomqtt-events-sd-buffering.inomqtt-remote-commands.inonode-red-multi-plant-concentrator.jsnonblocking-wifi-reconnection.inoproduction-pulse-counter.inortc-ntp-synchronization.inosd-daily-file-datalogging.inosd-file-upload-http-post.inowebserver-ota-firmware.ino- Bill of materials + README
Get the pack by email — free
Fill in the form and we will send the complete pack to your inbox within minutes.