Backup notifications cellular w/ raspberry?

Posted on
Sun Jul 16, 2017 1:51 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Backup notifications cellular w/ raspberry?

The odds of a criminal cutting a phone line or cable internet line is pretty slim... however, there are other circumstances where I would want to maintain notifications in the event of a power outage, some kind of network upset, etc.

Since I (and probably most of you) don't have a traditional land line anymore... if we have a home phone, it's probably another form of communication that relies on internet (VOIP).

Back in my x-10 days, I had one of their auto-dialers.... which I guess would still work on my VOIP line (If I could find it in my attic)... but this would still be dependent on a functioning internet connection.

Anyway... I've been searching all over the place to find an all-in-one device solution to this.... to have a modern day (cellular) auto-dialer that could work with Indigo. Either I have totally missed it somewhere, or it doesn't exist. (Checked smarthome, amazon, google, envisalink and here with little success.) Every solution in the envisalink forums points to devices that no longer exist or were never supported.... so you could get one that works with your DSC alarm, but it won't say anything or send you a message... just beep randomly in your ear with something that only alarm monitoring software can understand.... Ok, but that message could be a break-in, a communication error, power failure or a battery in one of the remotes I don't use is dying.

The closest thing I have found for a backup communication would be a USB cell device hooked into my server with some AppleScript telling the server when to switch from the home network to the USB network. This may be workable, but I foresee lots of pitfalls.... Power outage = no running scripts.... or it will switch over while I'm out of town and my wife will stream 50 netflix movies over my USB cell network.

To those that have experience programming and using raspberries with indigo, would it be possible to use one as an output device? (Everything on our forum I have found uses them as some sort of input into indigo). My thought is a raspberry with a USB cell dongle that has a few pre-recorded options (if it detects a power failure, it sends a message) and the ability to send customizable messages via scripting / triggers / plugin? I think there is a way to put an application version of Pushover on a raspberry and ways to do texting and emails from one. With a "pay-as-you-go" sim card, this may be an inexpensive way to have a notification device independent from A/C power and your home internet. I already see potential issues.... like, if it is using a cell network to communicate out, how will it also be on the home network to receive instructions from indigo?

So... if all the above is my question, I guess the answer I'm looking for is:

A: Check out this device that already exists on http://www.cellular_indigo_autodialer_thing.com
B: Totally possible to make, here are the steps: buy this, solder that, install this, insert this code, done.
C: I will build and sell these and sell them to every home automation enthusiast but since you gave me the idea, you will get a discount. :D

Bill
My Plugin: My People

Posted on
Sun Jul 16, 2017 3:02 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Backup notifications cellular w/ raspberry?

I would think about using a router that does failover from ethernet to Wifi-as-Wan in conjunction with a mobile hotspot device. Lots of consumer grade routers do this, just do a web search on "wifi-as-wan router".

Then you just need to cobble up an Indigo script that can tell when you've lost the primary internet and switched to the hotspot.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jul 16, 2017 3:32 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Backup notifications cellular w/ raspberry?

I actually had a similar setup in my work truck with a TP mobile router that used wifi as primary and the SIM card as the failover.. I didn't mind the data usage because that was with a work provided unlimited data account.

For home use, I would probably be restricted to either a pay as you go or add a line to my cell contract that would share my minutes/data plan.

3 problems with this method:
1) in the event of a power outage, there will be nothing to tell the router to switch to a hotspot and nothing to tell the hotspot to activate.

2) if I get around the power issue above (put indigo server, router, etc on UPS... which is probably a good idea anyway), I would have the issue of all internet traffic being routed through the cellular connection. If I'm out of town when this happens, I can totally see getting a massive data overage bill in just one day.

3) If I got all the above ironed out, I would be very hesitant to swap out my current router setup which has been bulletproof for years (2 Airport extremes, 4 airport expresses... all play very well with each other but there is no failover option I am aware of)

I would like a way to only send specific (and limited) notifications over a cell connection.

Bill
My Plugin: My People

Posted on
Sun Jul 16, 2017 3:41 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Backup notifications cellular w/ raspberry?

Partially answering my own question....

Instead of the cell hotspot on the router, I could add it to the computer running Indigo. Save that as a location profile under network. If Indigo gets a "disconnected from the internet" trigger or if an "indigo notification fails to send" trigger... indigo could tell the computer to switch locations, send a notification, then switch back to the LAN location. This would be repeated for notifications until the network is restored without allowing any other home device to use up my cell data..

Bill
My Plugin: My People

Posted on
Sun Jul 16, 2017 3:42 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Backup notifications cellular w/ raspberry?

whmoorejr wrote:
1) in the event of a power outage, there will be nothing to tell the router to switch to a hotspot and nothing to tell the hotspot to activate.


The router I previously used would automatically switch if it detected a failure on the primary interface. Which would happen if the modem went down or if it couldn't ping a specified address through that interface. The hotspot would be active all the time, just no traffic going through it.

whmoorejr wrote:
2) if I get around the power issue above (put indigo server, router, etc on UPS... which is probably a good idea anyway), I would have the issue of all internet traffic being routed through the cellular connection. If I'm out of town when this happens, I can totally see getting a massive data overage bill in just one day.


