I am currently trying to set up my homey so that it can fully control my projector via raspberry media centre.
Goals:
-Turn projector on off.
-Change HDMI input.
Status:
Raspberry Pi 5 is set up with libreElec with Kodi. CEC works with SSH commands. I can currently turn the projector on and off. However, I am struggling with CEC for HDMI input.
So far:
I used this method to get CEC control:
The 2024 answer relies on modern HDMI-CEC implementation, for instance the package v4l-utils and specifically its cec-ctl command. Having it to work is a matter of putting a
dtoverlay=vc4-kms-v3d
in your /boot/config.txt
file and this gives you a /dev/cec0
device for your first HDMI port. Then you can execute some topology-discovery command like
Then I used these commands to control the projector:
On: cec-ctl -s -t0 --image-view-on
Off: cec-ctl -s -t0 --standby
So now it boils down to getting HDMI input control. I need to switch between the chromecast and the raspberry Pi. And I really don’t want to use the remote control.
Does anyone know how to do it?