Skip to content

tom-tagmdl/asset_intelligence

Repository files navigation

banner_light

How It Works

SystemFlowOverview2

Asset Intelligence

Asset Intelligence is the Homes Platform integration for asset-centric environmental stewardship, risk evaluation, provenance, and explainable home intelligence.

It extends Home Assistant with a new concept:

πŸ‘‰ Assets β€” the things your home exists to support, protect, and preserve

This transforms your home from:

monitoring devices
into
understanding what matters


πŸš€ Start Here

To understand how the system works:

Documentation


Installation

HACS (Recommended)

  1. Open HACS in Home Assistant.
  2. Go to Integrations.
  3. Click the menu and select Custom repositories.
  4. Add https://github.com/tom-tagmdl/asset_intelligence with category Integration.
  5. Search for Asset Intelligence and install.
  6. Restart Home Assistant.
  7. Go to Settings > Devices & Services > Add Integration and add Asset Intelligence.

Initial Setup Example

In the integration options, configure:

  • Default labels: for example Asset
  • Document storage path: for example /media/asset_intelligence_documents
  • Enable document management: on

Notes:

  • Default labels are applied automatically to new assets.
  • The panel now prompts for a reload when a newer frontend bundle is detected after an upgrade.
  • If frontend updates still are not immediately visible after an upgrade, perform a hard browser refresh.

My Home Assistant Link

Track this repository directly in HACS:

Open your Home Assistant instance and show this repository inside HACS.


✨ At a Glance

Asset Intelligence enables your home to:

  • Understand what it contains (assets as first-class entities)
  • Evaluate whether conditions are appropriate
  • Track custody, movement, and loan history
  • Maintain documents, provenance, and insurance records
  • Provide explainable risk and advisory insights
  • Support room-aware and audience-aware experiences

🧠 The Missing Piece in Smart Homes

Today’s smart homes answer:

  • β€œWhat is the temperature?”
  • β€œIs the light on?”
  • β€œWhich device is in this room?”

But not:

  • β€œAre conditions appropriate for what’s here?”
  • β€œIs anything at risk?”
  • β€œWhere is this, and who has it?”
  • β€œDo I have documentation for this?”

Asset Intelligence enables your home to answer those questions.


🧩 The System Model

Asset Intelligence introduces a simple, powerful model:

  • Areas (Rooms) β†’ where things are
  • Assets (Devices) β†’ what exists
  • Labels β†’ what kind of things
  • Environment β†’ what’s happening
  • Risk & Advisory β†’ what it means

πŸ”„ How It Works

Sensors β†’ Environment β†’ Evaluation β†’ Risk β†’ Advisory β†’ Activity β†’ Automation

  • Sensors capture conditions
  • The system evaluates those conditions against asset requirements
  • Risk is determined
  • Advisory explains what matters
  • Activity records what changed
  • Automations (optional) take action

🧾 What Is an Asset?

An asset is anything that matters.

Device-backed assets

  • TVs, Sonos, networking gear, appliances

Non-device assets

  • Artwork, instruments, furniture, collections, documents

Each asset is implemented as a Home Assistant device, enriched with:

  • environmental requirements
  • documentation and provenance
  • custody and governance
  • history and audit data

πŸ›οΈ Stewardship, Not Just Automation

Asset Intelligence brings concepts from:

  • museums
  • archives
  • collections
  • estate inventories

into the home.

It introduces:

  • structured asset inventory
  • environmental stewardship
  • audit and lifecycle tracking
  • custody and loan workflows
  • documentation and provenance

This is not just automation.

πŸ‘‰ It is stewardship


🧠 Environmental Intelligence (Assets + People)

Asset Intelligence models the environment in a structured way across:

  • climate
  • light
  • air quality
  • particulates
  • biological conditions
  • structural context

This allows the home to evaluate:

For assets

  • Is this environment safe for artwork, instruments, electronics?

For people

  • Is air quality healthy?
  • Is COβ‚‚ elevated?
  • Is the room becoming unsafe?

Room Risk & Advisory (Room Detail)

Room Detail now includes a room-scoped risk/advisory interpretation layer designed for explainability.

What this adds:

  • State and Confidence context for the room snapshot
  • Status since time tracking for the current condition state
  • Clear reasons for the current room condition
  • Advisory-oriented guidance tied to observed room signals

Why this matters:

  • Users can understand room-level safety context before reading raw sensor values.
  • It provides a faster decision path for placement and remediation actions.

Room Confidence Drivers (Room Detail)

Room Detail now includes a dedicated Room Confidence Drivers panel that explains exactly why the room confidence is what it is.

