Internet and Battery backup on Hass.io

Now that my home automation system is expanding, I would like to make it as reliable as possible. One of the main reasons why I use HA is for my alarm system. However, currently, my system doesn’t have a battery and 4g backup. Thus, if the power goes down, the alarm stops working and if the internet goes down, I won’t be able to know if the system gets triggered.

So I’m looking for the best way to include a 4g backup and a battery backup to my HA instance which is currently running on a Raspberry PI 3 (but I am planning to switch to a NUC).

I’ve read a few other posts online but I haven’t found a solution, yet.

Battery Backup

So we have a few options here:

  • Classic UPS: The problem with this is that most models won’t allow my PI to run for more that an hour due to power loss as the UPS outputs 240v but the battery run on 12v and the PI on 5v so the power has to be stepped up and back down.

  • Powerbanks: Another option would be to use a power bank. The issue is that we would need to find one that supports charging and discharging itself at the same time to power the PI. Furthermore it would have to have an output of 2.5 amps for the PI. Finally, power banks have quite a limited number of cycles.

  • DIY system: Because of the issues which come with a Classic UPS and Powerbanks, I’ve decided to put something together. I’m thinking of using a 12v ups which can be found on Aliexpress which I’ll connect to an 18 Ah lead acid battery. I’ll then use a power converter to convert the 12v to 5v for the pi. This should give me a solid 20 hours of battery backup. Do you think this is a good idea ?

LTE/4G/3G Backup

Now here is the part where I’m really having trouble.
I’ve seen a few options online from this. However for every one I’ll need to change/add some lines of code to the PI. However this cannot be done with Hass.io via Terminal.

I could get a router with a 4g backup, however if the power also goes down, I’ll stop working. I don’t want to connect my router to my UPS at it will decrease the time for which my PI could run on the UPS.

I’m thinking of using a 4g usb stick for this. However, I’ve got no idea how I can get Hass.io to automatically use the 4g usb stick’s provided internet when my ethernet connection goes down. In addition, can you set up port forwarding with a SIM card ? Will I be able to send notifications to my phone via the HA iOS app ?

Generally - no, you can’t, because most mobile operators don’t offer public IPs. There are solutions to this - vpn out to a server with a public IP address, or using tor.

For the first part, googling raspberry pi power backup or UPS will show a lot of options.

For the second part, do you really need remote access for the time your internet is down? If not, you don’t need to port forward.

Cellular backup is a mandatory alarm system feature, it is by far the most important feature of a security system and the one thing that thieves fear the most. Cutting power and internet to a home is basic common knowledge and people have been defeating ADT and other wired alarms with ease until cellular came into the picture. It is much harder to jam 4g and the equipment is not readily available. But luckily, most thieves know they can’t defeat cellular and just putting a sign in your window is enough to deter them as they won’t take the chance. If there was an easy way to get cellular backup workign with Hass.io it would be amazing.

1 Like

Easy enough to do at the router level. But unnecessary at the home assistant level.

No progress in this ??? We can use the USB modem for SMS notify … can we use the LTE to provide Internet backup ? That would complete the security system for Home Assitant

1 Like

So an old thread, but figured I would revive it instead of starting a new one.

One thing I didn’t understand is that OP mentioned he wasn’t interested in keeping the router up, but isn’t that the glue that holds most if not everything together in HA? With no router no wifi. We need wifi but not necessarily internet.

I am looking at a more fail proof system, and I was leaning towards a UPS to run the Raspberry pi (or other setup) AND the router/modem. Then on the “special” tasmota setups (like ones connected to door/window sensors) attach a 18650 to keep providing the 3.3 or 5v if main power goes out.

With this set up, when power goes out, HA and wifi keep running, and special devices with 18650 setup are also keep alive. If someone has a better solution I am all ears!

As for the 4G internet backup. I was hopping to find out that it was a done deal. Seems the current “easy” way would be to buy a 4g ready router. Once we can just put in an active SIM card, and if no internet it automagically switches to the 4g from the SIM card.

I am looking for something much more practical. Either a USB device where I can just slide the sim card in, then plug the sim to the raspberry pi running HA, or perhaps a SIM module connected to the pi via the pins.

The way I am seeing it, if internet is down, i don’t care if any other device has internet, except the HA device. Easy solution with 4g ready router would involve the cost of such router and would require additional configuration if you want ONLY HA to use the 4g connection. Integrating a SIM card directly onto HA, should be much cheaper (cost of the sim card, plus the device to hold/connect the sim card to your HA), and since it is directly connected to the HA host, no additional configuration would be needed to prevent other devices from consuming the megs.

1 Like

No wifi is only a problem if you have WiFi devices. There are many (more battery friendly) technologies.

As for internet, again not strictly necessary for ha. But if you need it, then I don’t think can just attach a sim card.

I honestly know very little if anything about other non wifi technologies. I’ve heard of zigbee and things like that, which I believe run on non wifi, but isn’t the base/receiver connected to wifi and that is how it connects to HA?

And I do agree that internet not 100% necessary for HA to work properly, except to connect to the outside during an invasion. If a somewhat smart thief decided to pull power down and cut the coaxial from the cable company it would be nice for HA to continue sounding the alarms and sending the Telegram messages.

Both zigbee and zwave can have hubs that connect via USB to the computer running home assistant, and be powered by that.

Yes 4g would be a good backup. I had a dsl router/modern that had 3g failover. Quite handy but that one was not very reliable.

I did a quick search with adding 4g to the raspberry pi4. there are some shields, and some modems available, but not as inexpensive as I had thought. Seems router with 4g fail over is the best option at the moment.

1 Like