gfjardim Posted April 18, 2015 Author Share Posted April 18, 2015 the <b> tag doesn't work, lol. Did you close the tag? It should work, since it's flagged as html. Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 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 Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 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> Quote Link to comment
gfjardim Posted April 19, 2015 Author Share Posted April 19, 2015 Some preliminary work: Quote Link to comment
sparklyballs Posted April 19, 2015 Share Posted April 19, 2015 Some preliminary work: very nice.... Quote Link to comment
snoopy86 Posted April 19, 2015 Share Posted April 19, 2015 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. Quote Link to comment
archedraft Posted April 21, 2015 Share Posted April 21, 2015 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 ). Quote Link to comment
gfjardim Posted April 22, 2015 Author Share Posted April 22, 2015 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" Quote Link to comment
archedraft Posted April 22, 2015 Share Posted April 22, 2015 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 Quote Link to comment
gfjardim Posted April 22, 2015 Author Share Posted April 22, 2015 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. Quote Link to comment
archedraft Posted April 22, 2015 Share Posted April 22, 2015 Awesome! All three tests worked! Thanks for working this up, I really appreciate this. Quote Link to comment
gfjardim Posted April 22, 2015 Author Share Posted April 22, 2015 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. Quote Link to comment
archedraft Posted April 22, 2015 Share Posted April 22, 2015 Do you need any modifications? Will add this command to Dynamix. Modifications as in how the messages show up in the prowl app? Quote Link to comment
gfjardim Posted April 22, 2015 Author Share Posted April 22, 2015 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? Quote Link to comment
archedraft Posted April 22, 2015 Share Posted April 22, 2015 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. Quote Link to comment
ijuarez Posted April 22, 2015 Share Posted April 22, 2015 Is this notification serious ? Get the popcorn ready, i like this notice!! Quote Link to comment
dirtysanchez Posted April 24, 2015 Share Posted April 24, 2015 Could we get support for Prowl? It's great for iOS devices (and free ). I second this. Prowl please. Quote Link to comment
bonienl Posted April 24, 2015 Share Posted April 24, 2015 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 Quote Link to comment
dirtysanchez Posted April 24, 2015 Share Posted April 24, 2015 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! Quote Link to comment
butlerpeter Posted May 5, 2015 Share Posted May 5, 2015 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. Quote Link to comment
roland Posted May 5, 2015 Share Posted May 5, 2015 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. Quote Link to comment
butlerpeter Posted May 5, 2015 Share Posted May 5, 2015 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. Quote Link to comment
bonienl Posted May 5, 2015 Share Posted May 5, 2015 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) Quote Link to comment
sparklyballs Posted May 5, 2015 Share Posted May 5, 2015 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. Quote Link to comment
bonienl Posted May 5, 2015 Share Posted May 5, 2015 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.