motioneye-project / motioneyeos

A Video Surveillance OS For Single-board Computers
Other
7.83k stars 898 forks source link

Power off button (on GPIO) #2404

Open AN4LOG2K opened 4 years ago

AN4LOG2K commented 4 years ago

Is there a way to add a physical button (such as a momentary switch connected to GPIO 3 or a combination such as GPIO 21 & ground) to power off safely both motioneyeos & the rasp pi. I am using a pi zero W / dev20200223 / pi cam v2 .

The reset (RUN) button could be used to switch the whole system up again.

The goal is to make a portable camera that can be activated and deactivated with the push of a switch when needed without the need for SSH or a Browser.

Cheers

starbasessd commented 4 years ago

Yes. There is a GPIO pin and a dtoverlay file that can be copied into the /boot partition and a couple of lines into config.txt There is a good set of instructions at https://forums.balena.io/t/dtoverlay-gpio-shutdown-and-gpio-poweroff-options-not-working/36467

On Sun, May 31, 2020 at 6:12 PM AN4LOG2K notifications@github.com wrote:

Is there a way to add a physical button (such as a momentary switch connected to GPIO 3 or a combination such as GPIO 21 & ground) to power off safely both motioneyeos & the rasp pi. I am using a pi zero W / dev20200223 / pi cam v2 .

The reset (RUN) button could be used to switch the whole system up again.

The goal is to make a portable camera that can be activated and deactivated with the push of a switch when needed without the need for SSH or a Browser.

Cheers

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ccrisan/motioneyeos/issues/2404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZTUHNOOVMLBG74HPKTPRDRULI3DANCNFSM4NPK6KRQ .

-- Thanks

Kevin Shumaker

Personal Tech Support https://kevinshumaker.wixsite.com/thethirdlevel

N38° 19' 56.52" W85° 45' 8.56"

Semper Gumby “Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA Ethics are what we do when no one else is looking. Quis custodiet ipsos custodes? “There is no end to the good you can do if you don’t care who gets the credit.” - C Powell You know we're sitting on four million pounds of fuel, one nuclear weapon and a thing that has 270,000 moving parts built by the lowest bidder. Makes you feel good, doesn't it?

AN4LOG2K commented 4 years ago

Hi there thank you for your answer. I haven't had the chance to work on this project yet unfortunately. But I will get back to you once I have successfully managed to do it.