Notification without the Internet

Hello,

everyone use notification service to send well… notifications :slight_smile:
All of them are delivered over the Internet.
A simple question - what happened if the Internet is down? For whatever reason.
Will it just simply fail? I assume the answer is “yes” but in that case - how we can make sure notifications are delivered as soon as the Internet is back again?

Can they be saved until the Internet is back and be sent once the Internet is available?

The only solution that came to my mind is to save them to a file/database and then use some 3rd party script that could handle all of that - like checking for the internet, trying a few times and then may be falling over to USB modem to send SMS.

Can that be achieved somehow else apart from writing custom script?

Cheers.

1 Like

There are very many notification components, they are all likely to be different if the net is down.

Try an internet modem that will switch to a 4g dongle when the main connection is down.

I think a persistent notification will survive the internet not being connected (as long as there is no restart of home assistant)

I explicitly want to use USB dongle as a “serial” modem to be able to send super urgent messages as SMS.
The reason for that is that data connection on a phone could be unavailable - disabled because of low battery level, poor mobile coverage etc.
SMS service seems way more reliable here.

P.S. was surprised not to find SMS-sender component.

1 Like

persistent notification - sure. But they are displayed on the HA itself or I missed something about persistent notifications?

http://smstools3.kekekasvi.com/

sure, I meant sms-sender component for HA.
Never mind then :slight_smile:

Yes but that is the best known sms software on linux, it is probably the way to integrate sms. It would need a python interface.

It is quite complex to set up, I never really got it going how I wanted it, and certainly wouldn’t be qualified to do a howto.

Just putting this here for people searching for a solution… I haven’t tried this: https://www.home-assistant.io/integrations/sms/

I just want to let folks know that, at least in the US, Twilio might be the cheapest SIM card provider for SMS in such a case.

  1. Buy a Twilio Phone Number
  2. Order a Programmable Wireless SIM from Twilio
  3. Activate the SIM when it arrives, and assign a Pay-As-You-Go, or a $1 Quota payment plan
  4. Assign the “Deliver message as intended by device” TwiML to your SIM’s Programmable Messaging in your Twilio account. Just go here: https://www.twilio.com/console/wireless/sims/, then click on your SIM card, then click on the tab that reads “Programmable Voice & SMS” and scroll down to Programmable SMS. Where it says SMS URL, click on the menu and select TwiML. Then click on the blue circle over on the right. It should pop up wit the TwiML you need. It should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Message from="YOUR_NUMBER_HERE" to="{{To}}">{{Body}}</Message>
</Response>

Add that TwiML Bin but make sure to replace YOUR_NUMBER_HERE with your Twilio phone number (in the US, the format would be +1##########).

If your USB modem is serial and can be recognized by HA, you’re all set. I think the phone number will cost $1 per month, and if you signed up for the $1 Quota payment plan, you’re looking at $1 for that. So, $2 per month and you now have SMS notifications if your system goes down.To be clear, I have this working at the moment. It’s actually not what I want. I want Twilio Calls to work over SIM, which seems a bit more complicated. But, if you want to use a SIM card and serial modem to send SMS from HA with the integration @gremblin mentioned above, this will 100% work. I can send myself texts all day consistently with this setup.

If you use this referral link to sign up, we both get $10 credit. www.twilio.com/referral/iY8CPM

2 Likes

I went the backup internet connection route and got a LB1120 with a Google FI data sim and setup WAN Failover on my pfSense box, then put it all on a UPS that will last for +4hours without power. This way I can still data from the cameras.