Skip to content

feat(monitoring): add a Monitoring tab with notices and learned values - #291

Merged
Developer-Simon merged 27 commits into
prereleasefrom
feat/monitoring
Nov 22, 2026
Merged

Developer-Simon merged 27 commits into
prereleasefrom
feat/monitoring

Conversation

@Developer-Simon

Copy link
Copy Markdown
Owner

Squash-merge commit message

A new Monitoring tab collects the notices about energy, measurement chains and learning in one place, with an acknowledgement and recommended steps, and shows every learned value.

Notices come from the energy balance (house load measured without a house meter, battery level without capacity, power values without a role, values left without a role by a chain), from the findings of the measurement chains and from learning findings that have no rule and nothing to apply, such as a fixed shade in the PV curve. Each notice has a stable ID, so a first-seen time and the acknowledgement survive restarts. An ID that disappears keeps its state for one hour. Acknowledging is stored per node in autolearn/monitoring.json, needs the setup right and is part of the backup. Each step jumps to the right place: the role table with the rows marked, a measurement chain, efficiency or the device map. The second view lists all learned values by system and device, with the course as a small curve.

The energy page keeps a single summary line that never vanishes silently and links to the tab. The dot on the Automations tab now counts only findings that have a rule.

New right view_monitoring (users.json version 9), granted to everyone who has view_energy or view_automations, allowed for guests and Home Assistant accounts. GET /api/v1/monitoring and POST /api/v1/monitoring/ack are documented in docs/developing/api.md. The wide tabs setting now also offers Efficiency and Monitoring.

Known limits: the old notice blocks of the energy page are gone, but their getters and CSS stay because tests still read them. The demo paragraph in demo/README.md describes the seeded notices as planned.

Highlights:
- A Monitoring tab with notices, acknowledgement and all learned values

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>

Highlight translations

Highlights (de):
- Ein Reiter Monitoring mit Meldungen, Quittung und allen Lernwerten

Tour

{
  "*": {
    "steps": [
      {
        "device": "any",
        "need": "view_monitoring",
        "target": "monitoring-tab",
        "title": {
          "en": "The Monitoring tab",
          "de": "Der Reiter Monitoring"
        },
        "text": {
          "en": "Monitoring gathers the notices about the energy balance, the measurement chains and the learning in one place. A dot on the tab shows that something new is waiting.",
          "de": "Monitoring sammelt die Meldungen zur Energie-Bilanz, zu den Messketten und zum Lernen an einer Stelle. Ein Punkt am Reiter zeigt, dass etwas Neues wartet."
        }
      },
      {
        "device": "any",
        "need": "view_monitoring",
        "panel": "monitoring-panel",
        "target": "monitoring-list",
        "title": {
          "en": "Notices and acknowledgement",
          "de": "Meldungen und Quittung"
        },
        "text": {
          "en": "Each notice lists the recommended steps, and a step jumps to the right place. With the setup right you mark a notice as acknowledged, it then moves below the new ones.",
          "de": "Jede Meldung nennt empfohlene Schritte, und ein Schritt springt an die passende Stelle. Mit dem Recht Einrichten nimmst du eine Meldung zur Kenntnis, sie rutscht dann unter die neuen."
        }
      },
      {
        "device": "any",
        "need": "view_monitoring",
        "open": ["monitoring-learned"],
        "panel": "monitoring-panel",
        "target": "monitoring-learned",
        "title": {
          "en": "All learned values",
          "de": "Alle Lernwerte"
        },
        "text": {
          "en": "The second view shows everything the node has learned, grouped by system and device, and what a value still needs while it is missing.",
          "de": "Die zweite Ansicht zeigt alles, was der Knoten gelernt hat, nach Anlage und Gerät, und was einem Wert noch fehlt, solange er fehlt."
        }
      }
    ]
  }
}

Summary

A new Monitoring tab collects the notices about energy, measurement chains and learning in one place, with an acknowledgement and recommended steps, and shows every learned value.

Checks

  • The title is a Conventional Commits subject.
  • scripts/dev/check_tracked_secrets.sh is clean.
  • AI assistance disclosed per AI-DISCLAIMER.md: Claude Sonnet 5.5
  • Suites run locally: go test, go vet, npm test, pytest, smoke
  • Linked issue: none

Developer-Simon and others added 27 commits November 22, 2026 13:21
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Version 9 of users.json grants view_monitoring to every account, guest
preset and HA preset that has view_energy or view_automations (migrateV8),
and the defaults for guests and HA users include it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds GET /api/v1/monitoring with the notices, the count of new notices and
the learned values, and POST /api/v1/monitoring/ack to acknowledge or take
back a notice. Reading needs view_monitoring, acknowledging also needs
edit_setup. The learned values are built by the same helper as
GET /api/v1/automations/learned.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The dashboard collects monitoring notices every learning minute and on
each request, keeps first-seen times and acknowledgements in
autolearn/monitoring.json, and serves the learned values with device
name and icon.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pure page model for the monitoring view: source and filter, sort and
group notices, since text, titles, texts, facts, steps with rights,
compass and week ranges. Part A of the model, learned values follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds learnedGroups, valueText and spark: site values with fixed keys,
device values by name in a fixed order, value texts and the year line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Template-literal keys keep the catalog scanner from reading prefixes as keys.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Template, stylesheet and Alpine component of the monitoring page, with
its JS test for loading, acknowledging and the acknowledge right.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The energy page replaces its notice strip and chain finding tiles with a
summary line. The line counts the notices about energy and chains from
GET /api/v1/monitoring, marks the unacknowledged ones as new, and opens
the monitoring page filtered to energy. It stays hidden without the
monitoring tab. A monitoring-goto event focuses rows and opens a chain.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A monitoring jump now also leaves its focus rows and chain in the window
flags, so the energy page applies it in load() even when the panel was
never opened before. The goto listener takes the flags when the page is
mounted, so the request runs once. The summary line counts again on
monitoring-changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the Monitoring page to the dashboard docs and its index entry, a
monitoring paragraph in the demo README, and a smoke check group
(checks/monitoring.sh) that reads /api/v1/monitoring as admin, acknowledges
and takes back the first notice, and expects 403 on the acknowledge POST
for an account with view_monitoring but without edit_setup.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Developer-Simon
Developer-Simon merged commit 7ae50a9 into prerelease Nov 22, 2026
20 checks passed
@Developer-Simon
Developer-Simon deleted the feat/monitoring branch November 22, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant