Printers & Home IoT

3D printers and home electronics, controlled from the website behind the opaque secure login — realized entirely on the sovereign nishi fabric. No Node, no nginx, no third-party proxy.

Live monitor

Loading live status…

Control (operator only — requires your cap)

Paste your printer control capability (an opaque bearer token). It is stored only in this browser and presented to the sovereign edge on each command — never to any third party. Revoke it anytime via /api/cap/revoke.

Architecture — opaque login → sovereign edge → LAN device

1
Browser opaque token
Your existing dashboard presents an opaque X-Nishi-Cap token (encrypted session cookie / bearer). Nothing about the printer leaves the browser except a control intent.
2
Sovereign edge — sites.elf :8443 TLS 1.3, own trust store
The single public entry point. Validates the opaque cap-token internally, then reverse-proxies the /printers route inward. This is the operator's web-server + reverse-proxy leg — already live, already sovereign.
3
Control organ — nx_printer_ctl cap-gated
A sovereign organ (on the NAS, which sits on the home LAN) with a least-authority capability. Fixed safe-endpoint allowlist — no arbitrary path, no raw G-code. Emits JSON: the MCP / API / agent interchange.
4
Printer — Moonraker :7125 / Fluidd :10088 LAN only
QIDI X-Max 3 (Klipper + Moonraker). Reached over plain LAN HTTP. It never sees the WAN — only the cap-gated organ ever touches it.

Why this is more secure than the reference design

Zero external exposure — by construction
The reference design puts the web server off-site and tunnels home over WAN mTLS. Here the sovereign edge is on the home LAN, so the organ reaches the printer directly. The printer never has a WAN-facing socket at all — there is no tunnel to attack.
Double-layer auth
An attacker must break the opaque cap-token layer and hold a least-authority capability scoped to nx_printer_ctl to reach the device. Least-authority is proven: a read-only cap is denied at the tool boundary.
Never-brick — mechanically proven
The organ maps every verb to a fixed safe endpoint. There is no raw-G-code passthrough, so no path can ever carry a firmware/EEPROM-write G-code (M500/M502). A verb outside the allowlist has no route → the gate goes RED. CLAUDE rule 26
No third-party stack
No Express, no nginx, no http-proxy-middleware. Sovereign organs over our own TLS 1.3 and LAN sockets — one auditable byte path, edit→build→deploy over the sovereign API.

Safe control surface (the allowlist)

VerbMethod + endpointEffect
infoGET /printer/infoPrinter + Klipper state (ready / startup / shutdown / error)
statusGET /printer/objects/queryLive telemetry — parsed hotend & bed temps + targets as clean JSON
readyGET /printer/infoPreflight gate — refuse to print unless Klipper state is ready
discoverLAN sweep (non-blocking)Auto-find printers on your subnet — discover 192.168.8 7125 → list of live hosts (no hand-entered IPs)
surveymulti-port LAN inventoryMap all home electronics on your subnet — survey 192.168.8 classifies each device (3D printer / web device / hub) by port profile
estopPOST /printer/emergency_stopInstant halt — runtime MCU stop, RAM-only; recovered by a soft firmware restart. Writes no persistent hardware state.
pausePOST /printer/print/pausePause the active print
resumePOST /printer/print/resumeResume a paused print
cancelPOST /printer/print/cancelAbort the active print
contract— (no network)Emit this security/routing contract as JSON for an agent

Live telemetry (temperatures, position, progress) parses through the shipped nx_moonraker_telemetry_parse / nx_moonraker_motion_parse organs. Real-time updates stream over our sovereign API — not WebSocket: the connected dashboard polls the cap-gated edge every few seconds (Nishi-native; the last-mile interop is the API). On the LAN side the organ polls Moonraker over plain HTTP. The camera feed (MJPEG over HTTP, sovereign) is the one piece that waits on the printer's webcam hardware.

Reference design → sovereign realization

