Motorhome (RV) Automation (A small side project)

Sorry if this post is long… I hope some people find it interesting :slight_smile:

Due to Covid, all our recent holiday plans went up in smoke.

We had various EU visits planned and booked for the year and some for next year – All refunded now as everything was cancelled by the various airlines.

After much deliberation, my other half and I decided to buy a small 2 berth Motorhome (MoHo) and ‘staycation’ as much as possible for the rest of the year and for next year, possibly crossing the channel to Europe when the Covid restrictions subside. (Assuming we like doing this!)

We intend to spend quite a few week-ends away (Hopefully every other week-end) so apart from all the obvious essentials, I wanted to add a few bits and, of course, a Hubitat hub.

When we first talked about buying, my wife’s first statement was: “No automation – I want peace!”

Obviously, to ‘keep the peace’ I agreed.

However; she didn’t say anything about monitoring :crazy_face:

Quite a few things came to mind…

  1. A Reliable Internet Connection
  2. Leak sensors
  3. Motion Sensors
  4. Internal Security Camera (For when it’s unoccupied)
  5. Door Contact(s)
  6. Temperature & Humidity Sensors
  7. Leisure Battery Voltage (How??)
  8. Need to create an app to report and alert any problems back to ‘base’
  9. Need to create a device driver on a home hub to receive all the data

First-things-first : Reliable Internet

Although UK sites often advertise that they have Wi-Fi, most are very slow or almost non-existent if your pitch is not next to the site office.
Also we quite like the idea of being totally off grid for short periods of time

After checking local bylaws, we found out that our original idea to keep the MoHo on the drive was a non-starter.
We luckily found a storage facility only about 2 miles away at a reasonable price so, when not being used, the MoHo would live there.

This made reliable internet an almost essential item as I wanted to increase security when it is in storage.
After some shopping around and research I decided to buy a complete Wi-Fi/3g/4g system so we could have reliable internet access wherever we are (hopefully)

This was the system I bought

I could probably have bought the components cheaper separately but I was looking for a quick fix

With great trepidation, I drilled a 25mm hole in the roof to fit the antenna.
I must have measured it ~20 times before drilling a pilot hole then finally the 25mm hole

The sim router is based on OpenWRT so has lots of useful feature and a few specific to this router.

One nice thing is the ability to use a local Wi-Fi connection and then ‘failover’ to 3/4g if necessary.

This got me thinking a bit…

Before venturing into the great unknown, and upon our return, we bring the MoHo back to the house to load it up with clothes/food etc. and to clean it before storage.
This usually means that it is sat on the drive for a day each time

This is an ideal time to connect to my home Wi-Fi and do updates etc. I’m also toying with the idea of a local media server for the cold evenings, so will copy movies and music across to the MoHo at this time.

I have now configured the Maxview system to connect to our home Wi-Fi (if present) and to failover to 3/4g when not at home.

Having tested this, a couple of times, I have found it to be reliable in its switching from one network to another.

I use ‘presence’ for the MoHo on one of my hubs so it will know when the MoHo is on the drive

For this, I am using an ST presence sensor in the MoHo (converted to run on 2x AA batteries) and also a virtual device on one of the home hubs to detect the MoHo’s IP connection. (With a reservation on my DHCP server)

So that the MoHo Hubitat knows it’s at home, I also use another ST presence sensor in the house to show ‘present’ on the MoHo Hub.

These presence sensors will eventually be used to trigger copying of data to the MoHo server, but currently just report the MoHo’s presence


Mounting the leak sensors, Motion sensor & Temp/Humidity sensors was easy enough. They are all zigbee (my preference) so easily connected to the MoHo hub

I’m currently using:

  • 3x ST leak sensors
  • 1x Philips Hue Motion sensor
  • 2x Xiaomi temp/humidity sensors

I am also using an ST presence sensor on the MoHo keyring to detect when we are present (more of that later)

Sensing/reporting the leisure battery voltages is another problem which I will get back to…

I was a little concerned at first that the Xioami sensors might not stay connected but they have proven to be reliable up to now.

It should be noted though that the MoHo is only 6.5m long and 2.5m wide so not a large space to deal with

I am not using any repeaters and all devices are connected directly to the MoHo hub.

Security Camera

I am a great fan of the Ring cameras and have multiple devices at home, so when I found out that I can run one of them from a 5v dc supply it was a no-brainer for me to fit one in the MoHo.

These can be configured to only record on movement so should not use too much internet bandwidth (or power) when the MoHo is unoccupied but will also alert should there be movement inside the MoHo when in Unoccupied mode

However; I don’t really want the transmission of videos showing us getting dressed in the morning or undressed at night, (or any other nocturnal activities for that matter!)

I came across the brilliant ‘Shelly1’ relay device

This can be used with 12v dc so was perfect for cutting the power to the camera when we are present (as indicated by the ST sensor on the MoHo keyring)