What it shows:

  • Coverage: how many configured signals are actively reporting data (e.g. 4/5 β€” 80%)
  • Configured signals: total count of sensors mapped to this room
  • Signals reporting: count of sensors returning live values
  • Signals missing: count of configured sensors with no data
  • Confidence summary: a plain-language explanation of why confidence is Good, Partial, Degraded, or Stale
  • Missing signal names: which specific sensor slots are empty
  • Reporting signal names: which slots are actively contributing

Quick fix link:

  • A Configure sensors link next to the missing signals list navigates directly to Room Configuration to fix gaps without manual navigation.

Why this matters:

  • Users often see "Partial" or "Degraded" confidence with no clear cause.
  • This panel surfaces exactly which sensors are missing data so users can assign or fix them.
  • Confidence is not just a status β€” it reflects how much real-world evidence backs the room's risk and people-health assessments.

People Health (MVP)

Room Detail now includes a dedicated People Health panel that evaluates room conditions against a baseline human profile.

MVP inputs:

  • temperature
  • humidity
  • COβ‚‚
  • PM2.5
  • VOC

MVP output:

  • Health state (Green / Amber / Red)
  • Confidence (High / Medium / Low)
  • Status since
  • top reasons and advisory guidance
  • observed vs total signals coverage

Profile model (MVP):

  • System default baseline profile in storage
  • Optional room-level profile override support
  • Preferred range and hard-limit checks per metric

Start/Stop Measurement (Per Asset)

Asset Intelligence includes a focused measurement workflow on the Asset Detail page.

  • Start measurement begins a time-bound observation session for a specific asset in its current room context.
  • While active, the header shows a live measurement box with:
    • elapsed timer
    • coordinator update count (how many new environment refresh cycles were captured)
    • quick Stop measurement action
  • Stop measurement requests session completion and finalizes the measurement profile from captured observations.

What It Is Used For In A Room

Use Start/Stop Measurement when you want to understand how a room behaves over a real observation window for one asset, not just a single instant reading.

Examples:

  • Verify how stable temperature/humidity are around an instrument during evening hours.
  • Capture changing light exposure for an artwork near windows.
  • Compare before/after behavior while HVAC, shades, or room setup are adjusted.

Activity Timeline Entries

Measurement sessions are written into the Activity pane with dedicated entries:

  • Start entry: records session start timestamp and initial room-environment snapshot.
  • Stop entry: records completion timestamp, observation/update count, and finalized measurement profile results.

This gives a clear audit trail of when the measurement began, how much data was collected, and what the final observed baseline looked like.

Room-Level Measurement History (Over Time)

Room Detail now includes a dedicated Room Measurement History panel so users can evaluate room conditions over time and decide whether the room is appropriate for a given asset.

What this provides:

  • A room-scoped timeline of measurement sessions across assets in that room
  • Newest sessions at the top, oldest at the bottom
  • Asset context on each entry (which asset the session was run for)
  • Filter options for All, Start, Stop, and Asset
  • A quick trend summary showing:
    • session count
    • last session timestamp
    • average observations per completed session

Why this matters:

  • You can compare room behavior across multiple sessions, times of day, and assets.
  • You can validate whether a room remains stable enough for sensitive assets (for example, artwork, instruments, or electronics).
  • You can make placement decisions using observed room behavior, not just one-point-in-time readings.

How this works with People Health:

  • The People Health panel gives immediate room-health context.
  • Room Measurement History provides the time-based evidence behind that context.
  • Together they support both snapshot decisions and trend-based validation.

πŸ”¬ What Makes This Different

  • Assets define what conditions matter
  • Rooms define how conditions are measured
  • The system compares the two

β€œAre these conditions appropriate for what is in this room?”


🚨 Calm, Explainable Awareness

Instead of alerts alone, the system provides:

  • risk states (Green / Amber / Red)
  • advisory explanations
  • missing data warnings
  • event history

This creates:

πŸ‘‰ awareness, not noise


πŸ“š Documents, Provenance, Insurance

Each asset can hold:

  • receipts and appraisals
  • manuals and warranties
  • insurance references
  • provenance records
  • physical document locations

Documents are stored in external storage (NAS recommended) and linked into the system.


πŸ” Custody and Movement

Track:

  • ownership status
  • loans and returns
  • custody transfers
  • storage location
  • agreements and responsibility

🧱 Architecture Overview

Asset Intelligence uses a layered architecture:

  • Environment β†’ sensing
  • Evaluation β†’ decision engine
  • Coordinator β†’ runtime state, events, advisory
  • Entities β†’ read-only projections

πŸ‘‰ See: ../../wiki/Architecture-Overview


πŸŽ™οΈ Concierge & Future Experience

