Hi everyone,
I've written a service add-on that brings Philips Hue Ambilight feature to a Raspberry Pi 5 running LibreELEC 12, without a Hue Sync box.
Why: with Kodi's DRM PRIME "Direct To Plane" renderer, decoded frames go straight to a hardware plane of the display controller, so add-ons based on Kodi's RenderCapture (like script.service.hue) capture nothing. Hue Ambi reads the video plane directly and streams the colours to a bridge over the Hue Entertainment API.
What it does:
- one colour per light, taken from the part of the picture each light faces (positions come from the entertainment area set up in the Hue app)
- 50 updates per second over the Entertainment API (DTLS), about 0.13 ms of CPU per update
- HDR10 aware
- turn ambilight off for one video with a remote colour key (blue by default), or "Play without ambilight" in the context menu
- English and French UI
Requirements: Raspberry Pi 5, LibreELEC 12.x, PRIME render method "Direct To Plane", a Hue bridge (v2 API) with an entertainment area.
Install: zip from https://github.com/miton18/hue-ambi/releases ("Install from zip file"), then pair with the bridge and pick the entertainment area in the add-on settings. Pull request for the LibreELEC add-on repository: https://github.com/LibreELEC/LibreELEC.tv/pull/11901
So far it has only been tested on my own Pi 5, so feedback is welcome, especially from other boards (Pi 4) and other Hue setups. Issues: https://github.com/miton18/hue-ambi/issues