docs(wiki): park-2 event-loop stall incident + bounded-request-cost decision; Dingtian firmware retired, dev-board pinout, edge-controller memo
- 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).
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
type: entity
|
||||
tags: [parking, hardware, access-control, relay]
|
||||
sources: []
|
||||
updated: 2026-10-22
|
||||
updated: 2026-10-23
|
||||
---
|
||||
|
||||
# Dingtian Relay Controller
|
||||
@@ -170,12 +170,19 @@ On assign the driver runs `harden()` (the [[device-registry|HardenableDevice]] c
|
||||
> drop connections (ECONNRESET), locking out the API the driver depends on — recoverable only by
|
||||
> factory reset. `harden()` deliberately never touches it.
|
||||
|
||||
## Can we flash our own firmware? (2026-10-22)
|
||||
## Can we flash our own firmware? (2026-10-22) — **RETIRED 2026-10-23**
|
||||
|
||||
> **Decision (user, 2026-10-23): not pursuing custom Dingtian firmware.** The bench unit is the
|
||||
> standard (locked) SKU and the user chose not to wire the debug header. Booth resilience will be
|
||||
> pursued with **mini PCs** instead ([[appliance-provisioning]] line); the Dingtian stays a stock,
|
||||
> dumb relay+input board behind the host. The notes below remain for reference only.
|
||||
|
||||
The DT-R0xx boards are **ESP32-WROOM-32D** designs (the module is visible in product photos; the
|
||||
community ESPHome/Tasmota configs target ESP32). Relays/inputs are behind **74HC595 / 74HC165
|
||||
shift registers** (SDI GPIO13, CLK GPIO14, RCK GPIO15, PL GPIO32, Q7 GPIO16); Ethernet is a
|
||||
**JL1101 PHY** (MDC 23, MDIO 18, clock out 17, power 0). Community firmware exists: Tasmota
|
||||
community ESPHome/Tasmota configs target ESP32). On the 2/4-channel boards relays and inputs are **direct GPIOs**
|
||||
(DT-R004: relays IO16/IO2/IO32/IO12, inputs IO36/IO39/IO33/IO35); 8/16/32-channel boards use
|
||||
**74HC595 / 74HC165 shift registers** (SDI 13, CLK 14, RCK 15, PL 32, Q7 16). Ethernet is a
|
||||
**JL1101 PHY** (MDC 23, MDIO 18, clock out 17, power/reset IO0). Debug header + GPIO table:
|
||||
[[esp32-flashability-test]] / `raw/dingtian_dev_pinout/`. Community firmware exists: Tasmota
|
||||
templates (Dingtian ships them in its own download centre) and an ESPHome external component
|
||||
`dtr0xx_io`.
|
||||
|
||||
@@ -233,3 +240,11 @@ keep the stored value).
|
||||
password → `&2&/&`). Confirmed the device validates the old creds. **Also confirmed the CGI API
|
||||
needs NO auth** (config dump + `userset.cgi` return 200 unauthenticated) → rotation is cosmetic.
|
||||
- ⬜ Next: wire the actual entry flow (input event → signed event + print ticket → `pulseOpen`).
|
||||
|
||||
## Phantom "timeout" under a server event-loop stall (2026-10-24)
|
||||
|
||||
A relay `timeout` with `tookMs` just over the 2 s limit, while the device answers status probes in
|
||||
~50 ms, is **not** a device or network fault: the server's event loop was blocked (a ~2 s
|
||||
synchronous handler) and Node ran the expired timer before the queued UDP reply. The relay did
|
||||
fire. Fix: `binaryUdp` now defers the timeout rejection with `setImmediate`, and the stalling
|
||||
handler was rewritten. Full analysis: [[park-2-event-loop-stall]].
|
||||
|
||||
@@ -2,11 +2,16 @@
|
||||
type: entity
|
||||
tags: [parking, hardware, firmware, esp8266, dingtian, cloud, watchdog, poc]
|
||||
sources: []
|
||||
updated: 2026-10-22
|
||||
status: poc
|
||||
updated: 2026-10-23
|
||||
status: retired
|
||||
---
|
||||
|
||||
# relay-proxy — Dingtian emulator + cloud proxy/watchdog firmware (PoC)
|
||||
# relay-proxy — Dingtian emulator + cloud proxy/watchdog firmware (PoC, retired)
|
||||
|
||||
> **Retired 2026-10-23.** The Dingtian-firmware path this PoC seeded is dropped (user decision:
|
||||
> focus on mini PCs for booth resilience). The code stays in `firmware/relay-proxy/` as a working
|
||||
> Dingtian protocol emulator — still useful as a **bench stand-in when no real relay board is on
|
||||
> hand** — and the watchdog/heartbeat ideas carry over to whatever runs beside the booth PC.
|
||||
|
||||
Code: `firmware/relay-proxy/` (PlatformIO, Arduino framework; NodeMCU v3 / ESP8266 now, ESP32
|
||||
env planned for the real [[dingtian-relay]]). Throwaway cloud stand-in: `poc/cloud-standin.mjs`.
|
||||
@@ -63,6 +68,11 @@ watchdog flipped to `booth UP` the moment port 80 opened.
|
||||
or `STATIC_IP`.
|
||||
- ESP8266 limits (Wi-Fi only, ~40 KB heap, blocking HTTP) are PoC-only; the target is the ESP32
|
||||
on the Dingtian with Ethernet. Camera traffic is never proxied by the microcontroller.
|
||||
- **Superseded as a hardware target (2026-10-22):** the takeover only works if the controller also
|
||||
fronts the readers and the printer, which needs a Linux box with a Node runtime; the microcontroller
|
||||
cannot. Hardware options and the watchdog policy (take over at one missed probe, power-cycle only when
|
||||
the PC is dead at every layer) are on [[edge-controller-hardware]]. The emulation and watchdog logic
|
||||
here carry over to the port.
|
||||
|
||||
## Bench note: NodeMCU v3 clone CH340 vs WCH driver
|
||||
|
||||
|
||||
Reference in New Issue
Block a user