Skip to content

fix: Fix Hue Sync Color Distribution and Light Mapping#161

Closed
Intecpsp wants to merge 1 commit intochrivers:masterfrom
Intecpsp:fix/hue-sync-upstream
Closed

fix: Fix Hue Sync Color Distribution and Light Mapping#161
Intecpsp wants to merge 1 commit intochrivers:masterfrom
Intecpsp:fix/hue-sync-upstream

Conversation

@Intecpsp
Copy link
Copy Markdown

@Intecpsp Intecpsp commented Apr 23, 2026

This PR resolves two critical issues in the Hue Entertainment streaming implementation that caused incorrect color distribution across bulbs in an entertainment zone.

Fixed Issues:

  1. "Bottom Left" Color Persistence: Standard bulbs were incorrectly being identified as multi-segment devices. This triggered a fallback to a hard-coded list of segment positions, the first of which was "Bottom Left". Consequently, every bulb in the zone was reporting the same position to the Sync app, leading to identical color data for all lights.
  2. Alphabetical Mapping Scramble: The backend was mapping incoming color channels to Zigbee devices based on the alphabetical order of their friendly names. This resulted in a disconnect between the Sync app's channel IDs and the actual physical bulbs.

Changes:

  • src/routes/clip/entertainment_configuration.rs: Updated make_channels to verify the segment count. Standard bulbs (1 segment) now correctly preserve their user-defined positions from the Hue app.
  • src/backend/z2m/backend_event.rs: Refactored the entertainment start sequence to build an explicit mapping of channel_id to Zigbee network addresses.
  • src/backend/z2m/entertainment.rs: Updated EntStream to utilize the new channel-based mapping, ensuring color data is routed correctly even if device names are changed or reordered.

How to Verify

  1. Apply the changes and restart the service.
  2. CRITICAL STEP: Open the Hue app and navigate to your Entertainment Area settings.
  3. Move at least one light slightly and Save the area. This is required to force the bridge to re-calculate and push the new, corrected coordinate data to your Sync clients (like the Hue Sync TV app or Windows/Mac app).
  4. Start a Sync session; bulbs should now reflect individual screen positions and distinct colors.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@Intecpsp Intecpsp changed the title Fix Hue Sync Color Distribution and Light Mapping fix: Fix Hue Sync Color Distribution and Light Mapping Apr 23, 2026
@Intecpsp Intecpsp closed this by deleting the head repository Apr 28, 2026
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