# Door, window

Process

Door and window monitor

Door, window
OC
TC
LC
O
T
C
L
S

# Inputs

IDAbbrevNameTypeDefaultDescription
open_contactOCOpen contactBOOLEANfalseOpen door window contact
tilted_contactTCTilted contactBOOLEANfalseTilted door window contact
locked_contactLCLocked contactBOOLEANfalseLocked door window contact

# Outputs

IDAbbrevNameTypeDefaultDescription
openOOpenBOOLEANfalseActive when door or window is open
tiltedTTiltedBOOLEANfalseActive when door or window is tilted
closedCClosedBOOLEANfalseActive when door or window neither open nor tilted
lockedLLockedBOOLEANfalseActive when door or window is locked
securedSSecuredBOOLEANfalseActive when door or window is closed and locked

# Source Code

View Volang source
open = input::get("open_contact")
tilted = input::get("tilted_contact")
closed = !open and !tilted
locked = input::get("locked_contact")
secured = closed and locked

output::set("open", open)
output::set("tilted", tilted and !open)
output::set("closed", closed)
output::set("locked", locked)
output::set("secured", secured)
Door and window monitor