Attendance Devices & Face Recognition
Udyamo HRMS integrates with physical attendance devices (biometric terminals, face recognition cameras) to automate check-in and check-out. The AttendanceDevice model handles device registration and token-based authentication, while the EmployeeFace model stores facial embeddings for face recognition. This chapter covers setting up devices, registering employee faces, and managing the integration.
Prerequisites
Required: Before setting up attendance devices:
- Shifts must be configured and assigned to employees (see Creating & Assigning Shifts)
- Attendance policies should be in place (see Attendance Policies & Rules)
- The physical device must be installed, powered on, and connected to the network
- You need administrator access to Udyamo HRMS
Navigating to Device Management
- From the sidebar, click Attendance.
- Click Devices from the submenu.
- The Devices page displays a list of all registered attendance devices.

Understanding the AttendanceDevice Model
Each registered device has the following attributes:
| Field | Description | Example |
|---|---|---|
| Name | A descriptive name for the device | Main Entrance Biometric |
| Token | A unique authentication token used by the device to communicate with the Udyamo HRMS API | d3f1a2b4-e5c6-7890-abcd-ef1234567890 |
| Device Type | The type of device (biometric, face recognition, card reader) | Face Recognition |
| Location/Office | The office or location where the device is installed | Mumbai HQ — Lobby |
| Status | Active or Inactive | Active |
| Last Sync | Timestamp of the last successful communication with the server | 2025-06-15 18:30:00 |
Adding an Attendance Device
Step 1: Open the Add Device Form
- On the Devices page, click Add Device or Register New Device.
- The device registration form opens.
Step 2: Enter Device Details
- Name — Enter a descriptive name that identifies the device and its location (e.g., "Ground Floor Biometric", "Cafeteria Face Scanner").
- Device Type — Select the type:
- Biometric (Fingerprint) — Fingerprint scanner
- Face Recognition — Camera-based facial recognition
- Card Reader — RFID or proximity card reader
- Multi-Modal — Device supporting multiple methods
- Office — Select the office where the device is installed.
- Description — Optional notes about the device (model number, serial number, placement details).
Step 3: Generate the Authentication Token
- Click Generate Token or the token is auto-generated upon saving.
- The system creates a unique, cryptographically secure token.
- This token will be configured on the physical device to authenticate API requests.
Warning: The token is displayed only once when generated. Copy it immediately and store it securely. If you lose the token, you will need to regenerate it, which invalidates the previous token.
Step 4: Save the Device
- Click Save.
- The device appears in the Devices list with an Active status.
- Copy the generated token for device configuration.