Reference (Node/Express)Sovereign nishi equivalent
Express server on public internetsites.elf edge :8443 (live)
Opaque token DB lookup middlewareX-Nishi-Cap capability verify (ta_mcp_call)
http-proxy-middleware + mTLS agentsovereign reverse-proxy /api/route + TLS 1.3
Home nginx mTLS servernot needed — edge is on-LAN
Moonraker/OctoPrint client codenx_printer_ctl → nx_moonraker_client/io

Agent / API surface

nx_printer_ctl info <lan-ip> 7125 # GET /printer/info -> {"http_status":200,"result":"OK",...} nx_printer_ctl status <lan-ip> 7125 # live temps -> {"hotend":{"actual_c":209,"target_c":210},"bed":{...}} nx_printer_ctl ready <lan-ip> 7125 # preflight -> {"ready":1,"klippy_state":"ready"} nx_printer_ctl discover 192.168.8 7125 # LAN sweep -> {"found":["192.168.8.42"],"count":1} nx_printer_ctl survey 192.168.8 # home inventory -> {"devices":[{"ip":..,"kind":"3d-printer","ports":[7125,10088]}],"count":N} # --- the full sovereign print pipeline (zero third-party) --- nx_slicer slice model.stl model.gcode 200 20 # SOVEREIGN slice: STL -> G-code (0.2mm layer, 20% infill, QIDI profile) nx_printer_ctl upload <lan-ip> 7125 model.gcode model.gcode # multipart -> printer files nx_printer_ctl printstart <lan-ip> 7125 model.gcode # start the print nx_printer_ctl progress <lan-ip> 7125 # track state + percent nx_printer_ctl estop <lan-ip> 7125 # POST /printer/emergency_stop nx_printer_ctl pause <lan-ip> 7125 nx_printer_ctl contract # the security/routing contract as JSON

Emitted JSON is the same object whether called by the browser dashboard, the mgmt API, or an autonomous agent over MCP. Malformed input is rejected fail-closed; an offline printer returns an honest {"result":"NETWORK_ERR"} — never a fabricated status.

Revoking access — killing a leaked token

Every hardware-access capability is individually revocable by nonce. If a token leaks, present it to POST /api/cap/revoke — the edge validates its signature and appends its nonce to the denylist (cap_revoked.list), checked on every subsequent request. Revocation is surgical: killing one token never affects another, and needs no key rotation or downtime.

POST /api/cap/revoke {"_cap":"<the-leaked-token>"} -> {"revoked_nonce":1784572621,"note":"denylisted; refused from now on"}

Proven live: minted a scoped test token → it worked → revoked it → the same token returned capability denied (revoked) on the next call, while the live token kept working.

Current status

Control organ nx_printer_ctl + lib (10 verbs)built · gate GREEN 10/10 · MCP-live
Live telemetry status + preflight ready verbsparsed JSON · proven (gate T6/T7/T8)
LAN auto-discovery discover + home-device surveyMCP-live · surveyed 6 real LAN devices in 226ms (gate T9/T10)
Moonraker primitives (client · io · telemetry · motion · ready-check)shipped
Never-brick safe-endpoint allowlistproven (gate T3)
Real loopback roundtrips (GET info · POST estop)proven (gate T4/T5, real kernel TCP)
Live monitor dashboard (auto-refresh + auto-discover)LIVE · renders survey + printer state; refresh beat every 2 min
Browser control (operator, cap-gated)LIVE · buttons → /mcp with your cap; anon denied -32001 (proven)
Sovereign slicer nx_slicer (STL → G-code)MCP-live · gate 5/5 · real STL → 140KB G-code on the QIDI profile, no OrcaSlicer
G-code upload + FULL pipeline (slice→upload→print→track)MCP-live · 15 verbs, gate 14/14 · zero third-party
QIDI X-Max 3 hardwareoffline — powers on → point info <ip> 7125 at it