The Power of Raspberry Pi–rethinking and restructuring to do even more with less

To start this story at the very beginning, go to this post. To go to the previous post in this series, go here. As it may be clear from the discussion so far, I have a tendency to increasingly add more requirements and functionality to my Raspberry Pi (and/or the newer version 2 RPI-2) computer until it cries “uncle”–or more often than not, just quietly dies under the extreme load. This post is about adding more functionality, but by being smarter, avoiding the dying part–at least for now.

myth tv running on raspberry pi
Every traditional boatwright needs to watch the Woodwright’s Shop for inspiration.

One of our luxurious activities when paying to be at a marina with shore power is to run my Shuttle small-form-factor (SFF) computer with its Intel i7 CPU and lots of RAM and lots of storage space. When it is running, it records over-the-air–using an antenna–HDTV movies and shows according to various rules we have programmed. Those shows are re-encoded by the Shuttle computer in a very efficient format to make the files smaller–1/3 to 1/5 original size–and then saved to a hard drive for later viewing–like when storm-bound in a remote bay somewhere in Alaska.

Our time in marinas is limited and the Shuttle requires too much power to run just for recording shows (producing non-shore power electricity is very expensive) and the movie recording program is way too demanding for a regular RPI. But now I thought maybe, just maybe, the new RPI-2 could record TV programs–of course I really mean do that in addition to all the other stuff the RPI-2 already does.

The program we use to record over-the-air shows is called MythTV. I have a love-hate relationship with MythTV, but we have been using it for about 10 years and it keeps track of every show ever recorded by us so that it doesn’t re-record something we already have on a hard disk or DVD or CD-ROM somewhere on Mahdee or in storage. The challenge for us is that the database for MythTV has a huge number of recordings (way over 10 thousand) to keep track of and the scheduler needs to sort through all of our rules (which are numerous and have evolved from our refinements over those same 10 years) and compare rule-matching scheduled showings to already recorded shows and determine which shows to actually record when so as to optimize the recordings. I had my doubts that even the RPI-2 would be capable–let alone doing that task while also doing the really important stuff like keeping track of the weather and how well the anchor is holding–after all, we do have to keep our priorities straight.

To make the RPI-2 able to record TV movies we had to make some changes.

1. We bought a network HDTV tuner (HD HomeRun Extend HDTC-2US) that has a built-in transcoder that re-encodes the movies in a more space-efficient format (H-264) on-the-fly. This removes the requirement for the RPI-2 to re-encode the recordings–which it couldn’t do anyway–and keeps the file sizes reasonable. In addition, H-264 is an open standard whereas the original inefficient proprietary format used in over-the-air transmissions requires one to buy a MPEG license before the RPI-2 can perform hardware decoding for viewing. So not only is the output of the HD HomeRun more space efficient, it also uses an open standard that doesn’t require the purchase of a license. The HD HomeRun even runs on 12V DC which is nice. So we installed a 60W regulated 12V DC power supply on Mahdee to use the HD HomeRun off a 12V DC battery.

2. The other change was to continually power up the Linksys Wifi router. The Linksys is also powered by 12V DC–so it can use the same newly installed regulated power supply as the HD HomeRun. Earlier, we tried to make the RPI be Mahdee’s Wifi access point in order to save the power required to run the Linksys. Running the Linksys offloads the Wifi access point functions but more importantly, also provides a needed Ethernet hub. The hub makes is possible for the HD HomeRun tuner to be available to the RPI-2, as well as to my Shuttle computer, all over fast Ethernet rather than Wifi. Further, we decided that we could also keep running the old RPI and use it via Ethernet to offload some functions from the new RPI-2–such as internet gateway, firewall, GPS server, network time server using GPS, secondary/backup anchor position alarm, Scrabble game server (oh–didn’t I mention that requirement), as well as that coveted contact and calendar schedule web server.

The net result is that, even though we now have two Raspberry Pi’s running (an RPI and an RPI-2) along with a network TV tuner and a Linksys router (the latter two alone adding 24 amp-hours a day to our afloat battery usage), our electric power usage is less than half of what it was at the dock with the Shuttle computer running. We are now getting recordings and a practical, fun to use computer that is available 24-7 even while at anchor. All that while logging weather and boat data and monitoring that important data with alarms to keep us safe. The RPI-2 has been exceptionally reliable with our previous and current up-time exceeding three weeks since the last intentional reboot.

