Add-on for using HDMI-CEC on Raspberry Pi 3b

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.

2 Likes

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.

Do you have any pointers on how I can fix this?

Thanks.

Worked perfectly on Raspberry Pi 4 as well, thank you so much for sharing this.

note: Since the RPi4 have 2 HDMI port, use the HDMI port nearest to the power port. the other one doesn’t seem to work.

Does this work for external HDMI read/listen devices such as the USB-CEC by Pulse Eight?

How do i get this to work with the external USB-CEC by Pulse Eight?

For some reason, HA won’t let me add this repository to my add-on page. Anyone else have this issue?

https://github.com/samueltardieu/homeassistant-addon-pi-cec is not a valid add-on repository

Bumping for visibility.

I have the same problem as goobags. If there’s another way to do this, it’d be nice to have some instructions.

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.