If you have a way to command the TV once it's on, you could use a player program (like XBMC) on the Pi and wake it up (by e.g. sending a menu command via it's web interface). It would then wakeup the TV for you, and you can command the TV via IP.
HDMI CEC is designed for devices to set the path of switches between themself and the TV to their input, although you could spoof an Active Source message to force the TV to switch to a different HDMI port. But there's no way to command a non-HDMI port at all.
Edit: I didn't want to double post so I added more to this one.
I installed libCEC on a raspberry pi (I think this is all of the packages, I could be wrong):
sudo apt-get install libcec2 libcec-dev cec-utils
Then I turned the TV off (I was waching TV on another HDMI input)
echo 'standby 0' | cec-client -s
Then back on again
echo 'on 0' | cec-client -s
The input that was previously active was active again (which is not the input the Pi is on), but for some reason CEC didn't work for it (I couldn't control it with the TV's remote). I turned the TV off then on with the remote and it worked again.
Edited by apalrd, 15 June 2015 - 09:35 PM.