Pushbullet notifications from Ubuntu

Pushbullet (https://www.pushbullet.com/) is a great tool which can be used on most devices to send notes, pictures, links, etc. For our purposes we can make use of it to send notifications from our NAS to our computer and/or phones.

I find this much more convenient than email notifications and have been gradually replacing my email notifications with Pushbullet notifications, since it just pops up on my phone to let me know when the NAS has done something (e.g. finished a torrent download, started up, gone to sleep, woken up, …).

Similarly to the email notifications we configured here, the Pushbullet notifications can also be run with one command on the command line.

It also simply uses HTTP push commands so you don’t even need to install anything extra to make it work. To get it set up you need to go to the Pushbullet site and register an account. This will let you get your Pushbullet API key.

pushbullet_api
Now you can run this command to send a notification (replace ‘APIKEY’ with your own key) …
curl -u APIKEY: https://api.pushbullet.com/v2/pushes -d type=note -d title="Your NAS" -d body='Test notification!'

To make it even easier you can set up a little script which makes sending a notification more intuitive…

Add this to the script  (adding your own API key towards the top):

Make the script executable:

Now you can add a command to various scripts for notifications (e.g. in boot script or rc.local) or just run from the command line like this:

Also note that you can add Ubuntu variables, such as date above, by putting them in quotes.

Leave a Reply

(email optional)