2 Presence Meta Event Injector:
3 events indicating presence:
5 - door lock using manual movement closing (unless door ajar, assume we would not use key to close from inside )
6 - door unlock (any method, manual, key, card, phone, ssh, etc)
8 - door toggle button press
10 - movement sensor (maybe threshold number movements within 5 minutes)
12 events indicating somebody left:
13 - door closed with card, phone, ssh (while backdor and frontdoor shut)
14 - no movement within 3 hours and movement within the last 6 hours (disable trigger if sensor is broken)
17 events indicating "alarm state" / special message:
18 - Panic Button pressend
19 - Sudden rise in Temp-Sensor-Value
20 - Sudden rise in Dust/Smoke-Sensor-Value
23 Movement Meta Event Injector:
24 movement sensor (maybe threshold number movements within 5 minutes) -> Movement Passed Threshold
25 no movement within 3 hours and movement within the last 6 hours -> Movement Absence Passed Threshold
26 asign confidence to metaevent
27 -> if few movement was detected before door closed -> lower timeout until no presence !
28 -> if a lot of movement was detected -> longer timeout until no presence
29 (e.g. confidence of SomethingReallyIsMoving{false} must reach level of SomethingReallyIsMoving{true} before presence switch is triggered
32 Sensor Spike Event Injector:
33 monitors sensor values and calculates running average mean, stddev over last hours,
34 raises Event is value spikes, aka rised beyond mean +- stddev within 2 min (enables after 1 hour of collecting data)
39 * someone walks by the movement sensor towards the door. Closes it from outside with the Card and leaves -> nobody in room anymore
40 * somone still works in the OLGA room while the last person in the main room leaves and closes the door behind him with the card
43 -> all doors closed and shut -> no movement for ~30 seconds after closing doors -> assume everybody left
44 -> movement within next ~30 seconds -> assume somebody is still here until SomthingReallyIsMoving{false} fires
47 possible better Solution:
48 close door "differently" from outside if people are still inside (e.g. with buttonpress prior to closing with card from outside... or install a "CLOSE ONLY" event sending device which can be triggered through the glass)