Configuring the Physical Device
After registering the device in Udyamo HRMS, configure the physical device to communicate with the API.
Device Configuration Requirements
| Setting | Value |
|---|---|
| API Endpoint | Your Udyamo HRMS attendance API URL (e.g., https://yourcompany.udyamo.com/api/attendance) |
| Authentication Token | The token generated in the previous step |
| Authentication Method | Token-based (Bearer token in HTTP header) |
| Data Format | JSON |
| Sync Interval | How often the device pushes data to the server (typically real-time or every 1-5 minutes) |
How Token-Based Authentication Works
- The physical device sends an HTTP request to the Udyamo HRMS API.
- The request includes the token in the
Authorizationheader:Bearer <token>. - The server validates the token against the registered AttendanceDevice records.
- If valid, the attendance data (employee identifier, timestamp, event type) is accepted and processed.
- If invalid, the request is rejected with a 401 Unauthorized response.
Tip: Work with your device vendor to configure the API endpoint and token. Most modern biometric and face recognition devices support REST API integration with custom headers.
API Request Format
The device sends attendance events in the following format:
| Field | Description | Example |
|---|---|---|
| employee_identifier | The employee ID or face recognition match ID | EMP-001 |
| timestamp | The date and time of the event (ISO 8601) | 2025-06-15T09:03:00+05:30 |
| event_type | The type of event | check_in or check_out |
| device_id | The device's registered name or ID | main-entrance |
Face Recognition Setup
Face recognition uses the EmployeeFace model to store facial embeddings (mathematical representations of facial features) for each employee. When a face recognition device scans an employee, it generates embeddings and matches them against stored data.
How Facial Recognition Works
- Enrollment — The employee's face is scanned and converted into a numerical embedding (a vector of numbers representing facial features).
- Storage — The embedding is stored in the EmployeeFace model associated with the employee record.
- Recognition — When the device scans a face, it generates a real-time embedding and compares it against all stored embeddings.
- Match — If the similarity score exceeds the configured threshold, the employee is identified and the attendance event is recorded.
- Logging — An AttendanceEvent of type
device_check_inis created with the employee, timestamp, and device information.
Registering Employee Faces
Step 1: Navigate to Face Registration
- Open the employee's profile.
- Navigate to the Attendance or Face Recognition section.
- Click Register Face.
Alternatively:
- Navigate to Attendance > Devices > Face Registration.
- Select the employee from the dropdown.
Step 2: Capture Face Images
- The system prompts the employee to face the camera (web camera or connected device camera).
- Capture multiple images (typically 3-5) from slightly different angles for better accuracy:
- Front facing
- Slight left turn
- Slight right turn
- Slight upward tilt
- Slight downward tilt
- Each image is processed to extract facial embeddings.

Step 3: Review and Save
- The system displays the captured images with quality indicators (good, poor, retake needed).
- Review the captures. Retake any images marked as poor quality.
- Click Save to store the facial embeddings.
- The EmployeeFace record is created for the employee.
Tip: For best recognition accuracy:
- Ensure good, even lighting during enrollment
- Remove hats, scarves, or other face-covering accessories
- Ask the employee to maintain a neutral expression
- Capture in the same lighting conditions as the device location if possible
Face Registration Best Practices
| Practice | Reason |
|---|---|
| Register faces in the actual device environment | Matching lighting conditions improves accuracy |
| Update face data annually | Appearance changes over time can degrade matching accuracy |
| Register faces for all shifts | Different lighting conditions in day vs. night shifts |
| Test after registration | Have the employee attempt a check-in to verify recognition works |
Managing Employee Face Data
Viewing Registered Faces
- Open the employee's profile.
- Navigate to the Face Recognition section.
- View the registration status: Registered or Not Registered.
- If registered, the date of registration and number of stored embeddings are displayed.
Updating Face Data
If an employee's appearance has changed significantly (new glasses, major hairstyle change, weight change):
- Open the employee's profile.
- Navigate to Face Recognition.
- Click Update Face Data or Re-Register.
- Capture new images following the same process as initial registration.
- The new embeddings replace the old ones.
Deleting Face Data
- Open the employee's profile.
- Navigate to Face Recognition.
- Click Delete Face Data.
- Confirm the deletion.
- The employee will no longer be recognized by face recognition devices and must use an alternative check-in method.
Warning: Deleting face data is irreversible. The employee will need to go through the full registration process again.
Device Management
Viewing Device Status
The Devices list page shows:
| Column | Description |
|---|---|
| Device Name | The registered name |
| Type | Biometric, Face Recognition, Card Reader |
| Office | Assigned office location |
| Status | Active or Inactive |
| Last Sync | When the device last communicated with the server |
| Attendance Count (Today) | Number of attendance events recorded today |
Monitoring Device Health
Regularly check the Last Sync timestamp for each device. If a device has not synced recently, it may indicate:
- Network connectivity issues
- Device hardware failure
- API configuration problems
- Token expiry or invalidation
Tip: Set up monitoring alerts if a device has not synced within a configurable period (e.g., 1 hour during business hours). This allows proactive troubleshooting before attendance gaps accumulate.
Deactivating a Device
- On the Devices list, click the Actions menu for the device.
- Select Deactivate.
- The device status changes to Inactive.
- The device's token is still valid but the server rejects attendance data from inactive devices.
Reactivating a Device
- Click the Actions menu for the inactive device.
- Select Activate.
- The device status changes to Active and it can resume sending attendance data.
Regenerating a Token
If a device's token is compromised or lost:
- Click the device name to open its details.
- Click Regenerate Token.
- Confirm the action. The previous token is immediately invalidated.
- Copy the new token and reconfigure the physical device.
Warning: Regenerating a token immediately invalidates the previous token. The physical device will stop working until it is reconfigured with the new token.
Troubleshooting
| Problem | Possible Cause | Solution |
|---|---|---|
| Device not syncing | Network connectivity issue | Check the device's network connection; verify it can reach the API endpoint |
| "401 Unauthorized" errors in device logs | Invalid or expired token | Regenerate the token in Udyamo HRMS and reconfigure the device |
| Face recognition not matching employees | Poor lighting during enrollment | Re-register faces in conditions matching the device's environment |
| Face recognition not matching employees | Outdated face data | Update face registration for affected employees |
| High false-rejection rate | Recognition threshold set too high | Contact your device vendor to adjust the matching sensitivity |
| High false-acceptance rate | Recognition threshold set too low | Contact your device vendor to increase the matching sensitivity |
| Duplicate attendance entries | Device sending duplicate events | Check device sync interval; implement deduplication on the API side |
| Device registered but no data coming through | API endpoint misconfigured on the device | Verify the URL, token, and data format on the device |
| Attendance recorded but employee not matched | Employee identifier mismatch between device and HRMS | Ensure the employee ID on the device matches the Employee ID in Udyamo HRMS |
Security Considerations
| Consideration | Recommendation |
|---|---|
| Token storage | Store device tokens securely. Do not share via email or messaging. |
| Face data privacy | Facial embeddings are mathematical representations, not actual photographs. Communicate this to employees for privacy concerns. |
| Data in transit | Ensure the API endpoint uses HTTPS to encrypt data between the device and server. |
| Physical device security | Install devices in tamper-resistant enclosures. Restrict physical access to device configuration menus. |
| Employee consent | Obtain written consent from employees before collecting biometric or facial data, as required by applicable privacy laws. |
Warning: Indian data protection regulations may require explicit employee consent for collecting biometric data (fingerprints, facial data). Consult your legal team before enabling biometric or face recognition attendance.
Next Steps
- Enable location tracking for mobile check-ins — see Location Tracking
- Configure overtime policies for hours beyond shift — see Overtime Requests
- Review attendance reports to verify device data — see Attendance Calendar & Reports