[PP-Script / Queue-Script] Notifications (All In One)

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.
Post Reply
l2g
Posts: 205
Joined: 27 Jun 2014, 22:13
Contact:

[PP-Script / Queue-Script] Notifications (All In One)

Post by l2g » 25 Nov 2014, 02:13

I'm not out to compete with the other great notification scripts that others have made. Their's are much less complex then this one. I just thought it would be easier to migrate all notification services into one plugin.

It also utilizes the pynzbget I wrote which simplifies NZBGet script development.

Notify NZBGet Script Details
Author: Chris Caron <lead2gold@gmail.com>
Current Version: 0.9.1
Release Date: May 30th, 2018
License: GPLv2
Source: GitHub / Direct Download Link

Updates:
  • May 30th, 2018 Update (v0.9.1):
    • Dropped Support for Notify My Android (NMA) as they've officially shut down.
    • Kodi Notification Bugfix (images are now passed correctly to screen)
    • Better Discord Markdown support
    • Removed Notify My Android (as they officially shut down for good)
    • Email plugin supports to= variable.
  • Mar 11th, 2018 Update (v0.9.0):
  • Feb 4th, 2018 Update (v0.8.0):
    • Added Support for Rocket Chat
    • Re-factored entire engine to use Apprise
    • Improved QNAP TS-212 stability
  • Oct 29th, 2017 Update (v0.7.0):
    • Another small bug fix for MatterMost Notifications users (affects only SABnzbd users)
    • Added Support for Pushjet
    • Added Support for Twitter DM
    • Small bugfix causing Notify script to truncate userid fixed.
    • Better support for Microsoft users
  • Jul 9th, 2017 Update (v0.6.1):
    • Small bug fix for MatterMost Notifications users.
    • Inline Configuration Check (users can test their settings now right from the NZB-Get configuration page)!
  • Jul 5th, 2017 Update (v0.6.0):
  • Jan 23rd, 2017 Update (v0.5.6):
    Minor release just applying a few outstanding bug fixes.
  • Sep 20th, 2016 Update (v0.5.5):
    Minor release adding:
  • Aug 5th, 2016 Update (v0.5.0):
    New release which adds 2 new notification services
  • July 19th, 2016 Update (v0.4.0): Minor release that just added support for SABnzbd.
So far this notification script supports: How does it work
It's pretty simple, you just use space and/or comma to delimit your servers you want to notify. Specify as many as you want and have as many notifications sent as you need.
The syntax works as follows:
  • service://user@host:port
  • service://password@host:port
  • service://user:password@host:port
  • service://host:port
  • service://host
NZBGet Notifications relies heavily on relaying the information it extracts from an NZBGet RPC call it makes. It's important that your RPC Server is running (NZBGet out of the box has it already configured). If your not sure, just make sure you're listening on a local address in your Settings -> Security options of your configuration. Setting a TCP/IP address of 0.0.0.0 is the easiest way to ensure you won't have a problem.

Here are a few things it can do:
  • Supports listing the downloaded files, displaying statistics, and/or displaying the log entries.
  • Can act as a Queue-Script and notify you when something was just added to the queue.
  • You can specify as many Push Notification servers as you want.
  • Notification services that support HTML content can be notified as such.
  • Notification services that support graphic images can display a fancy red (failure), green (success), or blue (info) image to enhance the user experience. :)

How Do I Make It Work?
It has gotten to be way to much effort to update this message board with all of the possible combinations of notifications. Especially now that there over 25+ of them. It's best to read the latest details here on how to formulate your own notification URL.

Command Line
Most of my testing is done using the Command Line Interface I attached to it. For example a simple entry like this could send 'Hello World' to your XBMC server:

Code: Select all

python Notify.py -s xbmc://192.168.0.2 -t "Hello" -b "World!"
Here is what the tool offers so far (from the command line):

Code: Select all

Usage: Notify.py [options]

Options:
  -h, --help            show this help message and exit
  -s URL(s), --servers=URL(s)
                        Specify 1 or more servers in their URL format ie:
                        growl://mypass@localhost
  -t TITLE, --title=TITLE
                        Specify the title of the notification message.
  -b BODY, --body=BODY  Specify the body of the notification message.
  -i, --include_image   Include image in message if the protocol supports it.
  -L FILE, --logfile=FILE
                        Send output to the specified logfile instead of
                        stdout.
  -D, --debug           Debug Mode
Thank you binreader for all of your protocol suggestions; I'll be able to tackle most of them except a few due to the fact they can't be accessed without compiling code. I'm going to stick with python for now to be cross-platform friendly.

Happy Notifying :)
Last edited by l2g on 31 May 2018, 00:47, edited 58 times in total.

binreader
Posts: 19
Joined: 07 Oct 2014, 03:00

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by binreader » 26 Nov 2014, 14:11

It's a cool idea, one ring to unite them all. Perhaps when this one is ship shape hugbug may put into the distro.

