April 18, 201511 yr Author the <b> tag doesn't work, lol. Did you close the tag? It should work, since it's flagged as html.
April 18, 201511 yr the <b> tag doesn't work, lol. Did you close the tag? It should work, since it's flagged as html. i just copy pasted your script, then put in my app code and pushover id code. i'll try closing the tag
April 18, 201511 yr the <b> tag doesn't work, lol. Did you close the tag? It should work, since it's flagged as html. i just copy pasted your script, then put in my app code and pushover id code. i'll try closing the tag lol, now i get <b>Alert Test</b>
April 19, 201511 yr If anyone wants to get notification to kodi(xbmc), make a script in the agents folder containing below. Obviously you have to put your kodi ip, path to image... #!/bin/bash ############# wget --spider --header="Content-Type: application/json" --post-data="{\"jsonrpc\":\"2.0\",\"method\":\"GUI.ShowNotification\",\"params\":{\"title\":\"$SUBJECT\",\"message\":\"$DESCRIPTION\", \"image\":\"smb://path_to_image/logo.png\"},\"displaytime\":5000,\"id\":1}" http://xbmc:password@kodi_ip:9090/jsonrpc You must set "allow control of kodi via http" to true in kodi.
April 21, 201511 yr PS: Which are your favorite push services? I will compile a list to begin writing a configuration page for it. Could we get support for Prowl? It's great for iOS devices (and free ).
April 22, 201511 yr Author PS: Which are your favorite push services? I will compile a list to begin writing a configuration page for it. Could we get support for Prowl? It's great for iOS devices (and free ). The app isn't. I can't test it, so please let me know if this works: #!/bin/bash ############ APP_NAME="unRAID" API_KEY="" #found here: https://www.prowlapp.com/api_settings.php TITLE=$SUBJECT MESSAGE=$DESCRIPTION ############ MESSAGE=$(echo -e "$MESSAGE") case "$IMPORTANCE" in 'normal' ) PRIORITY="0" ;; 'warning' ) PRIORITY="1" ;; 'alert' ) PRIORITY="2" ;; esac curl \ -F "apikey=${API_KEY}" \ -F "application=${APP_NAME}" \ -F "event=${TITLE}" \ -F "description=${MESSAGE}" \ -F "priority=$PRIORITY" \ https://api.prowlapp.com/publicapi/add Some text commands: notify -e "Notice Test" -s "Notice Test" -d "This is a test for Notices" -i "normal" notify -e "Warning Test" -s "Warning Test" -d "This is a test for Warnings" -i "warning" notify -e "Alert Test" -s "Alert Test" -d "This is a test for Alerts" -i "alert"
April 22, 201511 yr The app isn't. Hmm I must have downloaded it when it was on sale or something then. Thank you so much for working on this BTW! Results: notify -e "Warning Test" -s "Notice Test" -d "This is a test for Notices" -i "normal" curl: try 'curl --help' or 'curl --manual' for more information /boot/config/plugins/dynamix/notifications/agents/prowl: line 20: -F: command not found
April 22, 201511 yr Author Results: notify -e "Warning Test" -s "Notice Test" -d "This is a test for Notices" -i "normal" curl: try 'curl --help' or 'curl --manual' for more information /boot/config/plugins/dynamix/notifications/agents/prowl: line 20: -F: command not found Ok, my bad. Get the fixed code and try again.
April 22, 201511 yr Awesome! All three tests worked! Thanks for working this up, I really appreciate this.
April 22, 201511 yr Author Awesome! All three tests worked! Thanks for working this up, I really appreciate this. Do you need any modifications? Will add this command to Dynamix.
April 22, 201511 yr Do you need any modifications? Will add this command to Dynamix. Modifications as in how the messages show up in the prowl app?
April 22, 201511 yr Author Do you need any modifications? Will add this command to Dynamix. Modifications as in how the messages show up in the prowl app? I mean, the code run ok as it is?
April 22, 201511 yr I mean, the code run ok as it is? Yeah I far as I can tell it's running just fine. I didn't get any strange messages from unRAID's ssh session after running the commands.
April 24, 201511 yr Could we get support for Prowl? It's great for iOS devices (and free ). I second this. Prowl please.
April 24, 201511 yr Could we get support for Prowl? It's great for iOS devices (and free ). I second this. Prowl please. Well, gfjardim has made an update and has included Prowl, please wait for the next release to find all goodies
April 24, 201511 yr Well, gfjardim has made an update and has included Prowl, please wait for the next release to find all goodies I just noticed that. That's what I get for not reading the rest of the thread. Thanks!
May 5, 201511 yr Is there a script or anything that can be called to trigger custom notifications? For example, you might have a script that copies a bunch of files from one drive to another (maybe you're migrating from reiser to xfs), it would be good to be able to add a step to the end of that script that triggers a notification to say it has completed.
May 5, 201511 yr Any of these should do the trick ... notify -e "Notice Test" -s "Notice Test" -d "This is a test for Notices" -i "normal" notify -e "Warning Test" -s "Warning Test" -d "This is a test for Warnings" -i "warning" notify -e "Alert Test" -s "Alert Test" -d "This is a test for Alerts" -i "alert" or you could just call the notification script directly if you want to bypass the unRAID notification on screen.
May 5, 201511 yr Any of these should do the trick ... notify -e "Notice Test" -s "Notice Test" -d "This is a test for Notices" -i "normal" notify -e "Warning Test" -s "Warning Test" -d "This is a test for Warnings" -i "warning" notify -e "Alert Test" -s "Alert Test" -d "This is a test for Alerts" -i "alert" or you could just call the notification script directly if you want to bypass the unRAID notification on screen. Thanks for that, I didn't realise that functionality already existed. Works a treat Should now hopefully get some PushBullet notifications when a couple of long file copies have finished.
May 5, 201511 yr Any of these should do the trick ... notify -e "Notice Test" -s "Notice Test" -d "This is a test for Notices" -i "normal" notify -e "Warning Test" -s "Warning Test" -d "This is a test for Warnings" -i "warning" notify -e "Alert Test" -s "Alert Test" -d "This is a test for Alerts" -i "alert" or you could just call the notification script directly if you want to bypass the unRAID notification on screen. Thanks for that, I didn't realise that functionality already existed. Works a treat Should now hopefully get some PushBullet notifications when a couple of long file copies have finished. It is easy to use the notifications system in your own script, this is achieved by either calling the script notify within a shell script or by calling the module Notify.php within a PHP program. Both approaches use the same optional parameters to form the notification. -e = event description -s = subject description -d = detailed description -i = importance (normal, warning, alert) -m = message content -x = single notification (i.e. the same notification will not be repeated)
May 5, 201511 yr This will make someone giggle, i have this thread on notify. i just saw five emails with notification and unraid in the title and thought oh fu*k something major has happened to my server.
May 5, 201511 yr This will make someone giggle, i have this thread on notify. i just saw five emails with notification and unraid in the title and thought oh fu*k something major has happened to my server. You can exclude email notifications, if that makes you happier
Archived
This topic is now archived and is closed to further replies.