[Design] Modular Event-Driven Alert and Notification System #99

Open
opened 2026-09-27 21:36:09 -04:00 by JackFrostbyte · 0 comments

Objective

Design a modular, event-driven alert and notification system for RGB Aura that allows external applications, scripts and system services to trigger temporary RGB effects.

The system should integrate with RGB Aura's existing animation engine and OpenRGB infrastructure without interfering with normal operation.

This issue covers the architecture, technical specifications, configuration design and implementation planning. Actual implementation will be divided into separate issues under a dedicated milestone.

1. Background and motivation

RGB Aura currently focuses on controlling RGB devices through predefined configurations and animations.

An event-driven notification system would extend its functionality by allowing external events to temporarily modify RGB output, turning existing RGB hardware into a visual notification system.

Initial use cases include:

  • EVE Online: Flash designated RGB devices when an alliance fleet notification arrives through Pidgin, provided EVE Online is running.
  • Homelab monitoring: Display notifications originating from IPFire, Proxmox or other monitoring services.
  • Desktop notifications: React to selected system or application events.
  • Custom automation: Allow users to trigger RGB alerts directly from shell scripts, Python applications or other automation tools.

The design must remain application-agnostic. RGB Aura should not contain application-specific notification detection logic.

Instead, external integrations should submit standardized events through a documented interface.

2. Proposed architecture

The system should consist of three independent layers.

A. Event sources

External integrations are responsible for detecting events and determining whether an alert should be generated.

Examples include:

  • Pidgin notification listener
  • Custom Python scripts
  • Shell scripts
  • Monitoring services
  • Optional desktop notification integrations

Event sources should communicate through a standardized local interface.

Event detection and application-specific filtering must remain outside the core RGB Aura animation engine.

B. Alert Manager

Introduce a dedicated component responsible for receiving, validating, prioritizing and managing alert requests.

Responsibilities should include:

  • Event reception and validation.
  • Alert identification and configuration lookup.
  • Priority management.
  • Alert activation and expiration.
  • Repeated-event handling and cooldowns.
  • Concurrent alert management.
  • Device and zone targeting.
  • Coordination with the existing animation engine.
  • Restoration of normal RGB operation.

The Alert Manager must remain independent of individual event sources.

C. Animation integration

The existing RGB Aura animation engine should remain responsible for communicating with OpenRGB and controlling devices.

The Alert Manager should request temporary visual overrides through a controlled internal interface.

Independent modules should not compete for direct control of OpenRGB devices.

Normal animations must resume automatically when alerts expire.

3. Design requirements

3.1 Event interface

Evaluate possible communication mechanisms, including:

  • Unix domain sockets.
  • Local D-Bus interface.
  • Other lightweight local IPC mechanisms.

The preferred solution should be secure, simple to maintain, suitable for a systemd user service and easily accessible from Python and shell scripts.

The initial design should not require a network-accessible API.

Define a standardized event schema that can support:

  • Event identifier and source.
  • Alert type or configured profile.
  • Priority.
  • Optional message and metadata.
  • Optional duration or other permitted overrides.

Document input validation, authorization and any limitations.

3.2 Alert configuration

Design a configuration format that allows users to define reusable notification profiles.

Consider supporting:

  • Unique alert identifiers.
  • Descriptive names.
  • Enabled/disabled state.
  • Priority levels.
  • RGB colours.
  • Visual effects (solid, flashing, pulsing, etc.).
  • Animation speed.
  • Duration.
  • Cooldown.
  • Target devices or zones.
  • Repeated-event behaviour.

Determine which parameters should be configurable globally and which should be defined per alert.

Reuse existing RGB Aura configuration conventions wherever practical.

3.3 Priority and concurrent alerts

Define deterministic rules for handling multiple simultaneous alerts.

Questions to resolve:

  • Should higher-priority alerts interrupt lower-priority alerts?
  • Should interrupted alerts resume?
  • Should alerts be queued, discarded or replaced?
  • How should identical repeated events behave?
  • Should an active alert be extended when triggered again?
  • Should different devices be capable of displaying independent alerts simultaneously?

The initial implementation should favour predictable behaviour over unnecessary complexity.

3.4 Animation interruption and restoration

