I have the cec-client and libcec working on my Raspberry Pi. I would like to use it for more than just turning on and off the television, I would like to be able to query the other devices for their system information. Then maybe control them through the RPi. :)
Anyway, I'm wondering if there are some good sources of information on the cec-commands. I know I can send the following:
echo "on 0" | cec-client -s
to turn on the televisionecho "standby 0" | cec-client -s
to turn it off- I even found
echo 'lang 0' | cec-client -t p -p 1 -d 1 -s | tail -n1 | grep 'language' | awk '{print $3}'
which will tell me the television language is 'eng'.
All of the commands were found in the libcec/support/cec-test-device.sh script. Is there a complete list of built-in libcec commands somewhere?
Alternatively I did look at the CEC-O-MATIC tool. What type of source is the Raspberry Pi or does it matter? Is there a way to query what devices are connected to the television from the RPi? For example, if I connect and disconnect a Blu-ray player, is there a way to tell that has happened?
echo scan | cec-client -s -d 1
command was exactly what I was looking for to query what devices are connected to the television. I also wasn't using the "-d 1" option before... that's a big improvement! – GrandAdmiral Aug 23 '13 at 16:57