|
Well, why would you want to shut it down at all? If it's "far away from people", someone would have to go turn it back on. Put a big enough UPS behind it, and it will run for months. I think a small UPS (no bigger than 650VA, should be more than large enough for even extended power outages.
SD cards are prone to corruption (file corruption notwithstanding). That's why booting from a USB thumb drive is preferable. Putting the Pi on a UPS will mean never having to worry about either. I was simply recommending what I do on my Pi's. (I personally have been burned before by the "corrupted SD card" thing - never again.)
Amazon has a crapload of UPS's for less than $50 that will fill the bill for you.
If you insist on having the Pi shutdown at loss of power, you can still do that via the UPS. I know that there's an app for Linux and APC UPSs, but then again, there's the hassle of sending someone to turn the Pi back on.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 31-Dec-18 9:42am.
|
|
|
|
|
I think I'll go this way, the APC UPS daemon and put a switch there...
That way I'm fully covered:
- If they leave for holidays and want to shut all the devices down, they can just switch power OFF.
- If there is a power outage the UPS will do the work.
- If for any reason any of the softwares there hangs, then they'll be able to reset it easily.
Even I would prefer something like PiJuice Hat, it seems they are having stock problems... And I have not found any replacement that looks good enough...
Thank you John!
|
|
|
|
|
You can also remote in with the terminal, and reset or shutdown. There are ramifications when you connect anything to the Pi pin header (the PiJuice thing). Tread carefully.
You can also get a local Pi to test the apc connnectivity stuff before deploying it to the remote location. If power outages are brief, a small UPS should do the job nicely. You should also be able to have the Pi email you when the UPS kicks on/off, or setup a web app on the pi that you can connect to to keep an eye on things.
Automation is cool once it's setup correctly.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Working in this field and having been bitten many times over the years, our general rule of thumb is to write as little as possible to the boot device. I have no idea why booting from an SD card or a USB drive would make any difference - the corruption is a file system issue. It typically occurs when you are writing to the file system structures
A boot operation is typically read only. I have products in factories that have to run for years, so we have come up with approaches to minimize writes to anything important. For example, diagnostics are collected using a USB drive. Working storage is ram, the results are copied to the USB, the boot device is not touched. Logging is another issue. What we've found is that if writing only occurs on a user commanded basis, typically you don't lose power during that operation .
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
I have 3 Pi's that I am playing with. There is nothing graceful about shutting one down. You just kill the power. I bought a cheap battery UPS and run it with one of them and it works, ie: the Pi continues to run when you kill the power but I still have to kill the UPS power when I want to shut down. I haven't experienced any corruption from the shut down procedure but I do have one experimental OS that doesn't boot anymore (which may be from corruption but seems like more of a video problem).
<sig notetoself="think of a better signature">
<first>Jim</first> <last>Meadors</last>
</sig>
|
|
|
|
|
Terminal in and issue the "shutdown -r" command. Voila! Graceful shutdown.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
In the old days (~thirty years ago), a UPS would have a "dry contact" that would be closed when there is power and it would open when power is removed. We would use an open serial port and wire the RTS line to one side of the contact and the CTS line to the other side of it. Then we set one signal high and monitor the other one and this would tell us when we had power. I am certain you could easily do something similar if you have a UPS with a relay contact. I don't know if they have them any more.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
|
Thinking around two corners, this also explains why so few birds eat at McDonald's.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Looks like a snowman with a red scarf to me.
|
|
|
|
|
...in the UK, we have Mass stabbings[^]
39 people?
What happened, did they form a queue?
[edit]
They changed the article as more news came in: the original didn't mention the party, or that the whole party was arrested for not cooperating; it just said "Man stabbed, 39 arrested for attempted murder". Spoilsports.
[/edit]
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
modified 31-Dec-18 8:41am.
|
|
|
|
|
When I first saw the article, I thought 39 people had been stabbed. But 39 against one!?
/ravi
|
|
|
|
|
He was clearly a popular fellow ... but
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Some people going one better (or 27) than Murder on The Orient Express?
I'll get me coat...
|
|
|
|
|
What a bunch of Brutes!
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Et tu?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Initially, I thought that this was a database-design error, with a one-to-many the wrong way around, but it turns out that the victim was only stabbed once, so it's a one-to-one relationship, and they often cause problems (although I believe that more stabbings, divorces, etc, are caused by one-to-two relationships).
Nutshell version: I blame Oracle.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I finally got SWMBO migrated to Linux (Mint)! I am now in a Windows-free environment at home (not counting the Windows 7 VM I use for the occassional hobby dev work).
She hasn’t used the machine yet, so the true test has yet to be performed.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
John Simmons / outlaw programmer wrote: She hasn’t used the machine yet, so the true test has yet to be performed.
If she's like my wife, she'll find 10 ways to break it that you never thought possible.
|
|
|
|
|
"Hello from Seattle". That's what it says on the back of all earlier generations of Zune devices. Much derided at the time, Microsoft's very late answer in 2006 to the iPod still to this day remains the punchline of many jokes.
I don't care. I just tracked back my original purchase transaction (September 2009), and after some reminiscing and googling, I can establish that in 2009, the Zune HD had just come out, was overpriced, and was not going to be available in Canada anyway, so I settled for the prior generation when Future Shop--now taken over and shut down by Best Buy--cleared out their remaining inventory. I got mine for $99.99, and they threw in the car adapter, itself usually overpriced, for free.
I'm not an Apple fan, and at the time, had already gone through many of the cheaper MP3 players, ranging from $20 to perhaps $75. They all died rather quickly or, because of their own infuriating quirks, met an early demise by my own hand. I found the Zune to be the best alternative and stopped looking elsewhere.
So I've been using it for over 9 years now, and I can confidently say nearly every day. I hardly listen to music, but it's been a great podcast player all this time, and it simply behaves exactly like the ideal podcast player ought to behave. It's been dropped more times than I care to count from considerable height on hardwood floors, concrete slabs, gravel driveways, and even found its way half-buried in dirt in a flowerbed, and somehow always managed to survive unscathed. Even the battery still lasts a lot longer than I need it to.
But 2018 has been a rough year for my Zune. I dropped it on the floor once too many times, and the screen finally cracked at the beginning of the year. Not a big deal, as the cracked area was restricted to a corner and didn't even cover any viewable area of the display. I noticed a problem with static electricity last winter, when the air tends to be drier than it is during summer. It seemed like every time I reached for it, I would hear (and feel) a tiny spark, and almost invariably, the Zune would immediately reset itself. But it kept going, until one day a spark seemed to have fried the firmware (it actually showed a message indicating it needed to be re-flashed). I managed to re-apply the latest firmware through some nasty hacks I won't get into, which brought it back to life. It survived the remainder of winter, then the static electricity problem disappeared as we went through spring, summer and fall, although by then it did get dropped on the floor a few more times, and I guess because it'd already been weakened, it developed another, much larger crack. Now with winter back, static electricity still causes the occasional reset when I pick it up.
Then a few weeks ago, after leaving it in the car for a few hours when the temperature dropped to -30C, the Back button stopped working. Nothing gets it working again, so if I'm navigating the menus and need to go back up one level, I have to force it to power off, and then power it back on to get to the root menu--very impractical.
To finish it off, now the backlight may or may not turn on anymore. This is pretty much the last straw.
In hindsight, never have I owned an electronic device work for so many hours and take such a beating for such a long time. I knew the day would come, so a few years ago I went trawling (not trolling) a local eBay equivalent and purchased two spare Zune HD players for a lot less money than they originally went for. What few competitors still existed at the time still sucked. I'm finally putting the "new" players to good use, but it's clear that by the time the Zune HD had come out, the touchscreen craze had already taken over, and I'm finding it to be a lot less user-friendly. For one thing, I could count the clicks as I pressed the original Zune's big fat round button so I could perform most functions in the car by feel and not take my eyes off the road, which is not possible with touchscreens.
Is there a point to this? Other than saying the Zune got a lot more crap than it should have, probably not. Like most underdog stories, this one deserved a lot more praise than any of its competitors ever got.
|
|
|
|
|
I'm not an Apple fan too, but I have to admit that the Ipod Touch 1st generation that I once got as a gift in 2008, is still in use as an mp3 player today !
|
|
|
|
|
|
Quote: One person in the Netherlands had just watched the film Braveheart and called to ask questions about the plot. What's so odd about that, it's a film that raises a lot of questions !
|
|
|
|
|
It's the "blood group" one that would worry me: count your kidneys on the way out ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
The FO should spend more time answering stupid questions; they'll do less harm that way.
(This also applies to all other government offices, in all other governments)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|