Suggestions for notification methods

I want to have the spark core send a notification to a mobile device via LAN.
I am able to do it via the cloud, but this will be used in an environment where there is not always an internet connection available.

Any helpful ideas??


Your best bet in that situation is to use a GSM module and use AT commands to send an SMS or if you have a module with built in TCP/IP, make a TCP connection to a server that will handle Google Cloud Messaging to the device.

Hi Dave,
This project is for an environment that is often out of GSM range. It’s a ship at sea, and while there is some internet access, it is not reliable, as weather, or physical blockage of the antenna can knock out the Satellite internet connection at any time, unpredictably. I’m trying to figure out a sure fire method of notification whether there is internet connectivity or not.

To what kind of network would this “mobile device” then be connected? You’ll have to have some sort of connection if you want to send stuff. Might help if you could elaborate a bit further as to what kind of device you’re talking about. Is it yet to be built, or is it an existing product? You could set up some sort of internal network, which works localy for the boat. Wifi could be used, or a mesh network of RF/bluetooth. Bluetooth might be nice since that can easily interact with mobile phones.

Just thinking aloud here… maybe a local cloud setup on the ship, that way you don’t need the internet, just the WiFi. you could then use a local mail server and send emails.

I would manage the connection manually on my software and turn off cloud and wifi at setup.

Then during the loop I will say every 30 minutes, turn on WiFi, attempt to connect and if connected send the queued messages or notifications. If no connection is available I would add to the queue any new messages to send later when a connection is available… The risk is that the queue might get full and you will have to loose some data. Although there are FLARM external memory solutions where this scenario is unlikely.

I would in any case turn off the cloud to relieve the overhead and maybe use a very lean TCP socket based server with a very simple protocol in a computer in land to serve as a relay to any messaging or notification services. This can also trigger notifications if the device haven’t report for a while.

If there’s no wifi in the ship I would use other device to make my application. Maybe raspberry pi (possible overkill) or netduino if there’s ethernet available. The advantage of the spark is the simple WiFi. If there’s WiFi, by all means Spark is the best!

OK, so there is WIFI thru out the ship. The mobile device I’m using is an iPhone, but it could be an android if that is easier. The spark is on the ship, and currently everything works well using a Prowl notification, but I’d like to cut out the cloud, so that all notifications go thru regardless of internet connection status.

The notifications have to be as close to real time as possible. Seconds are acceptable, minutes are not. I’d do a raspberry Pi if I could figure out how to do that.

Using IOS maybe I can figure out how to make a VOIP app, so that I can keep a socket listening all the time, so that the notification will still come thru even when the phone has gone to sleep…


Ohh. I understand now… Well in that case you will have to figure out a way to keep the app running in the background at all times or at least like you said keep a socket open… Which will work fine in an built for your phone, but would not make it to the app store because it is forbidden by guidelines. Android should be equally complex to develop, except that you don’t need the app store.

As for realtime… It will be realtime (very quick)… If the socket is always listening to a port and the spark will be sending notifications via tcp (wifi) locally to the iPhone, then there’s no problem.

I am also trying to remember some new stuff available on iOS 8 that will allow more background monitoring… But I don’t know… Il have to check WWDC again :smile: