mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 10:24:26 +01:00
doorlockd.py: implement emergency unlock
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
5fd19def77
commit
9567ca938f
@ -218,7 +218,8 @@ class DoorHandler:
|
|||||||
BUTTON_PRESENT = b'Y'
|
BUTTON_PRESENT = b'Y'
|
||||||
BUTTON_OPEN = b'G'
|
BUTTON_OPEN = b'G'
|
||||||
BUTTON_CLOSE = b'R'
|
BUTTON_CLOSE = b'R'
|
||||||
# TBD EMERGENCY OPEN
|
|
||||||
|
CMD_EMERGENCY_SWITCH = b'E'
|
||||||
# TBD DOOR NOT CLOSED
|
# TBD DOOR NOT CLOSED
|
||||||
|
|
||||||
def __init__(self, device):
|
def __init__(self, device):
|
||||||
@ -245,9 +246,9 @@ class DoorHandler:
|
|||||||
# playsound...
|
# playsound...
|
||||||
self.state = DoorState.Present
|
self.state = DoorState.Present
|
||||||
logic.emit_status(LogicResponse.ButtonPresent)
|
logic.emit_status(LogicResponse.ButtonPresent)
|
||||||
# elif recv == DoorHandler.BUTTON_EMERGENCY_PRESS:
|
elif recv == DoorHandler.CMD_EMERGENCY_SWITCH:
|
||||||
# playsound(wave_emergency)
|
playsound(wave_emergency)
|
||||||
# logic.emit_status(LogicResponse.EmergencyUnlock)
|
logic.emit_status(LogicResponse.EmergencyUnlock)
|
||||||
|
|
||||||
if expect is None:
|
if expect is None:
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user