-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Asset Intelligence is designed as a structured system that separates sensing, decision-making, state management, and presentation.
This architecture ensures consistency, accuracy, and long-term maintainability.
Asset Intelligence follows three key principles:
- Separate data collection from decision-making
- Separate decision-making from state changes
- Separate logic from presentation
Each layer has a clearly defined responsibility.
The system is composed of four primary layers:
- Environment (Sensing)
- Evaluation (Decision Engine)
- Coordinator (Runtime Management)
- Entities (Presentation)
The environment layer is responsible for collecting and structuring environmental data.
It answers:
“What is happening in the room?”
- Home Assistant sensors
- External environment (sun position, weather)
- System context (HVAC, airflow)
A structured room environment model including:
- Temperature
- Humidity
- Light (Lux / UV)
- Air quality
- CO₂
- Particulates
- Mold index
- Leak detection
- Sun position
- Sensor confidence
- Does not evaluate risk
- Does not store data
- Does not trigger events
It only describes current conditions.
The evaluation layer determines the current risk state for each asset.
It answers:
“Based on current conditions, what should the risk state be?”
- Asset environment requirements
- Room environment snapshot
- Risk state (Green, Amber, Red)
- Candidate state
- Risk reasons
- Signals used
- Debounce action
- Pure logic (no side effects)
- Does not write to storage
- Does not generate events
- Does not perform advisory logic
It provides a deterministic answer based only on available data.
The coordinator is the central runtime engine of the system.
It answers:
“What changed, what should be recorded, and what should be shown?”
- Runs evaluation cycles
- Applies debounce rules
- Determines effective risk state
- Detects transitions
- Generates events
- Produces advisory insights
- Maintains runtime projections
- Writes changes to storage
- Environment layer output
- Evaluation results
- Stored asset data
- Updated asset state
- Event records (environment, advisory, activity)
- Advisory signals
- Projection data for UI
- Only layer that creates events
- Only layer that manages state transitions
- Only layer that generates advisory insights
Entities expose system state to Home Assistant and the UI.
They answer:
“What is the current state of the system?”
- Risk state sensor
- Candidate state
- Advisory text
- Environment snapshot
- Read-only
- No logic
- No evaluation
- No state changes
Entities display what the coordinator has already determined.
The system follows a strict flow:
Environment → Evaluation → Coordinator → Entities → UI
- Sensors update
- Environment model is built
- Evaluation computes risk
- Coordinator processes results
- State changes and events are recorded
- Entities reflect updated state
- UI displays results
Each layer has strict boundaries:
| Layer | Responsibility | Does NOT Do |
|---|---|---|
| Environment | Sensing | Evaluation, storage |
| Evaluation | Decision logic | Events, storage, advisory |
| Coordinator | State + events + advisory | Sensor reading, rule definition |
| Entities | Display | Logic, storage |
This architecture ensures:
- Deterministic risk evaluation
- No duplicated logic
- Clear system behavior
- Consistent UI output
- Easy troubleshooting
- Maintainable long-term structure
Advisory logic is part of the coordinator but separate from risk evaluation.
- Risk tells you the current condition
- Advisory explains what to understand or consider
Risk:
- RED → humidity too high
Advisory:
- "Reduce humidity to protect sensitive assets"
- "No UV data available"
- "Consider adding a light sensor"
All changes are recorded as events.
Event types include:
- Environment events
- Risk transitions
- Advisory events
- Activity events
- Document events
- Custody events
These power the Activity and Auditing system.
The system stores:
- Asset definitions
- Room configuration
- Event history
- Document references
- Policy data
It does not store:
- Raw sensor data
- Derived UI projections
- Temporary runtime values
Asset Intelligence integrates deeply with Home Assistant:
- Assets are devices
- Areas define rooms
- Labels define categorization
- Entities expose state
- Automations perform actions
This architecture was designed to:
- Use Home Assistant as the system of record
- Avoid data duplication
- Provide explainable outcomes
- Support advanced advisory logic
- Enable automation without forcing behavior
You don’t need to understand the code.
But understanding the structure helps explain:
- Why risk behaves consistently
- Why missing sensors affect results
- Why advisory messages appear
- Why automations are external
- Why the system is reliable
- Environment detects conditions
- Evaluation determines risk
- Coordinator manages state and generates insight
- Entities display results
- Home Assistant executes actions
Asset Intelligence is designed to be predictable, explainable, and extensible.
It separates knowing from deciding, and deciding from acting. ``