User avatar
mroptonix
Posts: 2
Joined: Wed Jan 03, 2018 5:07 pm

Video looper with shut down option

Wed Jan 03, 2018 5:30 pm

For my project, I need a video looper and I found it here:

https://learn.adafruit.com/raspberry-pi ... stallation

It works fine, and to turn off the system I remove the power cable.
But in the above method, they mentioned that you need to connect to raspi board with ssh to shut down the board, because shutting down the raspi by pulling the power cable may cause damage to SD card and in some case maybe need to reinstall the os.

In my project, I need to power on and off my video looper several times in a day. (I do not want to use SSH ) so it's better that have a shutdown button to turn off the raspi.

so is there a method that integrates mentioned video looper with a shutdown button?

any alternative method to do this is appreciated.

Regards

fruitoftheloom
Posts: 17489
Joined: Tue Mar 25, 2014 12:40 pm

Re: Video looper with shut down option

Wed Jan 03, 2018 9:04 pm

mroptonix wrote:
Wed Jan 03, 2018 5:30 pm
For my project, I need a video looper and I found it here:

https://learn.adafruit.com/raspberry-pi ... stallation

It works fine, and to turn off the system I remove the power cable.
But in the above method, they mentioned that you need to connect to raspi board with ssh to shut down the board, because shutting down the raspi by pulling the power cable may cause damage to SD card and in some case maybe need to reinstall the os.

In my project, I need to power on and off my video looper several times in a day. (I do not want to use SSH ) so it's better that have a shutdown button to turn off the raspi.

so is there a method that integrates mentioned video looper with a shutdown button?

any alternative method to do this is appreciated.

Regards

http://www.uugear.com/witty-pi-realtime ... pberry-pi/
Adieu

User avatar
mroptonix
Posts: 2
Joined: Wed Jan 03, 2018 5:07 pm

Re: Video looper with shut down option

Thu Jan 04, 2018 8:30 am

My device is 'Raspberry pi 3 model B' and I want to use GPIO + Python coding to do that.
I found somethings in web but did not work for me (I guess because those methods were for raspberry 2) !
Is there a clear solution (using GPIO + python) for raspberry pi 3 model B to add a shutdown button?

nashosky
Posts: 1
Joined: Wed Sep 12, 2018 2:47 pm

Re: Video looper with shut down option

Wed Sep 12, 2018 2:59 pm

I found a solution for using the 'ESC' key to halt the raspberry pi when playing videos with Adafruit video looper
It involved editing the Python file ~/pi_video_looper/Adafruit_Video_Looper/video_looper.py

Then at the top add :
from subprocess import call

and in the quit function , line 243.
Add this line :
call("sudo halt", shell=True) # Call command to halt system

Then you need to run the install script again :
~/pi_video_looper/install.sh

Then edit the config file to enable keyboard input
/boot/video_looper.ini

And voila! there's probably a cleaner way of doing this, but at least i can turn off the Pi properly by just connecting a keyboard and pressing 'ESC' . No SSH needed.

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 5 guests