From dbaca0a46eadf2b4c6cf2d6db0bc48aa04f9685d Mon Sep 17 00:00:00 2001 From: Hossain Mahmud Date: Wed, 11 Sep 2024 11:54:34 +0600 Subject: [PATCH] feat: Adjust format to unpack 49 bytes for SpeedFace-V5L device --- zk/base.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/zk/base.py b/zk/base.py index 4940d09..136a356 100644 --- a/zk/base.py +++ b/zk/base.py @@ -1651,6 +1651,39 @@ def get_attendance(self): timestamp = self.__decode_time(timestamp) attendance = Attendance(user_id, timestamp, status, punch, uid) attendances.append(attendance) + + # ZKTeco SpeedFace-V5L Multi-Biometrical Reader + elif record_size == 49: + while len(attendance_data) >= 49: + try: + # Debug: print raw data before unpacking + # print(f"Raw data (hex): {codecs.encode(attendance_data[:49], 'hex')}") + + # Adjust format to unpack 49 bytes + uid, user_id, status, timestamp, punch, additional_data = unpack('= 40: uid, user_id, status, timestamp, punch, space = unpack('