Add OpenRGB reconnect and retry behavior #36

Merged
JackFrostbyte merged 1 commit from feature/v0.6-issue-16-openrgb-retry into main 2026-05-09 21:28:01 -04:00

Summary

Implements issue #16 by adding limited OpenRGB reconnect/retry behavior and safer runtime disconnect handling.

Changes

  • Added finite OpenRGB startup retry behavior:
    • 3 connection attempts
    • 2-second delay between attempts
    • clear logging for each failed attempt
  • Preserved clear failure behavior for mapping validation errors.
  • Preserved clear failure behavior for runtime config errors.
  • Added cleaner handling for OpenRGB disconnects during runtime.
  • Runtime OpenRGB connection failures now exit safely with code 3 instead of producing a messy traceback.
  • Improved blank disconnect error logging with no additional details.
  • Kept dry-run preview hardware-free.

Validation

Tested successfully:

  • Ruff formatting:
    • ruff format src/rgb_aura
  • Ruff linting:
    • ruff check src/rgb_aura scripts tests
  • Dry-run regression:
    • PYTHONPATH=src python -m rgb_aura.main --dry-run --dry-run-events 14 --animation-speed 1.25
    • confirmed OpenRGB connection and RGB writes were skipped
  • OpenRGB unavailable startup test:
    • stopped app-OpenRGB@autostart.service
    • confirmed 3 connection attempts
    • confirmed clean exit code 3
    • confirmed no traceback
  • Normal runtime test:
    • PYTHONPATH=src python -m rgb_aura.main --duration 20 --animation-speed 1.25
    • confirmed clean exit code 0
  • Runtime disconnect test:
    • started RGB Aura
    • stopped OpenRGB SDK service during runtime
    • confirmed clean disconnect handling
    • confirmed exit code 3
    • confirmed no traceback
    • confirmed improved log message:
      • OpenRGB connection error: OpenRGBDisconnected: no additional details

Scope notes

  • Does not implement systemd user service behavior.
  • Does not add documentation.
  • Does not rewrite animation visuals.
  • Does not change dry-run behavior.
  • Does not enable the reserved ARGB zone.

Closes #16

## Summary Implements issue #16 by adding limited OpenRGB reconnect/retry behavior and safer runtime disconnect handling. ## Changes - Added finite OpenRGB startup retry behavior: - 3 connection attempts - 2-second delay between attempts - clear logging for each failed attempt - Preserved clear failure behavior for mapping validation errors. - Preserved clear failure behavior for runtime config errors. - Added cleaner handling for OpenRGB disconnects during runtime. - Runtime OpenRGB connection failures now exit safely with code `3` instead of producing a messy traceback. - Improved blank disconnect error logging with `no additional details`. - Kept dry-run preview hardware-free. ## Validation Tested successfully: - Ruff formatting: - `ruff format src/rgb_aura` - Ruff linting: - `ruff check src/rgb_aura scripts tests` - Dry-run regression: - `PYTHONPATH=src python -m rgb_aura.main --dry-run --dry-run-events 14 --animation-speed 1.25` - confirmed OpenRGB connection and RGB writes were skipped - OpenRGB unavailable startup test: - stopped `app-OpenRGB@autostart.service` - confirmed 3 connection attempts - confirmed clean exit code `3` - confirmed no traceback - Normal runtime test: - `PYTHONPATH=src python -m rgb_aura.main --duration 20 --animation-speed 1.25` - confirmed clean exit code `0` - Runtime disconnect test: - started RGB Aura - stopped OpenRGB SDK service during runtime - confirmed clean disconnect handling - confirmed exit code `3` - confirmed no traceback - confirmed improved log message: - `OpenRGB connection error: OpenRGBDisconnected: no additional details` ## Scope notes - Does not implement systemd user service behavior. - Does not add documentation. - Does not rewrite animation visuals. - Does not change dry-run behavior. - Does not enable the reserved ARGB zone. Closes #16
JackFrostbyte deleted branch feature/v0.6-issue-16-openrgb-retry 2026-05-09 21:28:01 -04:00
Sign in to join this conversation.
No reviewers
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!36
No description provided.