K1 Firmware Ops
Purpose
Create a repeatable, end-to-end flow for K1.node2: codegen → compile → OTA → API/UI QA → release notes.
Prerequisites
- •PlatformIO CLI (
pio) installed and on PATH. - •Node.js 18+ and npm installed.
- •Playwright runtime installed (the steps below run
npx playwright install).
Config
Edit tools/k1.config.json in the repo root to match your setup:
json
{
"device_ip": "192.168.1.50",
"ota_method": "arduino",
"dashboard_path": "/",
"pattern": "Twilight",
"upload_port": "3232"
}
Procedure (follow these steps in order)
- •
Build & Upload (uses existing project scripts and/or PlatformIO):
bashbash tools/k1_firmware_ops.sh --pattern "<PATTERN_NAME>" --ip "<DEVICE_IP>" --qa false
- •Artifacts land under
artifacts/<timestamp>/(build log and metadata).
- •Artifacts land under
- •
Install QA deps once:
bashcd tools/qa/playwright npm ci npx playwright install cd ../../..
- •
Run API + UI tests (captures JSON report + screenshots):
bashbash tools/k1_firmware_ops.sh --pattern "<PATTERN_NAME>" --ip "<DEVICE_IP>" --qa true
- •
Generate release notes (Markdown summary with links to artifacts):
bashnode tools/release/generate_release_notes.mjs
Examples
- •
Rebuild and upload Twilight to
192.168.1.50and run QA:bashbash tools/k1_firmware_ops.sh --pattern "Twilight" --ip "192.168.1.50" --qa true
- •
Build only (no QA), using
tools/k1.config.jsondefaults:bashbash tools/k1_firmware_ops.sh
Guardrails
- •Treat IPs and Wi‑Fi credentials as secrets; do not commit secrets.
- •Prefer ArduinoOTA unless an HTTP OTA endpoint is documented and reachable.
- •If
/api/paramsPOST semantics differ from the tests, updatetools/qa/params.sample.jsonand the tests accordingly.