FactoryMind.
Predictive maintenance: edge sensor to root cause in one pipeline.

FIG. 01 — System diagram: alarm to root cause
Alarm to root cause
A C++ edge sensor checks three machines against their limits and publishes a JSON alarm over AMQP only when one is crossed. RabbitMQ buffers the alarms; a worker pulls each alarm, retrieves similar past cases from technician notes in ChromaDB and asks a local Qwen2.5 model through Ollama for the likely root cause and next steps.
THE BUILD
An Industry 4.0 pipeline: a C++ edge sensor watches temperature and vibration and publishes a JSON alarm over AMQP when a limit is crossed, RabbitMQ buffers it, and a worker matches each alarm against technician notes with local RAG before a local LLM suggests a root cause and mitigation — fully on-premise, started with one docker compose command.
WHAT IT DOES
- 01C++17 edge sensor (rabbitmq-c): limits of 90 °C and 7.1 mm/s with hysteresis, so one noisy reading can't fire twice
- 02RabbitMQ decouples the sensor from the AI worker
- 03Notes filtered per machine and per exceeded reading in code, then local RAG + on-prem LLM diagnosis
IN DETAIL

One alarm, end to end
CNC-02 crosses 90 °C. The worker looks only at CNC-02's notes and, because temperature is the reading over its limit, keeps only the temperature note — that filtering is done in code, not left to the model. The local Qwen2.5 model then turns the note into a root cause and an action: check coolant level and look for a leak.
A real run: CNC-02 overheats, the matching note is found, the model answers

The broker in between
RabbitMQ decouples the C++ sensor from the AI worker: the sensor publishes and moves on, the worker consumes at its own pace. The management UI shows the publish and deliver rates rising as alarms arrive.
RabbitMQ management: alarms flowing from the sensor to the AI worker

One command
RabbitMQ, the Python worker and the C++ sensor build and start together with docker compose up; Ollama runs on the host. The sensor is compiled inside its own Debian image, so nothing needs installing on the machine.
The whole stack started with one docker compose command