{% extends "base.html" %} {% block title %}NFC Access Control – {{ board.name }}{% endblock %} {% block content %}

NFC Access Control

{{ board.name }} — {{ board.host }}:{{ board.port }}
Reader Status
{% if nfc.get('initialized') %} PN532 Ready {% else %} PN532 Not Detected {% endif %}
Access state
{% set as = nfc.get('access_state','idle') %} {% if as == 'granted' %}ACCESS GRANTED {% elif as == 'denied' %}ACCESS DENIED {% else %}Idle — waiting for card {% endif %}
Last detected card UID
{{ nfc.get('last_uid') or '—' }} {% if current_user.is_admin() %} {% endif %}
Authorized card UID
{% if nfc.get('auth_uid') %} {{ nfc.get('auth_uid') }} {% else %} None — no card enrolled yet {% endif %}
Trigger relay
Relay {{ nfc.get('relay_num', 1) }}
Absence timeout
{{ nfc.get('pulse_ms', 3000) }} ms
{% if current_user.is_admin() %}
Quick Enroll

Present a card to the reader, click Refresh until the UID appears, then click Enroll card. The UID will be set as the authorized card with the relay and timeout below.

{% if nfc.get('last_uid') %}
Will enroll UID: {{ nfc.get('last_uid') }}
{% else %}
No card detected yet — present a card to the reader and refresh.
{% endif %}
Manual Settings
Relay closes this many ms after the card is removed (100 – 60 000).
{% if nfc.get('auth_uid') %} {% endif %}
{% endif %}{# is_admin #}
{# right col #}
{# row #} {% endblock %} {% block scripts %} {% endblock %}