When passage making, we can turn off the network TV tuner, Linksys router and the RPI to reduce power usage without loosing any important functionality–e.g. don’t really need our contact server in the middle of the ocean. And with no TV tuner, we can turn off MythTV and have plenty of CPU capability on the RPI-2 to run the OpenCPN chart plotter which can use either the weather/boat data pseudo serial port on the RPI-2 for GPS data or the GPS data on the RPI if it hasn’t been secured to save power. With this nice flexible and stable setup, I have to keep telling myself not to add anything new. Unfortunately, I know that it is only a matter of time before I come up with new ideas of things/tasks/programs to add to the RPI-2. With any luck, a new more capable RPI-3 will come out before I completely overload the RPI-2. Right now, however, I am really happy with both my RPI and RPI-2.  Next I will cover some tips for running MythTV on the RPI-2 without impacting all the other stuff the RPI-2 needs to do.

Pictures of Helper Tools: Freebag Pro

One thing leads to another it seems, for example, last summer while I was linking the Schooner Chandlery’s Freebag store page to the video of their yachting product, I discovered the Freebag Pro on their Norwegian site. As I read all about it, I became excited by the product. Really excited. The original Freebag was developed by Norwegian yachtsmen to increase comfort and endurance on long voyages in rough waters. Out of that development came the Freebag for Yachting and the smaller Freebag Pro for Industrial Use.

Over the years, use of this Freebag has been explored by a wide range of groups, ranging from archaeologists spending days on their knees, photographers seeking the best image in an awkward situation, and welders often working in cramped uncomfortable positions. I watched the video with guys using the Freebag while kneeling on rebar and then using the Freebag in a pool of water.  I saw it used to cushion the worker’s shoulder while carrying pipes and knees while setting floor tile.  I thought “I want one of THOSE Freebags!” David and I, like most other DIY boaters have spent countless hours and days on our knees or even contorted into uncomfortable places with stringers and bits and pieces of the boat jabbing us in the side, back, and chest as we try to get something done in an awkward place.

Both David and I thought “Oh, if we’d only had this while doing Mahdee’s rebuild — wouldn’t that have been nice!” We still have our crawl around and contortion jobs — from cleaning the bilges to replacing the raw water impeller on the engine — so there are still numerous opportunities to be jabbed by hard and sharp bits of Mahdee.

While I was working with Freebag to arrange for the yachting Freebag to be imported, I chatted with the Freebag company telling them how excited I was about the industrial product and I learned that, in Norway, the industrial Freebag is sold by a chain of tool stores and pretty much every archaeologist there has one too. The company sent me a few of the industrial Freebags for US DIY boaters, boatwrights, and yard workers to test out. Of course, the first thing I did was check out the product for my own varnishing contortions on Mahdee’s foredeck. David also made use of the Freebag while cramming himself into the lazarette for a project. The lazarette door has an uncomfortable 3″ threshold that jabs you in the ribs, back, or whatever part of you that spans it.  Unfortunately we have reason to work in that tiny space with some frequency.

As Mahdee readers know, I’m the varnish person aboard. But I wanted to get some photos.  So David demonstrated the Freebag Pro as we have used it so far on Mahdee: kneeling and laying on it to varnish. I also took a quick picture while David was using the Freebag in the lazarette. All-in-all, a great product for our use during DIY projects aboard Mahdee.

Below:  The Danforth Anchor blocking includes some very pointy bronze hardware that gets in the way when varnishing the foredeck.

danforth anchor brackets

It is much more comfortable to lay on the Freebag than on the pointy bronze hardware!

2

The perimeter of the boat includes a lot of covering boards and bulwarks that lead to many hours of on-knee time while varnishing. I dislike knee pads and so the Freebag is perfect for my use when kneeling.

kneeling with Freebag for industrial use

This Freebag Pro is smaller than the yachting Freebag and while it is big enough to sit on, it is small enough to hook to your belt to carry it around a worksite.

Belt carry of the Freebag for Industrial Use

Freebag for Industrial Use

The lazarette threshold is over 3″ tall and about 1″ wide with sharp corners that dig into your back as you’re halfway in the space to lubricate the worm gear steering, rearrange the mooring lines, work on the engine exhaust or, on the port side, to open and close the generator exhaust thru-hull each time the diesel generator is used.

lazarette threshold

This Freebag isolates your body from the threshold.

isolate

The Freebag also cushions the rest of you because it’s just long enough for the length of an average size person’s torso.

cushion with Freebag for Industrial use

We’ll be putting more information online over in the Schooner Chandlery about Freebags — and the Freebag company will be taking pre-orders for the product here in the USA soon. In the meanwhile, David and I will continue to be among the few lucky DIY boaters who have a Freebag Pro!

Google Analytics Alternative