[PP-SCRIPT] Pushbullet notifications (Android, iOS, Chrome)

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
JVM
Posts: 83
Joined: 21 Oct 2013, 05:11

[PP-SCRIPT] Pushbullet notifications (Android, iOS, Chrome)

Post by JVM » 05 May 2014, 16:21

Pushbullet is a notification service for Android, iOS, Chrome, Firefox and Windows. https://www.pushbullet.com/

I made these scripts mainly as Sickbeard does not support Pushbullet.

I've tested them on my Raspberry Pi. If anyone has any tips or improvements I am open to suggestions. They require cURL to push to Pushbullet (however v14 does not require cURL).

Here's an example for the most feature rich Pushbullet script for NZBGet v14+:

Image

For NZBGet v14+
  • Pushbullet.py is a pre- and post-download notification script for v14+.

    Compared to 13.0-r1031+, I have added options regarding [New Feature] Per-nzb time statistics, specifically average download speed (which is more reliable than 22 July 2014) and various times.

    This version also works on Windows and Debian without cURL.

    To install Pushbullet.py, copy to your scripts folder. For a notification before a nzb is added to the queue, add Pushbullet.py under Settings, Extension Scripts, ScanScript. For a notification after job is completed, add Pushbullet.py under Settings, Extension Scripts, PostScript or Category, PostScript. Then add your Access Token on the Pushbullet settings page. Testing is the same as described for pushbullet.py above.
For NZBGet 13.0-r1031+
  • Pushbullet.py is a pre- and post-download notification script for 13.0-r1031+.

    To install Pushbullet.py, copy to your scripts folder. For a notification before a nzb is added to the queue, add Pushbullet.py under Settings, Extension Scripts, ScanScript. For a notification after job is completed, add Pushbullet.py under Settings, Extension Scripts, PostScript or Category, PostScript. Then add your Access Token on the Pushbullet settings page. Testing is the same as described for pushbullet.py above.
  • 22nd July 2014: I added average download speed reporting to Pushbullet.py which can be downloaded here. More reliable average speed reporting in v14+ below.


For NZBGet 11+
  • pushbulletnzbprocess.py is a pre-download NZBProcess script that sends Pushbullet notifications when a new NZB is noticed by NZBGet but before the NZB is added to the queue.

    To install pushbulletnzbprocess.py, copy to your ppscripts folder, open the script in a text editor and modify access_token = 'ADD_YOUR_ACCESS_TOKEN_HERE' with your Pushbullet Access Token accordingly. Then in the NZBGet settings, go to Incoming NZBS and add the path to the script in the NzbProcess textbox. For me it was: ${MainDir}/ppscripts/pushbulletnzbprocess.py

    Now it should send a Pushbullet notification on every new NZB added.
  • pushbullet.py is a post-download notification script that is intended to send a Pushbullet notification once download and all other post processing is done. It is a modified version of the default Email ppscript provided with NZBget.

    To install pushbullet.py, copy to your ppscripts folder just like other scripts. Then configure via NZBGet settings. To quickly test your Pushbullet Access Token and DeviceID settings, go to your download history, click on an entry, then Postprocess and turn on the pushbullet script. To run the script, click Actions and Post-Process Again. You should now receive a notification to all your devices if DeviceID is empty or those only listed in the DeviceID setting.
Last edited by JVM on 08 Oct 2014, 12:36, edited 10 times in total.

JVM
Posts: 83
Joined: 21 Oct 2013, 05:11

Re: [PP-SCRIPT] Pushbullet notification

Post by JVM » 06 May 2014, 08:33

Moved to OP.
Last edited by JVM on 26 Jun 2014, 13:15, edited 1 time in total.

JVM
Posts: 83
Joined: 21 Oct 2013, 05:11

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by JVM » 24 Jun 2014, 14:31

Moved to OP.
Last edited by JVM on 26 Jun 2014, 13:15, edited 3 times in total.

hugbug
Developer & Admin
Posts: 6720
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by hugbug » 24 Jun 2014, 14:40

It's nice to see a scan script.

BTW, you could combine both scripts into one if you want.

JVM
Posts: 83
Joined: 21 Oct 2013, 05:11

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by JVM » 24 Jun 2014, 14:50

That might be tidier actually. I see you can define a script signature as scan/post-processing. Is there a "NZBOP_" or similar to differentiate if it has been called as a scan or post-processing script?

hugbug
Developer & Admin
Posts: 6720
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by hugbug » 24 Jun 2014, 14:56

PP- and scan-scripts have different env. vars passed as context.
For example if NZBPP_DIRECTORY is defined it's the pp-script is called. If NZBNP_DIRECTORY is defined it's the scan-script. You can check any other env. var too.

JVM
Posts: 83
Joined: 21 Oct 2013, 05:11

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by JVM » 24 Jun 2014, 16:29

They are now merged, much nicer, thanks humbug.

neilt0
Posts: 261
Joined: 10 Sep 2008, 19:11

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by neilt0 » 26 Jun 2014, 08:02

I can't get this working. I think the API key is correct (it's not called that on teh PushBullet web site, BTW) because it gives me the correct devices when I use curl to find them.

Code: Select all

Pushbullet: KeyError: 'NZBPP_TOTALSTATUS'
INFO	Thu Jun 26 2014 09:00:04	Pushbullet: raise KeyError(key)
INFO	Thu Jun 26 2014 09:00:04	Pushbullet: File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
INFO	Thu Jun 26 2014 09:00:04	Pushbullet: success = os.environ['NZBPP_TOTALSTATUS'] == 'SUCCESS'
INFO	Thu Jun 26 2014 09:00:04	Pushbullet: File "/mnt/cache/unraid_apps/nzbget/ppscripts/Pushbullet.py", line 202, in <module>
INFO	Thu Jun 26 2014 09:00:04	Pushbullet: Traceback (most recent call last):

hugbug
Developer & Admin
Posts: 6720
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by hugbug » 26 Jun 2014, 08:12

The script attached to the third post needs at least r1031. For older versions use the script from the first post.

@JVM: I would attach them both to the first post with a comment.

neilt0
Posts: 261
Joined: 10 Sep 2008, 19:11

Re: [PP-SCRIPT] Pushbullet notifications (Android, iOS, Chro

Post by neilt0 » 26 Jun 2014, 08:15

GAH!

Yup, the old one worked.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests