schmi85
Posts: 8
Joined: Fri Jan 04, 2019 8:07 am

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

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? Would it even be possible to boot the PI when the TV is turned on?

User avatar
DougieLawson
Posts: 35811
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

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

Sat Jan 26, 2019 7:55 am

Once your RPi is off nothing on the HDMI interface can turn it back on.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

fruitoftheloom
Posts: 20487
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

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

Sat Jan 26, 2019 10:56 am

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
Retired disgracefully.....

schmi85
Posts: 8
Joined: Fri Jan 04, 2019 8:07 am

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

Sat Jan 26, 2019 11:33 am

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??

User avatar
DougieLawson
Posts: 35811
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

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

Sat Jan 26, 2019 11:46 am

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.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

drgeoff
Posts: 9748
Joined: Wed Jan 25, 2012 6:39 pm

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

Sat Jan 26, 2019 11:53 am

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.

User avatar
Paul Webster
Posts: 801
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK
Contact: Twitter

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

Sat Jan 26, 2019 4:39 pm

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.

Return to “Media centres”