i'm new to ZKteco devices! I am using a Zkteco device. I have a Zkteco Device and I have downloaded a standalone SDK, but this SDK doesn't trigger the events, (for example OnVerify, or OnAttTransaction). So, I read in some articles, that I need to use Push SDk, but I can't find it.
I took one month to find that for that PUSH SDK and ADMS, clearly ZKTeco is not open to share that. so I had try to proceed otherwise. Here is the solution I had implement and it work properly.
The push SDK is just HTTP request made by ZKTeco device to the Bioserver. You can use a tool like Wireshark to scan HTTP requests made by your device and implement same request/response on your own server.
For exemple, the ZKTeco device model MB560-VL send requests like this one
GET http://[SERVER-IP:PORT]/iclock/getrequest?SN=XXXXXXXXXX
and if like the BioTime software, your server just send
OK
as response in text/plain, your device will view your server as a "BioTime"
Note that your ZkTeco Device should have ADMS support, so that you will first configure SERVER-IP and PORT on the device (see your official device documentation on ZKTeco website)
User registration
When a user is registered on the device, the device send this request
POST /iclock/cdata?SN=XXXXXXXXXX&table=OPERLOG&Stamp=9999
with user information on the HTTP buffer. something like this one
PIN=2\tName=Johny Deep\tPri=0\tPasswd=\tCard=\tGrp=1\tTZ=0000000100000000\tVerify=0\tViceCard=\tStartDatetime=0\tEndDatetime=0\n
your server should just parse this data and respond OK to this request
User logs (clock_in / clock_out) Device request
POST /iclock/cdata?SN=XXXXXXXXXX&table=ATTLOG&Stamp=9999
the data sent by device on HTTP data buffer looks like
2\t2022-07-12 16:00:20\t1\t15\t\t0\t0\t\t\t43\n
As you can see you parse this string with '\t' as the separator of informations
Here is an exemple of implementation with Python
@http.route('/iclock/getrequest', type='http', auth="public", csrf=False)
def zk_bio_device_ping(request):
print("----------DEVICE PING-----------")
print(request.GET)
return HttpResponse("OK", content_type='text/plain')
@http.route('/iclock/getrequest', type='http', auth="public", csrf=False)
def zk_bio_device_push(request):
print("----------DEVICE SEND DATA----------")
print(request.GET)
print(request.body.decode('utf-8'))
return HttpResponse("OK", content_type='text/plain')
Device do not use any authentification to communicate with server ! I'm pretty sure that's a big security issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With