How I Set Up My RV for HA

The Mifi address is 192.168.1.1. I enabled the built in GPS stream on port 10110. Below is the shell command that an automation calls every 30 minutes when the camper is away from home.

#!/bin/bash

GPSLOC="` curl -s --http0.9 192.168.1.1:10110 --output - | grep -a GPGGA -m 1 | cut -d, -f 3-10 `"
GPSLAT="` echo $GPSLOC | cut -d, -f 1 `"
GPSNS="` echo $GPSLOC | cut -d, -f 2 `"
GPSLON="` echo $GPSLOC | cut -d, -f 3 `"
GPSEW="` echo $GPSLOC | cut -d, -f 4 `"
GPSALT="` echo $GPSLOC | cut -d, -f 8 `"


if [[ $GPSNS =~ "S" ]]; then GPSLAT=`echo "0-$GPSLAT" | bc`; fi
if [[ $GPSEW =~ "W" ]]; then GPSLON=`echo "0-$GPSLON" | bc`; fi

GPSLAT=`echo "($GPSLAT/100)+(($GPSLAT%100)*.016666667)" | bc`
GPSLON=`echo "($GPSLON/100)+(($GPSLON%100)*.016666667)" | bc`
GPSALT=`echo "($GPSALT-1.8)/1" | bc`
printf '{"latitude":"%s","longitude":"%s","altitude":"%s"}\n' "$GPSLAT" "$GPSLON" "$GPSALT"

The automation runs this command with a response variable “gps_response”:

The next step of the automation is a set_location action using this response variable:

Edit: The shell script above subtracts 1.8m from the altitude because that’s approximately how high the Mifi is typically above ground level.

Considering this as well. Likely on a Mini PC or something but my home runs on ProxMox for so many resources so it seems like the right thing to do for the camper as well lol.

1 Like

@CO_4X4
This week I setup a spare HP 600 G3 Mini I had; Upgraded the ram to 32GB, 1TB M.2 and 256GB SSD with ProxMox 8.4; Then loaded HA and Emby VMs onto it.

Hope to install this next week and replace the 2 Pi4s I have running HA & Kodi and then see where that leaves me. Also need to setup the BM6 battery monitor at some point.