Sorry, 1st post, not sure if anyone already thought using HDMI-CEC. At least for a subset of displays - TVs with CEC support - it's possible with the RPi.
First we need to install libCEC from PulseEight, here is what I did (but there might be easier ways these days)
Code:
# sudo apt-get install build-essential autoconf liblockdev1-dev libudev-dev git libtool pkg-config
# sudo git clone git://github.com/Pulse-Eight/libcec.git
# cd libcec
# sudo ./bootstrap
# sudo ./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi
# sudo make
# sudo make install
# sudo ldconfig
at this point, libcec along with cec-client should be installed and ready to go.
Now, enable CEC on your HDMI display/TV (sometimes called AnyNet+, EZ-Sync and all sorts of other branded names), see
http://en.wikipedia.org/wiki/HDMI#CEC.
Test with:
Now you can turn your TV off via
Code:
# echo standby 0 | cec-client -s
and turn it back on via
Code:
# echo "on 0" | cec-client -s
Of course the last one only works if the RPi isn't plugged into the TV's USB as power supply
-Th