I used this repository :
https://github.com/konikvranik/pycec/
First, enable the pycec module on home assistant.
In the configuration.yaml file, add :
hdmi_cec: !include config/hdmi_cec.yaml
and in the config/hdmi_cec.yaml file :
host: !secret rpi3b_ip
Then on the Raspberry pi :
cd
git clone https://github.com/konikvranik/pycec/
First, compile the libcec :
https://github.com/Pulse-Eight/libcec
For compiling it, I followed the Linux procedure :
apt-get update
apt-get install cmake libudev-dev libxrandr-dev python-dev swig
git clone https://github.com/Pulse-Eight/libcec.git
mkdir libcec/build
cd libcec/build
cmake ..
make -j4
sudo make install
sudo ldconfig
Then symlink the service in the pycec repository :
ln -s /path/of/pycec.service /etc/systemd/system/pycec.service
systemctl start pycec
then enable the service so it starts at boot :
systemctl enable pycec
Aucun commentaire:
Enregistrer un commentaire