Wolf's Roadtrek Motorhome Modifications
... and Other Stuff
PiRV (and PiRVREAR)
The pictures here can be clicked for a much higher resolution version!
Does it crash often?
I am no programmer. I have no more than a formal education in Fortran punched into paper cards and fed into an IBM 360. You ever punched cards? Have you ever fed paper cards into a 360? Everything else I have learned myself. That being said, I did play “Lunar Lander” on an IBM 360 in 1976 or so. I programmed programs I have sold. I programmed a 6809 assembler amateur radio repeater controller. I probably don’t have your insight into objects and recursion and who knows what. No time for that.
represents hundreds of hours of my own banging against a problem I needed to
solve. Here’s the problem.
Flying with a Raspberry Pi
When flying my 1957 Cessna 172 I run two seven inch Samsung tablets. The program called Avair receives data from a Raspberry Pi running Stratux software. I get maps, speed, vertical speed, bearing, distance and about a hundred of other pieces of information. Here is a web page on how I have that set up.
Most important to me, from the FAA I get ADSB data that plots aircraft who are flying around me. I can visualize, plan and avoid other aircraft. It is a fantastic tool in the cockpit.
That implementation uses a VK-162 USB GPS receiver which has excellent precision. It allows the Pi to be remote with only the tiny GPS head on the dash. Data is sent to the tablets via wifi.
The programs interface to a web page
The programs interface to a web page that sort of looks like this: WEB PAGE
You set the alarms, view the temperatures and see the status via the web page. This web page is served out of the PiRVREAR Pi running Apache.
In order to do this, you need mobile internet either through a phone or through a puck designed to allow it. I have Wow cable internet at home. I have Verizon on my cell phone. I decided to go with T-Mobile for the puck. That gives me three options from home, two from the box.
The first one to ask, "What happens if you don't have internet coverage?" is going to get a special reply. "It is just like your toaster. Go to your toaster. Unplug it. Put two pieces of bread in the toaster. Turn it on. You will notice you don't get toast because you don't have power. Not having the internet in the motorhome is a lot like not having the toaster plugged in."
A heads up digital speedometer
I have a 2016 Roadtrek motorhome, a 190 Popular based on a 2015 chassis. It has an analog speedometer. I need a digital speedometer. Yeah, as all projects start, that seems not so hard. Read a GPS and put it on a screen on the dash.
Fridge/freezer temperature monitoring
I monitor the fridge and freezer temperature. Those are displayed and the background changes should the temperatures rise above a particular limit. It also sends a text alarm when it goes above a preset temperature. I have always had some sort of thermometer in my fridge. Not what I want. I want to be warned when the fridge goes over a certain temperature.
Monitoring internal temperature
(protecting the dogs)
On the Outer Banks of North Carolina, in Kinnakeet on Hatteras Island, is a restaurant called “Gidget’s Pizza and Pasta”. They have a dish called “Spaghetti a la MC”. “Grilled green and red pepper, onion, mushroom, 2 meatballs, a link of a la MC Italian sausage over angel hair and marinara with mozzarella.” When I am on the island I need Spaghetti a la MC. It is one of the few culinary debaucheries that I allow myself. Purple pill at the ready, Alka-Seltzer at the standby, I have to imbibe.
The dogs demand to come. They can’t come in the restaurant. They know that. They still want to hang in the motorhome while I imbibe. This restaurant in in a latitude that a person from the Cleveland, Ohio snow belt is quite attracted to. It is warmer. On the flip side, sometimes a bit too warm … for dogs ... waiting in the motorhome.
For this I have the internal temperature monitoring function. If the temperature goes above a set temperature, I get a page. If it goes below a set temperature I get a page. Problem solved. If I need to, if the temps require it, I can leave.
While in the restaurant I can call up the web page and monitor the temperature.
FUTURE EXPANSION: I plan a couple of additions. First, if the temperature alarm is not addressed within some time period, I will sound an audible alarm. Second, I plan on starting the motorhome having left the air conditioning on.
The temperature sensors
Solder the connections both to the resistor and to the Pi. DO NOT USE PUSH ON CONNECTIONS. Tape the resulting connections to a piece of popsickle stick. Tape or otherwise secure that to the case.
There are so many things working against push on connections. Vibration, heat/cold cycling, dust, there are all kinds of things that will thwart push-on connections. You need a soldering kit. Search for “Tabiger Soldering Iron Kit” on Amazon. There are excellent “how to solder” videos available.
I want to see the time. I want to be able to set it so that when the motorhome grinds over a time-line I can reset it.
FUTURE EXPANSION: Set the time based on the GPS location.
The ability to dim a screen is not a given. Driving I-77 in southern Virginia in the fog will teach you things you cannot learn in any other way. That screen needs to be dark!
Where's Dad? (not yet functional)
I want to let my kid know where I am. Sometimes I am on a coddiwomple.
I want to serve a web page that tells my kid where I am and where I am headed. I want him to be able to click on a web page and find me. Or at least my motorhome.
OBD data (not yet functional)
I want to monitor OBD data and not just get an idiot light. I want a full, extended long-winded discussion as to why the engine light just came on. I’ve not programmed that yet. The plan is for the OBD button to go red when there the OBD throws an error. Click on it and it will come up with what is being reported.
Why two Raspberry Pis?
In the end, the Pi that can crash is the one in the back. I need my analog speedometer. The front Pi is for a mission-critical function. Second, I am too lazy to run numerous wires all over the motorhome.
The front shows speed and demonstrates what the back has seen. If something goes wrong on the back, the front troopers on. That is why I have a front and back Pi.
Which Pi to use?
I use whatever is latest and greatest. I have, on other occasions, used Pi Zero Ws to do the work of a Pi [enter latest high-end model here]. Do what you can afford.
If you have not worked with temperature sensors or GPS, Mosquito servers and clients to talk between the computers, if you have not sent a text to your cell phone, THEN KNOW THAT YOU HAVE MOUNTAINS TO CLIMB. If you are an experienced Python programmer all the better. If you have decided to learn Python with this project, good luck. I sure did learn a lot.
Temperatures are monitored over one-wire devices. I use them with the W1thermsensor library. Easy. I have not figured out where to put a sensor to measure outside temperature. The current dash gives an outside temperature and I have found that adequate. Not sure I really need to replace what is already there.
If you have never gotten into the head of a GPS device, prepare to be astounded. Friggin’ awesome amount of data is coming your way. How you use it is up to you.
Each Pi "pings" home through a text
Each Pi sends a text at midnight to advise it is alive and the IP address it is using.
So here is the code
I have left the Python source code at:
Here is a date: November 22, 2020. If a lot of time passes, know that I am probably not going to remember the code. In like 1984 and 1997 I wrote help files for problems that happened to a motorhomes I owned back then. I regularly get “can you help me” email on those posts. I cannot. I don't remember much and don't have the motorhome anymore. In like manner here is a list I cannot help you with:
Please don’t ask, “Why isn’t my temperature sensor working?” Google is your friend.
Breaking down a problem
When I got stuck here is how I worked through it: I started a new editor and make a copy of the program. In this test copy I delete out as much of the code as I can leaving ONLY the code for the problem. I run one function for one purpose. That often leads me to the solution.
I am not really interested in making my code sleeker, cleaner, faster. It works and I have other projects I want to start. That’s why the code is … rough.
So there you go. The best explanation I have. If you have a question on this and you are asking it decades into the future I won't be able to help you. Right now, as I write this in 2020, I am getting questions on a Winnebago Chevy P-31 chassis modification I did decades ago. I remember very little of this. So when someone says, “What is the resistor you used …” my answer, if any, will be, “I did that in 1989. I have no recollection. Good luck, Steve”. Sorry. Or, I may be dead.
The internet has memory and that memory looks current. That memory is probably is not current. Good luck to you. Good programming!
Programmed during the 2020 coronavirus plague.
November 22, 2020