I used a similar setup to translate CEC user commands (volume/fwd/reverse/etc), that travelled from my TV remote to the TV to the CEC bus to a pi that was plugged into the TV via HDMI. The pi was running jukebox software (moode audio). Similar to the article, the pi had a shell script that reads all the loglines coming from cec-client and acted on them when appropriate, in my case translating a subset of the CEC user commands to moode commands.
Worked pretty well, was nice to CEC-ify a pi program and eliminate the need for special-purpose hw/sw to interact with the audio player.
The CEC spec has all of the user control codes on the 2nd last page[1], in table 27.
I made myself a little HDMI dongle (about half the size of a classic Fire Stick) with a WiFi modem that I use to remote control my TV from Home Assistant. My remote is the HA app.
Why? Because Google Home's TV remote stuff can do a lot, but not turn on the TV. CEC can.
Worked pretty well, was nice to CEC-ify a pi program and eliminate the need for special-purpose hw/sw to interact with the audio player.
The CEC spec has all of the user control codes on the 2nd last page[1], in table 27.
[1] https://storage.googleapis.com/google-code-archive-downloads...