jglazer63
Posts: 14
Joined: Sun Jul 16, 2017 11:10 pm

Remote power button or reset button?

Sun Feb 16, 2020 4:43 pm

I have a number of pi 3s setup as media players but now and again, I need to reset it. Either cycle power or, if possible, reset/reboot it. The only way I can find to do it is to reach around and unplug it and plug it back in. Is there any, more elegant solution? A button on a long wire or something? Can I hook something up to the GPIO to perform a reboot/reset?

jbudd
Posts: 1339
Joined: Mon Dec 16, 2013 10:23 am

Re: Remote power button or reset button?

Sun Feb 16, 2020 4:51 pm

Connect by ssh, sudo reboot?

I have a Pi running Node-Red which accepts an MQTT message pi/reboot and executes sudo reboot to do a clean shutdown and reboot.
Could do the same thing with a Python script to subscribe to MQTT and reboot too.

User avatar
mooblie
Posts: 178
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Remote power button or reset button?

Sun Feb 16, 2020 4:59 pm

Putting a SPST push-to-momentary-make switch across GPIO pins 5 and 6 performs something like what you want, but it's not remote! You have to modify the /boot/config.txt file too. See here:

viewtopic.php?t=191145

alphanumeric
Posts: 2513
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Remote power button or reset button?

Sun Feb 16, 2020 8:38 pm

Just be advised, if you have i2c enabled the dtoverly shutdown option won't work via GPIO 3.

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

Re: Remote power button or reset button?

Mon Feb 17, 2020 4:12 am

with a similar set up as @jbudd above (mosquitto/nodered) and my favorite $10 chinese bargain a tasmota-ised sonoff rf bridge..
https://github.com/arendst/Tasmota/wiki ... ridge-433 which echos any 433mhz RF signal it can decode as a mqtt topic/payload.
This allows the use of many cheap button controllers and alarm sensors as easy inputs to feed node red flows I personally like the single buttons like Image that cost a couple of quid and run for ages on a pair of 3v coin cells

jglazer63
Posts: 14
Joined: Sun Jul 16, 2017 11:10 pm

Re: Remote power button or reset button?

Mon Feb 17, 2020 2:22 pm

I ended up crossing RUN and GND with a momentary switch to do what I need. I really needed a hard reset, not a soft reboot, since sometimes it ends up locked.

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

Re: Remote power button or reset button?

Mon Feb 17, 2020 11:45 pm

for a hard reset and avoiding most complications of mains power you could look at one of the plug inline smart switch options that can be reprogrammed with open source firmware to remove reliance on commercial possibly not free or alive forever servers and phone apps..

an OTA rewrite is even possible with some devices meaning no need to even crack the case..

with a smart switch in place you could embed rules to monitor your pi and automatically issue a hard reset when/if it stops providing services.

emma1997
Posts: 762
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Remote power button or reset button?

Tue Feb 18, 2020 1:14 am

jglazer63 wrote:
Mon Feb 17, 2020 2:22 pm
I ended up crossing RUN and GND with a momentary switch to do what I need. I really needed a hard reset, not a soft reboot, since sometimes it ends up locked.
I agree a true reset is needed with the switch-over from good ol' reliable Stretch to flaky Buster. I'm confident they will eventually get most of those bugs out. Then week of so after that Woody gets released and here we go again... (obviously joking because these guys are doing a fantastic job fixing things.)

Anyway I suggest using both of those button pads because temptation to reset often can cause significant issues with SD card lifespan. Same with slide switch in the DC or AC power line. So IMO that 'safe' shutdown button is still desirable specially when you can't get to the menu.

My solution was to use all 3 (Global & Run buttons just above the GPIO, slide switch on the 12v input) as can be seen here:

Image

User avatar
rpdom
Posts: 16980
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Remote power button or reset button?

Tue Feb 18, 2020 7:59 am

emma1997 wrote:
Tue Feb 18, 2020 1:14 am
Then week of so after that Woody gets released and here we go again... (obviously joking because these guys are doing a fantastic job fixing things.)
Certainly joking... next release is Bullseye. Woody was about 18 years ago. I remember it well. It was the second release of Debian I used.
Unreadable squiggle

emma1997
Posts: 762
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Remote power button or reset button?

Wed Feb 19, 2020 6:35 pm

Yuck Yuck... I guess I'm not as smart as I thought I was. Knowing zero about history of Raspbian and even less about mainstream Debian was unaware of anything older than Wheezy. I just thought they forgot to use the cowboy.

Although Unix was my first OS and much later Linux (Corel/Redhat) it was strictly as an appliance user. Had to do it for work but didn't have to like it so, being DOS/Winders, never delved into details. That is until pretty much tricked into it by you and the other Pi holes. Now I'm turning into one myself. :)

User avatar
rpdom
Posts: 16980
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Remote power button or reset button?

Wed Feb 19, 2020 7:36 pm

Unix was about the tenth OS I used - back in 1995. I did also use DOS and Windows, but started switching everything to Linux between 2001 and 2005.
Unreadable squiggle

Return to “General discussion”