[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
jamesjfa72
Posts: 4
Joined: 07 Oct 2015, 11:39

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

Post by jamesjfa72 » 07 Oct 2015, 12:35

hugbug wrote:As a side note: script NotifyOSX shows correct icon.
Can I use this on the Synology (where NZBGet is installed) and have it forward to my Mac? I couldn't see an option for that.

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

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

Post by hugbug » 07 Oct 2015, 12:41

jamesjfa72 wrote:Can I use this on the Synology (where NZBGet is installed) and have it forward to my Mac? I couldn't see an option for that.
No, it works only when NZBGet is running locally on Mac.

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

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

Post by l2g » 07 Oct 2015, 13:07

jamesjfa72 wrote:Are you able to include the NZBGet logo when sending the notification to Growl? At the moment it's a default image by Growl I think.
I thought I had built this into the script already TBH.

You could try this out:

Code: Select all

# with password
growl://password@server?version=1
# or without
growl://server?version=1
The difference is how the icons are referenced... with v1 they're actually opened from a local storage location that comes with TidyIt vs the default which fetches them off a location shared on the web.

Alternatively, if you wouldn't mind flipping on Debug mode for me, maybe there is something in the logs that can help us out.

As another note; if you can get a terminal window on your Synology device (does it offer you something like that?) we can test this faster through the command line:

Code: Select all

# just browse to your scripts directory
cd /path/to/nzbget/scripts
# -i from the command line enables images (they're disabled at the CLI by default)
# Optionally add a -D somewhere too if you want (the debugging is the same
# as it is in NZBGet)
TidyIt.py -i -s growl://password@server?version=1 -t "Hello" -b "World"

jamesjfa72
Posts: 4
Joined: 07 Oct 2015, 11:39

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

Post by jamesjfa72 » 07 Oct 2015, 23:27

Thank you for the replies. It was "user error".

As my Growl notifications are passed to OS X Notification Centre, the only icon I see is the Growl one (the same as the rest Growl passes).

However when I opened up Growl preferences and look at Applications, the icon I see for NZBGet-Notify is a generic icon and not the NZBGet one. This is where I assumed (never assume I know), that it wasn't passing the correct icon. It is though. Why I disable pass to OSX, Growl shows me the correct logo. This happen if I use version 1 or 2.

It's only Growl preferences that doesn't show the proper icon.

Thank you so much for the quick responses.

Cheers,
James

In_Cognito19
Posts: 2
Joined: 02 Nov 2015, 16:36

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

Post by In_Cognito19 » 02 Nov 2015, 16:40

Could you please supply me with an example of what the simple json response would look like from nzbget-notify? :)

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

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

Post by l2g » 02 Nov 2015, 17:49

In_Cognito19 wrote:Could you please supply me with an example of what the simple json response would look like from nzbget-notify? :)
Sure,

It assumes you're listening at some web address (secure or non-secure). Your NZBGet Notify option would look like this:
json://hostname/full/url/to/where/you/want/to/POST/TO

If it's secure (port 443), then:
jsons://hostname/full/url/to/where/you/want/to/POST/TO

It's just like a regular URL, so you can change the port, enforce a login, etc:
jsons://user:password@hostname:8443/full/url/to/where/you/want/to/POST/TO


The JSON content sent looks like this:

Code: Select all

{
    'version': '1.0',
    'title': "Download Successful: Sintel 720p",
    'message': "More Details... here",
    'image': "http://nzbget.lead2gold.org/notify/nzbget-notify-success-128x128.png"
}
The HTTP headers pushed with the message looks like this:

Code: Select all

'User-Agent': 'NZBGet-Notify'
'Content-Type': 'application/json'
edit: If you can think of other items you'd like to see such as maybe the hostname of the server sending the notification, or more logging details etc, just let me know. I'd be happy to add anything you might find useful that's missing (as it is a very basic response string).

In_Cognito19
Posts: 2
Joined: 02 Nov 2015, 16:36

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

Post by In_Cognito19 » 02 Nov 2015, 18:06

Thanks a lot, great response time. :o
And great script

conradh
Posts: 2
Joined: 04 Nov 2015, 10:41

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

Post by conradh » 04 Nov 2015, 10:47

HI,
This Extension script is great!! I am very happy with it. :D

I am using the Pushover and Prowl parts.
All messages are send perfectly and I am receiving them on my iOS devices.

Still one question.

I always get a warning message with the text:
"Notify: RCP Connection Failure (10061): No connection could be made because the target machine actively refused it"

I put the debugger on. But cannot find out what is causing it.

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

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

Post by l2g » 04 Nov 2015, 17:17

conradh wrote: I always get a warning message with the text:
"Notify: RCP Connection Failure (10061): No connection could be made because the target machine actively refused it"
Notify.py makes an RPC (Remote Procedure Call) back to NZBGet to fetch all of the download statistics... logging, etc (so that it can relay this info along to you through the notification it sends). So; if you're getting that error, then the connection is being dropped (or can't be established) while it's attempting to fetch this information. Notify.py will already know (with or without this extra RPC call) whether the download was successful or not which is why you're getting the notifications still. The warning is just letting you know that you're missing out on some more info on the download (transfer speeds, etc) that can get passed back to you.

If you used the email portion of the script; or Pushbullet (which supports a much larger message sizes), then the missing information that comes with this extra RPC call is really noticeable. The services you're using (pushover, etc) won't be as noticeable because due to their protocol limitations; i strip off most of the fetched content anyway. So in your case, you can honestly safely ignore this warning.

BUT if it's truly bugging you (as I know it would annoy me); and if you want this message to go away, you just need to grant RPC access to the Notify.py script. You can do this by going to NZBGet Settings -> Security.

Focus on the entry which reads "Control IP". Try setting this to 0.0.0.0 (if it's not already). Also; if you scroll down; make sure the SecureControl is turned off. I'm not sure if either of these are causing the problem or not; but just for testing purposes; I'd be great if you did this and reported back your success/failure :). I may need to add SSL support to my RPC calls as a solution to this issue you're having; otherwise we might be looking in the wrong place (not sure).

All my knowledge with the NZBGet RPC interface was from looking at hugbug's Email.py script (a long time ago). The Email.py does the same thing Notify.py does (fetches all sorts of great info and fires it along to the end user). So there may be a setting he uses that I'm not accounting for. So while you test my suggestions above; I'll look back at his script and see if there is anything i can accommodate on my end.

Anyway let me know how it goes!

conradh
Posts: 2
Joined: 04 Nov 2015, 10:41

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

Post by conradh » 04 Nov 2015, 19:48

l2g wrote:
conradh wrote: I always get a warning message with the text:
"Notify: RCP Connection Failure (10061): No connection could be made because the target machine actively refused it"

I just tested several combination of the settings. Indeed you need the ControlIP to be 0.0.0.0 and the switch SecureControl on OFF.
Only then you don't get an error.

In that case you cannot run NZBGet under SSL.

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests