Page 1 of 5

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

Posted: 05 May 2014, 16:21
by JVM
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.

Re: [PP-SCRIPT] Pushbullet notification

Posted: 06 May 2014, 08:33
by JVM
Moved to OP.

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

Posted: 24 Jun 2014, 14:31
by JVM
Moved to OP.

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

Posted: 24 Jun 2014, 14:40
by hugbug
It's nice to see a scan script.

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

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

Posted: 24 Jun 2014, 14:50
by JVM
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?

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

Posted: 24 Jun 2014, 14:56
by hugbug
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.

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

Posted: 24 Jun 2014, 16:29
by JVM
They are now merged, much nicer, thanks humbug.

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

Posted: 26 Jun 2014, 08:02
by neilt0
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):

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

Posted: 26 Jun 2014, 08:12
by hugbug
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.

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

Posted: 26 Jun 2014, 08:15
by neilt0
GAH!

Yup, the old one worked.