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 :bigsmile: 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, then Hyperion install from here -> https://hyperion-project.org/t…ziell-unofficially.10463/
After setting up the led's in Hyperion using the WS281X on RPi PWM everything is working sweet, I occasionally had black screen issues, so after setting the kodi gui to 720p solved all of that - lets be honest real 4k on a pi4 is still a few months away plus most of my media is 1080 anyway so it doesn't bother me and it will eventually be working out the box as development on all projects move forward.
I changed the Platform Capture to DispmanX 740 x 480 pixel (width, height) @ 30Hz capture and it has made a huge difference on Video Drop Outs and the black screens i was getting especially after pressing a button when media was playing, previously the screen would go black and I had to press right to get to the stop button then hit ok (all during black screen) where as now it doesn't. This was not required after setting the GUI to 720, once GUI was set platform capture worked flawlessly at 1080
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
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 Resolved
Hope this helps someone out as
despite the occasional black screen or hiccup this is a very sweet project.
Thanks to all the people who made this project possible as it's definitely brightened my media experience :LOL: