- concepts/park-2-event-loop-stall: /api/sessions/active ~2 s synchronous (quote() per open unpaid transient x664, unindexed ledger scans) froze the loop; Node runs expired timers before queued UDP replies, so healthy Dingtian pulses reported "timeout" and signed entries lost their snapshot/session row. Standing decision: bounded request cost whatever the operator data. - Dingtian: custom firmware retired (2026-10-23), runbook shelved, vendor pinout in raw/, relay-proxy PoC marked retired; edge-controller hardware memo (open).
18 KiB
type, tags, sources, updated, status
| type | tags | sources | updated | status | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| decision |
|
2026-10-22 | open |
Edge controller — hardware options for the resilient core
Status: open (2026-10-22). Research memo, no purchase yet. Prices are what a web search returned on 2026-10-22 and mix dates and currencies; every figure is to be re-checked at the vendor before ordering. Nothing here is verified on hardware.
Why a Linux controller, not a flashed Dingtian
The relay-proxy-firmware PoC proved the shape: the device that owns the barrier relay and the button inputs reports to the cloud on its own, power-cycles the booth PC, and takes relay commands while the PC is dead. Two things it cannot do on an ESP8266/ESP32 decided this page:
- Every reader push, every ticket print, still goes to the booth PC. The DT-008 readers HTTP-GET
the booth, the printer listens on TCP 9100 for the booth. With the PC down the cloud can pulse a
relay but cannot read a card or print a ticket. The takeover only works if the controller sits
in front of every device: readers and buttons push to the controller, which forwards to the
booth while it answers and acts alone when it does not. That is a real proxy and needs a TCP/IP
stack, a Node runtime for the existing drivers (
dingtian,dingtian-qr-reader, ESC/POS render, ticket Luhn), and local durable storage. - The autonomous minimum decided in discussion (2026-10-22): entry prints a ticket and opens; exit fails open with a signed degraded-exit event; everything is logged locally and reconciled when the booth returns (fail-state-safety, open-questions "Cloud takeover mode"). Internet-down is a separate question the owner is still thinking about; the controller must work with no uplink.
Watchdog policy from the same discussion: take over at one missed probe (1 s cadence, 1 s timeout, same switch as the PC, reversible, harmless if wrong); power-cycle the PC only when it is dead at every layer including ICMP, over a longer window, because a mains cut mid-update corrupts a LUKS/SQLite box and a reboot takes over a minute. ICMP alive with HTTP dead = app down, not PC down.
The bench DT-R004 is the locked standard SKU (dingtian-relay "Can we flash our own firmware?"), so the Dingtian stays what it is: a dumb relay board, optional once the controller has its own relays.
Requirements (derived, not yet signed off)
| # | Requirement | Why |
|---|---|---|
| R1 | ≥ 3 relays with NO and NC contacts (entry, exit, PC mains), ≥ 4 opto-isolated inputs (buttons, loops/radar) | The PC-mains cut needs an NC contact; barrier-not-a-door stays (pulse, never timed close) |
| R2 | Ethernet on the site LAN; a second port is optional | The booth, devices and router share one flat switch today (site-device-installation); an uplink-side port only matters if the LAN is split later |
| R3 | Linux (Debian/Ubuntu class), arm64 or x86, enough for Node + SQLite + the drivers; no vision | Reuse the booth's code; the autonomous minimum is tiny |
| R4 | Hardware watchdog independent of the CPU, RTC with battery | The controller is the thing that restarts others; fees depend on the clock (clock-integrity) |
| R5 | eMMC or NVMe, not microSD as the only storage | Unclean power cuts are the normal case here (park-2 incident 2026-10-17) |
| R6 | A secure element (ATECC608 or TPM) for a non-extractable signing key | The takeover design needs a second signer and asymmetric keys (hardware-signer-options, open-questions takeover section) |
| R7 | 9–36 V DC input, fanless, DIN rail, ≥ 0…+60 °C, ideally a battery/UPS input | Booth cabinet in an Albanian summer; the controller must outlive the PC's power |
| R8 | Vendor supply promise and mainline or vendor-LTS kernel to ~2030 | Field appliances; no re-porting every two years |
| R9 | Modest unit cost; LTE optional, preferably as a separate router | The owner has not decided the internet-down policy |
Candidates
A. Raspberry Pi 5 + relay/input HAT (lab grade)
Pi 5 (board RTC with battery connector, bcm2835 watchdog driver, PCIe x1 for NVMe) plus a Sequent Microsystems Four Relays Four HV Inputs HAT (4 × NO/NC relays 8 A, 4 opto inputs 3–48 V, stackable, ~€57–65; one retailer states Pi 5 support, another lists Zero–4 only — confirm). No secure element (add an I²C ATECC608 breakout), no DIN enclosure, board rated for a desk, not a cabinet (the Pi 5 ambient rating is 0–50 °C — unsourced, LLM prior; check the product brief). Pi prices rose in April 2026 with the memory market. Verdict: the right thing to put the ported firmware on now, in the lab; not the field unit.
B. Raspberry Pi Compute Module on an industrial carrier
| Carrier | Compute | Relays / inputs | Net | Power / UPS | RTC / WDT / SE | Temp | Price (found) |
|---|---|---|---|---|---|---|---|
| Sfera Labs Iono Pi Max v2 | CM4S (CM3+/CM3 also) | 4 × 6 A NO+NC relays, 4 DI 0–40 V, 4 DT lines (Wiegand, 1-Wire) | 1 × 10/100 | 10–50 V DC, built-in UPS for a 12/24 V lead-acid battery | RTC (CR1220) · independent HW watchdog · ATECC608 | -20…+60 °C | from €695 + tax |
| Sfera Labs Strato Pi Max (XS/XL) | CM5 | via X2 expansion boards; analog and RS-485 X2 boards confirmed, a relay/DI X2 board not confirmed by the search | 2 × Ethernet | DC in; RP2040 power management, dual SD redundancy | RTC · WDT · (SE on CM-less Zymbit SCM variant) | industrial | from $602 + tax |
| Seeed reComputer R1100 / R2135-12 | CM4 (R1100) / CM5 32 GB eMMC (R2135 industrial) | R21xx: 4 DI, 4 DO (transistor, not relays), 2 × RS-485, 2 × RS-232, 2 × CAN FD | 1 GbE (+ 1 × 10/100 on R1000) | 9–36 V DC | RTC · WDT (check) · no SE | -20…+65 °C (reseller; R2130 desktop variant 0–45) | ~$390 (R1100) to ~$550 (R2130-12); R2135 price not found |
| Revolution Pi Connect 5 + RevPi RO | CM5, 32 GB eMMC | on board: 1 DI (24 V), 1 SSR; RevPi RO adds relays via PiBridge | 2 × GbE, RS-485, CAN FD | 24 V DC | RTC · WDT · no SE | industrial (Kunbus) | €536–687 + RO €153 |
Verdicts. The Iono Pi Max v2 is the only unit that meets R1, R4, R5, R6 and R7 out of the box, UPS included, and its ATECC608 is exactly the part hardware-signer-options wanted for the controller. Its weaknesses are a single 10/100 port (enough: readers push a few bytes, the printer a few kB; no camera traffic ever goes through the controller) and the older CM4S. The Strato Pi Max is the stronger platform (CM5, two ports) if Sfera confirms a relay/DI X2 board; ask before ruling it out. Seeed is the LTE-friendly option (module slot) but its outputs need an external relay block and it has no secure element. RevPi is the most PLC-like and the most expensive once relays are added; overkill for three relays.
C. Rockchip SBCs (Orange Pi, ODROID, Radxa, FriendlyElec)
| Board | SoC | Storage | Net | RTC | Temp | Software | Price (found) |
|---|---|---|---|---|---|---|---|
| ODROID-M2 | RK3588S2 | 64 GB eMMC HS400 on board, M.2 | 1 GbE | PCF8563 on board | not listed | Hardkernel Ubuntu (20.04 at launch; 24.04 promised), Armbian standard, 6.18 kernel | $180 (4 GB) – $300 (16 GB) |
| ODROID-M1S | RK3566 | 32/64 GB eMMC on board | 1 GbE | battery connector | not listed | Ubuntu 20.04/22.04 images; Armbian | $79–148 |
| Orange Pi 5 Plus | RK3588 | eMMC socket, M.2 | 2 × 2.5GbE | HYM8563 | 0…+70 °C (one listing) | Armbian; Orange Pi 5 Pro mainline DT only at patch v4 in March 2026; Armbian once called the Pro/Max/Ultra "entirely unsupported" | ~$109 (8 GB) – $129 launch era |
| Orange Pi Zero 3 | Allwinner H618 | SD + SPI | 1 GbE | no | — | mainline since 6.5, Armbian standard | cheap |
| Radxa ROCK 5C | RK3588S2 | SD, eMMC module, M.2 | 1 GbE | yes | — | Armbian platinum (vendor-backed) | $166 (4 GB) |
| Radxa E24C / E54C | RK3528A / RK3582 | eMMC options | 4 × GbE | — | — | router form factor; GPIO exposure to confirm | $35 / $55 |
| FriendlyElec NanoPi R3S-LTS | RK3566 | 32 GB eMMC | 2 × GbE | — | 0…+80 °C "measuring" | LTS part, Armbian; metal case $7 | $38 (1 GB) – $53 (2 GB/32 GB + case) |
| FriendlyElec NanoPi R6S | RK3588S | 32 GB eMMC | 2 × 2.5GbE + 1 GbE | — | 0…+70 °C | Armbian platinum | $212–265 |
Verdicts. None has relays, a watchdog you can trust independently, a secure element or a DIN enclosure; all of that is add-on boards and a case. What they offer is eMMC on board at a low price (ODROID, NanoPi) and two Ethernet ports (Orange Pi 5 Plus, NanoPi, Radxa E). The NanoPi R3S-LTS is the cheapest serious candidate: eMMC, two ports, an LTS promise, Armbian, under $60 with case; relays would come from a USB or RS-485 relay module (Sfera Iono RP, RP2040-based, 4 × 6 A relays, 12–28 V, RS-485, is a clean fit). Orange Pi is the best spec per dollar and the worst bet on software: the 5-series boards reached mainline only this year and Armbian support has flip-flopped; the Zero 3 is well supported but has no eMMC. ODROID-M2 is the solid middle: eMMC and RTC on board, Armbian standard, vendor Ubuntu, pitched at embedded builders, but still a bare board.
D. Industrial-first boards
- Olimex STMP157-OLinuXino-LIME2 (STM32MP157, dual Cortex-A7 650–800 MHz, 1 GB, GbE, eMMC option, battery-backed RTC): -EXT -25…+85 °C, -IND -45…+85 °C, open hardware, mainline Linux, supply promised until 2036, €53–71. Enough CPU for the autonomous minimum (Node on armv7 is slow but fine for a few requests a minute), not for anything more. Relays via Olimex's own UEXT/MOD relay boards or an Iono RP. The cheapest board that is honestly industrial.
- Teltonika TRB255 / RUT956 (LTE gateways with DI/DO; RUT956 has a relay): RutOS is OpenWrt, custom
apps ship as
.ipk, the SDK moves to a new build system at RutOS 7.25. Not a Node host. Role: the LTE router in front of whichever controller is chosen, if the internet-down policy ever wants cellular; not the controller.
E. x86: ODROID-H4+ (Intel N97, 2 × 2.5GbE, 4 × SATA, M.2, fanless, $130–275 before RAM/SSD)
Runs the existing x86 container images unchanged (no arm64 build), has the N97's firmware TPM for the signer, and is in effect a second, smaller booth PC. No relays, no DIN, no DC-input range to speak of; relays via USB. Worth keeping in view only if the arm64 port turns out to be the expensive part.
Cross-cutting notes
- Secure element. Only the Sfera units ship one. Elsewhere: an I²C ATECC608 breakout (a few
euros, the part atecc608 already describes) on any board with a 40-pin header, or a Zymbit
HSM6/HSM60 module for Pi (HSM6 $125, listed sold out; HSM60 for Compute Modules released December
2025). x86 brings a TPM. Whatever is chosen, the ledger signer must go asymmetric first (today
HMAC-SHA256 in
SoftwareSigner): a cloud or a controller cannot verify an HMAC chain without holding the key that forges it. - Watchdog. The Pi's on-SoC watchdog (bcm2835_wdt) resets the Pi itself; it does not help if the kernel is fine and the app is wedged, and nothing external resets a Rockchip board. The Sfera carriers put a separate watchdog chip in front of the CM; the others need the app-level watchdog plus a power-cycle path. For the PC-mains relay on any board, the boot-time relay state must be verified on the bench before field use (the Tasmota "relays blip at boot" report on Dingtian, dingtian-relay) — with NC wiring a blip is a PC power cut.
- arm64 images. The booth images are built for the OptiPlex (x86). Everything except E needs an
arm64 build of a server subset in
build-images.yml(container-deployment); better-sqlite3 has arm64 prebuilds, the vision service is never on the controller. - Second Ethernet port. Not needed while the site LAN is one flat switch; it becomes useful only if the controller is later made the gateway between device VLAN and uplink (network-isolation). Do not pay for it yet.
- Raspberry Pi supply. CM5 in production until at least January 2036; prices rose in April 2026 (memory). CM5 ranges $67.50 (2 GB Lite) upward; eMMC 16/32/64 GB.
Recommendation (to confirm with the owner)
- Order one Sfera Labs Iono Pi Max v2 for the field candidate: relays with NC contacts, UPS, watchdog, RTC, ATECC608, DIN, -20…+60 °C, Raspberry Pi OS. Ask Sfera in the same mail whether a relay/DI X2 board exists for the Strato Pi Max (CM5, two ports); if yes, compare before paying.
- Port the relay-proxy logic to Node on a Pi 5 + Sequent HAT now, since that work is identical for A and B and the lab has no CM carrier yet. The Node port is also what makes the readers and the printer proxyable.
- Keep NanoPi R3S-LTS + Iono RP as the budget alternative (~$60 + the IO module) if unit cost turns out to dominate across many sites, and ODROID-M2 if more CPU is wanted on a bare board. Rule out Orange Pi for field units until its mainline/Armbian status holds for a year.
- LTE stays a router question (Teltonika in front), decided together with the internet-down policy, not inside the controller.
Relates
- relay-proxy-firmware — the PoC this replaces the hardware for; its wire-contract emulation and watchdog logic carry over.
- fail-state-safety, barrier-not-a-door — the rules the autonomous minimum must keep.
- hardware-signer-options, atecc608, append-only-event-chain — the signer the controller needs, and why asymmetric.
- cloud-service-saas — the cloud the controller reports to; "cloud makes resolution nicer, not possible".
- esp32-custom-controller, esp32-flashability-test — the microcontroller path this supersedes for the controller role.
- open-questions — #1 lane topology, #2 failure modes, #6 secure element, and the takeover section.
Sources (web, 2026-10-22)
- Sfera Labs: Iono Pi Max v2 · Strato Pi Max · Strato Pi Max on CM5 · X2 analog boards · Iono RP
- Seeed: reComputer R1000 wiki · R21xx getting started · R20xx getting started · R1124-10 listing · R2130-12 listing
- Revolution Pi: products and prices · RevPi Connect 5 · Helmholz overview
- Raspberry Pi: Compute Module 5 · price history · DigiKey CM5
- Sequent Microsystems: Four Relays Four HV Inputs · RobotShop listing · Elektronica voor Jou listing
- ODROID: M2 8 GB · M2 forum intro · M1S · Armbian ODROID-M2 · H4 family · H4 prices
- Orange Pi: 5 Plus specs · 5 Pro mainline patches · Armbian 5 Pro · Armbian Zero 3 · Armbian forum on Pro/Max/Ultra
- Radxa: ROCK 5C · E24C/E54C
- FriendlyElec: R3S-LTS · R6S wiki · R3S wiki
- Armbian: 26.8 release · boards
- Olimex: STMP1 family · LIME2 · Mouser LIME2H-EXT
- Teltonika: TRB255 I/O · RUT956 I/O · RutOS SDK · custom app as .ipk
- Zymbit: HSM6 · docs · SCM