Repository navigation
feat(monitoring): add a Monitoring tab with notices and learned values - #291
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Squash-merge commit message
Highlight translations
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
scripts/dev/check_tracked_secrets.shis clean.