I did something similar back with Boblight a year or 2 ago. Had it working with configurable lighting effects and Facebook/Email too.
https://www.youtube.com/watch?v=RM946iXWEx8
The lighting transition was generated as well since Boblight only took byte streams and didn’t know about any effects.
Kind of related to this, I currently have my Hyperion set up with 2 different sources, Kodi and an USB video grabber but I needed a way to easily switch them. My first solution was to create a Kodi plugin that I could control using a simple HTTP request. It worked but was tedious. I recently learned about the existence of cec-client and it’s monitoring mode, so I whipped up a bash script that monitors the CEC traffic and changes Hyperion sources based on my AV receiver’s source. All configurable too. The only other thing I want now is to be able to change the HDMI OUT mode of my receiver but apparently that’s impossible using CEC. There’s an undocumented command you can send over telnet to do it though but I don’t want to get another ethernet cable there.