Commit Graph

2 Commits

Author SHA1 Message Date
36de1623c2 Add HMAC-SHA256 API authentication to board drivers and edit UI
- Both olimex_esp32_c6_evb and olimex_esp32_c6_evb_pn532 drivers now
  sign every API request with X-Request-Time / X-Request-Sig headers
  using HMAC-SHA256(api_secret, METHOD:path:unix_timestamp)
- Board model gains api_secret column (nullable, default None)
- boards.py edit route saves api_secret from form
- edit.html adds API Secret input with cryptographic Generate button
- If api_secret is empty/None, headers are omitted (backward compat)
2026-03-15 12:33:45 +02:00
1152f93a00 Add Olimex ESP32-C6-EVB + PN532 NFC driver and web UI
- New driver: app/drivers/olimex_esp32_c6_evb_pn532/
  - Full relay/input control (inherits base behaviour)
  - get_nfc_status(), get_nfc_config(), set_nfc_config() methods
  - manifest.json with NFC hardware metadata (UEXT1 pins, card standard)

- NFC management routes (boards.py):
  - GET  /boards/<id>/nfc            — management page
  - GET  /boards/<id>/nfc/status_json — live JSON (polled every 3 s)
  - POST /boards/<id>/nfc/config     — save auth UID / relay / timeout
  - POST /boards/<id>/nfc/enroll     — enrol last-seen card with one click

- New template: templates/boards/nfc.html
  - Live reader status (PN532 ready, access state, last UID)
  - Quick Enroll: present card → Refresh → Enrol in one click
  - Manual Settings: type/paste UID, pick relay, set absence timeout

- detail.html: NFC Access Control button shown for pn532 board type
2026-03-15 09:41:01 +02:00