Design a mechanism that allows temporary alerts to override normal RGB output without disrupting the existing animation engine.

Requirements:

  • Avoid concurrent writes to the same OpenRGB device or zone.
  • Preserve the necessary animation state.
  • Automatically resume normal animations after an alert.
  • Define behaviour when an alert is cancelled or interrupted.
  • Handle disconnected devices and OpenRGB communication failures.
  • Ensure that a malfunctioning external integration cannot permanently interrupt normal animations.

Special attention should be given to maintaining compatibility with existing RGB Aura device discovery and OpenRGB resilience mechanisms.

3.5 Device and zone targeting

Investigate how notifications should target RGB hardware.

Potential capabilities:

  • All configured devices.
  • Specific devices.
  • Individual RGB zones.
  • Groups of devices.
  • Independent notifications on different devices.

The design should leverage existing RGB Aura device mappings and avoid duplicating device-discovery functionality.

3.6 Reliability and resource management

The notification system should be lightweight and suitable for continuous background operation.

Consider:

  • Event-driven processing instead of unnecessary polling.
  • Queue-size limits and event rate limiting.
  • Alert cooldowns.
  • Handling malformed events.
  • Behaviour during OpenRGB restarts.
  • Behaviour when RGB Aura restarts.
  • Logging and debugging.
  • Optional notification subsystem enable/disable setting.

The notification system must not compromise normal RGB Aura operation when no alerts are active.

3.7 Security

Define an appropriate trust boundary for external integrations.

Requirements should include:

  • Local-only communication by default.
  • No privileged execution.
  • Input validation.
  • Appropriate IPC permissions.
  • Restrictions on externally supplied parameters.
  • Protection against excessive or malformed events.

Evaluate whether external applications should trigger only predefined alert profiles rather than submitting arbitrary animation instructions.

4. Reference integration: EVE Online fleet notifications

Use EVE Online as the initial reference scenario to validate the proposed architecture.

Expected behaviour:

  1. An external integration monitors incoming Pidgin messages.
  2. The integration identifies relevant alliance fleet notifications.
  3. It checks whether EVE Online is running.
  4. If the configured conditions are satisfied, it submits an alert to RGB Aura.
  5. RGB Aura temporarily activates the configured notification effect.
  6. Normal RGB animations resume when the alert expires.

This integration is intended as a proof of concept and should eventually have its own implementation issue.

Its application-specific detection logic must remain outside the RGB Aura core.

5. Proposed implementation phases

The design should produce a set of implementation issues grouped under a dedicated milestone.

Phase 1 — Notification infrastructure

  • Implement the selected event interface.
  • Introduce the Alert Manager.
  • Establish the internal interface with the existing animation engine.
  • Support one basic predefined alert.
  • Implement automatic animation restoration.

Phase 2 — Configuration and advanced alert management

  • Introduce configurable notification profiles.
  • Implement priority and concurrent-alert handling.
  • Support configurable effects and durations.
  • Implement appropriate device and zone targeting.
  • Introduce cooldown and repeated-event handling.

Phase 3 — Integrations and validation

  • Provide a documented Python integration example.
  • Provide a simple CLI or shell-script trigger.
  • Implement the EVE/Pidgin reference integration.
  • Validate interactions with the existing RGB Aura services.
  • Document configuration, examples and troubleshooting.

The precise issue breakdown and implementation order should be established during the design process.

6. Expected deliverables

This design issue should produce:

  • A documented system architecture.
  • A selected IPC mechanism with documented rationale.
  • A standardized event schema.
  • A proposed alert configuration format with examples.
  • Defined priority, interruption and restoration behaviour.
  • Defined device and zone targeting behaviour.
  • Documented security and reliability considerations.
  • A compatibility and integration strategy for the existing animation engine.
  • A dedicated development milestone.
  • Separate implementation issues with clear acceptance criteria.
  • An architecture decision record (ADR), if appropriate.

7. Acceptance criteria

This issue can be closed when:

  1. The proposed architecture has been reviewed and documented.
  2. Major technical decisions have been made and justified.
  3. The event interface and alert configuration format have been specified.
  4. Animation interruption, concurrency and recovery behaviours have been defined.
  5. Security and reliability requirements have been established.
  6. The implementation work has been divided into actionable, appropriately scoped issues.
  7. All implementation issues have been assigned to the dedicated milestone.