For quite a few of my USB powered devices, I am using this little device:

I have found these to be reliable and reasonably priced – I have quite a few of them!

Leisure Battery Monitoring

Luckily for us, the previous owner installed a solar charging system with a 100watt solar panel

I am hoping that this will supply enough power to keep the batteries (2x 110ah) topped up with my minimal power usage when storing the MoHo

I have tried all sorts of thing to try and get battery voltage reporting into Hubitat, even adapting a contact sensor to use the battery reporting on this.

Unfortunately, this has proven to be unreliable so my next step is to try one of these:

(Which should, in theory, work)

I have pre-ordered two as they are not released yet, but I am hopeful that these will solve my problem as they have ADC inputs (I remain quite impressed with Shelly devices)

The Hub

The Hubitat hub I am using is a standard C7 with only Zigbee enabled.
(In an attempt to reduce power consumption I have disabled the unused z-wave)
It has only a few drivers and one app added
This is mounted with ‘velcro’ to the inside of one of my cupboards and powered by the usual 12v – 5v dc converter.
Its network is directly connected to the Maxview router with an RJ45 cat 5 cable.

Included Community Drivers:

  • Shelly1
  • Xiaomi Contact sensor
  • Xiaomi Temp/Humidity
  • My email driver

The only other driver used is not on this hub but on one of my home hubs as a receiver for the data sent from the MoHo (via Maker API)

Included app

  • My own ‘MoHo App’

I have only 3 modes configured

  • Home
  • Occupied
  • Unoccupied

Home is when the hub detects that it is sitting on the drive.
I think it’s pretty obvious what the last two are.

Occupied/Unoccupied is controlled via the ST presence sensor on the MoHo keyring.

The Software

The ‘MoHo app’ has been written to perform a number of functions (it’s still a work in progress)

  • Turn on/off the Shelly1 (and hence the camera) based upon mode
    This ensures we are not recorded when near or in the MoHo
  • Collect readings from the various sensors and report them back to ‘base’
  • Send alerts via email & pushover for leaks, motion when unoccupied, door opening when unoccupied, high & low temperatures and high average humidity
  • Sensor data is sent via Maker API to a ‘collection device’ driver on one of my hubs at home

This gives me an idea of what is going on when the MoHo is in storage.

I did consider using HubConnect (as I use that at home between all my hubs) but for my usage, it’s a bit of overkill.

I found Maker API to work just as well without too much overhead.

This what the app looks like so far :

The app reports back to a custom driver which looks like this:


I know that convention is to use lowercase attribute names but this is just for my usage as a display of current data from the MoHo so I added 1st letter as uppercase (just my preference)

This will, no doubt, continue to be a work in progress but I’m having a bit of fun doing it (apart from drilling that hole)

[EDIT] - 08/10/2020
I now have a second app installed on the MoHo hub
'Device Guardian'
This is one of my apps to keep an eye on the devices installed
If they don't 'check-in' to the hub for a certain period of time (I have it set for 24hrs) then I get an alert - This is great for letting me know when batteries fail or if a device slips off the zigbee network

Third app... Maker API
This means with a couple of extra drivers, I can remotely reboot or shutdown the MoHo hub

[EDIT] - 12/10/2020
Added a couple of extra virtual switches and a section to the MoHo app
This enables remote changing of modes should this be required
In addition to this, I have added a 'contact' input to the security section which will later be used for security alerting in 'unoccupied' mode
Also, added a couple of extra attributes to the receiving device



This is super cool! Will definitely be following to see how everything works and what else you come up with!


I had my RV out last week for a trip from Missouri to Minnesota. With all of my lights automated at home, I was thinking "dang, this is a pain--I have to manually turn on my lights!". :stuck_out_tongue:

1 Like

This is the problem I have...
Not sure I can get away with anything yet though.. I have to do this in 'stealth mode' until my other half gets used to the idea :slight_smile:
I think she might notice the automated lights! :slight_smile:



I'll be really happy when I can monitor the leisure batteries' voltage
This is a biggie for me because I know that they are a few years old and I need to keep an eye on them
I can't wait for the Shelly Uni to arrive!


I've been thinking of ways to monitor the 'grey' waste tank on the MoHo
Currently, the in-built system is not very reliable when it comes to alerting about levels

So.. I thought about a couple of contact sensors hacked to have leads on them
With a couple of sensors, one at the bottom, one half way up and one at the top, I can get the info into the Hubitat hub
Then it's just a case of editing the MoHo app and setting up some alerts.
The additional code for the inputs and alerts is very easy & quick to do..
Drilling the tank and mounting the sensors might take a while :slight_smile:

I am way for this week-end (probably the last this year) so will think on this one for a while...


You might want to check out Everlanders on Youtube. I've linked to a playlist where "DIY Water Level and Flowmeters using Blynk and Arduino Project" can be of particular interest to you.


1 Like

