-
-
Notifications
You must be signed in to change notification settings - Fork 3
User accounts and NFC
User accounts are optional. With the feature disabled, Smart Drink Fridge continues to work exactly as before: no login is shown, camera scans are anonymous, and no NFC reader is required.
Open Settings → User accounts and create the first administrator. Enabling
the feature requires the current STORNO_PASSWORT, which prevents another
network user from taking control of an unconfigured installation.
Administrators can then create accounts with:
- A display name
- A unique login name
- A PIN or password
- The
UserorAdministratorrole - An optional NFC card
PINs and passwords are stored as one-way hashes. NFC card identifiers are stored as keyed hashes and are not saved in their original form.
Users can sign in through the web interface with their login name and PIN or password. A signed-in user receives a personal overview of consumption and costs for the last 30 days.
Keyboard-style RFID readers can also enter a card on the login page. A PC/SC reader connected directly to a headless Docker host uses the separate NFC service instead.
The exact ACS ACR122U used for development and testing is available through this Amazon product link. Product listings can change, so verify the model name before ordering.
Connect the reader to the Docker host and start:
docker compose --profile scanner --profile nfc up -dCheck the service when a card is not recognized:
docker compose --profile nfc ps
docker compose logs --tail=100 nfc
lsusbNFC selects a user; it does not scan drink barcodes. After a known card is presented, that user is selected for 120 seconds or until the next successful camera barcode removal.
With the optional Nextion display, a user can alternatively tap Sign in with PIN, select an active account, and enter the same PIN used for web login. The PIN is verified against the existing one-way hash and is never stored or printed in logs. NFC and display PIN login set the same temporary scanner user.
The option Block drink scans without a selected user is a separate setting and is off by default:
- Accounts off: anonymous scanning works normally.
- Accounts on, policy off: identified scans are attributed; all other scans remain unassigned.
- Accounts on, policy on: a user must first be selected by web login, NFC, or the optional Nextion PIN screen. Otherwise the scan is rejected and stock does not change.
Disabling user accounts also disables the scanner policy automatically.
Administrators can enable the checkout-style start page under Settings. When enabled, the normal flow starts with selectable user tiles and PIN login or NFC identification. A checkout login page waiting in the browser detects a recent physical NFC selection and opens that user's checkout automatically; the raw card identifier never reaches the browser. The signed-in user then sees touch-friendly drink tiles with product image, name, current stock, and quantity selection. Confirming a tile removes the selected quantity and attributes the booking to that user.
This mode is optional and appears only while user accounts are enabled. The normal inventory dashboard remains available through its own navigation link.
Administrators can open Settings → User accounts and assign an unassigned consumption booking to an active user. This supports both historical bookings and anonymous bookings made while the strict scanner policy was disabled.
Use Disable user accounts in the same settings page. Existing users and booking attribution remain stored so the feature can be enabled again later, but login enforcement and the strict scanner policy are switched off.
NFC cards are convenient identifiers, not proof of identity. Many low-cost cards can be cloned; do not rely on them as the only protection for administrative actions.
Smart Drink Fridge documentation · App Store · Repository · Releases · Issues
- Home
- Installation
- Configuration
- Using the application
- iPhone and Apple Watch app
- Multiple fridges and remote scanners
- Hardware and barcode scanners
- User accounts and NFC
- Nextion display
- PWA and mobile installation
- Tailscale and HTTPS
- Updates
- Integrations
- Backups and data
- Security
- Troubleshooting
- Maintaining the Wiki