Author Topic: Keeping the FPP alive during power off  (Read 716 times)

Offline algerdes

  • Supporting Member
  • ******
  • Join Date: Apr 2014
  • Location:
  • Posts: 602
  • Kudos: 7
Keeping the FPP alive during power off
« on: April 17, 2017, 09:34:25 PM »
I would have continued with a post I started over 120 days ago, but the forum software warned me to start a new one - so here it is.


1 RPi master (full time power), and 6 FPP/RPi remotes will be used this year.  4 of the remotes will be on power systems that are shut down every night.  That means they will only have power between 4 and 5 hours (4 hours Sun - Thurs, 5 hours Fri - Sat) to recharge while they are in use.


The biggest hassle we have is with the RPi getting corrupted.  I know folks have said that I can use the "read only" mode, but honestly I haven't seen anything that says this is easy to employ and easy to update.  Corruption problems last year caused a complete rethink of one area of the show.  I do NOT want to go through that again.


As one alternative, I'm working on putting together a solar charge system for each location that powers down.  It would have to be one that coexists with 110 power (properly transformed to the needs of the RPi) and in some cases a PiHat.


Any leads as to how to make this happen will be greatly appreciated.


Al



Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 506
  • Kudos: 10
Re: Keeping the FPP alive during power off
« Reply #1 on: April 17, 2017, 09:56:35 PM »
Have you tried turning off logging on the FPP?  That one simple thing will greatly reduce the likelihood of corruption on power off.


The next thing that's pretty easy is to use the Shutdown scripts and schedule them before the power goes off.  I use this method on all my remotes and have zero corruption issues
Vixen and xLights for sequencing / FPP for scheduling and playing / Falcon controllers for pixels / DIY controllers for everything else

Offline andyaz

  • Full Member
  • ***
  • Join Date: Jan 2016
  • Location: Tracy, CA
  • Posts: 107
  • Kudos: 2
    • Bentley Lane Holiday Magic
Re: Keeping the FPP alive during power off
« Reply #2 on: April 17, 2017, 10:00:53 PM »
Last year I used the remote shutdown script quite successfully.
After the last run of the show I had the scheduler in the master pi send the shutdown command to all the remotes. An hour later AC timers killed power to the 3 remote rPis, power supplies, and F16v2r controllers in the yard. 30 minutes before showtime the next day the timers turned the power back on and everything rebooted ready for the master to start the show.
I had no trouble with corruption at all. The master Pi in the garage was on a UPS and was the only one to stay on full time.


http://falconchristmas.com/forum/index.php?topic=5906.0

Offline Sawdust

  • Full Member
  • ***
  • Join Date: Nov 2015
  • Location: Northern CA
  • Posts: 246
  • Kudos: 0
Re: Keeping the FPP alive during power off
« Reply #3 on: April 17, 2017, 11:01:26 PM »
I have mentioned this in other threads, but feel it should be repeated.

Last seasons Halloween and Christmas I ran a master and 2 FPP/Pi Zero as remotes.  The Pi Zeros run with no USB Storage.  I use the a one drive system, using the Micro SD for storage as well as the op.  So if anything can corrupt the boot system, this should.  However, I did turn off all logging, so there were no writing to the SD.

Throughout both show I shut down every night, using power off via smart relays timers.  The shutdown sequence was not used, I just cut the power 15 minutes after the FPP schedule ended.

In addition, with the abundance of rain in California this year, I experienced several ground fault shutdowns, while the show was running. 

You would think with all the shutdowns, scheduled or not, I would have corrupted one of the boot systems, but not once.   I think the key is to turn off all the logging......not likely going to change a read only system.





Offline algerdes

  • Supporting Member
  • ******
  • Join Date: Apr 2014
  • Location:
  • Posts: 602
  • Kudos: 7
Re: Keeping the FPP alive during power off
« Reply #4 on: April 18, 2017, 06:09:07 AM »
Have you tried turning off logging on the FPP?  That one simple thing will greatly reduce the likelihood of corruption on power off.


The next thing that's pretty easy is to use the Shutdown scripts and schedule them before the power goes off.  I use this method on all my remotes and have zero corruption issues


Both good ideas.  The part about using the shutdown scripts is a problem.  The power is shut down manually and varies depending how long cars are in the park each night.

