Skip to content

feat: birdnet-go, mqtt-notifications, on-air, pomodoro-timer ask for the screen in-process - #624

Merged
ChuckBuilds merged 1 commit into
mainfrom
feat/in-process-on-demand
Oct 5, 2026
Merged

ChuckBuilds merged 1 commit into
mainfrom
feat/in-process-on-demand

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

Summary

Core ChuckBuilds/LEDMatrix#768 (merged, 0577c807) added BasePlugin.request_on_demand(mode=None, duration=None, pinned=False) and end_on_demand(). They are safe from any thread and reach the display within a frame. These four plugins wrote the display_on_demand_request mailbox instead, which the display reads only once a second while its control socket is up and which a future core removes (core docs/IPC_CONTROL_SOCKET.md, stage 5).

Each plugin now:

  • calls the API when hasattr(self, "request_on_demand") / hasattr(self, "end_on_demand") holds;
  • writes the mailbox exactly as before when the method is missing (cores up to 3.8.0), answers None (no display in the process, or a full queue), or raises.
Plugin Version Where
birdnet-go 1.2.9 _trigger_on_demand (detection interrupt)
mqtt-notifications 1.2.9 _trigger_on_demand_display. A duration the core refuses (a string from the JSON) keeps the mailbox path, which parses it as before
on-air 1.2.15 _trigger_display ON / OFF
pomodoro-timer 1.3.11 _sync_pin, pin and release; still under state_lock, since both calls only queue

On new cores, on-air's OFF and pomodoro's release end only the plugin's own on-demand session. A mailbox stop ended any session, including one the user had started for another plugin.

ledmatrix_min_version is unchanged (the fallback keeps older cores working). The core APIs used are guarded by hasattr in an if, so no API_FIRST_VERSION row is needed. A None row isn't possible yet anyway: core main still reports 3.8.0, which is tagged, so UNTAGGED_SATISFIED_BY can't be satisfied. Core gained no src/ module, so MODULE_FIRST_VERSION is unchanged, and no sports mixins moved.

Tests

  • New plugins/birdnet-go/test_on_demand_api.py and plugins/on-air/test_on_demand_api.py. Extended mqtt-notifications/test_on_demand_trigger.py and pomodoro-timer/test_pomodoro_timer.py.
  • Each covers the mailbox path (no display or an old core) and the API path through the core's real PluginManager: no mailbox write, the request reaches the handler, and a refused or raising call falls back. The API half prints SKIP-PART on a core without it.
  • A hand mutation that disables the API branch in each plugin fails its test (4 of 4).
  • run_plugin_tests.py for the four plugins: 8 passed against core main before #768 and against a fresh core main clone after it (0577c807).
  • Every scripts/test_*.py (47) passes with LEDMATRIX_CORE set to that fresh clone.
  • Also run:
    • check_plugin.py safety harness: all four exit 0;
    • check_version_bump.py --base origin/main birdnet-go mqtt-notifications on-air pomodoro-timer: 4 PASS;
    • update_registry.py --check: PASS;
    • check_manifest_version_fields, check_manifests_ascii, check_core_api_signatures, check_min_core_version, check_module_collisions: all pass.

🤖 Generated with Claude Code

…the screen in-process

Core #768 added BasePlugin.request_on_demand() / end_on_demand(). These
four plugins wrote the display_on_demand_request mailbox, which the display
reads once a second while its control socket is up and which a future core
removes. They now use the API where the core has it (hasattr), so a
request lands within a frame, and write the mailbox when the method is
missing (cores up to 3.8.0) or answers None (no display in the process),
or raises. On-air's OFF and pomodoro's release end only the plugin's own
session on new cores.

ledmatrix_min_version is unchanged: the fallback keeps older cores working.

- birdnet-go 1.2.9, mqtt-notifications 1.2.9, on-air 1.2.15,
  pomodoro-timer 1.3.11 (versions[] entries; plugins.json regenerated)
- tests: birdnet-go and on-air test_on_demand_api.py, mqtt-notifications
  test_on_demand_trigger.py and pomodoro-timer test_pomodoro_timer.py cover
  both paths; the API half skips on a core without it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bec228a7-7547-48ff-bf17-d5e671d9486f
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 43 complexity

Metric Results
Complexity 43

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@ChuckBuilds
ChuckBuilds merged commit 650b0f5 into main Oct 5, 2026
4 checks passed
@ChuckBuilds
ChuckBuilds deleted the feat/in-process-on-demand branch October 5, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant