0

My Raspberry Pi is connected to the supply, and after shutting down, it is still connected to the supply and the red led is on. Is it possible to reboot the pi without removing the supply and without adding a button ?

7
  • 1
    you could use a photo sensor instead of a switch ... technically, that would not be a button
    – jsotola
    Jun 2, 2021 at 18:40
  • 2
    No - not possible unless you add external hardware.
    – Seamus
    Jun 2, 2021 at 19:46
  • @jsotola I didn't get how to integrate the photo sensor can you explain a little more please
    – mina
    Jun 3, 2021 at 7:58
  • @Seamus the thing is that in my application I have a switch that supplies the entire system but I don't want to place my Raspberry after that switch so I can do safe shutdown. I though of supplying my Raspberry Pi directly from the battery and using the switch to detect when should I run the script for shutdown. but now I couldn't find a way to reboot it. I think I have to use that switch to supply the raspberry and find another solution for save shutdown :/
    – mina
    Jun 3, 2021 at 8:08
  • 1
    Sadly, the RPi developers don't make this easy. Perhaps it can't be done easily - the hardware and firmware are closed-source and so only a few have the opportunity. And then there's the "cost thing". Again, unless you're willing to take on some hardware construction, I don't know of any way what you've asked for can be done. I've seen a device called the "Witty Pi" mentioned here - you might have a look at that. OTOH, if you're willing to build some hardware, it can be done.
    – Seamus
    Jun 3, 2021 at 16:47

2 Answers 2

1

The Raspberrypi doesn't have a power button, if thats what you're asking. You could Use a powerstrip with a switch. But make sure to always shut down your raspberry completely bevore toggling the switch, to preserve your SD card.

Or if you would consider adding a button nontheless, maybe you wan't to buy something like the pimoroni onoff shim ? I have no experience with it, so make sure you read the description closely to make sure it does suit your needs. Or google for alternatives.

Or if you don't want to solder, maybe this

1
  • the thing is that in my application I have a switch that supplies the entire system but I don't want to place my Raspberry after that switch so I can do safe shutdown. I though of supplying my Raspberry Pi directly from the battery and using the switch to detect when should I run the script for shutdown. but now I couldn't find a way to reboot it. I think I have to use that switch to supply the raspberry and find another solution for save shutdown :/
    – mina
    Jun 3, 2021 at 8:10
1

You can install a momentary push button to one of the GPIO pings then add the line dtoverlay=gpio-shutdown to /boot/config.txt on your Pi.

It will shutdown the Pi but it will consume a small amount of power, about 35 mA, when in this state.

You can also press the button to power up the Pi afterwards. The default is pin 5 and ground but it can be changed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.