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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 5

- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
open-pull-requests-limit: 5
41 changes: 41 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributor Covenant Code of Conduct

## Our pledge

We pledge to make participation in this project a harassment-free experience
for everyone, regardless of age, body size, disability, ethnicity, sex
characteristics, gender identity and expression, level of experience,
education, socioeconomic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our standards

Examples of behavior that contributes to a positive environment include:

- Demonstrating empathy and kindness toward other people.
- Being respectful of differing opinions, viewpoints, and experiences.
- Giving and gracefully accepting constructive feedback.
- Accepting responsibility and apologizing to those affected by mistakes.
- Focusing on what is best for the overall community.

Unacceptable behavior includes harassment, insulting or derogatory comments,
personal or political attacks, and publishing another person's private
information without explicit permission.

## Enforcement

Project maintainers are responsible for clarifying and enforcing these
standards. Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported privately through the maintainer contact options on the
[GitHub profile](https://github.com/bwente). All reports will be reviewed and
investigated promptly and fairly.

Maintainers will respect the privacy and security of reporters.

## Attribution

This Code of Conduct is adapted from the
[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
50 changes: 28 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ MessageCenter does not control LEDs, speakers, GPIO, or other hardware. It
publishes message and attention intent so any MagicMirror module or external
integration can decide how that intent should be presented.

## Project status

MMM-MessageCenter is released and ready for everyday use. Its core MagicMirror
notification support requires no external service, account, API key, or special
hardware. Home Assistant, MQTT, camera snapshots, and other integrations are
optional and are configured separately by the user.

## Design principles

- One normalized entry point for household notifications.
Expand All @@ -27,12 +34,23 @@ integration can decide how that intent should be presented.

## Installation

From the MagicMirror `modules` directory:
Install from the MagicMirror directory:

```sh
cd ~/MagicMirror/modules
git clone https://github.com/bwente/MMM-MessageCenter.git
cd MMM-MessageCenter
npm install --omit=dev
npm ci --omit=dev
```

## Update

Update an existing installation from the module directory:

```sh
cd ~/MagicMirror/modules/MMM-MessageCenter
git pull
npm ci --omit=dev
```

## Configuration
Expand All @@ -51,7 +69,7 @@ require MMM-pages or any hardware integration:
compactMaxMessages: 3,
pages: false
}
}
},
```

It shows the newest messages in a narrow region, uses time-only metadata, and
Expand Down Expand Up @@ -121,25 +139,13 @@ interactive browser installations. Other modules can always use `MC_ACK_ALL`,
allowHttp: false
}
}
}
},
```

Place the module class on the corresponding MMM-pages page:

```js
{
module: "MMM-pages",
config: {
modules: [
["page-0"],
["page-1"],
["page-2"],
["page-3"],
["message-center-page"]
]
}
}
```
When using MMM-pages, add `"message-center-page"` to the desired page in that
module's `modules` configuration. See the
[MMM-pages configuration guide](https://github.com/edward-shen/MMM-pages#configuration)
for its complete page layout syntax.

| Option | Type | Default | Description |
| --- | --- | --- | --- |
Expand Down Expand Up @@ -209,7 +215,7 @@ rendered newest entries; `maxMessages` remains the hard queue limit.
maxVisibleMessages: 6,
clearAttentionWhenViewed: true
}
}
},
```

## MagicMirror internal notifications
Expand Down Expand Up @@ -347,7 +353,7 @@ curl http://127.0.0.1:8787/message \
Home Assistant messages share the same inbox and attention model, whether they
contain a simple household update or a cached camera snapshot:

![Home Assistant appliance and doorbell notifications in the MessageCenter inbox](docs/images/home-assistant-notifications.png)
![Home Assistant appliance and doorbell notifications in the MessageCenter inbox](docs/images/screenshot-home-assistant-notifications.png)

The default configuration accepts requests only from software running on the
mirror. To receive webhooks from Home Assistant or another LAN system, opt in
Expand Down
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { defineConfig } = require("eslint/config");

module.exports = defineConfig([
{
ignores: ["node_modules/**"]
},
{
files: ["**/*.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "commonjs"
},
rules: {
"no-constant-condition": ["error", { checkLoops: false }],
"no-dupe-keys": "error",
"no-unreachable": "error"
}
}
]);
Loading