MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / setup_environment

Method setup_environment

shared.py:917–938  ·  view source on GitHub ↗

Setup the environment with the necessary directories and files.

(self, clear_console=False)

Source from the content-addressed store, hash-verified

915 # via the same Pushover account/keys as the security alerts above —
916 # these toggles only gate the RuSense events. Requires Pushover keys
917 # to be configured and pushover_enabled to be on.
918 # What the space is watched FOR. 'security' = expected-empty,
919 # alert when someone appears; 'health' = expected-occupied
920 # (wellness), alert on inactivity + lead with vitals trends;
921 # 'both' = presence and inactivity alerts together. Picking a mode
922 # in Settings presets the alert toggles below (still tunable).
923 "rusense_mode": "security",
924 "rusense_notify_enabled": False,
925 "rusense_notify_presence": True, # room goes empty <-> occupied
926 "rusense_notify_motion": False, # significant (active) motion
927 "rusense_notify_people": False, # people count crosses threshold
928 "rusense_notify_people_threshold": 1, # alert when count >= this
929 "rusense_notify_node_offline": True, # a CSI node stops streaming
930 "rusense_notify_cooldown_s": 60, # min seconds between same-kind alerts
931 # False-positive guards: an event only fires when the classifier
932 # confidence is at/above this fraction AND the condition has held
933 # continuously for at least this many seconds (debounce).
934 "rusense_notify_min_confidence": 0.95, # 0..1; require >= 95% confidence
935 "rusense_notify_sustain_s": 2, # condition must persist this long
936 # Health-mode safety net (the INVERSE of the presence alert): fire
937 # when a home that should be occupied shows NO activity for this
938 # many hours of awake time. The quiet (sleep) window is excluded —
939 # the timer only runs outside it, so a normal night never trips it.
940 "rusense_notify_inactivity": False, # no-activity-for-N-hours alert
941 "rusense_inactivity_hours": 4, # awake hours without activity

Callers 1

__init__Method · 0.95

Calls 9

create_directoriesMethod · 0.95
save_configMethod · 0.95
generate_actions_jsonMethod · 0.95
delete_webconsolelogMethod · 0.95
initialize_csvMethod · 0.95
warningMethod · 0.80

Tested by

no test coverage detected