Remote reboot capability

As a frequent traveler, I have often found the need to reboot one or both of my PiAware feeders while away from home. The commands available on the FlightAware stats page are of great help unless the feeder is unresponsive. A few months ago, I installed a Belkin WeMo F7C027fcAPL WiFi switch on each feeder. Through the WeMo app (free) on my phone or tablet, I can power cycle either Raspberry Pi CPU to effect a cold reboot. Of course, if the problem is a bad internet connection, nothing works including the WeMo switch. Also, using the “Rules” that can be set up with the WeMo app, I have both feeders shutting down at 1:00 AM local (ADS-B traffic almost nil) and coming back up 2 minutes later. This invokes a clean cold boot daily with virtually no interruption in service. Using a UPS for the Pi’s also helps :smiley: The setup has proven very reliable and usually restores the crashed Pi in seconds.

The model F7C027fcAPL switch has been discontinued by Belkin in favor of a newer, and somewhat more expensive ($60) model. You can still find the older switches on Amazon for about $40.

I’m sure that others have developed or wanted to develop methods to recover a crashed PiAware feeder remotely. I have found this one to be dirt simple and effective. Just wanted to pass it along.

Tom P.

I like what you’re doing and the remote reach is real nice. I’ve only one concern about your daily clean boot. Are you just power cycling to perform the reboot? If so, I’d be concerned with sd card corruption, as eventually you’ll catch the pi at the wrong moment and next thing you know you’ll be re-imaging your sd card.

It definitely would be more graceful to have a script shut the Pi down. One you sharper software guys could help there.

You might want to look into using the Pi’s hardware watchdog. This will reset the system unless it gets a message saying that everything is OK every few seconds.

see e.g. … ng-on.html

The usual watchdog doesn’t actually check anything, it just assumes that if userspace is alive enough that the watchdog process is running, then everything is OK.
You could do more complex things there if you wanted.

You could use approximately the same principle with an external switch, basically a deadman’s switch where you have to continually tell it that everything is OK or else it’ll cycle the power.

If the system is behaving well enough that you can actually shut it down cleanly, then you could of course just tell the system to reboot. The hardware watchdogs are for cases where it’s too far gone for that.

Forgive me if this sounds harsh…

If you have a UPS, a good power supply, and a correctly setup unit, then you shouldn’t ever need this.
Pulling the power every night creates a very dirty boot. It’s as far away from clean as you can get.

If you are finding that you need to be rebooting all the time to keep the system operating, then something is wrong! I would devote time to find the real problem, because your current solution is creating additional problems.

90% chance, your issue is as simple as a power supply with intermittent voltage drops…They may have skimped on some capacitance.

Can your WiMo switch be used without a schedule?
… so you can do a remote power cycle when only needed only (meaning the Pi is not responding to anything)

I second (or is it third or fourth by now) this motion! Power off reboots are not a good idea at all… if you really wanted a daily reboot, You would be better off setting crontab to do an “init 6” on a dailly basis.