IMPLEMENTATION DOCS / UNS FRAMEWORK

uns-stoppage — Stoppage Classifier

Classifies why machines aren't running — auto-classification with manual operator overrides.

Production · Adds reasons to recorded stops. Read state tracking first to understand the source records.
LanguageNode.js
TypeHTTP function
Scaffolded withfnkit node
Depends onPostgreSQL (uns_state)
On this page 4 sections
What It DoesAuto-classificationAPIQuick Start

What It Does

Reads non-ACTIVE states from uns_state, auto-classifies each stoppage, provides POST endpoint for operator overrides.

Auto-classification

StateCodeCategory
IDLENO_WORKplanned
WAITINGSTARVEDunplanned
ALARMFAULTunplanned
SETUPSETUPplanned
OFFLINEOFFLINEplanned

API

GET  /uns-stoppage?machine=cnc-01
POST /uns-stoppage  {"state_id":42,"reason_code":"TOOL_BREAK","category":"unplanned"}

Quick Start

cd uns-stoppage && cp .env.example .env && docker compose up -d
curl http://localhost:8080/uns-stoppage | jq