Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions MMM-MessageCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},

Expand Down
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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
Expand Down
17 changes: 9 additions & 8 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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;
Expand All @@ -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

Expand Down Expand Up @@ -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.
14 changes: 1 addition & 13 deletions test/MMM-MessageCenter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down