Skip to content

feat(publishers): add PixelCade publisher and Publisher interface#594

Merged
wizzomafizzo merged 2 commits intomainfrom
feat/pixelcade-publisher
Apr 3, 2026
Merged

feat(publishers): add PixelCade publisher and Publisher interface#594
wizzomafizzo merged 2 commits intomainfrom
feat/pixelcade-publisher

Conversation

@wizzomafizzo
Copy link
Copy Markdown
Member

  • Introduce a Publisher interface with Start, Publish, Stop methods, replacing the MQTT-only []*MQTTPublisher return type in startPublishers with []Publisher
  • Extract shared MatchesFilter helper from MQTTPublisher.matchesFilter into filter.go for reuse across publisher types
  • Add PixelCadePublisher that transforms media.started notifications into GET /arcade/{mode}/{console}/{rom} REST calls to PixelCade LED marquee displays
  • Add built-in mapping of ~70 Zaparoo system IDs to PixelCade console folder names in pixelcade_systems.go, with lowercase fallback for unmapped systems
  • Support configurable on_stop behavior: blank display, show default marquee, or do nothing
  • Add PixelCadePublisher config struct and GetPixelCadePublishers() accessor to config
  • Wire PixelCade publishers into startPublishers alongside existing MQTT publishers
  • Validate host, mode, and on_stop values in Start() to catch config errors early

Refs #587

Introduce a Publisher interface to decouple publisher backends from MQTT-specific
wiring, and add a PixelCade publisher that transforms Zaparoo notifications into
REST API calls to display game marquee images on PixelCade LED displays.

The PixelCade publisher handles media.started notifications by mapping Zaparoo
system IDs to PixelCade console names and sending GET requests to the PixelCade
arcade endpoint. On media.stopped, it can blank the display, show a default
marquee, or do nothing based on configuration.

Refs #587
@sentry
Copy link
Copy Markdown

sentry bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 75.43860% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/service/publishers/pixelcade_publisher.go 85.36% 10 Missing and 2 partials ⚠️
pkg/service/service.go 25.00% 11 Missing and 1 partial ⚠️
pkg/config/configservice.go 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread pkg/service/publishers/pixelcade_systems.go
@wizzomafizzo wizzomafizzo merged commit 08a1f53 into main Apr 3, 2026
10 checks passed
@wizzomafizzo wizzomafizzo deleted the feat/pixelcade-publisher branch April 3, 2026 08:06
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