In This Post...
“Home Automation” sounds like something that belongs, well… in the home. But since we sometimes live in a van, I could not help but wonder: is there anything the Internet of Things could make easier?
I already had a Raspberry Pi creating a Wifi network in the van (another one of my Magic Spellbooks: inconspicuous Home-Assistant touchscreen kiosks living in a stylish book). Curious what else I might do with it, I began searching around and found the AutoPi project: an IoT platform built on Raspberry Pis and some custom hardware. I appreciate how they’ve built with open-source and open-hardware to create a complete solution for car owners.
I chose instead to work with the Home-Assistant platform. The AutoPi platform does have some nice consumer uses, but is geared more at fleet vehicles and commercial applications. On the other hand, I was already familiar with Home-Assistant and it seemed better suited for my needs.
My entire Van Home Assistant configuration is available open-source on Github.
Security & Dashcams
Having things stolen from the van could be devastating. When we travel and work from the road, we’re carrying our entire lives with us. Not to mention, it’s nice to have a dashcam recording in case of any accident or police interaction.
I started with a Raspberry Pi night vision camera (or this one for a Zero W). The easiest approach is to use Home Assistant’s built-in support for the Raspberry Pi camera. However, this only creates still images. This is good enough for checking in on the van via the Home Assistant UI, but doesn’t do much to prevent theft.
A better security solution is the popular motion open-source project, which can save all video or just detect periods of motion. The various options are quite exhaustive. Most importantly, it can run a script when motion is detected.
When we’re not around, the security camera motion detection becomes “active” and triggers a notification to my phone.In my post about the best uses Home Assistant, I described how we detect when we are at home or not.
Speed, Fuel Usage, and More
I’m a data nerd. I love seeing stats about our trip — all the better if they can be collected automatically.
The OBD II port is standard diagnostic on pretty much every vehicle created in the last decade. A simple bluetooth ELM327 dongle can plug into the port to read everything the vehicle has to offer.
The Home Assistant UI can show graphs including:
- Fuel levels
- Speed & engine RPMs
- Outside temperature & barometric pressure
- … and a lot more.
Plus, a simple USB GPS device is enough to track where the car is at all times.
In my post about living the vanlife with a dog, I shared a scary story about police nearly breaking in to our van to “save” our dog. We started using the relatively low-tech solution of taping a note to the window explaining that Azuli is fine and has her own fan and amenities.
But for our own peace of mind, we wanted to know when the van might become uncomfortable for her. A simple temperature sensor is enough to trigger a notification when it gets too hot (or cold) for her to be in the car. This particular sensor also detects light, air pressure, humidity, and motion — making it a pretty full-featured addition to the Home Assistant configuration.
Tracking Cellular Data Usage
Finally, perhaps one of the most useful features.
Our solution to having internet involved bonding multiple internet connections together. This meant that we could use our cell phones, a Mifi, or connect to local Wifi networks — or use all of them at once. This is great for getting work done on the road, but we have to keep an eye on data usage.
The Verizon Jetpack, like many Mifi providers, can be queried to determine the current data plan usage. I wired up some quick scripts that parsed this information so that they each showed as sensors in Home Assistant. Putting it all together, we get a nice readout on the Home Assistant UI (above) that shows:
- Connectivity (the bars to the left of the Verizon name)
- Data usage so far (and how many days remain)
- Wifi connectivity status
It would be possible to extend this even further. The Speedify CLI (the software I used for internet bonding) can output specific information about how much data is being used by each of the different connections, apply throttling/caps, etc.