Yeah, that's an issue. As an alternative I would look into hooking the hotspot directly to the Indigo system (either wifi or USB tether) and then figuring out how to switch the primary interface.

whmoorejr wrote:

3) If I got all the above ironed out, I would be very hesitant to swap out my current router setup which has been bulletproof for years (2 Airport extremes, 4 airport expresses... all play very well with each other but there is no failover option I am aware of)


I can understand that.

whmoorejr wrote:

I would like a way to only send specific (and limited) notifications over a cell connection.


Which I think takes you back to your rPi + Cell modem device. Something like: https://www.adafruit.com/product/1946

It wouldn't be that hard to write some code running on the rPi that listens for commands over the network from Indigo.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jul 16, 2017 3:44 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Backup notifications cellular w/ raspberry?

whmoorejr wrote:
Partially answering my own question....

Instead of the cell hotspot on the router, I could add it to the computer running Indigo. Save that as a location profile under network. If Indigo gets a "disconnected from the internet" trigger or if an "indigo notification fails to send" trigger... indigo could tell the computer to switch locations, send a notification, then switch back to the LAN location. This would be repeated for notifications until the network is restored without allowing any other home device to use up my cell data..


Yeah, that was my second option. But the more I think about it, doing the rPi+modem gives you an "any time" SMS notification system that doesn't depend on a third party (like Twilio or GV).

I've got an rPi around here somewhere. I might pick up one of those modems and try to hack something up.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jul 24, 2017 8:15 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Backup notifications cellular w/ raspberry?

I'm no network expert (and UK phones have their own separate power so work in an outage) but....

If you leave your router without a UPS, when you get an outage the router will power off, and the mac (with a UPS) will look for the next available network connection - see network settings in OSX. If you had an old iphone with a sim, set up with data sharing next to the mac, when the router powers off, the mac should select next available network - the iphone - and "tat tarrr", no loss of connection for indigo (well a short one while it logs onto the next network), and only the mac using the sim, not the rest of the house network.

You might have to check this works if the mac is on a wired connection but I think it does - the solution is based on rebooting my router, during which time my mac connects to the wifi of the printer - took me ages to work out why I had no internet!

Edit:

If its just the loss of internet your worried about, check connection via script in indigo. If the connection is down power off the router (with a plugin module) and the mac should switch to the iphone (as above).

Reboot the router every half hour (or as required) and switch off the wifi on the mac (via command line) to see if you have connection. If not, switch the wifi back on and connect back to the iphone - try again in a set amount of time

Late 2018 mini 10.14

Posted on
Tue Jun 05, 2018 8:38 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Backup notifications cellular w/ raspberry?

Another possibility for cellular communication.....

Facetime & Continuity....

With my current cell provider, I get 5 free lines. I could dedicate one iPhone to my indigo server machine and put them on the same iCloud for iMessages and FaceTime. If the network goes down or if the server is running on USP, a text/imessage will probably get hung up since it will think it is still online (wifi connection good, but no internet or no power). A FaceTime audio call to a phone number should initiate a FaceTime audio call through the cell phone.

Step 1: Add new iPhone to the system as a "indigo phone"
Step 2: sync iCloud for FaceTime and iMessages, find friends, etc.
Step 3: Create scripts to initiate a FaceTime audio call through cell (versus a standard FaceTime call via home network)

This script works via-home network/internet:
Code: Select all
open location "facetime-audio://" & "8325551212" & "?audio=yes"
delay 5
-- simulate pressing the Enter key
tell application "System Events"
   keystroke return
   delay 120
end tell


This script works via-cell call from indigo (apple continuity thing):
Code: Select all
open location "tel://" & "8325551212" & "?audio=yes"
delay 5
-- simulate pressing the Enter key
tell application "System Events"
   keystroke return
   delay 120
end tell


Downside.... both apple scrips execute and call me, but both hang up somewhere on the indigo side. (the action dialogue box will freeze up and I see the "running AppleScript" at the bottom of the main page. That hang-up goes on for about a minute or two, after the call has been places successfully. More than likely, it's a problem with my script somewhere.

Problem 2.... haven't figured out how to script an audible message over FaceTime.

Either way, with power (ups) this should provide a notification platform that is resilient to network or power outages..... if I can polish this up.

It will be limited to the amount of time the UPS can provide backup power and the battery life of the cell phone once it looses main power.... but more than enough time to send out a couple notifications to let me know there is a problem at the house (either electrical or internet) and provide a back-up notification for a major event (DSC Alarm or Fire Alarm).

I think I would still prefer a complete stand-alone product, i.e. programable raspberry.... but with a full time job and five kids, it will be a while till I have time to learn how to program something new. (I would prefer this because I know that apple can be funny with messages and FaceTime.... you might not notice it on a phone, but when it's a background task on a server.... after a couple days of thinking.... "I haven't gotten any notifications lately?" log onto the server to see some random, "you need to re-verify your apple ID" or whatever. So.... a solution that takes a couple of links out of the chain (AppleScript, FaceTime, continuity, etc.) and goes straight from indigo -> device would be preferable.

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests