uns-stoppage — Stoppage Classifier
Classifies why machines aren't running — auto-classification with manual operator overrides.
| Language | Node.js |
| Type | HTTP function |
| Scaffolded with | fnkit node |
| Depends on | PostgreSQL (uns_state) |
What It Does
Reads non-ACTIVE states from uns_state, auto-classifies each stoppage, provides POST endpoint for operator overrides.
Auto-classification
| State | Code | Category |
|---|---|---|
| IDLE | NO_WORK | planned |
| WAITING | STARVED | unplanned |
| ALARM | FAULT | unplanned |
| SETUP | SETUP | planned |
| OFFLINE | OFFLINE | planned |
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