User's manual

Section 1: Kiosk Welcome & Category Selection (Idle State)

The Idle Screen is the default operating view presented to end users when no active transaction is taking place. It serves as the primary visual entry point, enabling customers to choose their language, review inserted or pre-loaded credit, and browse available service categories.

Screen Overview

Visual Elements & Display Components

1. Language Selection Bar (Top Header)

  • Location: Fixed at the top of the interface.
  • Supported Languages: 7 switchable interfaces — English (EN), German (DE), French (FR), Italian (IT), Spanish (ES), Romanian (RO), and Bulgarian (BG).
  • Active Indicator: The currently active locale is highlighted with a gold accent border.
  • Auto-Reset Timeout: If a language other than the machine's configured default language is chosen, the kiosk will automatically reset to default language and return to idle if no interaction occurs within the idle timeout period (configurable via kiosk_timeout_sec, default 60 seconds).

2. Category Navigation Grid (Main Viewport)

  • Location: Center content area.
  • Display Structure: Multi-column responsive card grid (configured dynamically by the kiosk's category_columns parameter, showing 2 columns in this view).
  • Card Anatomy:
    • Category Thumbnail: High-resolution preview image streamed dynamically from the local database.
    • Category Title: Localized category title corresponding to the selected header language (e.g., 1. Regular tokens, 2. Buy subscription card, 3. Subscription recharge, 4. Relay Timer).
  • Touch Target: Touching or tapping any category card immediately transitions the view to display the products assigned to that category.

3. Balance & Change Status (Bottom Footer)

  • Location: Bottom-right corner of the screen.
  • Live Credit Display: Shows the current accumulated cash or card credit available in real time (e.g., Available: 0.00 EUR), formatted according to the configured system currency (EUR, RON, $, etc.).
  • Change Return Button: If change dispensing is enabled (has_change = 1), credit remains after an operation, and the customer is within dispensing limits, a dedicated Return Change button will automatically appear alongside the balance indicator.

Customer Instructions

How to Begin an Order

  1. Choose Your Preferred Language: Tap any of the flags/language codes along the top bar (EN, DE, FR, IT, ES, RO, BG) to adapt all screen text instantly.
  2. Select a Category: Tap on the category card matching the service or item type you require.
  3. Alternative Direct Inputs:
    • Insert Cash / Coins: You may insert banknotes or coins at any time during the idle screen; the balance indicator in the lower-right corner will update immediately.
    • Scan RFID Tag / Card: Present an authorized RFID card or key fob to the reader; the screen will temporarily pop up your available card balance and allow one-touch operation.
    • Physical Selection Buttons: If your terminal is equipped with external physical push buttons or keypad modules, pressing a physical selection number will trigger the payment screen directly.

Technical Notes for Administrators

  • Display Mode Configuration: In the Admin Panel (/admin/api/kiosks), setting Display Type to 0 - Direct Products skips this screen and displays all active products immediately; setting it to 1 - Categories First activates this categorized hub.
  • Grid Formatting: The number of horizontal cards rendered per row is adjusted via the Category Columns field in the Kiosk Settings.
  • Live Heartbeat & Polling: The idle screen runs asynchronous background polling every 1,000 ms via HTMX (POLL_STATUS) to listen for hardware bill validator events, coin inputs, RFID tag scans, or administrative maintenance triggers without requiring full-page reloads.

 

Section 2: Category Product Catalog & Item Selection

When a customer taps any category card from the idle screen, the kiosk transitions to the Category Product Catalog view. This screen lists all active items assigned to the selected category, displaying localized item names, unit prices, real-time availability states, and direct action triggers.

Screen Overview




Visual Elements & Display Components

1. Navigation & Header Controls

  • Language Selector: Remains accessible along the top header, allowing customers to switch interface languages at any moment during item browsing.
  • Back Button (⬅ Back): Positioned immediately below the language bar. Tapping this button cancels the category filter and returns the interface directly to the top-level Category Grid.

2. Product Grid & Card Anatomy

The products are rendered in a dynamic responsive grid governed by the kiosk's configured column layout (product_columns). Each product card features:

  • Product Image: Live-rendered thumbnail loaded from the database image store.
  • Product Title: Localized title fetched dynamically according to the currently active language (e.g., product_name_en, product_name_ro).
  • Unit Price: Formatted currency value (e.g., 2.50 EUR, 5.00 EUR) computed directly from integer cents stored in the database.
  • Action Buttons:
    • Details (ℹ Details): Opens a dedicated product overview screen with high-resolution imagery and descriptive technical/usage specifications.
    • Buy (🛒 Buy): Initiates the purchase sequence for that item's selection number and routes immediately to the Payment Method Selection screen.

3. Active Relay / Timed Service State

  • If a product controls a timed hardware channel (e.g., wash bays, vacuum relays, or chargers) that is currently running an active cycle, the system automatically replaces both action buttons with a full-width countdown badge (🕒 MM:SS).
  • While busy, purchase actions on that specific selection are blocked until the physical timer elapses and releases the channel back to available status.

4. Credit & Status Bar

  • The bottom status bar maintains continuous visibility of any pre-inserted coin/banknote credit or scanned card balance.
  • If change dispensing is active and credit is present from a previous incomplete operation, the Change return option remains available.

Customer Instructions

How to Choose and Purchase a Product

  1. Browse Items: Scroll or scan through the product cards available in the chosen category.
  2. Review Specifications (Optional): Tap the Details button on any card to read extended item descriptions or usage instructions.
  3. Initiate Purchase:
    • Tap the green Buy button on the desired item card to advance to the payment method screen.
    • Alternative: If using physical selection buttons, pressing the corresponding external button directly chooses that item.
  4. Return or Switch Category: Tap Back at the top-left to return to the category selection screen.

Technical Notes for Administrators

  • Item Filtering: Products shown in this view are queried via category_id and filtered strictly by product_active = 1.
  • Layout Scaling: Adjust the horizontal item density by editing the Product Columns setting in the Kiosk configuration panel (product_columns).
  • Inactivity Rollback: If a customer navigates into a category but does not touch the screen before the configured timeout (kiosk_timeout_sec, default 60s), the system automatically flushes the transient session, resets language preferences to default, and returns the display to the main category grid.

Section 3: Product Details & Specifications

Tapping the Details button on any product card opens the Product Details view. This screen presents an expanded, dedicated overview of the selected item, offering clear visual confirmation, pricing, and localized descriptive text prior to initiating payment.

Screen Overview



Visual Elements & Display Components

1. Navigation Controls

  • Language Selection Bar: Continues to be accessible at the top header. Switching the language dynamically updates the item title and the descriptive text to the chosen language.
  • Back Button (⬅ Back): Positioned at the top-left. Selecting Back returns the customer to the previous product catalog grid while preserving the selected category context.

2. Product Detail Card

The centered message box frames all relevant item data in an enlarged format:

  • High-Resolution Product Image: Loaded dynamically as a JPEG stream directly from the database record (/kiosk/api/image?type=product&id=...).
  • Product Title: Prominently rendered in high-contrast text, populated from the localized name field (e.g., product_name_en).
  • Unit Price: Clear, high-visibility pricing in gold accent text, formatted with the active kiosk currency (e.g., 2.50 EUR).
  • Detailed Description: Secondary descriptive content retrieved from the database localization fields (e.g., product_details_en), providing usage instructions, service duration, or package details.
  • Buy Button (🛒 Buy): Prominent green action button. Tapping this button immediately advances the customer to the Payment Method Selection screen for this item.

3. Credit & Status Bar

  • Current Balance Indicator: Persists in the bottom-right corner, displaying live accumulated funds.
  • Pre-Inserted Cash: Any banknotes or coins inserted while viewing this screen are immediately accounted for and added to the balance indicator.

Customer Instructions

How to Proceed from Product Details

  1. Review Item Information: Verify the product name, price, and detailed specifications on the screen.
  2. Proceed to Checkout: Tap the green Buy button to move directly to payment options (Cash / Card).
  3. Return to Catalog: Tap the Back button at the top-left to cancel the inspection and return to the category listing.

Technical Notes for Administrators

  • Database Field Mapping:
    • The title is read from product_name_<lang>.
    • The description is read from product_details_<lang> (configured via the admin panel under Products Registry > Details (EN/RO/DE/FR/IT/ES/BG)).
    • The image is read from the product_image BLOB field.
  • Inactivity Rollback: The view participates in the kiosk idle timeout loop (kiosk_timeout_sec). If no screen input occurs within the timeout threshold, the system automatically flushes the view state and resets to the idle category home screen.
  • Direct Hardware Selection Override: If an end user presses an external physical selection button while on this screen, the system immediately recognizes the selection number, overrides the current preview, and advances directly to payment processing for the chosen hardware channel.

Section 4: Payment Method Selection

Once an item has been selected by tapping Buy from the product catalog or product details view, the kiosk displays the Payment Method Selection screen. This modal prompt allows customers to decide between cash/coin payment or cashless bank card terminal processing before hardware billing peripherals are energized.

Screen Overview


Visual Elements & Display Components

1. Navigation & Cancellation Controls

  • Back Button (⬅ Back): Located at the upper-left corner of the display.
  • Session Abort: Tapping Back invokes the LOAD_MAIN action, safely resetting the transient transaction state and returning the customer to the main catalog.

2. Selection Modal & Payment Channels

The centered modal box isolates the customer's choice into two high-contrast payment triggers:

  • Pay Cash (btn-cash):
    • Visual Styling: High-visibility green card featuring a stacked coin icon.
    • Function: Triggers the Cash transaction workflow (StartStage = 1). When tapped, the system commands the bill acceptor and coin validator to enable acceptance for the specific product price.
  • Pay Card (btn-card):
    • Visual Styling: Distinct blue card featuring a credit card icon.
    • Function: Triggers the Card/Cashless workflow (StartStage = 2). When tapped, the kiosk engages the cashless payment terminal (MDB cashless or external POS) to request the exact transaction authorization.

3. Asynchronous State Polling

  • While on this screen, the client executes an accelerated background poll every 500 ms via HTMX (hx-trigger="every 500ms").
  • If physical banknotes or coins are inserted while this screen is displayed, or if telemetry commands arrive from attached peripherals, the screen adapts instantly.

Customer Instructions

How to Complete Payment Selection

  1. Choose Payment Type:
    • Tap Pay Cash (Green) if paying with banknotes or coins.
    • Tap Pay Card (Blue) if paying with a contactless debit/credit card, phone wallet, or chip terminal.
  2. Cancel Selection: Tap the Back button in the top-left corner at any time to cancel item checkout and return to browsing.

Technical Notes for Administrators

  • Workflow Stage Routing:
    • Choosing Pay Cash executes Lua Stage 1 for the chosen product.
    • Choosing Pay Card executes Lua Stage 2 for the chosen product.
  • Localization Keys: Text strings are dynamically resolved from the system_messages database table using the following keys:
    • Modal Title: select_payment
    • Cash Button: pay_cash
    • Card Button: pay_card
    • Back Button: btn_back
  • Hardware Push-Button Integration: If external push buttons are wired for payment choices, physical command signals PAYCASHPRESSED or PAYCARDPRESSED trigger these exact software entry points automatically.

Section 5: Cash Payment & Acceptance Workflow

Selecting Pay Cash initializes the physical banknote and coin acceptance workflow. During this phase, the kiosk enables the attached currency acceptors, tracks incoming credit in real time, and provides visual confirmation when the required transaction amount is met.

Screen Overview





Visual Elements & Display Components

1. Live Credit Banner (credit-banner)

  • Visual Appearance: Green-bordered status badge centered at the top of the interaction card.
  • Real-Time Balance Display: Displays accumulated credit (Available: X.XX [Currency]) computed dynamically from AccumulatedCreditCents.
  • Incremental Feed Updates: Every accepted coin or banknote immediately increments this counter without clearing or flickering the prompt.

2. Instruction & Status Prompt (message-text)

  • Awaiting Cash Stage (insert_cash):
    • Displays the localized directive (e.g., Insert cash) alongside the target purchase price formatted in system currency: (Price: X.XX EUR).
    • Instructs the customer to feed legal tender into the bill validator or coin slot.
  • Confirmation Stage (payment_successful):
    • As soon as inserted cash meets or exceeds the item price, the prompt updates to Payment successful.
    • Indicates that acceptance hardware has locked down and the vend execution sequence has been initiated.

3. Background State Synchronization

  • The client polls /kiosk/api every 500 ms via HTMX (hx-trigger="every 500ms") with action: POLL_STATUS.
  • Hardware telemetry events emitted by connected peripherals (such as COININ, BILLSTACKED, or CASHFULLYRECEIVED) immediately trigger asynchronous UI partial updates.

Customer Instructions

How to Complete a Cash Purchase

  1. Feed Banknotes or Coins: Insert bills into the illuminated note validator slot or drop coins into the coin mechanism.
  2. Monitor the Screen: Observe the Available balance increase as each denomination is stacked and registered.
  3. Automatic Confirmation:
    • Once the deposited amount equals or surpasses the displayed product price, the display transitions to Payment successful.
    • The machine immediately begins product dispensing, token discharge, or activation of the requested relay service.
  4. Change Return (If Applicable):
    • If an overpayment occurs on machines configured with a coin payout mechanism (has_change = 1), change is either returned automatically or made available via the Change return button on completion.

Technical Notes for Administrators

  • Workflow Engine Execution:
    • Cash checkout begins at workflow Stage 1 (StartStage = 1), which dispatches the hardware command GETCASH(PriceDue) to the assigned peripheral board.
    • If credit was already present prior to selecting the product and covers the full cost, the software engine bypasses physical bill acceptance and triggers GETCASHFULLYRECEIVED / positive branch execution immediately.
  • Hardware Telemetry Commands:
    • COININ(cents, channel): Coin validator impulse.
    • BILLSTACKED(cents): Bill validator note escrow and stack event.
    • CASHSALE(price, selection_number): Automatically logged in the database table mall_payment_telemetry and forwarded to the central gateway via backend WebSocket.
  • Database Localization Keys:
    • Balance Label: available_credit
    • Price Prefix: product_price_label
    • Cash Directive: insert_cash
    • Completion Notice: payment_successful

Section 6: Card & Cashless Terminal Payment Workflow

Selecting Pay Card initiates the cashless payment authorization sequence through the connected bank card POS reader or MDB cashless device. During this stage, the kiosk handshakes with the payment terminal, transmits the exact purchase amount, and instructs the customer to complete authorization directly on the card reader interface.

Screen Overview


Visual Elements & Display Components

1. Live Balance Banner (credit-banner)

  • Visual Appearance: Green-bordered status badge pinned at the top of the interaction card.
  • Balance Tracking: Displays any pre-loaded credit (Available: 0.00 EUR) stored in the session. For standard single-card sales without pre-loaded balance, this defaults to zero.

2. POS Terminal Instruction Box (message-text)

  • Cardholder Directive: Renders the localized prompt (e.g., Follow instructions on POS terminal) prompting the customer to redirect attention to the external payment reader.
  • Amount Due Indicator: Shows the exact transaction charge in parentheses formatted with the active currency symbol (e.g., (2.50 EUR)), resolved dynamically from SelectedProductPrice.
  • Dynamic Content Injection: Formatted by the state engine using the active message key along with resolved parameter lists.

3. Asynchronous Workflow Listener

  • Continuous Polling: The client executes continuous background requests to /kiosk/api every 500 ms (hx-trigger="every 500ms") passing action: POLL_STATUS and the active workflow stage identifier.
  • Real-Time UI Swapping: As soon as the POS terminal emits approval, decline, or timeout signals, the screen updates automatically without requiring a full browser refresh.

Customer Instructions

How to Complete a Card Payment

  1. Check the Amount: Confirm that the price displayed on the kiosk screen matches your intended purchase.
  2. Interact with the POS Terminal: Look at the external payment terminal / card reader mounted on the kiosk housing.
  3. Present Payment Method:
    • Tap your contactless debit/credit card, smartphone wallet (Google Pay, Apple Pay), or smartwatch against the reader.
    • Insert your chip card into the card reader slot if prompted by the reader.
  4. Authorize Transaction: Follow any PIN or verification prompts displayed on the reader's dedicated LCD.
  5. Vending Execution: Upon bank authorization, the terminal beeps, the kiosk registers the approval, and product dispensing or timed service activation begins immediately.

Technical Notes for Administrators

  • Workflow Stage Routing:
    • Choosing the card payment path triggers Lua Stage 2 (StartStage = 2) for the selected product.
    • The state machine communicates with the peripheral board using cashless command protocols such as CSLS1VNDREQ or CSLS2VNDREQ with the price and selection number parameters.
  • Telemetry & Event Lifecycle:
    • Authorization Hold/Approval: Hardware reports CSLS1VNDAPP or CSLS2VNDAPP upon reader authorization.
    • Vend Confirmation: When physical dispensing completes, hardware sends CSLS1VNDSUCC / CSLS2VNDSUCC or VENDSUCCESS.
    • Transaction Logging: Approved card sales generate a CARDSALE(amount, selection_number) event logged directly to the local mall_payment_telemetry table and dispatched to the central management gateway via backend WebSocket.
  • Localization:
    • Main Directive Key: follow_instructions_on_pos_terminal (translated dynamically per active language in system_messages).
    • Available Balance Label: available_credit.
  • Timeout & Failure Handling:
    • If the user fails to tap a card or the transaction is declined by the acquiring bank, the terminal emits a negative answer (negans) or times out (tmt), routing the engine back to the idle screen safely.

Section 7: Product Dispensing & Service Fulfillment Workflow

Once payment authorization has been validated (via cash receipt or cashless card terminal approval), the kiosk transitions into the Product Dispensing state. During this execution phase, the state machine triggers physical motor, hopper, or relay actuators on the connected peripheral boards while displaying visual progress confirmation to the customer.

Screen Overview


Visual Elements & Display Components

1. Live Credit Banner (credit-banner)

  • Visual Appearance: Green-bordered status badge pinned centered at the top of the interaction card.
  • Balance Tracking: Reflects the post-deduction balance. If exact payment was deposited or credit was depleted by the vend cost, it displays Available: 0.00 EUR (or the equivalent configured currency). Any unspent surplus remains registered here for change return.

2. Dispensing Status Notice (message-text)

  • Execution Directive: Displays the high-contrast notification Dispensing product... (localized dynamically via the system translation registry).
  • Interaction Lockout: All category, product, and payment selection buttons are suppressed while the physical vending operation is in progress, preventing duplicate charges or motor collisions.

3. Asynchronous Telemetry & Polling

  • Live Status Loop: The web client polls /kiosk/api every 500 ms (hx-trigger="every 500ms") passing action: POLL_STATUS and the active stage ID.
  • Telemetry Sensor Watch: The backend server continuously listens over serial or MQTT for physical hardware sensor signals (such as optical drop sensors, microswitch feedback, or pulse acknowledgments).

Customer Instructions

What to Expect During Dispensing

  1. Wait for Physical Delivery: Stand by while the vending machine or token dispenser activates its internal transport motors or release coils.
  2. Collect Your Item: Once the motor cycle completes and the item drops, retrieve your purchased token, card, or packaged item from the bottom retrieval box or collection chute.
  3. Automatic Screen Advance:
    • If change is due and a coin changer/hopper is fitted, the kiosk automatically dispenses change or advances to the Change Return screen.
    • If no change is pending, the display resets automatically back to the main idle screen, ready for the next customer.

Technical Notes for Administrators

  • Workflow Engine Execution:
    • Dispensing is triggered by the product's assigned Lua workflow script calling hardware dispatch opcodes such as motor commands, pulse commands, or relay triggers (RELAY, VNDREQ, CSLS1VNDREQ).
    • The step specifies loadpage = "messages.html" and pagemsg = "dispensing_product".
  • Hardware Event Feedback:
    • Vend Success: The controller expects positive completion confirmations such as VENDSUCCESS, EXEVENDSUCCESS, CSLS1VNDSUCC, or CSLS2VNDSUCC.
    • Telemetry Logging: Successful completions record transaction events into mall_payment_telemetry and broadcast real-time metrics (CASHSALE or CARDSALE) to central monitoring over the secure WebSocket gateway.
  • Localization & Messages:
    • Message key: dispensing_product (resolved via system_messages table across supported locales).
    • Balance header: available_credit.
  • Error & Jam Protection:
    • Workflows feature configurable timeout registers (tmt) and negative answer traps (negans).
    • If a spiral motor stalls or drop sensors detect a failed delivery, the engine routes to the designated negstage or tmtstage to abort safely, refund credit, or alert administrative telemetry.

Section 8: Remaining Balance & Change Dispensing Workflow

When a cash transaction concludes with surplus funds deposited beyond the product price, or when overpayment credit remains, the kiosk transitions into the Remaining Balance State. If the kiosk is fitted with an MDB coin changer or payout hopper, an active Change button is unlocked in the footer, enabling the customer to either dispense their physical coin change or apply the remaining credit toward another purchase.

Screen Overview

Visual Elements & Display Components




1. Persistent Remaining Credit Badge (#idle-credit-display)

  • Visual Styling: Green-bordered status badge pinned in the bottom-right control tray.
  • Balance Indicator: Renders the exact remaining credit (Available: X.XX [Currency]), calculated directly from AccumulatedCreditCents in system memory.
  • Multi-Vending Capable: The customer may tap any other category or item immediately; any unspent credit is applied automatically toward the next purchase.

2. On-Screen Change Return Button (btn_change)

  • Visual Appearance: Dedicated action button featuring a coin-payout icon (💰 Change) alongside the balance badge.
  • Conditional Visibility Rules: The change button only renders when all of the following conditions are met:
    1. The kiosk hardware configuration has change dispensing enabled (has_change = 1).
    2. At least one successful sale has been executed in the session (SalePerformed = 1).
    3. The accumulated credit is greater than zero (AccumulatedCreditCents > 0).
    4. The refundable balance does not exceed the maximum allowed change safety limit (MaxChange <= 0 or AccumulatedCreditCents <= MaxChange).

3. Change Dispensing Status Screen (messages.html)

  • Prompt Notice: When change is initiated, the kiosk centers the transaction dialog displaying Dispensing change... (X.XX EUR).
  • Amount Injected: The payout figure in parentheses is dynamically computed from the remaining balance and formatted with the active kiosk currency.
  • Hardware Lockout: While the payout sequence runs, touch actions on items are temporarily suspended to protect changer motor cycles.

Customer Instructions

How to Retrieve Remaining Change

  1. Verify Your Remaining Credit: Check the bottom-right badge to see your remaining balance after a purchase (e.g., Available: 0.50 EUR).
  2. Collect Your Change:
    • Tap the Change (💰 Change) button on the touchscreen.
    • Alternative: Press the physical coin return button/lever on the front of the machine housing.
  3. Wait for Payout: The screen displays Dispensing change... (X.XX EUR) while the internal coin changer ejects coins into the payout cup.
  4. Collect Coins: Retrieve your dispensed coins from the change return tray at the bottom of the machine.
  5. Session Reset: Once the payout sequence finishes, the balance clears to 0.00 and the interface returns to the idle state.

Technical Notes for Administrators

  • Change Engine Architecture:
    • Tapping the change button dispatches an HTMX POST with action RETURN_CHANGE.
    • The state machine calls StartChangeWorkflow, reloading the Lua change workflow script from kiosks.kiosk_change_workflow in the database and executing stage 1.
  • Physical Hardware Signals:
    • Telemetry commands such as COINCHGREQ, COINCHANGEREQ, or CHANGEPRESSED received over serial or MQTT trigger the identical StartChangeWorkflow routine.
  • Safety & Fraud Prevention:
    • Bill Changing Inhabitation: Direct bill-to-coin changing without purchasing is blocked by default (SalePerformed = 1 requirement), preventing customers from using the machine solely as a money changer.
    • Threshold Capping: If max_change is set in kiosk_config (in cents), change requests exceeding that amount are rejected and logged to prevent emptying coin payout tubes.
  • Audit & Telemetry Logging:
    • Hardware emits COINAP or COINAPOK when coins are discharged.
    • The backend records a COINAPDONE(amount, -1) financial record in mall_payment_telemetry and reports DAYCHANGE and LIFECHANGE counter updates to the central management gateway.
  • Localization Keys:
    • Button label: btn_change
    • Balance label: available_credit
    • Dispensing notification: dispensing_change

Section 9: RFID Subscription Card Recharge Workflow

When a customer selects a top-up package from the Subscription recharge category and completes payment (via cash or card), the kiosk transitions to the RFID Card Recharge Prompt. During this stage, the system holds the paid credit in escrow and instructs the user to present their contactless RFID subscription card or key fob to the reader so the balance can be credited.

Screen Overview


Visual Elements & Display Components

1. Live Credit Banner (credit-banner)

  • Visual Appearance: Green-bordered status badge centered at the top of the interaction card.
  • Escrow Balance Display: Shows the exact funds currently held and ready to be written to the card (Available: 3.00 EUR), reflecting the AccumulatedCreditCents register.

2. RFID Reader Instruction Prompt (message-text)

  • User Directive: Displays the localized instruction Tap RFID card to recharge paired with the formatted top-up value in parentheses: (3.00 EUR).
  • Awaiting Tag State: The screen remains locked on this prompt until the attached RFID peripheral detects a card UID (RDRBEGIN) or the stage timeout expires.

3. Background Telemetry Polling

  • Continuous Polling: The browser interface polls /kiosk/api every 500 ms via HTMX (hx-trigger="every 500ms") passing action: POLL_STATUS and the active workflow stage identifier.
  • Instant Transition: As soon as the RFID reader transmits the scanned tag serial number over MQTT or serial, the UI swaps immediately to confirm completion or return to the idle view.

Customer Instructions

How to Top Up an RFID Card or Key Fob

  1. Verify the Recharge Amount: Confirm that the top-up amount displayed on screen matches the value you paid (e.g., 3.00 EUR).
  2. Present Your Tag to the Reader: Hold your contactless RFID subscription card or key fob flat against the kiosk's RFID reader antenna zone.
  3. Hold Steady Until Confirmation: Keep the tag in place for a brief moment while the reader captures the tag serial number (UID) and updates your account balance.
  4. Complete Session: Once credited, the kiosk deducts the escrow balance from the screen and returns to the main idle screen.

Technical Notes for Administrators

  • Workflow Engine & Database Action:
    • The product's Lua workflow pauses at this stage waiting for a positive answer (posans = "RDRBEGIN") from the reader hardware.
    • Upon receiving RDRBEGIN(tag_sn), the workflow executes the internal node action $RECHARGE_RFID$ (or $RECHARGE_CARD$).
    • RechargeRfidCardFromTelemetry queries the rfid_cards table for tag_sn: if the card exists, it adds AccumulatedCreditCents to credit_cents; if the card is new, it automatically inserts a new record with the recharged balance.
  • Hardware Telemetry & Logging:
    • When a tag is presented, the reader emits RDRBEGIN(tag_sn) followed by RDRLEAVING when removed.
    • The RDRBEGIN event is logged to mall_payment_telemetry and forwarded to the central gateway via BackendWS.SendSaleStat2("RDRBEGIN", -1, -1, CardSn).
  • RFID Card Management:
    • Administrators can inspect, manually adjust balances, register new tag UIDs, or delete cards directly from the Admin Panel under RFID Cards (/admin/api/rfid/list).
  • Localization Keys:
    • Prompt Message Key: tap_rfid_card_to_recharge (resolved via system_messages).
    • Balance Banner Label: available_credit.

Section 10: Transaction Completion & Vend Confirmation

Once the hardware peripheral confirms product delivery, relay activation, or RFID balance crediting, the kiosk transitions to the Vend Confirmation Screen. This final stage provides clear visual confirmation that the transaction succeeded, identifies the fulfilled item or service, and prepares the terminal to return to the idle state.

Screen Overview


Visual Elements & Display Components

1. Live Credit Banner (credit-banner)

  • Visual Appearance: Green-bordered status pill centered at the top of the confirmation card.
  • Balance Reflection: Displays the current session credit (Available: 3.00 EUR) formatted in the active kiosk currency. Depending on the product workflow configuration, this reflects either the credited amount or any remaining cash surplus eligible for change return.

2. Completion Notice & Fulfilled Product Label (message-text)

  • Success Confirmation: Displays the localized completion message Sale successful! Thank you! in high-contrast gold text.
  • Product Identification: Appends the localized name of the purchased item or service in parentheses (e.g., (Subscription recharge EN)), dynamically resolved from the active product's name field.

3. Timed Display & Automatic Return to Idle

  • Background Polling: The screen maintains a 500 ms HTMX poll (hx-trigger="every 500ms") on /kiosk/api (action: POLL_STATUS) to monitor stage completion.
  • Auto-Reset Transition: After a brief configurable hold delay, the workflow advances automatically back to main.html, resetting active transaction registers while preserving any unspent change balance.

Customer Instructions

Concluding Your Transaction

  1. Verify Confirmation: Check the screen to confirm the Sale successful! Thank you! message and verify the item or service name displayed below it.
  2. Collect Your Item or Remove Your Card:
    • For physical items or tokens, retrieve your purchase from the delivery chute.
    • For RFID card recharges, remove your card or key fob from the reader antenna.
  3. Check for Remaining Change (If Applicable):
    • Once the screen returns to the main catalog, verify the bottom-right credit indicator.
    • If surplus credit remains from a cash payment, tap the Change button to receive your coins or select another product to spend the remaining balance.

Technical Notes for Administrators

  • Workflow Node Configuration:
    • This confirmation screen is rendered by a final workflow stage configured with loadpage = "messages.html" and pagemsg = "sale_successful" (or equivalent localized key).
    • Passing "$PRODUCT_NAME$" inside the stage's pageparams array causes ResolveParamVariables and PushUiMessageFragment to append (SelectedProductName) directly beneath the confirmation text.
  • Session Register Updates (actions):
    • Workflow node actions typically execute "$SALE_PERFORMED$=1" to unlock the change return button if surplus cash remains (SalePerformed = 1), and "$ACCUMULATED_CREDIT$=$ACCUMULATED_CREDIT$-$PRODUCT_PRICE$" to deduct the item price from the session balance.
  • Returning to the Idle Screen:
    • Using aftersleep or tmt paired with gotostage / tmtstage pointing to a cleanup stage with loadpage = "main.html" triggers ResetTransactionState, clearing stage registers and restoring the main grid view.
  • Sales & Telemetry Recording:
    • Hardware completion events (VENDSUCCESS, EXEVENDSUCCESS, CSLS1VNDSUCC, CSLS2VNDSUCC, CSLS1CASHSALE, CSLS2CASHSALE) are recorded in mall_payment_telemetry and transmitted to the central gateway via BackendWS.SendSaleStat as CASHSALE or CARDSALE records.
    • Administrators can audit all completed transactions and filter by date or payment type in the Admin Panel under Sales (/admin/api/sales/list).

Section 11: Timed Service & Live Countdown Workflow

When a customer purchases a time-based service (such as a self-service wash bay, vacuum station, air compressor, or timed power outlet) configured with live hardware countdown feedback, the kiosk transitions to the Live Countdown Screen. During this active service window, the interface locks onto a high-visibility digital timer that synchronizes directly with remaining-time telemetry reported by the peripheral controller board.

Screen Overview


Visual Elements & Display Components

1. Live Credit Banner (credit-banner)

  • Visual Appearance: Green-bordered status pill positioned at the top of the interaction card.
  • Balance Reflection: Displays the active session credit (Available: 0.00 EUR), formatted dynamically with the configured kiosk currency. Once payment has been applied to activate the timed service, the balance reflects any remaining unspent funds.

2. Countdown Header Label (message-text)

  • Service Status Prompt: Displays the localized label Remaining time directly above the timer box.
  • Dynamic Translation: Resolved automatically from the system_messages table using the active customer language (remaining_time).

3. High-Visibility Digital Countdown (timer-display)

  • Visual Styling: Oversized gold digital readout (8rem bold typography) paired with a clock icon inside a highlighted gold-bordered frame (e.g., 🕒 00:18).
  • Time Format: Converts raw remaining seconds transmitted by the hardware into a zero-padded MM:SS format (Minutes:Seconds).
  • Real-Time Synchronization: Updates continuously as the peripheral board counts down, keeping the customer informed of exact remaining usage time from a distance.

4. Background Polling & Timeout Protection

  • 500 ms Refresh Loop: The screen polls /kiosk/api every 500 ms via HTMX (hx-trigger="every 500ms") with action: POLL_STATUS to render incoming timer ticks smoothly.
  • Idle Timeout Suppression: Each incoming time update refreshes LastActivityTime in the state engine, preventing the kiosk's inactivity watchdog (kiosk_timeout_sec) from prematurely resetting the display while a paid service cycle is actively running.

Customer Instructions

Using a Timed Service

  1. Begin Service Immediately: As soon as the countdown screen appears, the relay or equipment assigned to your selection is energized and ready for use.
  2. Monitor Remaining Time: Glance at the large MM:SS clock display on the kiosk screen to track how much service time remains (e.g., 00:18).
  3. Service Completion:
    • When the timer reaches 00:00, the peripheral board automatically de-energizes the output relay and signals cycle completion.
    • The kiosk interface exits the countdown screen and returns to the main idle screen (or displays change options if cash credit remains).

Technical Notes for Administrators

  • Incoming Hardware Telemetry (TIME):
    • During an active workflow stage (CurrentStageID > 0), the core message parser (Main.ProcessIncomingMessage) intercepts incoming TIME(seconds) frames from MQTT or serial peripherals.
    • HandleRemainingTimeTelemetry(TotalSeconds) formats the integer seconds into MM:SS and invokes PushUiTimeFragment("messages.html", "remaining_time", FormattedTime) to update LastGeneratedUiFragment.
  • Synchronous vs. Asynchronous Relay Modes:
    • Dedicated Countdown View (TIME Telemetry): Used when a workflow stage remains active (CurrentStageID > 0) while a peripheral board streams TIME(seconds) updates until a completion event (posans) is received.
    • Background Grid Lock (RELAY Opcode): When a product workflow invokes the RELAY(a, b, c, d, time_seconds) opcode directly, TriggerRelayExecution dispatches the relay command, registers an expiration timestamp in ActiveRelayTimers, and immediately returns the UI to the main grid where that specific product card displays an inline MM:SS busy countdown button while other channels remain available for purchase.
  • Localization Keys:
    • Timer Heading Key: remaining_time (configured in system_messages).
    • Credit Banner Label: available_credit.