Asset Intelligence enables:

  • room-aware voice interactions
  • audience-specific descriptions
  • guided experiences
  • contextual explanations

The home can eventually explain:

  • what is in a room
  • why it matters
  • what is happening to it

🏑 Homes That Behave Well

Asset Intelligence is built around:

homes that understand what matters and act accordingly

Not just:

  • convenience
  • automation

But:

  • awareness
  • responsibility
  • explanation

πŸš€ What This Enables

Asset Intelligence transforms Home Assistant into:

  • an environmental awareness system
  • an asset management system
  • a documentation system
  • a stewardship system

The result:

A home that behaves with intention.


Repository Structure

Path Purpose
__init__.py Integration entry point. Registers all services, sets up config entries, and wires the coordinator, storage, and document view into HA.
manifest.json HA integration metadata: domain, version, config flow flag, IoT class, and codeowner declaration.
quality_scale.yaml Tracks which Home Assistant Quality Scale rules have been satisfied for Bronze β†’ Platinum progression.
const.py Shared constants used across the integration (domain name, signal names, service names).
models.py Core data models: Asset, CustodyRecord, LoanRecord, and supporting types.
coordinator.py AssetIntelligenceCoordinator β€” owns runtime state, triggers refreshes, computes room-level human-health projections, and dispatches change signals to entities.
asset_entity.py Base entity class shared by sensors and binary sensors; resolves the asset from coordinator data.
sensor.py Sensor entities: asset count, asset list, room environment readings, and room-level people-health attributes.
binary_sensor.py Binary sensor entities: risk state and advisory flags per asset.
config_flow.py UI-driven config flow for setting up and reconfiguring the integration.
storage.py AssetStore β€” reads/writes persistent JSON storage, including system defaults and human-health profile baselines.
document_models.py Data classes for document records (receipts, appraisals, manuals, provenance).
document_storage.py DocumentStorage β€” manages file-level operations for linked asset documents on NAS/share.
environment.py Parses and normalises room environment sensor data into structured readings.
evaluation.py Evaluates environmental conditions against per-asset requirements and room-level human-health profiles to produce risk/advisory states.
advisory.py Generates human-readable advisory text from evaluation results.
validation.py Input validation helpers used by service handlers to reject malformed payloads early.
panel.py Registers the custom frontend panel with HA's HTTP layer.
strings.json Translatable UI strings for the config flow and services.
services.yaml HA service schema declarations (fields, descriptions) for all registered services.
translations/en.json English translations for config flow, services, and entity states.
helpers/document_resolver.py Resolves document paths and validates file availability against configured storage.
services/document_retrieval.py Service handler for document fetch/download operations.
frontend/panel_v5.js Compiled frontend panel served to the HA UI for asset management views.
frontend/src/ Source for the frontend panel (components, pages, views).
docs/asset_intelligence.md End-user documentation: concepts, installation, removal, and supported actions.
docs/asset_intelligence_examples.md Usage examples and automation patterns for common asset intelligence scenarios.
docs/asset_intelligence_troubleshooting.md Troubleshooting guide for common setup and runtime issues.
docs/quality_scale_audit.md Platinum audit log: evidence mapping for each Quality Scale requirement.
custom_components/asset_intelligence/brand/ Integration branding assets (icons, banners, logos) for the HA brand registry.
tests/conftest.py Shared pytest fixtures for all test modules.
tests/test_config_flow.py Tests for UI config flow: setup, validation, and single-entry enforcement.
tests/test_setup.py Tests for integration startup and platform loading.
tests/test_unload.py Tests for config entry unloading and resource cleanup.
tests/test_services.py Tests for service handlers: document upload, attach, delete, and asset mutations.
tests/test_documents.py Unit tests for document record helpers and rebuild logic.
tests/test_history.py Tests for asset history payload construction.
tests/test_diagnostics.py Tests for the HA diagnostics payload output.
tests/test_entity_metadata.py Tests for sensor and binary sensor entity metadata (name, unique ID, device class).
tests/test_validation.py Tests for input validation helpers.
tests/run_quality_gate.ps1 PowerShell script that runs the full pytest suite with coverage gate (β‰₯85%) and emits artifacts.
tests/run_smoke_tests.ps1 Lightweight smoke run targeting the most critical service tests only.
tests/_validate_services.py Standalone script to validate services.yaml schema against registered service definitions.
QUALITY_SCALE_CHECKLIST.md Working checklist tracking Bronze β†’ Platinum progress with phase-by-phase implementation plan.

About

Asset-centric Home Assistant integration for environmental stewardship, risk evaluation, provenance, and explainable home intelligence.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors