LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 11-24-2019, 05:13 PM   #1
bifferos
Member
 
Registered: Jul 2009
Posts: 401

Rep: Reputation: 149Reputation: 149
triggering Android notification over wifi


I want an Android notification when my doorbell rings. I've already got the bell rigged up to Linux but I need an app that will give me a notification on, say, a UDP packet. It could use SNMP, it could use a web request, it doesn't really matter so long as I can trigger it from the Linux command-line. Does such a thing exist?

thanks!
 
Old 11-25-2019, 06:04 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,484

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Take a look at Pushover.net, ok, so it's a one-time $5 to use it on Android but it has a very easy to use API that can be triggered from the command line with a curl call.

I've been a user for years.
 
Old 11-25-2019, 08:48 AM   #3
bifferos
Member
 
Registered: Jul 2009
Posts: 401

Original Poster
Rep: Reputation: 149Reputation: 149
Quote:
Originally Posted by TenTenths View Post
Take a look at Pushover.net, ok, so it's a one-time $5 to use it on Android but it has a very easy to use API that can be triggered from the command line with a curl call.

I've been a user for years.
Thanks for the recommendation, but doesn't that work via some internet site? I wouldn't want my doorbell failing to work if the internet was down.
 
Old 11-25-2019, 09:08 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,484

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Quote:
Originally Posted by bifferos View Post
Thanks for the recommendation, but doesn't that work via some internet site? I wouldn't want my doorbell failing to work if the internet was down.
Yes, it does use an external site. However, with any of these things you have to take a pragmatic look at the various points of failure.

Given your use example, assuming your doorbell is wired directly to whatever you're running Linux on, your doorbell would "fail" if:
  • That box dies.
  • That box looses internal (WiFi) connectivity
  • Your WiFi Access Point / Router dies
  • Your phone isn't charged
  • You've muted your phone
  • You mention UDP, that's a stateless protocol so there's no guarantee it gets delivered

So you have to decide which of these failures you're happy with and mitigate accordingly.

If you want to go down the UDP route then look at something like this for your phone: https://play.google.com/store/apps/d...dreceive&hl=en no idea if it can do notifications on when a packet arrives but might send you in the right direction.

Alternatively pick up a (cheap?) usb GSM modem dongle and use a Pay-As-You-Go plan and send SMS to your phone when the door get pressed.

On a more serious note, does sounds like a fun project, let us know what you end up doing.
 
Old 11-25-2019, 09:50 AM   #5
bifferos
Member
 
Registered: Jul 2009
Posts: 401

Original Poster
Rep: Reputation: 149Reputation: 149
Quote:
That box dies.
The box is my router.

Quote:
That box looses internal (WiFi) connectivity
The box is my AP (I'm running hostapd)

Quote:
Your WiFi Access Point / Router dies
In which case nothing would work anyhow.

Quote:
Your phone isn't charged
That just never happens.

Quote:
You've muted your phone
I've seen independent apps that will un-mute on specific notifications I was planning to use one of those in addition. But there will be a buzzer by the door as well, I'm not just relying on this.

Quote:
You mention UDP, that's a stateless protocol so there's no guarantee it gets delivered
As I said, I don't really care what protocol is used, but for UDP I tend to send several packets (may lead to several notifications but not really a big issue as we don't get many visitors).


Quote:
Alternatively pick up a (cheap?) usb GSM modem dongle and use a Pay-As-You-Go plan and send SMS to your phone when the door get pressed.
I don't think this can work, I've seen big delays in receiving SMS in the past, 30 seconds may be enough for the person ringing to give up.

Quote:
On a more serious note, does sounds like a fun project, let us know what you end up doing.
Absolutely! I may end up having to write the thing myself, not really looking forward to it but if it's the only way....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
triggering Android notification via wifi bifferos Linux - Mobile 2 11-25-2019 03:24 AM
Few questions about Nagios - reboot notification, value=x notification. marccmile Linux - Software 5 06-04-2009 06:44 PM
triggering bash script if directory modified cbb Linux - Software 1 10-23-2004 07:52 AM
port triggering with iptables? injun Linux - Networking 2 08-29-2004 12:02 PM
E-Mail notification to users via SMS (gateway script ok, but notification script?!?) Riku2015 Linux - Networking 10 03-08-2002 10:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration