Send push notifications

Hello guys,
I'm using TP-Link Archer C50 v4 with OpenWrt 19.07.2 r10947-65030d81f3 / LuCI openwrt-19.07 branch git-20.057.55219-13dd17f
For the moment, using cron, every minute I'm checking the list of the connected devices and if there's a new device connected, I'm mailing this list using ssmtp.
I would like to send a push notification instead of a simple e-mail.
After several time spending on research, I've found out that I can use Pushbullet, Pushover or notify-send.
Does anyone tried this before? What would you recommend?

I was thinking on doing something like this, and wrote an article with my experimentation.
I ended up using an MQTT broker and an android app for listening to them.
Hope it helps: https://hackmd.io/@nicopace/Background_notifications_openwrt

1 Like

i use ifttt maker/webhooks with curl in my scripts to get notifications.. but my guess is that other service you mentioned will do the job, just a matter of preference.

curl -k -X POST -H "Content-Type: application/json" -d '{"value1":"$1","value2":"$2","value3":"$3"}' https://maker.ifttt.com/trigger/YORTRIGGER/with/key/YOURKEY

just my 2 cents :slight_smile:

1 Like

Another two cents: the Telegram messaging app admits the use of bots, that can send messages from DIY clients.

2 Likes

I am using Pushover works just fine from all my devices with the follow script “example.sh”

function push {
    curl -s -F "token=TOKEN" \
    -F "user=USER" \
    -F "title=MESSAGE" \
    -F "message=$1" https://api.pushover.net/1/messages.json
}
OUTPUT="started"
push "${OUTPUT}"
1 Like

Hello guys,
Thanks for your advice.
Now I can successfully send push notification to my phone.
I'm using IFTTT with webhooks.
I'm using 2 files, list_device_new and list_device_old.
For every device from list_device_new I'm checking if it exists in list_device_old. If it doesn't, than it's a new device and I will send a curl with 2 variables, $host and $mac.
For every device from list_device_old I'm checking if it exists in list_device_new. If it doesn't, than that device is no longer logged on my router and I will send a curl with $host and $mac in order to notify me.


Might be a good selfhosted alternative.