gfjardim Posted April 18, 2015 Share Posted April 18, 2015 Hi guys. With the release of beta15, I proudly announce that the notification system now support the use of third-party notifications, like Pushbullet, Twitter and Pushover. The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. The scripts are called with some environment variables: EVENT, SUBJECT, DESCRIPTION, TIMESTAMP and IMPORTANCE. These are some working agents: Pushbullet: #!/bin/bash ############# TOKEN="--put-your-access-token-here--" # Can be found here: https://www.pushbullet.com/account ############# DATE=$(date --date="@$TIMESTAMP" '+%Y/%m/%d %H:%M:%S') curl -s -k -X POST --header "Authorization: Bearer $TOKEN" \ --header 'Content-Type: application/json' \ -d "{\"type\": \"note\", \"title\": \"$SUBJECT\", \"body\": \"$DESCRIPTION\"}" \ https://api.pushbullet.com/v2/pushes Pushover: #!/bin/bash ########################## USER_KEY="--put-your-user-key-here--" # Can be found here: https://pushover.net/ APP_TOKEN="--put-your-app-token-here--" # Can be created here: https://pushover.net/apps MESSAGE="<b>$SUBJECT "$'\n'" $DESCRIPTION" #########################" case "$IMPORTANCE" in 'normal' ) PRIORITY="-1" ;; 'warning' ) PRIORITY="0" ;; 'alert' ) PRIORITY="1" ;; esac curl -s \ --form-string "token=$APP_TOKEN" \ --form-string "user=$USER_KEY" \ --form-string "message=$MESSAGE" \ --form-string "timestamp=$TIMESTAMP" \ --form-string "priority=$PRIORITY" \ --form-string "html=1" \ https://api.pushover.net/1/messages.json Hope this can help users getting started. PS: Which are your favorite push services? I will compile a list to begin writing a configuration page for it. Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 could there be a possibility of having two or more outputs for notifications ? so for instance i can send less critical stuff to email and really serious things to pushover Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 and i use pushover Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 although just for fun it'd be cool to have one that uses the message facility in kodi. Quote Link to comment
gfjardim Posted April 18, 2015 Author Share Posted April 18, 2015 could there be a possibility of having two or more outputs for notifications ? so for instance i can send less critical stuff to email and really serious things to pushover Yes, of course: under Settings/Notifications, set something like this: In this case, Notices will be sent to browser popup and email; alerts and warnings will be sent to browser pupup and custom agent . Test 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
gfjardim Posted April 18, 2015 Author Share Posted April 18, 2015 although just for fun it'd be cool to have one that uses the message facility in kodi. It can be done. Found this: http://www.commandlinefu.com/commands/view/13658/send-a-message-to-kodi-xbmc Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 although just for fun it'd be cool to have one that uses the message facility in kodi. It can be done. Found this: http://www.commandlinefu.com/commands/view/13658/send-a-message-to-kodi-xbmc yeah, i toyed around with it in a VM once Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 PS like the docker update notification. Quote Link to comment
gfjardim Posted April 18, 2015 Author Share Posted April 18, 2015 PS like the docker update notification. Thanks. Bonienl contributed with thing or two too (like the most of notification system)... Quote Link to comment
bonienl Posted April 18, 2015 Share Posted April 18, 2015 PS like the docker update notification. Thanks. Bonienl contributed with thing or two too (like the most of notification system)... And thanks gfjardim for the "agents" extension, works like a charm (using pushbullet) Quote Link to comment
GHunter Posted April 18, 2015 Share Posted April 18, 2015 This looks cool! Any recommendations for a Windows Phone 8 and Windows Tablet push service? I don't have any experience using push notifications. I had a quick look at the app store and found this https://pushalot.com/api which looks like I could use. I'll have more time next week to give this a try. Gary Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. do we have to create that folder or should it exist now by default ? , i don't have it. and in terms of pushover, will i have to create my own application ? are there plans for LT to have it's own app on pushover, similar to some other software i use , ie couch, sick etc... Quote Link to comment
bonienl Posted April 18, 2015 Share Posted April 18, 2015 The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. do we have to create that folder or should it exist now by default ? , i don't have it. and in terms of pushover, will i have to create my own application ? are there plans for LT to have it's own app on pushover, similar to some other software i use , ie couch, sick etc... The whole notification agents is very fresh, and at this point in time it requires several manual actions, like creating the folder and writing (copying) the script yourself. Some improvements in the user experience can be made (read: easier usage), give it some time. Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. do we have to create that folder or should it exist now by default ? , i don't have it. and in terms of pushover, will i have to create my own application ? are there plans for LT to have it's own app on pushover, similar to some other software i use , ie couch, sick etc... The whole notification agents is very fresh, and at this point in time it requires several manual actions, like creating the folder and writing (copying) the script yourself. Some improvements in the user experience can be made (read: easier usage), give it some time. Quote Link to comment
bonienl Posted April 18, 2015 Share Posted April 18, 2015 Congrats, you just alerted yourself Quote Link to comment
trurl Posted April 18, 2015 Share Posted April 18, 2015 The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. do we have to create that folder or should it exist now by default ? , i don't have it. and in terms of pushover, will i have to create my own application ? are there plans for LT to have it's own app on pushover, similar to some other software i use , ie couch, sick etc... The whole notification agents is very fresh, and at this point in time it requires several manual actions, like creating the folder and writing (copying) the script yourself. Some improvements in the user experience can be made (read: easier usage), give it some time. So we create the folder and we copy/paste the script into a script file named what? Quote Link to comment
bonienl Posted April 18, 2015 Share Posted April 18, 2015 The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. do we have to create that folder or should it exist now by default ? , i don't have it. and in terms of pushover, will i have to create my own application ? are there plans for LT to have it's own app on pushover, similar to some other software i use , ie couch, sick etc... The whole notification agents is very fresh, and at this point in time it requires several manual actions, like creating the folder and writing (copying) the script yourself. Some improvements in the user experience can be made (read: easier usage), give it some time. So we create the folder and we copy/paste the script into a script file named what? Any name you like, I have called mine "pushbullet" since that is what I am using as app. Quote Link to comment
trurl Posted April 18, 2015 Share Posted April 18, 2015 The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. do we have to create that folder or should it exist now by default ? , i don't have it. and in terms of pushover, will i have to create my own application ? are there plans for LT to have it's own app on pushover, similar to some other software i use , ie couch, sick etc... The whole notification agents is very fresh, and at this point in time it requires several manual actions, like creating the folder and writing (copying) the script yourself. Some improvements in the user experience can be made (read: easier usage), give it some time. So we create the folder and we copy/paste the script into a script file named what? Any name you like, I have called mine "pushbullet" since that is what I am using as app. OK, then I guess what you mean is that the checkbox that says Custom will run any and all scripts in that folder? Quote Link to comment
bonienl Posted April 18, 2015 Share Posted April 18, 2015 The system is kind of rudimentary right now. Scripts, called agents, are stored on /boot/config/plugins/dynamix/notifications/agents directory, and the triggers are adjustable under the Notifications Settings by selecting the Custom checkboxes. do we have to create that folder or should it exist now by default ? , i don't have it. and in terms of pushover, will i have to create my own application ? are there plans for LT to have it's own app on pushover, similar to some other software i use , ie couch, sick etc... The whole notification agents is very fresh, and at this point in time it requires several manual actions, like creating the folder and writing (copying) the script yourself. Some improvements in the user experience can be made (read: easier usage), give it some time. So we create the folder and we copy/paste the script into a script file named what? Any name you like, I have called mine "pushbullet" since that is what I am using as app. OK, then I guess what you mean is that the checkbox that says Custom will run any and all scripts in that folder? Correct, all scripts present under the folder 'agents' will be run when 'Custom' is checked. So you may setup different apps to receive the notifications. Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 Is this notification serious ? Quote Link to comment
bonienl Posted April 18, 2015 Share Posted April 18, 2015 Nah, I would grab a beer and watch the event from my chair, should be a great show Quote Link to comment
sparklyballs Posted April 18, 2015 Share Posted April 18, 2015 the <b> tag doesn't work, lol. Quote Link to comment
gfjardim Posted April 18, 2015 Author Share Posted April 18, 2015 Nah, I would grab a beer and watch the event from my chair, should be a great show 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.