omarm
Posts: 35
Joined: Fri Jun 16, 2017 1:36 am

Where's the power button?

Wed Jun 13, 2018 12:00 am

I've been tinkering with the Raspberry Pi for some time now.
Something just dawned on me: why no power button??

A little bit crazy I think to omit.

I've googled and there seem to be a few options.

Some options need soldering and adding a wire + adding some code.
Does this mean the item is ALWAYS on? And the button is just like a sleep or hibernation button?

I've seen some USB chargers with a power button - I haven't seen any with a rating of more than 3 stars out of 5 on Amazon.
This would have been my preferred method.

What's the best option?

Thanks.

User avatar
The Traveler
Posts: 361
Joined: Sat Oct 21, 2017 3:48 pm

Re: Where's the power button?

Wed Jun 13, 2018 12:18 am

I just leave my RPi on as it uses little power when it's idle. The RPi power wart is plugged into a UPS so I can shut it down manually via SSH if needed. Or, If you feel like tinkering, you can install and configure acpupsd (check your distro) for APS-based battery backups, or Network UPS Tools: https://networkupstools.org/index.html for other automatic shutdown options. This is the option I'll implement next when I get some free time.

Cheers.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

omarm
Posts: 35
Joined: Fri Jun 16, 2017 1:36 am

Re: Where's the power button?

Wed Jun 13, 2018 12:43 am

shutdown via SSH.
can you also remotely turnon through something similar to wake on lan?
(that would be amazing if possible)

>> acpupsd
what's that?
i followed the link you gave and and still not sure what you're referring to.
thanks.

User avatar
The Traveler
Posts: 361
Joined: Sat Oct 21, 2017 3:48 pm

Re: Where's the power button?

Wed Jun 13, 2018 12:57 am

can you also remotely turnon through something similar to wake on lan?
I haven't really looked into that with the RPi, but generally speaking, if there is a system daemon for it, it could be done. However, the ethernet interface and hardware have to support what is known as "magic packets". Note to self: check out WoL on RPi. ;)

acpupsd is a system daemon that monitors control signals from APS-based UPS battery backups. It's meant specifically for the APS brand. Here's a link with some better information: http://www.pontikis.net/blog/apc-ups-on ... orkstation

If you don't have a APS brand UPS, the Network Utility Tools ("nut") are more generic and can be found in most of the major distros as well.

Cheers.

[EDIT] I did a quick check and acpupsd is not in the RPi repository. However nut is so that looks like a good avenue to explore. :)
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

klricks
Posts: 5835
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Where's the power button?

Wed Jun 13, 2018 1:24 am

omarm wrote:
Wed Jun 13, 2018 12:43 am

can you also remotely turnon through something similar to wake on lan?
(that would be amazing if possible)
No, not without adding external hardware.

When the RPi is in shutdown mode the CPU is in a halt state so there no code at all running. The RPi board will still consume a small amount of power in shutdown state but IMO is of no concern unless operating on batteries.

The RPi can be started from shutdown state by momentarily shorting pin 5 & 6 or by momentarily connecting RUN to GND.
A momentary type switch can be used for this.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

omarm
Posts: 35
Joined: Fri Jun 16, 2017 1:36 am

Re: Where's the power button?

Wed Jun 13, 2018 12:28 pm

i looked up details of raspberry pi 3 b+
that has POE
when i googled, it seems as though you need an additional device: Pi PoE Switch HAT?

does that mean i can turn on and off over the internet?
just did a search on youtube and cant see anything

any thoughts?

thanks

klricks
Posts: 5835
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Where's the power button?

Wed Jun 13, 2018 12:55 pm

omarm wrote:
Wed Jun 13, 2018 12:28 pm
i looked up details of raspberry pi 3 b+
that has POE
when i googled, it seems as though you need an additional device: Pi PoE Switch HAT?

does that mean i can turn on and off over the internet?
just did a search on youtube and cant see anything

any thoughts?

thanks
POE provides only a way to power the RPi through a network cable. Requires special devices on both ends of the cable to inject then extract the voltage. You must still be physically present to restart the RPi from shutdown state.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

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

Re: Where's the power button?

Wed Jun 13, 2018 1:04 pm

The Traveler wrote:
Wed Jun 13, 2018 12:57 am
However, the ethernet interface and hardware have to support what is known as "magic packets". Note to self: check out WoL on RPi. ;)
Wake On LAN solutions require the WOL hardware to be permanently powered and they then enable power to the rest of the board when they get their magic packet. Pi's so far have not been designed with that mechanism in mind.

I would suspect it's the same for the Pi 3B+ but we don't have full circuit diagrams or datasheet for the LAN7515 so it's impossible for anyone without access to those to say for sure.

It is possible to add external WOL hardware and that should be easier with the Pi 3B+ as it has an 'almost no-power' mode (~10mA) controlled through the PMIC chip.

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

Re: Where's the power button?

Wed Jun 13, 2018 6:36 pm

Simplest solutions I know of:
https://www.adafruit.com/product/1620
https://www.adafruit.com/product/2379

And, no, there is no Pi with an "on board" power switch, though the WD SATA Adapter board for the CM/CM3/CM3L does have one.

RonR
Posts: 274
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Where's the power button?

Wed Jun 13, 2018 7:10 pm

The Traveler wrote:
Wed Jun 13, 2018 12:57 am
[EDIT] I did a quick check and acpupsd is not in the RPi repository. However nut is so that looks like a good avenue to explore. :)
FWIW, I run NUT on two RPI's: one as the Server connected to a CyberPower GX1325U UPS and the other as a Client. Operation has been totally reliable, giving me about 90 minutes of run time with a mains failure (the UPS also powers a DSL Modem, Router, 8-port Ethernet Switch, a VoIP Phone, a Cordless Phone Base, two ATA's, and a Security Base Station). Both RPI's shut down gracefully should the UPS become exhausted.

gkaiseril
Posts: 445
Joined: Mon Aug 08, 2016 9:27 pm
Location: Chicago, IL

Re: Where's the power button?

Wed Jun 13, 2018 7:33 pm

i would look to using a product like the PIMORONI ONOFF SHIM FOR RASPBERRY PI that includes a shutdown scrip for a controlled shutdown.

RonR
Posts: 274
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Where's the power button?

Wed Jun 13, 2018 9:13 pm

klricks wrote:
Wed Jun 13, 2018 1:24 am
The RPi can be started from shutdown state by momentarily shorting pin 5 & 6 ... .
A momentary type switch can be used for this.

The same switch will gracefully shut down a running RPi with the addition of the following line to /boot/config.txt:

Code: Select all

dtoverlay=gpio-shutdown

Simply wait for the red LED to blink 10 times and it's safe to disconnect power.

Return to “Beginners”

Who is online

Users browsing this forum: CrouchingWayne and 36 guests