@inputs Ranger Reset Off
@outputs Alarm Message:string Colour:vector
@persist 
@trigger

if (Ranger) {Alarm = 1}
if (Reset) {Alarm = 0}
if (Off) {Alarm = 0}

if (Alarm == 0) {
    Message = "All is well"
    Colour = vec(0,255,0)}

if (Alarm == 1) {
    Message = "WARNING! INTRUDER DETECTED!"
    Colour = vec(255,0,0)}

