Sorry to aak this maybe simple question.
I want to get HA rinning in my rv as well.
Ive connected my pi4 to the 12v of the camper and it is running.
When at home the pi connects to my home WiFi.
I can connect to HA easily.
But on our travels I have a Nighthawk M6 in the camper to create a rv WiFi network.
The WiFi is perfect running.
Can I connect the pi to the M6 automatically when that WiFi network is up. And if the home WiFi is detected it will connect to my home network.
So I can access the HA with my tablet who is connected to the same WiFi network.
Can HA switch over to a known WiFi network when detected? Just like a phone does?
I don’t think you’re going to get your pi to switch networks. I use essentially the same setup (although I just removed my Pi for a Intel Nuc running Proxmox), and I simply have a dedicated wifi network in my RV so it always connects there. When I’m home, it’s the access point that connects to my home network. The relaying does reduce speed a bit but it’s worth it for the convenience of not having to change wifi networks all the time.
I saw some instructions to add secondary wifi network to a file inside /etc and prioritse them.
But that file does not exist in my HA installation. And I am totaly new to HA and to editing in terminal.
But I am reading posts of people having setup pi4 with HA and switching between wifi networks.
They tell only a small bit how to do it. But I am afraid to skrew up the installation.
There’s not a good way to auto switch. I don’t even know if you can do it with actions or not, but I don’t think so - otherwise you could fool with that as a method. The other option would be to make your nighthawk the exact same SSID as your home so it’s an easy transition.
For me, having my RV network as it’s own independent network helps not only for HA (which I always run hard wired instead of wifi anyway) but also for my Pi-Hole and all the various wifi automation devices I run in there. I’ve tried to do it without and found it a pain to manage honestly.
This SHOULD work. I have a trailer and when we’re on an actual trip (month+) it’s connected to my router via Ethernet, but when it’s just at home it connects to my home WiFi. When we head to my wife’s parents it connects to their WiFi automatically. Unfortunately you can’t set priorities or anything in HA, but in my experience it seems to just connect to anything you’ve previously connected to and in the order of when you last did so.
Sounds great! But sadly it won’t work for me.
I’ve setup two networks and connected to both of the via WiFi. It works manual.
But when I connect to one WiFi network, and the disable that WiFi accesspoint, it won’t connect to the other available, and recent connected, WiFi network.
Weird, because I’ve definitely had this work for me without any interaction on my part. I wonder if it takes a while for it to switch to a different network? It’s a 3 hour drive when I go between networks…
This is the difference, you connect wired in the trailer and wifi when you are home, so HA has two network connections and wifi is the second fall-back, meaning if ethernet is disconnected it will attempt wifi to the SSID you provided in the config.
That could still be useful as @Dennis-en-Nancy might be able to set up something similar to resolve his issue, but that explains why it works for you and not him. It’s not remembering all your various networks (like your computer or phone would), I’m pretty sure that HA can only have on SSID and doesn’t rotate like those devices do.
While this is true on long trips where I setup my own router/internet in the trailer, what I’m referring to are short trips between my house (using my home WiFi) and my wife’s parents (using their WiFi). As I mentioned, it’s a 3 hour trip, but when I get there my HA automatically connects to their network after previously being connected to mine without any intervention on my part.
New addition to my RV setup: we’re currently at elevation in CO, and so it gets cold at night. We’ve been running the fireplace (fancy space heater) in the living room and small ceramic space heaters in the master and toy hauler garage (rear sleeping area.) They have a crude analog dial-type “thermostat” which doesn’t have temperature control in degrees; just “more warm” or “less warm” so we were regularly waking up in the night either freezing or sweating.
Ok, enough buildup. I have a few sonoff S31 relay plug that I wasn’t using yet, so I flashed them with ESPHome and called them “{room} space heater” respectively. I also picked up a couple of Govee H5100 Hygrometers, which are seamlessly picked up by my already-running bluetooth relay (I have a few on ESP32s that do other stuff, so I can “mesh” BT-enabled things like this into HA.) I put one of those in each room so I can read the temp.
Since I now have access to the temperature and the ability to turn on and off the space heaters (since they are fully analog, I just turned the “thermostat” value on each all the way up,) I can let HA decide when to turn them on and off at the wall based on the temp. This was as simple as adding a couple of generic_thermostats like so:
And here’s the temp data for the first night using it:
All told, since I already had the BT relay running and easy access to flash the sonoff S31s, it only took about 15 minutes to configure. HA really is a beautiful thing, once you start to get big building blocks in place
I just picked up the new Garnet 709-BTP7 for my camper and would love to know more about the custom integration you created. The Passive BLE Monitor integration says it covers the Garnet BT systems, but doesn’t recognize the one I installed.
I’ve been asking around if there’s a travel router that can remember multiple SSIDs to to join and the local camper devices would only connect to the travel router.
My TP-Link can do that for one SSID but a co-worker had one he said could remember multiple SSIDs and automatically join them.
Therefore it could connect to home when in the driveway and my hotspot while on the go.
I’m not paying for another cellular device…
Some GL iNet travel router was what he had.
I have a Pepwave Max Transit Duo, which does this (including using Wifi as WAN, so I have multiple prioritized WAN connections configured.) E.g. I have all of my devices connect to the Pepwave AP, and Pepwave connects to either my Starlink router or my Calyx hotspot via Wifi.
For how I’m using it, the device is way overpriced. It has two onboard SIM slots that can also be priority-driven, but since the Calyx SIM moved to T-Mobile (after they bought Sprint,) I can no longer put that directly in the device, so I’m using the intermediary hop via Wifi as WAN. All of that said, it works pretty well.
I found the package that this is forked from and translated it from Italian, making almost no other changes (yet.) The RV use case is a little different from the original, so I tweaked some of the timings so devices are turned off sooner than they would have been originally.
What does all of this mean? I have power monitoring at the pole (via my Watchdog and an esphome that pulls data from it via bluetooth.) I also have a number of sonoff wifi-enabled outlets running esphome that give me power tracking on a device-by-device basis:
If my power usage exceeds the Load Shedding Consumption threshold setting (in the first screenshot above,) then a 5 second timer starts. If after that timer expires, usage is still above the threshold, the automation checks list_entities from the second screenshot in order. It looks at the device for the given switch and finds a power entity on that device. If it is using any power, it turns off the switch and waits 20 seconds. If after that timer expires, we are still above the threshold, it goes to the next item in the list, and so on.
Once the power usage drops below the Load Restoration Consumption setting, the automation starts turning switches back on in reverse order, checking that we stay below the threshold after each one.
TL;DR: Instead of having the breaker at the pole trip when you exceed power, this package turns things off for you, and then turns them back on once there is headroom
There is support for sending push and media notifications, but I haven’t played with those yet.
Oh, and not included, but I wired it up to my existing logic: I have a Shore Power Rating helper that I flip between 50A, 30A, 15A, and Generator to control other things in my HA instance (e.g. turning on and off the generator when my batteries get low or back to full,) so I added an automation to change the threshold settings based on what my shore power rating is set to, since I can obviously use more power when on a 50A breaker than a 30A one, e.g.
If you have any questions, suggestions, or issues, please reach out either here or via a github issue; I’d like to continue to make this better, within the scope of using it for RVing. Thanks in advance!
Dynamic Weather/Location:
Our camper stays connected over a Verizon MiFi X Pro 5G. This device happens to have a built in GPS NMEA stream that can be enabled. I was able to write a simple curl shell command that pulls the latitude, longitude and altitude. This runs every 30 minutes when the camper is away from home and updates the HA location accordingly.
Could you elaborate on how you accomplished this? I would be ok with more of a manual option, but I’m interested in how the automatic option you implemented works.
I did something similar with my pepwave (which also has a GPS antenna and API access to some features of the router.) (Well, I say “did” but I really ripped it off from here.) Here is my pared-down usage, which only covers your question:
In my rest.yaml (referenced in configuration.yaml via rest: !include rest.yaml):
I’m going to be back on this for the current season, last year was a battle with health issues, so now I can get back on the bandwagon. Of of the biggest changes I’m making is deploying Proxmox to my RV so that my Plex, HA, Pi-Hole and GPS location system (for weather) are all on a single box.