I’ve got almost 40 years of RV / Live aboard boats ( they are really the same infrastructure systems, just don’t take your RV boating ). When you get new house batteries ( leisure as you call ). Here we call the batteries in a Motor Home Starting batteries and House batteries. Go with AGMs.


We have the Winegard ConnecT antenna / internet and it works well. You can either activate a sim or you can connect it to a campground WIFI or hotspot off your phone.
As for TV, we have an automatic satellite dome, which is OK for tv while driving but every good campsite has trees that ( somehow ) are just where it blocks the signal 80% of the time but for parking lot overnighters or event ( racetrack, festivals) that are mostly field parking it’s great.



Ya, I’ve seen that. And maintaining the running gear of an RV ( without water submerging ) is a PITA of itself. There is no way ( even if you gave it to me ) I would want to combine the two biggest money pits into one huge complex money pit. The RV repair guy would say “that’s a boat problem, the boat guy would say thats a vehicle mechanic problem and the mechanic would say you need to go to an RV dealer for that.


Clearly, you've been around RVs a while (i.e., you're not bluffing), too. rofl

Honestly, as a seasoned boon docker, I would be more focused on monitoring the amp hours going in and out of the batteries than the actual voltage. Voltage is a very flawed way of reading battery usage.


The factory tank level sensors never really work well. The inside of the tanks are usually always damp with bits of debris which causes false readings

My research into possible project for my own rv sensor system lead me to these non-contact sensors that don't rely on moisture across probes to complete a circuit. Plus no drilling into tank and possible leaks. Note: I never actually used these sensors so I cant speak to their performance. Its on the back burner. Working on an auto-leveling system.

You would need an arduino or esp8266 with Hubduino (wifi) but should accomplish your goal with more reliability.

1 Like

All I’m really concerned with is maintaining a level about a couple of figures
12.1v is around 50% charge and 10v is a danger point to damage the batteries if they stay at (or move below) that level.
This is more for the long storage duration than anything else.. I can always visit the storage site and put a gennie on to top them up if too low.
I know this is not an accurate way to measure the batteries’ capability, but will give me an indication of state of charge.


I’m still working on a few ideas for this.
Also, I have a grey water tank that is only 50l so not really ideal
I may add an additional tank or replace it with a larger one
So the level measurement is going on the back burner for a while :slight_smile:


So, I've come up with a couple of new ideas that I'm working on.

One of the things everyone seems to do (myself included) is use 'checklists'
I hate them but agree that sometimes they are necessary.
With a small motorhome like mine, the lists tend to be smaller than most but still..

One of my checklists is for leaving a pitch
A couple of things on that list I can automate..

  • Did I close all the windows/doors/skylights (roof windows)
  • Did I disconnect the AC mains lead?

The first problem is telling Hubitat that we are leaving..
I don't want any kind of button or alexa command so I thought about this for a while

What's the one thing I do when leaving a site?
"Turn on the vehicle's ignition to start the engine"

So... a 12v relay activated by the 1st click of the ignition key (acc?) can close a pre-wired contact to tell HE that we are about to move.
A few lines of code to check all the windows/doors/roof windows should work
BUT.. I don't want to look at a dashboard or anything

A 12vdc Shelly1 device to the rescue again!

If any contacts are open when the ignition is switched on also turns on the shelly1 relay.. this activates a buzzer.
So now.. if I turn on the ignition and a contact is open I will be informed and can check. Once all contacts are closed, the buzzer stops (by turning off the shelly1)

A 240vac mains relay, connected to one of the socket circuits (along with another contact sensor) will tell Hubitat if there is power connected.
Again the ignition turn on will perform a check and a different buzzer will go off (with another cheap shelly1) - Disconnecting the mains will stop the buzzer by turning off the shelly1

Right now I'm toying with the idea to use TTS to inform about these things but I'm not sure I can get away with this as TTS is considered automation by SWMBO :slight_smile:

This is what my 'MoHo Monitoring' device driver looks like so far...


1 Like

Obviously, I will be looking to use the door/window contacts in some sort of security capacity.. more thinking to do later on that one..

You may also notice that I have a couple of 'ShellyTemp' attributes.
I am playing with a Shelly1 with a couple of temperature probes connected.
I am thinking to monitor the temperature of the grey and fresh water tanks.
This is mostly for when the MoHo is in storage - I'm concerned about freezing and will probably setup a couple of alerts when the temp is too low.
The attribute 'TempStatus is 'ok' or 'freezing' depending on pre set thresholds

I remain impressed with the Shelly devices and @Evilborg (Scott) has done some wonderful work on the drivers!
@Evilborg Will you be doing a 'Uni' driver Scott? :slight_smile:


1 Like

I've ordered a couple from China to play with :slight_smile:

A few more that quickly come to mind from a safety and maintenance POV

  • Did I turn off the propane tank
  • Did I turn off the water heater