Page 1 of 1

Turn PI on/off when HDMI device is turned on/off

Posted: Sat Jan 26, 2019 7:21 am
by schmi85
Hello Everybody,

is it possible to catch any event when the connected HDMI TV is turned on/off via the remote control? Would it even be possible to boot the PI when the TV is turned on?

Re: Turn PI on/off when HDMI device is turned on/off

Posted: Sat Jan 26, 2019 7:55 am
by DougieLawson
Once your RPi is off nothing on the HDMI interface can turn it back on.

Re: Turn PI on/off when HDMI device is turned on/off

Posted: Sat Jan 26, 2019 10:56 am
by fruitoftheloom
schmi85 wrote:
Sat Jan 26, 2019 7:21 am
Hello Everybody,

is it possible to catch any event when the connected HDMI TV is turned on/off via the remote control?

cec may be able to accomplish, but need clarification of what you want to achieve ?

https://packages.debian.org/stretch/cec-utils


Would it even be possible to boot the PI when the TV is turned on?

No the Raspberry Pi SBC can not be booted from a signal on the HDMi port.

Though it may be feasible with extra hardware YMMV

Re: Turn PI on/off when HDMI device is turned on/off

Posted: Sat Jan 26, 2019 11:33 am
by schmi85
Thanks for clarification! I am going to have a look for »cec« and see what I can do. If I can catch the on and off event, I can start/stop a bunch of services, such the PI itself wont do much during this time. But is there something like a hibernation or standby state, I can set the pi to??

Re: Turn PI on/off when HDMI device is turned on/off

Posted: Sat Jan 26, 2019 11:46 am
by DougieLawson
There's no hibernation. You can run a RPi 24/365 for less than GBP£5 in electicity costs, so there's no point hibernating or shutting down services or any stuff like that - it's a waste of time to save a penny a year.

Re: Turn PI on/off when HDMI device is turned on/off

Posted: Sat Jan 26, 2019 11:53 am
by drgeoff
A software shutdown does not "turn off" a RPI to a state where it consumes no power. It is still taking an appreciable fraction of the current that it takes when running. The only way to reduce that to zero is to have external hardware which mechanically or electrically removes the 5 volt power input.

Re: Turn PI on/off when HDMI device is turned on/off

Posted: Sat Jan 26, 2019 4:39 pm
by Paul Webster
You might be lucky (like me) to have a TV that supplies enough power via USB to power the RPi AND has turns off the power to USB some minutes after thue DISPLAY OFF is sent via CEC.
Provided you spot the OFF message and can make an orderly shutdown happen quickly then it works really well.

I have this working with Sony TV and RPi1.
RPi1 uses less power than modern Pi and I have no USB devices plugged into it.

It is not something that will work safely for many installations but is great for a rarely used bedroom TV for me.