Offline algerdes

  • Supporting Member
  • ******
  • Join Date: Apr 2014
  • Location:
  • Posts: 602
  • Kudos: 7
Re: Keeping the FPP alive during power off
« Reply #5 on: April 18, 2017, 06:11:22 AM »
I have mentioned this in other threads, but feel it should be repeated.

Last seasons Halloween and Christmas I ran a master and 2 FPP/Pi Zero as remotes.  The Pi Zeros run with no USB Storage.  I use the a one drive system, using the Micro SD for storage as well as the op.  So if anything can corrupt the boot system, this should.  However, I did turn off all logging, so there were no writing to the SD.

Throughout both show I shut down every night, using power off via smart relays timers.  The shutdown sequence was not used, I just cut the power 15 minutes after the FPP schedule ended.

In addition, with the abundance of rain in California this year, I experienced several ground fault shutdowns, while the show was running. 

You would think with all the shutdowns, scheduled or not, I would have corrupted one of the boot systems, but not once.   I think the key is to turn off all the logging......not likely going to change a read only system.


I truly hope that my luck will run in the direction that yours did.  Unfortunately we did get corruption last year right up to the time I moved the FPP to a continuous circuit.

Offline algerdes

  • Supporting Member
  • ******
  • Join Date: Apr 2014
  • Location:
  • Posts: 602
  • Kudos: 7
Re: Keeping the FPP alive during power off
« Reply #6 on: April 18, 2017, 06:13:04 AM »
The FPP/RPi units are coming out of storage this next week.  I'm going to set them up and  run them through their paces (after upgrading all to the latest version of FPP). 


I'll turn off logging, and then we will see.
Thanks for the ideas.

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 506
  • Kudos: 10
Re: Keeping the FPP alive during power off
« Reply #7 on: April 18, 2017, 07:23:14 AM »
  The power is shut down manually and varies depending how long cars are in the park each night.
Does your playlist have a set end time or run continuously until somebody kills the power?

If your playlist has a schedule end time, Shutdown script can be put at the end of your playlist schedule.  Killing the power can happen any variable time after that.   

Offline Sawdust

  • Full Member
  • ***
  • Join Date: Nov 2015
  • Location: Northern CA
  • Posts: 246
  • Kudos: 0
Re: Keeping the FPP alive during power off
« Reply #8 on: April 18, 2017, 07:54:23 AM »
  The power is shut down manually and varies depending how long cars are in the park each night.
Does your playlist have a set end time or run continuously until somebody kills the power?

If your playlist has a schedule end time, Shutdown script can be put at the end of your playlist schedule.  Killing the power can happen any variable time after that.

If the shutdown script "writes" to the SD, then using it puts the FPP/Pi in jeopardy for corruption.  I just do a power off and I reboot fine at power on.

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 506
  • Kudos: 10
Re: Keeping the FPP alive during power off
« Reply #9 on: April 18, 2017, 08:03:58 AM »
If the shutdown script "writes" to the SD, then using it puts the FPP/Pi in jeopardy for corruption.
The shutdown script runs the Linux shutdown command which is, technically, the "proper" way to shutdown the OS

Offline Sawdust

  • Full Member
  • ***
  • Join Date: Nov 2015
  • Location: Northern CA
  • Posts: 246
  • Kudos: 0
Re: Keeping the FPP alive during power off
« Reply #10 on: April 18, 2017, 08:08:37 AM »
If the shutdown script "writes" to the SD, then using it puts the FPP/Pi in jeopardy for corruption.
The shutdown script runs the Linux shutdown command which is, technically, the "proper" way to shutdown the OS
I agree, It should be, but if it has potential to corrupt the OS, than I'm not going to use it....it may be an FPP thing.

PS: Ground Fault shutdowns don't allow for the Shutdown script.



I truly hope that my luck will run in the direction that yours did.  Unfortunately we did get corruption last year right up to the time I moved the FPP to a continuous circuit.

In preseason test I was running into the same issue, blowing the boot track almost every time I started testing something.  Even just using the shutdown sequence could damage the boot track.  Them someone hinted to turn off logging.  I wish I remembered who that was, I feel I owe them a case of beer.

I think your next step should be to turn off the logging, and just try to corrupt.  Not sure you can!
 

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 506
  • Kudos: 10
