Thought id chip in on this one as there are a lot of posts for advanced complicated setups with capture cards etc, I'm more of a minimal setup kinda guy that wants the lights to come on when kodi is in use and off when not and nothing else so hopefully it may help others.
I also thought about using the Ardrino route but the pi only has 1 purpose, to play media from a Emby Server so the onboard GPIO and smoothest Kodi wins and without a doubt Kodi runs way smoother on LibreElec than any distro build so going down they routes was a no no for me when i only need to run Kodi and PiHole so LibreElec with the docker addon from official repo for PiHole keeps the leanest meanest system for my needs.
With the LED's attached and soldered, the Data wire went to pin 18 of the GPIO along with a 470 ohm resistor, Earth from the LED strip spliced to a GND pin on the GPIO.
Clean install of Libreelec, Using Etcher then Hyperion install from here -> The Quickest And Easiest Hyperion Install Ever!!
After setting up the led's in Hyperion using the WS281X on RPi PWM everything is working sweet.
Next thing was starting and stopping Hyperion, there may be easier ways than this but i was testing some things out and they worked first time so I just left them there.
I Installed the following Addon in the official repos - Kodi Callbacks (to control Hyperion)
Create 2 scripts in the /storage directory, i opted for
start-hyperion.sh
stop-hyperion.sh
Then in the Kodi Callbacks addon, I assigned Task 1 to execute the /storage/start-hyperion.sh script then in the Event section - Event: On screensaver deactivation and to run Task 1
Same again for Task 2 but to execute the /storage/stop-hyperion.sh and on Event to activate Task 2 on screensaver Activation
When I change source to kodi and press a button the lights come on, then when done as soon as the screensaver comes on the lights go off.
One thing i have noticed is once Hyperion has been stopped, after a good few hours the first 2 led's on the strip light up, 1x is white and the other is green - no idea what it is but it must be coming from the pi somehow - if anyone knows please let me know Explanation Here
Hope this helps someone out as this is a very sweet project.
Thanks to all the people who made this project possible as it's definitely brightened my media experience