RaspberryPi and Pushbullet Notifications

I posted previously about using Twlio to get an RPi to send text message notifications to me using a Twilio trial account. These trial accounts used to keep going unless you stopped using them for a period of time, but now they time out like most trial accounts do.

I scouted around looking for another notification method. I didn’t want to use email. I’d previously used sSMTP with some success, but I wanted to try something different.

Pushbullet is working well for me. You can get a free account, and apps for Android and Apple. Once you’ve got your free API authentication key you can make web requests to the Pushbullet service and they’re delivered to your mobile.

I use the cUrl app to make the requests. If you need to install it, you can do so by entering this command in a terminal. (For other unrelated purposes, I also incorporate cUrl into some applications I develop, so I always install the libcurl3 development libraries as well. If you don’t need them you can leave them off the command. For completeness, this is the command I use to install all things cUrl on my boxes.)

sudo apt-get -y install curl libcurl3 libcurl3-dev

Then I create shell scripts similar to the following which can be called by other scripts or applications, or triggered by cron.

In the title= parameter, it is often convenient to use the name of the process you’re reporting on, or the name of the RPi or PC it is running on.

#!/bin/bash

API="enter your API key here"
MSG="This is where you would put your message text"

curl -u $API: https://api.pushbullet.com/v2/pushes -d type=note -d title="Message Title" -d body="$MSG"

Nice and simple, and free.

Tags : , ,

One thought on “RaspberryPi and Pushbullet Notifications”

Leave a Reply

Your email address will not be published. Required fields are marked *