Out of scope: Implementing the Alert Manager, developing event-source integrations or changing the existing animation engine as part of this design issue.

# Objective Design a modular, event-driven alert and notification system for RGB Aura that allows external applications, scripts and system services to trigger temporary RGB effects. The system should integrate with RGB Aura's existing animation engine and OpenRGB infrastructure without interfering with normal operation. This issue covers the **architecture, technical specifications, configuration design and implementation planning**. Actual implementation will be divided into separate issues under a dedicated milestone. ## 1. Background and motivation RGB Aura currently focuses on controlling RGB devices through predefined configurations and animations. An event-driven notification system would extend its functionality by allowing external events to temporarily modify RGB output, turning existing RGB hardware into a visual notification system. Initial use cases include: - **EVE Online:** Flash designated RGB devices when an alliance fleet notification arrives through Pidgin, provided EVE Online is running. - **Homelab monitoring:** Display notifications originating from IPFire, Proxmox or other monitoring services. - **Desktop notifications:** React to selected system or application events. - **Custom automation:** Allow users to trigger RGB alerts directly from shell scripts, Python applications or other automation tools. The design must remain application-agnostic. RGB Aura should not contain application-specific notification detection logic. Instead, external integrations should submit standardized events through a documented interface. ## 2. Proposed architecture The system should consist of three independent layers. ### A. Event sources External integrations are responsible for detecting events and determining whether an alert should be generated. Examples include: - Pidgin notification listener - Custom Python scripts - Shell scripts - Monitoring services - Optional desktop notification integrations Event sources should communicate through a standardized local interface. Event detection and application-specific filtering must remain outside the core RGB Aura animation engine. ### B. Alert Manager Introduce a dedicated component responsible for receiving, validating, prioritizing and managing alert requests. Responsibilities should include: - Event reception and validation. - Alert identification and configuration lookup. - Priority management. - Alert activation and expiration. - Repeated-event handling and cooldowns. - Concurrent alert management. - Device and zone targeting. - Coordination with the existing animation engine. - Restoration of normal RGB operation. The Alert Manager must remain independent of individual event sources. ### C. Animation integration The existing RGB Aura animation engine should remain responsible for communicating with OpenRGB and controlling devices. The Alert Manager should request temporary visual overrides through a controlled internal interface. Independent modules should not compete for direct control of OpenRGB devices. Normal animations must resume automatically when alerts expire. ## 3. Design requirements ### 3.1 Event interface Evaluate possible communication mechanisms, including: - Unix domain sockets. - Local D-Bus interface. - Other lightweight local IPC mechanisms. The preferred solution should be secure, simple to maintain, suitable for a systemd user service and easily accessible from Python and shell scripts. The initial design should not require a network-accessible API. Define a standardized event schema that can support: - Event identifier and source. - Alert type or configured profile. - Priority. - Optional message and metadata. - Optional duration or other permitted overrides. Document input validation, authorization and any limitations. ### 3.2 Alert configuration Design a configuration format that allows users to define reusable notification profiles. Consider supporting: - Unique alert identifiers. - Descriptive names. - Enabled/disabled state. - Priority levels. - RGB colours. - Visual effects (solid, flashing, pulsing, etc.). - Animation speed. - Duration. - Cooldown. - Target devices or zones. - Repeated-event behaviour. Determine which parameters should be configurable globally and which should be defined per alert. Reuse existing RGB Aura configuration conventions wherever practical. ### 3.3 Priority and concurrent alerts Define deterministic rules for handling multiple simultaneous alerts. Questions to resolve: - Should higher-priority alerts interrupt lower-priority alerts? - Should interrupted alerts resume? - Should alerts be queued, discarded or replaced? - How should identical repeated events behave? - Should an active alert be extended when triggered again? - Should different devices be capable of displaying independent alerts simultaneously? The initial implementation should favour predictable behaviour over unnecessary complexity. ### 3.4 Animation interruption and restoration Design a mechanism that allows temporary alerts to override normal RGB output without disrupting the existing animation engine. Requirements: - Avoid concurrent writes to the same OpenRGB device or zone. - Preserve the necessary animation state. - Automatically resume normal animations after an alert. - Define behaviour when an alert is cancelled or interrupted. - Handle disconnected devices and OpenRGB communication failures. - Ensure that a malfunctioning external integration cannot permanently interrupt normal animations. Special attention should be given to maintaining compatibility with existing RGB Aura device discovery and OpenRGB resilience mechanisms. ### 3.5 Device and zone targeting Investigate how notifications should target RGB hardware. Potential capabilities: - All configured devices. - Specific devices. - Individual RGB zones. - Groups of devices. - Independent notifications on different devices. The design should leverage existing RGB Aura device mappings and avoid duplicating device-discovery functionality. ### 3.6 Reliability and resource management The notification system should be lightweight and suitable for continuous background operation. Consider: - Event-driven processing instead of unnecessary polling. - Queue-size limits and event rate limiting. - Alert cooldowns. - Handling malformed events. - Behaviour during OpenRGB restarts. - Behaviour when RGB Aura restarts. - Logging and debugging. - Optional notification subsystem enable/disable setting. The notification system must not compromise normal RGB Aura operation when no alerts are active. ### 3.7 Security Define an appropriate trust boundary for external integrations. Requirements should include: - Local-only communication by default. - No privileged execution. - Input validation. - Appropriate IPC permissions. - Restrictions on externally supplied parameters. - Protection against excessive or malformed events. Evaluate whether external applications should trigger only predefined alert profiles rather than submitting arbitrary animation instructions. ## 4. Reference integration: EVE Online fleet notifications Use EVE Online as the initial reference scenario to validate the proposed architecture. Expected behaviour: 1. An external integration monitors incoming Pidgin messages. 2. The integration identifies relevant alliance fleet notifications. 3. It checks whether EVE Online is running. 4. If the configured conditions are satisfied, it submits an alert to RGB Aura. 5. RGB Aura temporarily activates the configured notification effect. 6. Normal RGB animations resume when the alert expires. This integration is intended as a proof of concept and should eventually have its own implementation issue. Its application-specific detection logic must remain outside the RGB Aura core. ## 5. Proposed implementation phases The design should produce a set of implementation issues grouped under a dedicated milestone. **Phase 1 — Notification infrastructure** - Implement the selected event interface. - Introduce the Alert Manager. - Establish the internal interface with the existing animation engine. - Support one basic predefined alert. - Implement automatic animation restoration. **Phase 2 — Configuration and advanced alert management** - Introduce configurable notification profiles. - Implement priority and concurrent-alert handling. - Support configurable effects and durations. - Implement appropriate device and zone targeting. - Introduce cooldown and repeated-event handling. **Phase 3 — Integrations and validation** - Provide a documented Python integration example. - Provide a simple CLI or shell-script trigger. - Implement the EVE/Pidgin reference integration. - Validate interactions with the existing RGB Aura services. - Document configuration, examples and troubleshooting. The precise issue breakdown and implementation order should be established during the design process. ## 6. Expected deliverables This design issue should produce: - [ ] A documented system architecture. - [ ] A selected IPC mechanism with documented rationale. - [ ] A standardized event schema. - [ ] A proposed alert configuration format with examples. - [ ] Defined priority, interruption and restoration behaviour. - [ ] Defined device and zone targeting behaviour. - [ ] Documented security and reliability considerations. - [ ] A compatibility and integration strategy for the existing animation engine. - [ ] A dedicated development milestone. - [ ] Separate implementation issues with clear acceptance criteria. - [ ] An architecture decision record (ADR), if appropriate. ## 7. Acceptance criteria This issue can be closed when: 1. The proposed architecture has been reviewed and documented. 2. Major technical decisions have been made and justified. 3. The event interface and alert configuration format have been specified. 4. Animation interruption, concurrency and recovery behaviours have been defined. 5. Security and reliability requirements have been established. 6. The implementation work has been divided into actionable, appropriately scoped issues. 7. All implementation issues have been assigned to the dedicated milestone. **Out of scope:** Implementing the Alert Manager, developing event-source integrations or changing the existing animation engine as part of this design issue.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JackFrostbyte/rgb-aura#99
No description provided.