Board-side half of "preloaded + self-register + claim", plus the QR flow.
- apess-selfregister.sh (on-board): pairs locally for a token, discovers
the LAN IP, and announces {kitId, url, token, claimCode} to APESS
/nodes/self-register (x-fleet-secret gated). Retries until APESS is up;
idempotent, safe on boot and on a timer.
- systemd/apess-selfregister.{service,timer}: self-register After the
daemon, re-announce every 5 min so a DHCP lease change can't strand a
board.
- apess-node.env.example: per-board identity (KIT_ID, CLAIM_CODE,
FLEET_SECRET, APESS_URL).
- gen-kit-codes.sh (host): mint per-kit 6-digit codes, write the
per-board env files, and emit the QR sticker CSV
(…/workshop?kit=KIT-NN&code=NNNNNN).
- web: BoardClaim accepts initialCode; TeamRegistration pre-fills it from
?code= so scanning the kit QR fills kit + code — one tap to claim.
- deploy/uno-q/README: documents the whole self-serve onboarding path.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
16 lines
480 B
Desktop File
16 lines
480 B
Desktop File
[Unit]
|
|
Description=APESS board self-registration (announce into the unclaimed pool)
|
|
After=network-online.target zeroclaw-daemon.service
|
|
Wants=network-online.target zeroclaw-daemon.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=arduino
|
|
# The script retries internally until APESS is reachable; the paired timer
|
|
# re-announces periodically so a DHCP lease change doesn't strand the board.
|
|
ExecStart=/home/arduino/apess-selfregister.sh
|
|
RemainAfterExit=no
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|