From 613b23378140ff3bf3581afb4f9fa6d1c21db90e Mon Sep 17 00:00:00 2001 From: Brian Wente Date: Tue, 11 Aug 2026 13:33:52 -0400 Subject: [PATCH] Present MessageCenter as a MagicMirror module --- CHANGELOG.md | 3 +-- MMM-MessageCenter.js | 3 --- README.md | 18 +++++++----------- docs/ROADMAP.md | 17 +++++++++-------- test/MMM-MessageCenter.test.js | 14 +------------- 5 files changed, 18 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c2241b..b3455fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,7 @@ All notable changes to MMM-MessageCenter are documented in this file. - Optional ingestion-time image snapshots with full-page and compact presentation. - MagicMirror internal notification ingestion for weather and MMM-Remote-Control. - Toasts, semantic attention state, and optional MMM-pages channel routing. -- Integration-neutral attention-event configuration with compatibility for the - former Seymour-named option. +- Integration-neutral attention-event configuration for presentation adapters. - Inbox UI with urgency styling, read-state transitions, history controls, and MagicMirror locale and clock-format support. - Compact region-friendly presentation for standard MagicMirror layouts. diff --git a/MMM-MessageCenter.js b/MMM-MessageCenter.js index 71188ab..e18b5da 100644 --- a/MMM-MessageCenter.js +++ b/MMM-MessageCenter.js @@ -844,9 +844,6 @@ Module.register("MMM-MessageCenter", { }, shouldPublishLegacyAttentionEvents() { - if (typeof this.config.attention === "string") { - return this.config.attention === "seymour"; - } return this.config.legacyAttentionEvents !== false; }, diff --git a/README.md b/README.md index d05effc..17bfa3a 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ attention notifications, an optional inbox, and optional page routing through [MMM-pages](https://github.com/edward-shen/MMM-pages). MessageCenter does not control LEDs, speakers, GPIO, or other hardware. It -publishes message and attention intent; integrations such as MMM-Seymour decide -how that intent should be presented. +publishes message and attention intent so any MagicMirror module or external +integration can decide how that intent should be presented. ## Design principles @@ -43,7 +43,7 @@ npm install --omit=dev ### Standard MagicMirror region Compact mode is designed for an ordinary MagicMirror region and does not -require MMM-pages, Seymour, or any hardware integration: +require MMM-pages or any hardware integration: ```js { @@ -527,14 +527,10 @@ It also emits `MESSAGE_CENTER_ATTENTION_CHANGED` with `active`, `unreadCount`, structured event is the preferred contract for new integrations; the legacy events remain available for compatibility. -These are ordinary MagicMirror notifications; MessageCenter does not control -WLED or depend on a particular lighting implementation. MMM-Seymour may consume -them as one attention source alongside Home Assistant, calendar, or other -modules. - -The former `attention: "seymour"` setting remains supported for existing -installations. New configurations should use the integration-neutral -`legacyAttentionEvents` option. +These are ordinary MagicMirror notifications. Any MagicMirror module may +consume them as an attention source, and external integrations can translate +the semantic state into lighting, sound, desktop notifications, or other +presentation without coupling that behavior to MessageCenter. Potential senders include Home Assistant, calendars, cameras, doorbells, weather services, household appliances, custom webhooks, and other MagicMirror diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index c5829c6..7cd0d60 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -7,9 +7,8 @@ job is to accept messages from many systems, apply consistent lifecycle and routing policy, and publish semantic state that any UI or hardware adapter may present. -Seymour is the first appliance integration, not a requirement. A vanilla -MagicMirror installation should be able to use the inbox and toast behavior with -all hardware integrations disabled. +A standard MagicMirror installation should be able to use the inbox and toast +behavior with all optional hardware integrations disabled. ## Product boundary @@ -32,8 +31,8 @@ MessageCenter does not own: - Home Assistant entity implementation; - the physical form or interaction model of a particular appliance. -Those responsibilities belong to adapters such as MMM-Seymour, Home Assistant -automations, camera providers, or future sound and desktop-notification modules. +Those responsibilities belong to Home Assistant automations, camera providers, +lighting adapters, or future sound and desktop-notification modules. ## Current message contract @@ -163,7 +162,7 @@ credentials and transport details must not leak into the core schema. The built-in inbox and MagicMirror toast notification are the first presentation surfaces. Future adapters may include: -- Seymour WLED status and attention patterns; +- lighting status and attention patterns; - audio cues and spoken alerts; - screen-edge or full-screen critical effects; - desktop and mobile notifications; @@ -185,7 +184,8 @@ producers merely to control hardware. - user navigation cancels automatic return (implemented); - built-in inbox with unread treatment and bulk acknowledgement (implemented); - compact region-friendly inbox presentation (implemented); -- confirmed Home Assistant delivery on Seymour (implemented). +- confirmed Home Assistant delivery on a physical MagicMirror installation + (implemented). ### Phase 2 — appliance UX and lifecycle @@ -229,6 +229,7 @@ When evaluating roadmap work: 3. Keep the message contract independent of hardware and page implementations. 4. Prefer semantic state over device commands. 5. Preserve backward compatibility or document an intentional migration. -6. Validate changes on the physical Seymour display as well as in unit tests. +6. Validate changes on representative physical MagicMirror displays as well as + in unit tests. 7. Treat this roadmap as revisable evidence of direction, not a promise that every exploratory feature will ship. diff --git a/test/MMM-MessageCenter.test.js b/test/MMM-MessageCenter.test.js index a2b1a4e..6e99caa 100644 --- a/test/MMM-MessageCenter.test.js +++ b/test/MMM-MessageCenter.test.js @@ -1080,19 +1080,7 @@ test("can disable automatic page actions", () => { assert.equal(module.notifications.some(({ name }) => name === "PAGE_CHANGED"), false); }); -test("can disable Seymour attention notifications", () => { - const module = instance({ attention: "none", showToasts: false }); - - module.socketNotificationReceived("MC_MESSAGE", { - title: "Stored only", - priority: "attention" - }); - - assert.equal(module.unreadAttentionCount, 1); - assert.equal(module.notifications.some(({ name }) => name === "ATTENTION_ON"), false); -}); - -test("uses an integration-neutral switch for compatibility attention events", () => { +test("can disable compatibility attention events", () => { const module = instance({ legacyAttentionEvents: false, showToasts: false }); module.socketNotificationReceived("MC_MESSAGE", {