When I boot my Raspberry my TV gets woken up over CEC.
Is there a way to send the wake up signal using shell so I could use cronjob to start my TV every morning at 7, for example?
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
I'm using Raspbian “wheezy”.
sudo apt-get update; sudo apt-get install gcc autoconf libtool pkg-config libselinux1-dev liblockdev1-dev gawk g++ c++ libgudev-1.0-dev libudev-dev; mkdir -p $HOME/distr/libcec; wget -P $HOME/distr/libcec https://github.com/Pulse-Eight/libcec/archive/master.zip; unzip $HOME/distr/libcec/master.zip -d $HOME/distr/libcec/; cd $HOME/distr/libcec/libcec-master; ./bootstrap; ./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi; make; sudo make install; sudo apt-get install cec-utils;
echo 'standby 0' | cec-client -s to turn TV off and
echo 'on 0' | cec-client -s to turn in on.
You may also have to substitute
cec-client (or reconfigure your
PATH) if the first one doesn't work.
echo 'on 0'|cec-client -s -d 1
is problematic, because it turns the TV on, but ALSO sets Raspberry Pi as the active source. It seems that the only way of changing the source to TV internal tuner is using JointSPACE framework for my Philips TV. I have unsuccessfully tried several different CEC command combinations to activate internal tuner. It is possible to switch between HDMI sources with CEC, but I have yet to discover how to switch to internal tuner...
I have something similar, the command
echo 'on 0'|cec-client -s -d 1 only turns on the tv, I was curious if there is a single command to turn on tv and switch input to what the pi is on. I was also curious if its possible to run this at boot?
ANSWERED: (I answered the above, added to etc/rc.local to run at boot.) Still curious why single command does not work. Any Ideas?
echo 'on 0'|cec-client -s <- Turn on TV echo 'as'|cec-client -s <- Initiate input Pi is active on
Yet the command to run both only gets me power. Not to big of a deal as I just run both at boot, but curious why the combined one isn't working.