You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/smart-home/packages/ai_summary.md
+21-11Lines changed: 21 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,16 @@ version: Unknown
16
16
17
17
## Executive Summary
18
18
<!-- START_SUMMARY -->
19
-
This package acts as the **Frontend** and **Controller** for the external **[AI Log Reporter Integration](../integrations/ai_reporter.md)**.
20
-
1. It provides the **Template Sensor** to display the summary.
21
-
2. It handles the **Scheduling** (7:00 AM) and **SSH Connection** logic to trigger the remote analysis.
19
+
The **AI Summary** package serves as the Home Assistant-side controller for the **[AI Log Reporter Integration](../integrations/ai_reporter.md)**. It manages the scheduling, triggering, and data ingestion of daily system reports generated by a remote AI agent. This package ensures that the heavy lifting of log analysis is offloaded to a dedicated Docker container while keeping the results fully integrated into the Home Assistant dashboard via native sensors and notifications.
This system runs automatically every morning at 7:00 AM.
25
+
1.**Trigger:** The system wakes up and sends a "Start" command to a remote server.
26
+
2.**Analysis:** The remote server (running a specialized AI Reporter) reads the logs from the past 24 hours. It looks for errors, warnings, and unusual patterns.
27
+
3.**Reporting:** Once finished, the remote server sends a summary back to Home Assistant.
28
+
4.**Notification:** You receive a notification on your phone (and a persistent message in the dashboard) summarizing the health of your smart home.
27
29
<!-- END_DETAILED -->
28
30
29
31
## Dashboard Connections
@@ -33,22 +35,30 @@ This package acts as the **Frontend** and **Controller** for the external **[AI
33
35
34
36
## Architecture Diagram
35
37
<!-- START_MERMAID_DESC -->
36
-
The diagram below illustrates the hand-off between this Home Assistant package and the external Docker container. For full implementation details of the remote system, see the **[AI Reporter Integration](../integrations/ai_reporter.md)** documentation.
38
+
The sequence diagram below details the interaction between the local Home Assistant instance and the remote **AI Log Reporter**. The process is initiated by a time-based trigger (7:00 AM) or a manual script invocation. Home Assistant opens a secure SSH tunnel to the remote host (`10.0.0.23`) and executes a Docker command (`docker exec`). The `ai-log-reporter` container processes the logs and, upon completion, fires an asynchronous event (`update_ai_summary`) back to the Home Assistant API. This event payload is captured by a Template Trigger, which updates the permanent `sensor.daily_system_summary`.
37
39
<!-- END_MERMAID_DESC -->
38
40
39
41
<!-- START_MERMAID -->
40
42
```mermaid
41
43
sequenceDiagram
42
44
participant Sched as ⏰ Schedule
43
-
participant Script as 📜 Script
45
+
participant Script as 📜 Script: run_ai_summary_now
44
46
participant SSH as 🔐 SSH Tunnel
45
-
participant Remote as 📦 Remote Integration
47
+
participant Remote as 📦 Docker: ai-log-reporter
48
+
participant API as 📡 HA API
49
+
participant Sensor as 🧠 Sensor: daily_system_summary
0 commit comments