Skip to content

OpenRFID: forward additional filament colors to filament_detect - #788

Merged
paxx12 merged 2 commits into
paxx12-snapmaker-u1:developfrom
RrrrobertB1992:openrfid-multicolor
Oct 19, 2026
Merged

paxx12 merged 2 commits into
paxx12-snapmaker-u1:developfrom
RrrrobertB1992:openrfid-multicolor

Conversation

@RrrrobertB1992

@RrrrobertB1992 RrrrobertB1992 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

With the RFID Detection System set to OpenRFID, a multicolor spool shows only its first color. The openrfid_u1_vendor.cfg and openrfid_u1_generic.cfg webhook templates send RGB_1 and nothing else, while the built-in reader fills RGB_2..RGB_5, and filament_detect/set already accepts those fields and derives COLOR_NUMS from them.

Without this change, the rainbow filament display added in stock 2.0.0.205 never receives more than one color from OpenRFID-read spools.

Changes

Both templates now emit RGB_2..RGB_5 from filament.colors_rgba[1:5], converting RGBA to RGB. The loop adds nothing for single-color spools, so their payload is unchanged.

Affected tag formats

This forwards every color OpenRFID already parses, so multicolor display now works through OpenRFID for:

Single-color formats (Anycubic, Qidi, Creality, Elegoo) send the same payload as before.

Hardware-tested with OpenSpool. The other formats were verified by reading their OpenRFID processors, and I haven't tested them on hardware.

Testing

Tested on a U1 with this branch built on develop (base 2.0.0.205), with suchmememanyskill/OpenRFID#37 applied on top of the pinned OpenRFID commit, OpenRFID as the detection system, and a red/blue OpenSpool tag:

  • print_task_config.filament_color_multi for that channel: nums 2, colors ["FF0000", "0000FF"]. Before this change it showed nums 1.
  • The touchscreen shows the spool as a red/blue split swatch (screenshot below).
  • I changed both colors by hand in the filament web UI, then refreshed from the tag, and both colors went back to the tag's values.
  • Single-color Anycubic spools on the other channels are unchanged (nums 1, correct colors).

Images

Screenshot_20261015_194248

The OpenRFID webhook templates only sent RGB_1, so multicolor spools
(e.g. Bambu dual-color, OpenSpool `additional_color_hexes`) showed a
single color when using the OpenRFID detection system, while the
built-in reader already populates RGB_2..RGB_5.

Send colors 2-5 from `filament.colors_rgba` as RGB_2..RGB_5 in both
the vendor and generic templates. filament_detect/set already derives
COLOR_NUMS from these, so filament_color_multi is populated as with
the built-in reader. Single-color spools are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011NVRoJLjL7JBmLBtmjrTrv
@github-actions

Copy link
Copy Markdown

✅ Build Artifacts

Version: 2.0.0-paxx12-test-pr-788
Build: dd1ec95 (merge of 78cdd98 into develop)
Duration: 4m 59s

Artifact Size
extended-build 219.31 MB
extended-afc-build 219.89 MB

View workflow run

@RrrrobertB1992 RrrrobertB1992 changed the title openrfid: forward additional filament colors to filament_detect OpenRFID: forward additional filament colors to filament_detect Oct 16, 2026

@paxx12 paxx12 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes. Please take a look at review comments.

Put the RGB_2..RGB_5 loop on its own lines instead of prefixing the
CARD_UID line with the endfor tag, as requested in review. The rendered
JSON is identical apart from whitespace.

Made with help from Claude
@github-actions

Copy link
Copy Markdown

✅ Build Artifacts

Version: 2.0.0-paxx12-test-pr-788
Build: 092df26 (merge of 160a97e into develop)
Duration: 3m 52s

Artifact Size
extended-afc-build 219.91 MB
extended-build 219.33 MB

View workflow run

@RrrrobertB1992
RrrrobertB1992 requested a review from paxx12 October 17, 2026 19:59
@paxx12
paxx12 merged commit 2298b1e into paxx12-snapmaker-u1:develop Oct 19, 2026
1 check passed
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.

2 participants