How todaysmonkeyjob/pythonproject1 works
IoT Guard is a local, event-driven security monitoring system. Devices feed camera, microphone, and gas pipelines; their events are routed through trust assessment and aggregation into an LLM decision path. A fuzzy risk corridor constrains GPT’s result before it updates location state and reaches operators. The README documents the main runtime relationships and decision stages; several subsystem internals and optional integrations are unsampled, so the graph omits uncertain links rather than inferring calls.
Main entry points: orchestrator.py Event orchestrator · worker.py LLM decision worker · events.py Event schema · aggregator Snapshot aggregator
Components 25
Sensing and perception
- Vision perception
modules/vision - Audio perception
modules/audio - Gas analysis
modules/gas
Event runtime and trust
- Event schema
core/events.py - Event orchestrator
core/orchestrator.py - Device discovery
core/device_manager.py - Device registry
core/devices.py - Identity registry
core/identity.py - Evidence trust
modules/trust
Risk decisions
- Snapshot aggregator
modules/aggregator - LLM evidence view
modules/aggregator/llm_view.py - Decision outbox
modules/aggregator/outbox.py - LLM decision worker
modules/llm/worker.py - LLM call gate
modules/llm/gating.py - GPT client
modules/llm/gpt_client.py - Risk corridor
modules/envelope
State and operator UI
- Location state
modules/locations/state.py - Notifications
modules/notify/service.py - Operator dashboard
dashboard/server.py
Fuzzy policy
- Fuzzy inference
core/fuzzy/engine.py - Rule suggestions
modules/rules/suggester.py
Other components
- Cameras
- Microphones
- Gas sensor
- Operator
Connections 27
- Cameras → Vision perception: frames to
- Microphones → Audio perception: audio to
- Gas sensor → Gas analysis: readings to
- Vision perception → Event schema: emits events
- Audio perception → Event schema: emits events
modules/audio/mic_controller.py - Gas analysis → Event schema: emits events
modules/gas/worker.py - Event schema → Event orchestrator: routes events
core/orchestrator.py - Device discovery → Device registry: updates registry
core/device_manager.py - Device discovery → Event orchestrator: starts pipelines
core/device_manager.py - Event orchestrator → Evidence trust: scores evidence
core/orchestrator.py - Event orchestrator → Snapshot aggregator: sends events
- Snapshot aggregator → LLM evidence view: builds view
modules/aggregator/llm_view.py - Snapshot aggregator → Decision outbox: writes snapshots
- Decision outbox → LLM decision worker: feeds worker
modules/llm/worker.py - LLM decision worker → LLM call gate: checks need
modules/llm/worker.py - LLM decision worker → GPT client: requests analysis
modules/llm/worker.py - LLM decision worker → Risk corridor: assesses corridor
modules/llm/worker.py - Risk corridor → Fuzzy inference: uses inference
- LLM decision worker → Event orchestrator: publishes decision
- Event orchestrator → Location state: updates state
- Event orchestrator → Operator dashboard: forwards events
- Location state → Notifications: drives alerts
- Operator dashboard → Operator: presents decisions
- Operator → Operator dashboard: reviews escalation
- Event orchestrator → Rule suggestions: records outcomes
modules/rules/suggester.py - Identity registry → Audio perception: supports attribution
modules/audio/mic_controller.py - Identity registry → Vision perception: supports identity