Re: Keeping the FPP alive during power off
« Reply #11 on: April 18, 2017, 08:46:04 AM »
Ground Fault shutdowns don't allow for the Shutdown script.
I agree.  Power can unexpectedly fail at any time and turning off FPP logging greatly reduces the chances of corruption during unplanned power loss.  I also have FPP logging disabled for this reason.  But if you can schedule/run the shutdown script for planned power-down its always going to be cleaner than just killing power - even with FPP logging off.

Quote
I think your next step should be to turn off the logging, and just try to corrupt.  Not sure you can!
You can!  FPP logging is not the only disk writing that happens.  The OS does its own logging even with FPP logging disabled (take a look as SYSLOG for example).  And there are other writes that can happen with FPP logging disabled.  Disabling FPP logging greatly reduces the amount of writing, but doesn't eliminate it.

Think about it.  What would be the purpose for any OS to have a SHUTDOWN command if it was going to cause more corruption than just killing power?  The whole purpose of having a SHUTDOWN command is to safely and cleanly shutdown, halt, and power-off the system.
« Last Edit: April 18, 2017, 09:05:43 AM by pixelpuppy »

Offline Sawdust

  • Full Member
  • ***
  • Join Date: Nov 2015
  • Location: Northern CA
  • Posts: 246
  • Kudos: 0
Re: Keeping the FPP alive during power off
« Reply #12 on: April 18, 2017, 09:17:50 AM »
Ground Fault shutdowns don't allow for the Shutdown script.
I agree.  Power can unexpectedly fail at any time and turning off FPP logging greatly reduces the chances of corruption during unplanned power loss.  I also have FPP logging disabled for this reason.  But if you can schedule/run the shutdown script for planned power-down its always going to be cleaner than just killing power - even with FPP logging off.

Quote
I think your next step should be to turn off the logging, and just try to corrupt.  Not sure you can!
You can!  FPP logging is not the only disk writing that happens.  The OS does its own logging even with FPP logging disabled (take a look as SYSLOG for example).  And there are other writes that can happen with FPP logging disabled.  Disabling FPP logging greatly reduces the amount of writing, but doesn't eliminate it.

Think about it.  What would be the purpose for any OS to have a SHUTDOWN command if it was going to cause more corruption than just killing power?  The whole purpose of having a SHUTDOWN command is to safely and cleanly shutdown, halt, and power-off the system.

I do not disagree with anything you say, but I cannot change my process - "if it ain't broke, don't fix it"

Offline MyKroFt

  • Administrator
  • *****
  • Join Date: Mar 2013
  • Location: NC Montana
  • Posts: 1,389
  • Kudos: 54
Re: Keeping the FPP alive during power off
« Reply #13 on: April 18, 2017, 09:13:38 PM »
Would I would do is get a usb battery pack, it can/will be charged when power is on, will also keep it running on power loss/brownouts.


Then I would use a - not sure what they are called - but are used to power a computer in a vech for a music system - but its a external board, it monitors power, when power is lost after a certain time, activates a gpio interface pin.  There is a service that will monitor this pin status, after a pre determined amount of time, will execute the linux shutdown command.


Upon power restoration - everything will boot back up and continue according to the schedule.


With the battery pack - the pi never looses power - just make sure you find one that will allow charging while the attached device is drawing power - amazon has a couple that I know of.


Just my 2 cents


Myk


Offline algerdes

  • Supporting Member
  • ******
  • Join Date: Apr 2014
  • Location:
  • Posts: 602
  • Kudos: 7
Re: Keeping the FPP alive during power off
« Reply #14 on: April 18, 2017, 10:10:32 PM »
  The power is shut down manually and varies depending how long cars are in the park each night.
Does your playlist have a set end time or run continuously until somebody kills the power?

If your playlist has a schedule end time, Shutdown script can be put at the end of your playlist schedule.  Killing the power can happen any variable time after that.


Unfortunately, no set end time.  If a visitor comes in 5 minutes before the front gate closes, they get to stay until they have made it through the whole mile.  If there is no one on property when it comes time to close, the attendants go around and kill the power (4 different main power cutoffs).  There are several timers throughout the park, but none of them have a show device connected - just old fashioned LED strings.


 

Back to top