Sending notifications through Pushbullet on Raspberry Pi

Pushbullet is a very useful service.

Users can send & receive notifications of various types(message, url, file, …) through it, and all those notifications are synchronized across all of their devices.

It even provides HTTP APIs, for free.

I used to receive status report email of my Raspberry Pi server every morning, and I made up my mind to replace the report system to Pushbullet.

With following content, you too, will be able to send Pushbullet notifications on your Raspberry Pi:

0. Prerequisite

Ruby needs to be installed on the machine. If it isn’t yet, you can get it done with this script.

1. Install pushbullet-ruby gem

$ gem install pushbullet-ruby

You can find further information about this gem here.

2. Get your Pushbullet access token

Visit this page and get your access token.

3. Get a sample Ruby script

This is a sample ruby script that sends basic status of Raspberry Pi.

Edit ACCESS_TOKEN value to yours.

4. Try running

Now run the script in the terminal.

$ ./pushbullet-rpi.rb

Then you’ll receive a Pushbullet notification immediately that is filled with the status report of your Raspberry Pi.

Notification shown on Pushbullet Chrome extension

Whole notification on Pushbullet website

5. Run it periodically

You can run commands periodically using Cron.

$ crontab -e

Add following line for running it at 6AM every morning:

0 6 * * * bash -l -c "/path/to/pushbullet-rpi.rb > /dev/null 2>&1"

6. Now, do your own things

Based on this script, you can add or change stuffs for your use.

For example, you can send notifications

Have fun with Pushbullet! :-)