KMI HRM · PART 1 · AUGUST 2026

KMI HRM, part 1: getting punches from fingerprint machines to a live screen

KMI Group is a company based in Faisalabad, Pakistan, with people spread across sites and plants, and attendance starts at a fingerprint machine on a local network. The first version of this HR system, built in August 2026, had one job: get each punch from that machine to a screen, reliably. Payroll means nothing if the punches cannot be trusted.

About this project

How attendance, HR and payroll for a Pakistani company of several sites and plants came together, from fingerprint machines to the phone in an HR manager’s hand.

In short

The system began in August 2026 with one job: move attendance from fingerprint machines on a factory network to a live screen, even when the internet is down. Those first weeks were mostly spent on what real networks and browsers do.

Why a small program runs next to the machine

A biometric machine sits on the site’s local network, and a web server on the internet cannot simply reach it. So a small agent runs on a PC on the same network. It reads punches from the machine and saves them to a local database straight away, then sends them to the server whenever it can. If the internet drops for a day, nothing is lost.

The five-hour bug

When the attendance sheet was first connected to real data, every punch showed five hours early. A worker arriving at 9:00 appeared at 4:00. The cause is a classic one: times stored in UTC were displayed without converting to Pakistan time. It took minutes to fix, but it would have been very expensive to discover in a salary sheet.

When “offline” is a false alarm

The live display kept announcing it was offline when it was not. Two checks could overlap and race each other, and one slow reply flipped the screen. An expired login session looked like a lost connection too. The fix was to stop overlapping checks and require two failures in a row before changing state. A display that cries wolf soon gets ignored.

The browser also has opinions

The display page is served securely, but the local agent is not, and Chrome blocks that mix without much explanation. I tried polling every 300 milliseconds, then returned to true live push by having the installer set a documented Chrome and Edge policy for that one server address. Polling stayed as the fallback. The installer also had to learn to store its data somewhere it is allowed to write, since Program Files is not.

What we shipped

  • A Windows agent that saves punches locally and syncs them
  • A live attendance display with an offline fallback
  • An attendance sheet using real punches in the right time zone

Lesson learned

Save the data locally first, then worry about moving it. Everything else in an attendance system can be retried; a lost punch cannot.