This plugin allows you to create a security system.
- Five preconfigured modes: Home, Away, Night, Vacation, Off.
- Five preconfigured setters: Home, Away, Night, Vacation, Off.
- Four preconfigured triggers: Home, Away, Night, 24h.
- Five preconfigured alerts: Home, Away, Night, 24h, Master.
- Persistent history of mode changes, accepted triggers, startups and shutdowns, with timestamps and a configurable event limit (default: 100).
- Color-coded frontend event table with local date and time display.
The plugin requires matterbridge v.3.11.0.
| Mode | Use |
|---|---|
| Home | Standard mode when you are at home. |
| Away | Use when nobody is home (full protection). |
| Night | Use at night (typically perimeter/partial protection). |
| Vacation | Same as Away; useful for extended absences and light automations. |
| Off | Disables the security system. |
Each mode is exclusive: the other will revert their state.
Mode vacation works exactly like mode away. Is useful to create on the controller some automations that turn on and off internal lights when you are on vacation.
| Setter | Use |
|---|---|
| Home | Sets the system mode to Home. |
| Away | Sets the system mode to Away. |
| Night | Sets the system mode to Night. |
| Vacation | Sets the system mode to Vacation. |
| Off | Sets the system mode to Off. |
Setters will set the corresponding mode and will revert immediately their state.
Is usefull when the controller doesn't allow to lock unlock doors from presence automations. They are enabled by the useSetters config.
Triggers are momentary switches you can use in your controller automations to start an alarm.
| Trigger | Use |
|---|---|
| Home | Triggers the alarm associated with Home. |
| Away | Triggers the alarm associated with Away. |
| Night | Triggers the alarm associated with Night. |
| 24h | Triggers the alarm associated with 24h. |
Triggers will trigger the corresponding alarm and will revert immediately their state.
On your controller you need to create an automation that trigger each trigger.
Alerts are the alarm states exposed by the plugin; they stay active for the configured alertTimeout and then reset.
| Alert | Use |
|---|---|
| Home | Alert state for Home. |
| Away | Alert state for Away. |
| Night | Alert state for Night. |
| 24h | Alert state for 24h. |
| Master | General alert state (not tied to a specific mode). |
The platform's events array contains the latest security events, oldest first. Set eventsNumber in the plugin configuration to an integer from 10 to 1000 to control how many events are retained (default: 100). Existing configurations without this option default to 100 on startup. History is saved in plugin storage under SecurityEvents and restored on startup.
The plugin frontend displays all retained events, oldest first, with color-coded event types and dates formatted for your browser's locale and timezone. Use Refresh to load the latest events. Timestamps remain in ISO format in storage and in the plugin's GET /plugins/matterbridge-security/api/events response.
Trigger events are displayed as Alarm in the frontend (for example, Alarm Away). Stored events and the API retain the trigger type and original trigger names.
Each entry contains datetime (an ISO 8601 UTC timestamp), event (the mode or trigger name, Startup, or Shutdown), and type (mode, trigger, startup, or shutdown).
- Mode events are recorded only when the mode changes, including changes to Off. Restoring the mode on startup does not add a mode event.
- Trigger events are recorded only when a trigger activates alerts in the current mode. Ignored triggers and automatic alert resets do not add events.
- Startup events are recorded after initialization completes. Shutdown events are saved before plugin storage closes.
{ "datetime": "2026-10-17T17:38:25.632Z", "event": "Mode Away", "type": "mode" }See also the Style Guide for JSDoc, naming, and logging conventions used in this repository.
Note: This repository uses a new toolchain. It replaces the traditional TypeScript / ESLint / Prettier / Jest stack with a faster and lighter setup.
- No
typescript 6.xpackage — replaced by TypeScript Native 7.x. - No ESLint, no Prettier — replaced by the oxc stack: oxlint for linting and oxfmt for formatting.
- No Jest — replaced by Vitest, which is much faster and natively supports ESM without extra configuration.
- Far fewer development dependencies — the number of installed packages drops from ~600 to ~75. A clean install is much faster.
- Much faster linting and formatting — oxlint and oxfmt run in a fraction of the time required by the ESLint / Prettier pipeline.
- Much faster builds — tsgo compiles the project in a fraction of the time required by the standard
tscbuild. - Editor support — use the VS Code extensions for tsgo and oxc to get the same experience in the editor.
All coding agents read the same guidance. AGENTS.md and .agents/ are the single source of truth; everything under .github/, .claude/, .codex/ and .antigravity/ are pointers and mirrors. Edit .agents/ (or AGENTS.md), never the copies. See .agents/README.md for the full layout.
| File | Notes |
|---|---|
AGENTS.md |
Main project instructions — shared by every agent |
.agents/README.md |
Layout and versioning of the shared instructions |
.agents/rules/testing.instructions.md |
Testing standards for unit tests |
.agents/rules/matterbridge.instructions.md |
Creating endpoints and using the single-class devices |
.agents/rules/plugin-frontend.instructions.md |
Serving a plugin's own frontend SPA and REST API |
.agents/rules/chip-tests.instructions.md |
The CHIP conformance test harness |
.agents/skills/verify-agent-context/SKILL.md |
Verify the agent loaded this context — $verify-agent-context (Codex), /verify-agent-context (all others) |
Content lives only in .agents/. The per-agent folders exist because each tool discovers rules and skills from its own hardcoded location, so they hold stubs that point back here — except where the tool reads .agents/ natively.
| Tool | Instructions | Rules | Skills |
|---|---|---|---|
| Codex | AGENTS.md — read natively |
.agents/rules/ — linked from AGENTS.md, on demand |
.agents/skills/ — native, $verify-agent-context |
| Copilot (VS Code and coding agent) | .github/copilot-instructions.md → AGENTS.md |
stubs in .github/instructions/ — applyTo globs |
stub in .github/skills/ — /verify-agent-context |
| Claude Code | CLAUDE.md imports AGENTS.md |
stubs in .claude/rules/ — paths globs |
stub in .claude/skills/ — /verify-agent-context |
| Gemini / Antigravity | GEMINI.md imports AGENTS.md |
.agents/rules/ — on demand |
.agents/skills/ — native, /verify-agent-context |
| File | Notes |
|---|---|
.github/copilot-instructions.md |
Pointer to AGENTS.md — always loaded |
.github/instructions/chip-tests/chip-tests.instructions.md |
CHIP conformance test harness — scoped to CHIP test files |
.github/instructions/matterbridge/matterbridge.instructions.md |
Matterbridge endpoint guide — dedicated Copilot instruction file |
.github/instructions/plugin-frontend/plugin-frontend.instructions.md |
Plugin frontend SPA and custom REST API guide — scoped to frontend and plugin code |
.github/instructions/testing/testing.instructions.md |
Testing standards — scoped to **/*.test.ts |
.github/skills/verify-agent-context/SKILL.md |
Skill invocable as /verify-agent-context |
| File | Notes |
|---|---|
CLAUDE.md |
Pointer to AGENTS.md — always loaded |
.claude/settings.json |
Claude permissions: allow, ask and deny rules |
.claude/rules/chip-tests/chip-tests.instructions.md |
CHIP conformance test harness — scoped to CHIP test files |
.claude/rules/matterbridge/matterbridge.instructions.md |
Matterbridge endpoint guide — loaded for all contexts |
.claude/rules/plugin-frontend/plugin-frontend.instructions.md |
Plugin frontend SPA and custom REST API guide — scoped to frontend and plugin code |
.claude/rules/testing/testing.instructions.md |
Testing standards — scoped to **/*.test.ts |
.claude/skills/verify-agent-context/SKILL.md |
Skill invocable as /verify-agent-context |
| File | Notes |
|---|---|
AGENTS.md |
Main project instructions — read directly, no pointer file needed |
.codex/config.toml |
Codex project permissions, approvals, and profile |
.codex/rules/default.rules |
Codex command allow, prompt, and deny rules |
Codex reads the shared rules and skills from .agents/ directly; the skill is invoked as $verify-agent-context.
| File | Notes |
|---|---|
GEMINI.md |
Pointer to AGENTS.md — always loaded |
.antigravity/settings.json |
Sandboxing and permissions: allow, ask and deny rules |
The shared rules under .agents/rules/ apply on demand for the relevant tasks, and .agents/skills/ is discovered automatically as /verify-agent-context.
Refer to the Matterbridge Development guide for other guidelines.
