Hi all. Since support for the builtin HDMI-CEC hardware component has been removed for Raspberry Pi hardware in release 2021.7.0, I have developed a simple add-on for RPi platforms which allows you to access the hardware through a TCP socket. It lets you send and receive HDMI CEC commands through the builtin hdmi_cec integration.
To use this add-on on your Raspberry Pi (mine is a 3b, I haven’t tried on other models), add https://github.com/samueltardieu/homeassistant-addons as an add-on repository and install the PI CEC add-on.
Hi Samuel, thanks for making the addon. On my system on raspberrry pi 4 before the latest update, I could switch my TV inputs using CEC but it doesn’t work now.
I’ve used supervisor CEC scanner but now it doesn’t show any inputs.
I copied it from the OP and it worked fine. popped right up in my add ons.
But my HDMI CEC still isn’t working…
It starts up then turns it self off.
autodetect FAILED
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
Restarted and copied the yaml config directly from the OP. It was probably working, but I didn’t know it. nothing came up in the logs but all of a sudden My tv was in the lovelace default overview. It is only an on and off switch but it works. I’ll try other stuff later! Thank you!
Well, it worked great for a day and quit… still have the switch for on/off but it doesn’t seem to be sending it to the TV. Not sure what happed. Happened right after the 2022.11 update. downgraded with a backup and still didn’t work. Hopefully someone knows something…
Edit
my TV swiched to ARC only … Grrrrr…
Switched my vizio TV back to CEC enabled and the on/off function works again.