Up to date instructions for CEC control?

I’m trying to setup hdmi_cec on RPi3 on Raspbian.

I installed cec-utils and libcec but Home Assistant is still not working.
I can’t find the _cec.so file in the python*/dist-packages folder so I guess I miss something.

I tried to install libcec-dev because I think there could be the python bindings there, but it won’t install because of:

he following packages have unmet dependencies:
 libcec-dev : Depends: libcec4 (= 4.0.1+dfsg1-1+rpi1) but 4.0.2.3~stretch is to be installed
E: Unable to correct problems, you have held broken packages.

Help?

You can try
sudo apt --fix-broken install
to see if that will help.

I already tried, thanks :frowning:

Try removing the cec package, update the OS, run the fix broken, then try installing again.

Done it already as well… no luck

Have you done a dist-upgrade? Are you on Debian Jessie or Stretch? If you are on Jessie, time to upgrade.

I’m on stretch, everything updated

Other than compiling from source ???

I can’t find the instructions to build from source and I read that it doesn’t always work on Raspbian :frowning:

edit, managed to build from source (link), now the devices are listed but they don’t respond to the commands :man_shrugging:
if I run the CEC commands from commandline they work just fine

also, Home Assistant returns the on/off status correctly

Hi,

I’m having similar issues so far, and di dnot find a way to overcome them yet :confused: I had to compile from source as well since the versions in the repos where conflicting.

I also have Kodi installed on the same raspberry pi as HA, so I’m currently wondering whether the two of them are not conflicting :confused:

I managed to get it to work (at least from command line) but never got it working on HA, I ended up creating some custom HA scripts that called the command manually…

The correct package is libcec4-dev