ZKLibrary icon indicating copy to clipboard operation
ZKLibrary copied to clipboard

send command to open door

Open IrisDande opened this issue 7 years ago • 6 comments

thank you for your code, I wanna ask a question about door lock. as normal, when staff scan fingerprint on ZK device, door lock will release and staff able to open door. So my question is could you help me check and write a quick code to sent command open door?

IrisDande avatar Nov 10 '18 02:11 IrisDande

You can't do it because ZK library is only for read the attendance data from the device.

kamshory avatar Nov 10 '18 11:11 kamshory

i'm not familiar with hex decode/encode. but on ZK access 3.5 have button open door image Could you help me how I can catch this option?

IrisDande avatar Nov 11 '18 01:11 IrisDande

You can use application like Wireshark to see the command sent to your device or you can open API documentation of your device

kamshory avatar Nov 11 '18 05:11 kamshory

Actually ZK device has a connection for door open. You don't need any code but a connection to device and buy ZK door contact device too. Search online

wombiro avatar Dec 26 '18 08:12 wombiro

Hi, I think this will help you. This code successful works in my system.

define('CMD_UNLOCK', 31); public function dooropen() { $command = CMD_UNLOCK; $byte = chr(10); // duration of delay unlocking $command_string = $byte; return $this->execCommand($command, $command_string); }

MiriDS avatar May 02 '19 06:05 MiriDS