wiegand with door status function

this is the code with a alert of open door