Skip to main content

Smart Locker System (Face Recognition Online Version)

A smart-locker terminal for FCV5005 and FCV5003, built with DejaOS SDK 2.0. It recognizes users locally and connects to a FitLock-compatible management service through MQTT for centrally managed users, face data, cabinet assignments, configuration, events, and alarms.

Online solution reference implementation

This repository contains both the embedded terminal application and its companion smart-cabinet management system. Deployment-specific accounts, infrastructure, and production configuration must still be provided by the integrator.

Application Screenshots

InterfacePreview
HomeHome
Home screen with the face-recognition entry, temporary-locker availability, network status, and device information.
Face RecognitionFace recognition
Local camera preview and face-recognition guidance.
Temporary Locker ConfirmationTemporary locker confirmation
Confirms the temporary locker assigned to the recognized user.
Administrator LoginAdministrator login
Supports face or password authentication for local administration.
Administrator ConsoleAdministrator console
Local maintenance entry points for cabinet control, system information, and network settings.
Open a Specific CabinetOpen a specific cabinet
Manually opens a selected cabinet for authorized maintenance.
Open All CabinetsOpen all cabinets
Sequential all-cabinet opening with an on-screen safety reminder.

Online and Offline Versions

Both editions perform face recognition and cabinet control on the terminal. Their management boundaries differ:

CapabilityOnline VersionFace Offline Version
User and face dataSynchronized from a management serviceManaged locally
Cabinet assignmentsCentrally issued and cached locallyConfigured locally
Operation recordsLocally queued and reported to the serviceStored locally
Network outageUses cached data and retries pending events after reconnectionNo network dependency
Central operationsMQTT commands, status, alarms, and optional remote maintenanceNot included

The online version is not the same as “cloud-only.” Recognition, authorization against cached records, and lock control remain on the device, while the server is responsible for centralized data and operations.

Main Features

User and locker workflows

  • Local face recognition for cabinet access.
  • Fixed-cabinet and temporary-cabinet business modes.
  • Temporary-cabinet allocation and user confirmation.
  • Local SQLite cache for users, face metadata, cabinet state, configuration, and pending events.
  • RS-485/UART lock-board control with separate command and door-state handling.

Online management

  • Device-scoped MQTT commands under fitlock/v1/cmd/{deviceSn}/#.
  • User and face-image synchronization with local feature enrollment.
  • Cabinet list and assignment synchronization.
  • Remote configuration, control, and OTA command handlers.
  • Access, face-sync, and alarm event reporting.
  • Business-acknowledged local event queue: an event is removed only after the matching reply is received.

Local administration

  • Face or password administrator login.
  • Open one cabinet or sequentially open all cabinets.
  • Ethernet/Wi-Fi and MQTT settings with a connection test.
  • System and diagnostic information.

Architecture

UI Worker         Face Worker        Lock Worker        Network Worker
\ | | /
\----------------+---- EventBus ----+-------------------/
|
MQTT Worker
|
FitLock-compatible management service

The SDK 2.0 application separates UI, facial processing, lock-board communication, network state, and MQTT processing into dedicated workers. Workers exchange small messages through dxEventBus; SQLite provides durable device state and the pending-event queue.

Smart Cabinet Management System

The repository also includes the management application used with the device terminal:

  • Java 17 and Spring Boot backend.
  • Built-in Netty-based MQTT service for device commands, synchronization, events, and acknowledgements.
  • SQLite by default, with optional MySQL configuration.
  • Web management pages for users, user groups, authorization groups, devices, device configuration, lockers, access records, event records, and MQTT logs.
  • Administrative operations such as remote cabinet opening/release, configuration delivery, upgrade tasks, and face-image/file upload.

View the smart cabinet management system on GitHub

Source Code

face_online/
├── screenshot/
├── smart_cabinet_management_system/
│ ├── config/
│ ├── sql/
│ ├── src/
│ └── build.gradle
└── source/
├── .temp/
├── app.dxproj
├── doc/
├── dxmodules/
├── resource/
├── test/
└── src/
├── db/
├── lock/
├── pages/
├── worker/
├── faceWorker.js
├── uiWorker.js
└── main.js

The device source directory mirrors the current application workspace, except for its .git repository metadata. Select the matching project configuration before installing or deploying components.

MQTT Protocol Document

The complete Fit Lock Pro MQTT Protocol Document (V1.0) is maintained with the source code on GitHub:

It defines message envelopes, topic rules, configuration, control and OTA commands, user and cabinet synchronization, access events, face-synchronization events, alarms, business acknowledgements, result codes, and data objects.

AI-Assisted Development and Localization

The device application and management system were generated and iterated with AI assistance. Their default user interfaces, sample data, and operational text are primarily in Chinese. If another language is required, AI can help translate and adapt the UI text, resources, and documentation. The translated version should still be checked on the target display for font coverage, text length, layout, and business terminology.

Getting Started

  1. Confirm whether the target product is FCV5005 or FCV5003 and select the matching project configuration.
  2. Copy the matching product configuration to app.dxproj before installing components.
  3. Install the components declared in app.dxproj with the DejaOS extension or dejaos install --project ..
  4. Deploy the source to the confirmed device and inspect device logs.
  5. Configure Ethernet or Wi-Fi and the MQTT account in the local administrator console.
  6. Deploy or adapt the included management system, then test synchronization, acknowledgement, reconnect replay, cabinet state, face enrollment, and failure recovery.

Deployment Boundaries

  • The included management system is reference source code and still requires environment-specific deployment and acceptance testing.
  • Static checks and prior development tests do not replace validation on the actual cabinet hardware and production server.