Dogga85
Posts: 28
Joined: Mon Dec 19, 2016 10:15 pm

Turn RPi 3 on with remote?

Wed Jun 12, 2019 8:17 pm

Hey all,
I just set my new RPi 3 up with Kodi as my Plex client. I have a Rii remote to use with it which is great, but is there any way to turn the RPi ON with a remote instead of having to turn it off/on by the power switch on the wall every time???

W. H. Heydt
Posts: 10319
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Turn RPi 3 on with remote?

Wed Jun 12, 2019 8:56 pm

If the Pi has power, it is on (to varying extent, depending on what else has been done). If it doesn't have power, there is no way for it to act on any signal in the environment. So, basically, the answer is, no, that won't work.

Note: You shouldn't just drop the power on a Pi. Start by issuing a shutdown command. After the system has had time to terminate all processes and quiesce the SD interface (allowing any remaining write activity on the card to *completely* finish), then you can drop the power. If you just cut the power, you may corrupt the SD card.

Andyroo
Posts: 3320
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Turn RPi 3 on with remote?

Wed Jun 12, 2019 9:13 pm

The only way I have seen but not tried is https://www.msldigital.com/collections/ ... d-for-pi-3

I guess others are out in the world but this matched the needs of a dead project :lol:
Need Pi spray - these things are breeding in my house...

PhatFil
Posts: 1233
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Turn RPi 3 on with remote?

Wed Jun 12, 2019 11:50 pm

Its a pretty trivial home automation task, the catch being most RPi home automation solutions employ a Rpi 24/7/365 as a system server..

You could with some careful shopping find some compatible gadgets to link together for a solution with your phone and some cloud served apps.

Edit** Of course any OFF commands you issue should issue a proper shutdown command and delay a sufficient period before cutting power..

the broadlink rm mini can hijack IR signals , and link upto IFTT to control any compatible smart switch via its mobile phone app
https://www.googleadservices.com/pagead ... CDs&adurl=

The sonoff RF bridge and sonoff smart switches with its ewelink phone app will enable lifting most 433mhz RF codes for pairing with and control of smart switches.
** https://sonoff.itead.cc/en/products/app ... bridge-433

the down side being giving 3rd parties access to your phones as every app needs all access for some reason?? and your dependent on the remote servers being up and available, and i would suggest any lags in response to triggers may be longer when coms involve traffic to china and back..

If your prepared to invest in a Rpi-0-w and run it 24/7/365 there are lots of fun ways you can negate relying on remote data mining servers and privacy invading phone apps.

IF power costs are an issue iirc i read in a recent post in here that a headless Pi-0-w power demands should be less than 1w? but with an active Pi your i/o options expand and your response to commands should suffer no lag if all the traffic is local to your net.

** I like sonoff brand devices as they are open to reprogramming with custom firmware
and while i use the tasmota project firmware, you could easily write your own using the arduino ide or any other platform that supports the esp8266 soc.

User avatar
Imperf3kt
Posts: 2404
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Turn RPi 3 on with remote?

Thu Jun 13, 2019 12:55 am

I assume OP is looking for a way to leave the Pi in "standby" mode for convenient on / off via a button on their remote control much like how your TV functions.

You could probably just setup something that momentarily shorts the run pin to ground upon detecting a certain frequency.
Maybe a transistor and IR LED? Hit IR LED with beam from remote, transistor detects current and opens the gate.

Just an idea, I have no idea how practical it would be or if it would work as I think.
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

W. H. Heydt
Posts: 10319
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Turn RPi 3 on with remote?

Thu Jun 13, 2019 2:55 am

Imperf3kt wrote:
Thu Jun 13, 2019 12:55 am
I assume OP is looking for a way to leave the Pi in "standby" mode for convenient on / off via a button on their remote control much like how your TV functions.

You could probably just setup something that momentarily shorts the run pin to ground upon detecting a certain frequency.
Maybe a transistor and IR LED? Hit IR LED with beam from remote, transistor detects current and opens the gate.

Just an idea, I have no idea how practical it would be or if it would work as I think.
By default (IIRC), pins 5 and 6. Short them together and the system shuts down. Do it again, and it reboots. All it takes is a single line in /boot/config.txt.

Code: Select all

dtoverlay=gpio-shutdown

Dogga85
Posts: 28
Joined: Mon Dec 19, 2016 10:15 pm

Re: Turn RPi 3 on with remote?

Fri Jun 14, 2019 9:39 am

