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
This commit is contained in:
@@ -20,6 +20,11 @@
|
||||
</div>
|
||||
{% if current_user.is_admin() %}
|
||||
<div class="d-flex gap-2">
|
||||
{% if board.board_type == 'olimex_esp32_c6_evb_pn532' %}
|
||||
<a href="{{ url_for('boards.nfc_management', board_id=board.id) }}" class="btn btn-outline-primary">
|
||||
<i class="bi bi-credit-card-2-front me-1"></i> NFC Access Control
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('boards.edit_entities', board_id=board.id) }}" class="btn btn-outline-info">
|
||||
<i class="bi bi-palette me-1"></i> Configure Entities
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user