Pushover is another service, I saw a script in the forums for it but itsa a paid app after trial period.
Last edited by binreader on 02 Dec 2014, 15:55, edited 1 time in total.

l2g
Posts: 205
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by l2g » 26 Nov 2014, 15:53

Thanks binreader,

I've added Pushover (pover://) to the TODO list,
Last night I created a simple JSON one too which can be used to just send content to a someone's website they set up which could be stored easily in a database accessible via json:// and jsons:// (secure version). Perhaps I should do a generic XML (SOAP) (xml:// and xmls://) one too?

I intend to add the Download Statistics and File Listings into the success/failure message too. In this early stage of development, i'm just trying to acknowledge as many protocols as I can. Thanks again for your feedback!

binreader
Posts: 19
Joined: 07 Oct 2014, 03:00

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by binreader » 26 Nov 2014, 21:14

Here is a list from a well respected nzb site

iOS
boxcar
Boxcar 2
prowl
faast/push 4.0
Pushbullet
Pushover

Android
notify my android
Pushbullet
Pushover

Windows Phone
Pushalot
Supertoasty

l2g
Posts: 205
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by l2g » 01 Dec 2014, 21:55

Thanks binreader for all the protocols you suggested!

I was able to impliment most of those and put together a release. I do not have an account for half of these services. each plugin was just created by following the documented API instructions on their websites.

If anyone has any issues, i'd be happy to address them!
Last edited by l2g on 02 Dec 2014, 20:55, edited 1 time in total.

hugbug
Developer & Admin
Posts: 6969
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by hugbug » 01 Dec 2014, 22:55

That's incredible.

And to make the list complete may be mailto"?

l2g
Posts: 205
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by l2g » 02 Dec 2014, 02:22

hugbug wrote:And to make the list complete may be mailto"?
I thought about that, the only problem with the mailto:// will be all the other settings such as the smtp mail server. I could try some basic guessing by the domain the user has. Hence if the users email is test@gmail.com i could try smtp.gmail.com and then mail.gmail.com etc. But then i'd have to also guess at SMTP ports (starting with the secure ones first).

It would certainly become messy and confusing fast though when you populate the field:

hence, it might look something (overly complicated) ilke this:

Code: Select all

mailto://user:smtppass@domain.com:smtpport/?smtp=srv.domain.com
I kind of like having the mail notification seperate just due to all of the configuration it entails. Plus your Email.py you got in place is solid! :)

I do intend to add the statistics, file listings, html support (to the notification servers that support it), and perhaps a Queue Script portion that notifies you when something has just begun downloading.

Anyway... your thoughts?

binreader
Posts: 19
Joined: 07 Oct 2014, 03:00

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by binreader » 02 Dec 2014, 16:05

Wow l2g you have come a far distance in a very short time. Now that we have a release I will do some testing I have pushbullet, prowl and xbmc and am familiar with the original notification scripts for all 3.

IMHO the measuring stick around here when it comes to notifications is the pushbullet script. It has a ton of options to config like skipping notifications on certain category and the formatting of the title and body. But I'll compare against this new integrated one.

Also I notice you have xbmc you may want to also include plex which has an api. plex is like xbmc but more popular because it is split into client and server components. So you notify the clients. However plex is a bit of ball of wax cuz under certain circumstance you may need to call the server refresh method else the client notification is a bit pointless. some setups of plex do not require server refresh as it is handled automagically. So a lot config options need to be there, check mannibis script on the forums for re details.

l2g
Posts: 205
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script] Notifications; Growl,XBMC, Prowl, PushBullet

Post by l2g » 03 Dec 2014, 13:23

binreader,

I didn't realize pushbullet was free, i signed up yesterday just to play around with it and it didn't work until i made one small adjustement. It works now without any problems. So you'll want to grab the latest version (updated the main post).

Hopefully tonight i'll get the statistics and file listings added to the response too.

Dec 3rd, 2014 Edit: Statistics, html support and file listings added. I haven't set up any services to utilize the html yet, but that's next. Once again, i bumped the version. So you'll want to grab it to get these bells and whistles.

Dec 4th, 2014 Edit: Logging now optional choice too, Queue-Script support now too pushing notifications when new nzb files are added. Some bullet proofing added and all previous features are optional choices.

Dec 29th, 2014 Edit: Bugfix with log sorting

Also, I've got mixed thoughts about adding Plex support just because of all the things you have to do in some cases. My goal is to just support notification services. I think i'll leave all that crazy Plex overhead to the other guy who's maintaining an exclusive script for it. :) That said, if Plex just has a 'popup' notification style thing, i'll gladly impliment that.

carp969
Posts: 4
Joined: 14 Oct 2014, 08:24

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by carp969 » 13 Jan 2015, 22:03

Thanks for this. I use Push Over a lot but never got round to getting a queue script working.

I'm finding that it doesn't translate the spaces from %20. So the title for a new nzb item shows as New%20File%20Queued%20for%20Download in pushover.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest