Wake up Pi when TV goes ON

  • My Pi has external power supply and is connected to TV with HDMI CEC. How can I make Pi to wake up when TV goes ON?

    It worked when Pi had power supply via USB from TV. But this “wake up” does not work. Why I changed to external power is that Pi many times turned off without any reasons and I thought that may be poor power from TV.

  • I think the easiest solution is to use a relay.

    The relay coil will be powered from the TV's USB port and the relay contacts will switch external RPi power.

    One problem but I see here. When you turn off the TV, RPi will be forcibly turned off as well, and it will not be turned off correctly.