Run Home to Mama: The Bug Pages
This is BugPi in all its glory.
The industrial/steampunk aesthetic of The Bug appeals to me.
It was always my intent to build The Bug to be spartan: strong and capable, but devoid of anything existing only for visual appeal. It was also my intent to have fast, unhindered access to the workings of the machine. I continue to be very pleased with the way this has all turned out.
My most recent road trip with The Bug showed a couple of areas where improvement was called for.
- Outdoor lighting. It gets really dark at night.
- Tweaks on the mounting of my window shades. The supplied method is kind of cheesy.
- Remote monitoring and controls.
Outdoor Lighting and BugPi
I ordered these LED lights from Amazon: RV outdoor lights (NOT an affiliate link, just informational.)
I put a toggle switch inline using my printed mount. I also ran the power through a relay at BugPi so I could control the lights individually from remote. More on those details later.
The trailer's running lights are also controllable from inside the trailer, and so they too got a relay.
The end result is demonstrated in this brief video:
Windows Shades Debacle
These window shades work really well. Unfortunately the way they mount is horrendous. In the first pic below you can see the little white plastic part has rotated. That's because there is only one screw under it, so it acts as a pivot. Really BAD design.
Window shades with the dubious factory mount. Pretty sad.
Using OpenSCAD, I modeled a cap to cover the white part and provide two screw holes to solidly affix this thing to the wall. My fix part just snaps over top of the white part, rotate to correct orientation, and apply two screws. Done!
Window shades with the fix applied. Much better!
Remote Monitoring and Controls
I have a Raspberry Pi 4 taking care of The Bug's needs. I also have this router installed to be the gateway between The Bug and the outside world. In a campground, I connect the router to the local WiFi, then all my devices are connected to the router behind its firewall.
When The Bug is parked at home, the router is connected to my main home router. The Pi (named BugPi) keeps its address on the Bug routers subnet, which is different than the subnet of the home router.
BugPi has these functions:
- Run my Python apps to monitor various statuses.
- Run Mosquitto, an MQTT server which manages some of that data.
- Run MPD to play music on a sound bar in The Bug.
- Display a rolling set of statuses on the LCD screen below BugPi.
- Provide a browser based interface to The Bug's systems.
- Use the attached 8-channel relay board to control anything I want to wire in.
More Detail
BugPi connects with our Bluetti power center via Bluetooth. I wrote some Python stuff to gather up the data from the Bluetti and hand it over to the MQTT server.
BugPi also has a BME280 environmental board attached by I2C as well as a 1-wire thermocouple which monitors the outside air temp under the trailer.
From all this we get data on the solar panels, battery status, power consumption, indoor and outdoor temp, humidity and pressure.
The Bug's MQTT server shares data with two others: one in Brilliant (the home of Mother, my home browser interface), and another at my Digital Ocean droplet. These three MQTT servers work together to centralize and make available all of the information I want all day long. If the Internet is working, we have data. If the Internet is not working, we still have local data.
BugPi also runs a Nginx/Flask/Gunicorn web server that provides me insights and control from any browser connected to The Bug's router. Written in Python, this mirrors the interface we use at home for house stuff. The house interface is served by Brilliant, a little cast-off i3 PC in my office. We call that interface 'Mother'.
When BugPi is home, there are some proxy lines in the nginx server config that bring the light controls into Mother so we don't have to have our phone connected to the Bug router to operate them.
Because I wrote all this stuff in Python, I have complete control over what happens. I'm very fortunate to be able to do that. I do understand, however, that if I make mistakes, I'll have no one to blame. I have some sense of security in the knowledge that nearly all of my data is firewalled from the outside. The few things that are exposed to the Internet are using SSL/TLS and have no public availability. Invincible? No way. Reasonably protected? Yes.
The Bug is and continues to be a Thing That Works. I suspect there will always be some little things here and there to tweak and play with. That's part of the fun.