Yes exactly, I was hoping I can do it just like a TV. I was concerned about leaving it on all the time. But perhaps leaving it on is the easiest solution? Hahaha

hippy
Posts: 5353
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Turn RPi 3 on with remote?

Fri Jun 14, 2019 10:58 am

Imperf3kt wrote:
Thu Jun 13, 2019 12:55 am
You could probably just setup something that momentarily shorts the run pin to ground upon detecting a certain frequency.
Maybe a transistor and IR LED? Hit IR LED with beam from remote, transistor detects current and opens the gate.
It needs a little more than that but can easily be done with a microcontroller or another Pi. The main problem isn't so much powering-on as preventing a reset at an inopportune time.

User avatar
Imperf3kt
Posts: 2404
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Turn RPi 3 on with remote?

Fri Jun 14, 2019 8:44 pm

@hippy
W. H. Heydt's solution would presumably fix an unexpected reset and is admittedly, better than my own thoughts.

Still needs some more control though, seemingly.
I'll watch this thread to see what others come up with, it's an interesting idea.
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

W. H. Heydt
Posts: 10319
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Turn RPi 3 on with remote?

Fri Jun 14, 2019 8:53 pm

What it really amounts to is that *something* has to be active and drawing power. That something has to be smart enough to recognize an input signal by some means or other and then trigger any further actions as needed. The very simplest solution of all is...don't turn the Pi off.

Dogga85
Posts: 28
Joined: Mon Dec 19, 2016 10:15 pm

Re: Turn RPi 3 on with remote?

Sat Jun 15, 2019 1:36 am

Thanks so much for everyone's replies. Looks like there's not really a solution for what I was after, so for the moment I just won't turn it off. Might buy a Flirc v2 case for it so it keeps nice and cool.

W. H. Heydt
Posts: 10319
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Turn RPi 3 on with remote?

Sat Jun 15, 2019 3:01 am

Dogga85 wrote:
Sat Jun 15, 2019 1:36 am
Thanks so much for everyone's replies. Looks like there's not really a solution for what I was after, so for the moment I just won't turn it off. Might buy a Flirc v2 case for it so it keeps nice and cool.
I think I ought to point out that a TV that can be "turned on" or "turned off" with a remote, is never really "off". As in my point about, *something* has to be active for that trick to appear to work.

User avatar
Imperf3kt
Posts: 2404
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Turn RPi 3 on with remote?

Sat Jun 15, 2019 4:37 am

Which reminds me, isn't there some HDMI protocol which can turn supported devices on and off when the TV is switched on and off?
Could the Pi be configured to use this?

Edit: I'm sure I was thinking of a different protocol, but HDMI CEC seems like it may work.
https://en.wikipedia.org/wiki/Consumer_ ... cs_Control
CEC[3] is a separate electrical signal from the other HDMI signals. This allows a device to disable its high-speed HDMI circuitry in sleep mode, but be woken up by CEC. It is a single shared bus, which is directly connected between all HDMI ports on a device, so it can flow through a device which is completely powered off (not just asleep).

The bus is electrically identical to the AV.link protocol, but CEC adds a detailed higher-level message protocol.

The bus is an open-collector line, somewhat like I²C, passively pulled up to +3.3 V, and driven low to transmit a bit.
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

hippy
Posts: 5353
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Turn RPi 3 on with remote?

Sat Jun 15, 2019 12:22 pm

Imperf3kt wrote:
Sat Jun 15, 2019 4:37 am
Which reminds me, isn't there some HDMI protocol which can turn supported devices on and off when the TV is switched on and off?
Could the Pi be configured to use this?
No, not without external hardware.

I am not sure if the Pi can receive CEC or whatever through HDMI but, even if it could, when powered off there would be nothing powered which could receive such commands.

The Pi only has three power states; power supplied and running, power supplied but not running, power not supplied.

There is no 'power supplied but only some things running' state which is what all wake-from-not-running systems require. That can only be achieved by using external hardware.

True; the reset handling is still running when the SoC is not running, but it requires external hardware to activate it.

It would seem possible to have this -

Code: Select all

HDMI Cable         Pi Computer
                 .--------------.
                _|_             |
        .-.__  |   |            |
========| |__| |   | CEC  Reset |
        `-'    |___|----.   o   |
                 |      |   |   |
                 `------|---|---'
                        |   |
                 .------|---|---.
                 |              |
                 `--------------'
               CEC Wake-Up Detector

Return to “General discussion”