Design Principles

So we wanted a Smart RV. But what is a Smart RV? And why/how is it useful? And how do you go about implementing the right automation architecture, given the constraints of a moving vehicle? These are the questions we’re trying to answer below.

1. Context and Scope

When we thought about a Smart RV, it was about much more than being able to control the lights. We wanted a system that would help us monitor all essential functions of the Airstream, make changes, as well has implement automations that help us prevent (or potentially fix) serious problems.

The essential features of any Smart RV are :

  • Power management. Energy consumption/generation and battery management are essential, since we cannot rely on being connected to a power grid at all times.
  • Resource Management. Besides power, other resources are limited too: propane, gas, fresh water, gray water, black water. Being able to track the status of all scarce resources is critical to prevent mishaps.
  • Environmental conditions. At the basic level, we want to be able to control temperature through heating or cooling, not just for the comfort of everyone inside, but also to prevent damage from excessive heat or cold. Equally important is the ability to monitor air quality and alert against dangerous substances (like propane, smoke, or CO)
  • Road safety. There is nothing more important for road safety than the ability to monitor all tires. While this is a standard feature on all new cars, it was not in 1984. A solid TPMS system with proper alerting features for pressure or temperature anomalies is critical.
  • Security. It’s always better to prevent than to fix. So we wanted to build a system that would discourage potential burglars from breaking in while also recording everything in case of theft.
  • Reliable Internet Access. While it might be romantic to travel the country disconnected from everything online, that’s too much of a leap for us. We built the system so that we had access both IN (remotely accessing Airstream features) and OUT (accessing the Internet from the Airstream).
  • Comfort Features. Ok, so this is where the light bulbs fit in. But of course we can do much more, like automatically switching from day to night, from home to away, from not sleeping to sleeping, etc. We built a series of automations that will make life in the Airstream comfortable, easy, and fun (as long as everything works).

2. Design Principles

There is nothing revolutionary about the documented scope. Many of the features listed have readily available solutions. But the challenge is that many of them are spot solutions, ie. they solve that 1 particular problem but nothing else. As a result, RVs tend to be loaded with a mishmash of screens, buttons, and sensors without any integration. We thought we could do better.

Here are the key criteria we decided on in designing our automation architecture:

  • Integrated. Rather than having a bunch of point solutions, we wanted all components of the system to be integrated, so that we could create smart automations and alerts that combine different elements (e.g. blink inside front left lights red when front left tire has an issue).
  • Offline. While we listed ‘Internet Access’ as a critical feature of a Smart RV, we didn’t want to rely on Internet access for any of our critical capabilities. This means that cloud-connected automation platforms were a no-go for us.
  • Open-source. Automation platforms tend to be walled gardens carefully curated by the tech giants. We did not want to lock ourselves in to any particular vendor. As a result, we decided to rely mainly on open-source software for the critical components of our automation architecture.
  • Invisible. We spend a lot of time, effort, and dollars to create a mid-century modern interior. We did not want to break the elegance of that interior with any visible tech gadgets. So, we had to design the system in such a way that everything can be tucked away and invisible to the regular eye.
  • Failing Gracefully. Complex systems will fail. Especially when they are subject to constant movement, heat, and cold. When that happens, essential functions shouldn’t be disrupted. So, if our automation platform goes down, we still want access to heating, power, water, lights, etc.
  • No Engineering Degree Required to operate the system. That may sound obvious, but if you let a geek geek out, the danger is that only geeks can operate the system. And that would not be ok. So, we wanted to make sure that all essential components can be operated without apps or complex control systems. Everything should be available through simple buttons and a single touch screen.

3. The Architecture

Smart RV Architecture Overview

The basic architecture has 6 major components:

1. Communications Infrastructure

We decided to go with a Peplink modem/router with three potential paths to the Internet: (i) WiFi WAN (e.g campground WiFi connections or tethering to an iPad with a SIM); (ii) Starlink in-motion dish; (iii) Cellular connection with dual SIM ports. The modem is connected to a Unifi Access Point located in the ceiling in the middle of the cabin to provide optimal connection for all sensors , no matter where they are located.

2. Home Assistant

Home Assistant is our automation platform of choice. It’s open-source, designed to work off-line, and has an active developer community. We decided to install the HassOS on an Odroid server with eMMC. This makes it easy to manage everything from the HA console. The eMMC module replaces SD cards and avoids any risk of data corruption when frequently powering on/off without following the proper shutdown sequence. Learn more.

3. MQTT

MQTT is a standards-based messaging protocol used for machine-to-machine communication, requiring minimal resources. All communication with Home Assistant and between sensors happens over MQTT. This allows us to implement automations without relying on Home Assistant, because sensors can send each other MQTT messages. Learn more.

4. Victron Energy System

Victron is a Dutch company specialized in the design of products for battery-based energy systems. We love their open approach towards developers. They open-source all their protocols and encourage innovation. They have a very active developer community. Their embedded MQTT server is synced with our main MQTT server (learn how). We use their BLE (Bluetooth Low Energy) functionality to connect battery-powered sensors.

5. BLE Sensors

It is hard to connect certain types of sensors to a permanent power source. Think about a fridge temperature sensor. For these sensors, we decided to use Bluetooth Low Energy as the communication channel. Batteries in BLE sensors can last for up 1 year, making them especially suitable for an RV environment. We use these sensors mainly for temperature monitoring, but also for monitoring our propane gas tank.

6. ESPHome WiFi Sensors

Most of our sensors and smart devices contain an ESP WiFi chip and use custom ESPHome firmware. ESPHome is a very powerful, open-source system that allows users to control ESP boards using YAML configuration files. It also makes it very easy to integrate with Home Assistant. Learn more.

4. Non-goals and Implementation Phases

Sometimes it’s as important to be clear about one’s non-goals vs. one’s goals. For us, the most important non-goal was to not worry about redundancy. Trying to add redundancy or any level of fault tolerance would massively complicate the entire project. We investigated setting up duplicate MQTT servers. Very difficult. We looked into deploying a hot spare HA server. Equally difficult, and not power efficient. Setting up dual WiFi Access Points. Again, difficult, and not power efficient. So, rather than focusing on duplicating hardware, we focused on making sure essential functions (heating, cooling, lights, power management) would continue to work without any of our automation systems.

We also decided early on to take a phased approach to our Smart RV implementation. It’s easy to be overwhelmed by the complexity of the system and hence, we decided to try and walk before attempting to run:

Phase 1: Basic Instrumentation

The goal here is to ensure all components of the RV are instrumented properly. Every light, outlet, appliance, and sensor is hooked up to Home Assistant, allowing us to monitor and control its state individually. This, in and off itself, is already quite useful since it allows us to have a deeper understanding of the energy system and easily troubleshoot any unexpected power draws.

Phase 2: Workflow Automation

Once everything is properly instrumented, it’s time to start adding some workflow automations. “Scene management” is a straightforward example of such automations: Switching between “Home” and “Away”, between “Day” and “Night”, or between “Sleep” and “Awake”. We also implemented a “TV Scene” that automatically lowers the light, closes the roller shades, rolls down the projection screen, and turns on the projector.

Phase 3: Self-healing Automation

The idea behind self-healing automation is to have the system constantly monitor its state and trigger corrective actions if something is not right. At the very basic level, a thermostat is an example of such self-healing automation. Other examples include: automated warning triggers when TPMS sensors report an anomaly, turning on the fans when CO2 levels are elevated, turning on the generator when the battery charge has dropped below a certain %, sounding an alarm and starting video recording when the door is opened unexpectedly, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *