Page 5 of 15

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

Posted: 27 Jun 2015, 00:48
by l2g
Unfortunately i'm troubleshooting this one blind since I don't own a single Apple or Microsoft Windows device in our house. Thus making an account with Prowl would prove futile.

Anyway, i pushed a very small change that caused an issue with NotifyMyAndroid (earlier) and the similar issue seemed to be present with the Prowl plugin too. Perhaps this is your problem (not sure). Their API is very straight forward, so it's tough to say what could be going wrong.

Try the master branch again (fix already pushed); If it still doesn't work, i might need to switch to private messages with you to help debug the issue (if you're willing).

Also, doublecheck that your API key is infact correct, the 401 status code you're getting returned to you is documented on their site as:
** 401 Not authorized, the API key given is not valid, and does not correspond to a user.

Edit: Also, see if running in 'Debug' mode sheds any light, run the same command you've already done with the --debug (or -D) switch specified too.

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

Posted: 29 Jun 2015, 14:02
by rambutan46
Sorry for the late reply, but no luck :cry:

This is the output of the debug command

Code: Select all

> python2.7 /usr/local/nzbget/share/nzbget/scripts/Notify.py -s prowl://6e4*******************44a0 -t "Hello" -b "meh" -D
[INFO] [DEBUG] Script mode forced off.
2015-06-29 15:49:07,493 - 23467 - DEBUG - set(config) SERVERS="prowl://6e4***********44a0"
2015-06-29 15:49:07,494 - 23467 - DEBUG - set(environment) SERVERS="prowl://6e4*******************44a0"
2015-06-29 15:49:07,495 - 23467 - DEBUG - set(config) TITLE="Hello"
2015-06-29 15:49:07,496 - 23467 - DEBUG - set(environment) TITLE="Hello"
2015-06-29 15:49:07,497 - 23467 - DEBUG - set(config) BODY="meh"
2015-06-29 15:49:07,498 - 23467 - DEBUG - set(environment) BODY="meh"
2015-06-29 15:49:07,499 - 23467 - DEBUG - get(config) SERVERS="prowl://6e4*****************44a0"
2015-06-29 15:49:07,500 - 23467 - DEBUG - get(config) TITLE="Hello"
2015-06-29 15:49:07,502 - 23467 - DEBUG - get(config) BODY="meh"
2015-06-29 15:49:07,503 - 23467 - DEBUG - get(default) INCLUDEIMAGE=None
2015-06-29 15:49:07,503 - 23467 - DEBUG - get(config) SERVERS="prowl://6e4*****************44a0"
2015-06-29 15:49:07,512 - 23467 - DEBUG - Server parsed to: {'host': '6e4***************44a0', 'user': None, 'query': None, 'url': 'prowl://6e4a***********************44a0', 'path': None, 'fullpath': None, 'password': None, 'port': None, 'schema': 'prowl'}
2015-06-29 15:49:07,514 - 23467 - DEBUG - Prowl POST URL: https://api.prowlapp.com/publicapi/add
2015-06-29 15:49:07,515 - 23467 - DEBUG - Prowl Payload: {'priority': 0, 'application': 'NZBGet-Notify', 'apikey': '6e4************4a0', 'description': 'meh', 'event': 'Hello'}
2015-06-29 15:49:08,298 - 23467 - WARNING - Failed to send Prowl notification: Verification Failed. (error=401).
I created a new API and double-checked my copy/paste from the Prowlapi website.
One thing I want to add is that even though I delete the script and all of its contents, restart NZBGet, move the new script contents over and then check the Settings page; the API key is still there(?).
The output above is run from the CLI.

I'm available for PM,
r.

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

Posted: 29 Jun 2015, 14:39
by l2g
In you debug message above, the (debug) output includes your API key (the one you were doing a great job masking out until now). You might want to just edit the post and fix that. At the same time re-generate your key again to be safe! :)

Perhaps through a private message you can send me your new key. I won't abuse it (obviously), but it'll give me something to test with as to why you're not getting messages. Eventually (hopefully) you'll get one of the messages I generate and then we'll know the problems rectified :). You can regenerate a new key from that point forward. I'll PM you now so you just need to reply with your info. I work during the week, so i only really get a chance to look at this on 'some' evenings but usually just weekends. You'll have to be patient.

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

Posted: 29 Jun 2015, 14:47
by rambutan46
:shock: :shock:

edited now, I'll PM you.

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

Posted: 01 Jul 2015, 18:11
by l2g
Release v0.2.0 (Direct Download Link) in place.

The release details can be found at the head of this thread (quick link).

This release adds quite a ton of new features:
  1. NotifyEmail: The biggest new feature is the ability to send emails now using it and support for the major services (such as Google, Microsoft, and Yahoo). More to come since this was written in a way i could easily expand it. Feel free to request one. It supports all sorts of custom emailing too outside of the standard public ones.

    This feature is rather complex, and it's easier if you just click here and read about the different settings you can specify.
  2. NotifyMyAndroid bugfixes and now supports HTML formatted messages too
  3. NotifyProwl issue resolved (in previous threads)
  4. CLI Updates Not specifying anything on the command line (when using the CLI interface) when executing this script will now display the help menu (making this tool a little more intuitive in that sense).
Happy Notifying!

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

Posted: 30 Jul 2015, 21:26
by l2g
Release v0.3.1 (Direct Download Link) in place.

This release really only addresses 2 key things aside from some minor code cleanup:
  1. NotifyGrowl: Growl protocols v1.x and v2.x are now working correctly (previously they weren't).
  2. Email HTML Logging Output previously when there was a problem; the HTML markup of the logging looked horrible; thankfully now it doesn't.
Edit: Updated to v0.3.1 (from v0.3.0) to fix a few small log formatting bugs

Happy Notifying!

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

Posted: 24 Sep 2015, 14:39
by roadrunnrr
I am trying to set this up through notify my android and probably spend the last 2 days a total of 4 hours trying everything. I am a complete novice and do not even know where to put my "nma://apikey"

Does anyone have some tips to how i would get this to work? Kind of like Explain like i'm 5?

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

Posted: 24 Sep 2015, 15:14
by l2g
roadrunnrr wrote:I am trying to set this up through notify my android and probably spend the last 2 days a total of 4 hours trying everything. I am a complete novice and do not even know where to put my "nma://apikey"

Does anyone have some tips to how i would get this to work? Kind of like Explain like i'm 5?
  1. Place both the Notify.py and Notify directory inside of the '/path/to/nzbget/scripts' directory where you installed NZBGet.
  2. Then see the attached image.
  3. Save your changes (button is at the bottom of the page - not shown in attached screenshot). You will be prompted to Reload NZBGet to update your settings (do so).
If it still doesn't work, then I may have a bug; feel free to report any issues you have.

Alternatively, if you open up a shell window in your OS (whether it be cmd.exe in Windows, or bash, in Linux/OSX, etc):
You can go to the directory you placed the Notify.py (and Notify directory) and type the following to see if it works properly (test it out):

Code: Select all

# The below should test out your api key and send a Hello World notification
# -t is the title, where as -b is the body
python Notify.py -s nma://PutTheAPIKeyHere -t "Hello" -b "World!"

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

Posted: 07 Oct 2015, 11:48
by jamesjfa72
Firstly thank you for taking the time to write this script. Your work is appreciated.

I have been using SABnzbd for a number of years now without any issues. I had heard of NZBGet but never played with it until now. Currently, I run these apps on a Synology. SAB forwards notifications on to Growl on my Mac which then passes it to Notificaion Centre.

After installing NZBGet and then this script, I used the Growl setting to send the notifications to my Mac. It works and they are passed along to Notification Centre. Can I ask for one thing (not even important as its cosmetic), 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.

Cheers,
James

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

Posted: 07 Oct 2015, 11:58
by hugbug
As a side note: script NotifyOSX shows correct icon.