i am using hass.io on raspberry pi which is connected to the TV through HDMI and i want to find the status of the TV if it is on or standby mode. when i run the ssh command
echo “on 0” | cec-client -s
it gives error
-bash: cec-client: command not found
How can i get that code running?
I am having the same issue. I’m new to home assistant, especially hassio/hassOS. I did a clean install off hassio on a RPi 4 and the first thing I’m trying to control is my AV system through CEC. The first CEC page I went to was the hdmi_cec integrations page. It states that:
Note that all Raspberry Pi models support CEC natively.
Great! my pi is connected to my soundbar through an hdmi cable.
Then it says that:
If you are using Hassio then just move forward to the configuration as all requirements are already fulfilled.
So far so good. I look at the configuration section and it says to add my devices to the config. Since I have no way of knowing what my devices are called, i move back up to the “testing your installation” section of the page. It tells me to run the command
echo scan | cec-client -s -d 1
That’s where I get the same problem.
core-ssh:~# echo scan | cec-client -s -d 1
-bash: cec-client: command not found
I’ve tried running the CEC Scanner addon for hassio. It outputs
[09:36:33] INFO: Starting CEC client scan...
autodetect FAILED
Does anyone out there know how to get CEC working on a hassio install? I can’t follow the libcec installation guide since hassOS doesn’t let me run apt-get
. Do I need to ditch hassio and just install home assistant on rasbpian in order to have more control over the software i can add?
I’m in the same boat, hoping to see a solution.
Well for me this works from time to time. I noticed that I have to reconnect HDMI cable sometimes and then it works.
If your HDMI connected to your TV then Address is probably 0.0.0.0
I know this is a long shot because it’s so long ago the thread has been updated, but: Have any of you had a success in this? I’m stuck with the same error messages as you, currently on RPI4 and hassOS (core-2022.4.0).
I also have been having issues with getting anything CEC related working on hassOS for the past two years.
I am struggling with this issue too, I’m posting here in the hope there might be some help out there.
Setup:
- rpi4
- Latest HA installed in the recommended way (Raspberry Pi - Home Assistant)
- RPI connected to AV Receiver, along with some other devices
When I do the following:
ssh [email protected] -p22222 docker exec -it homeassistant bash
bash-5.1# echo scan | cec-client -s -d 1
autodetect FAILED
bash-5.1# cec-client -l
libCEC version: 6.0.2, git revision: libcec-6.0.2, compiled on 2022-11-24 15:21:51 by root@localhost on Linux 5.15.0-1023-azure (aarch64), features: P8_USB, DRM, P8_detect, Linux
Found devices: NONE
Though i too have noticed that when i reboot my pi, connected to my AV receiver, it turns the receiver on, so CEC is working, but just not inside HA.
I’ve tried sending CEC commands via HA interface, but nothing
Should i be concerned that my cec-client is not built with RPi support, and if so, how do i recompile it?