Need help installing HDMI-CEC on Raspberry Pi AIO

Hi guys,

First up, I have only been hacking away at HASS on my RPI for less than 24 hours with the primary goal of getting CEC working so its safe to say I’m a RPi noob but have a few months of intensive HASS experience.

I have been using a Docker image of HASS on my NAS or some months now but getting HASS running on a RPi is far more time consuming than I am used to versus a Docker image. If there is a mistake to make, I have probably made it. I am learning everything I need to know about Python and its Virtual Environments ‘on the job’ so it’s probably safer to assume I know very little or enough to be dangerous when explaining things to me. :slight_smile:

I have successfully installed the AIO installer for HASS and appear to have successfully compiled and installed LibCEC as per the RPi instructions but I am yet to figure how to symlink it to HASS so it can use it.

Pretty sure all I need to do to get it working is figure out what directory the virtual environment for HASS is in or something, so I can complete this command??
virtualenv --system-site-packages HASS_VIRT_ENV_DIR
Yes, no, maybe?

Would I be correct in thinking that this directory should be the same for everyone using the default settings like I am and thus what worked for someone else should work for me?

Is there anyone who has got HDMI-CEC working that could steer me in the right direction please?

Cheers!

1 Like

So I have been doing some testing and it would appear that I have successfully compiled LibCEC as I can control my TV using the cec-client command. So I can confirm there is nothing wrong with my LibCEC.

i have rebuilt my RPi from scratch, recompiled LibCEC and finally figured out what the environment string should be.

ln -s /usr/local/lib/python3.4/dist-packages/cec /srv/hass/hass_venv/lib/python3.4/site-packages for anyone playing at home.

But if I add an hdmi_cec: entry to my configuration i get the following error and HASS stops loading or chrashes.
* failed to open vchiq instance

I googled the issue and found someone else having a similar error here. https://digitalchild.info/raspberry-pi-failed-open-vchiq-instance-solved/

Can anyone tell me if I need to do the same thing for the ````hassuser to fix this error? I'm just not sure that thevideo``` group is the group I need to add or what it should be if its not that one.

Thanks.

EDIT: I went ahead and tried it. it worked! =D
I now have a fully functional HDMI-CEC control on my RPi 3! Woot!

I will write up a short how-to for others later when I get a chance.

1 Like