{"action":"created","issue":{"url":"https://api.github.com/repos/pliablepixels/zmNinja/issues/135","repository_url":"https://api.github.com/repos/pliablepixels/zmNinja","labels_url":"https://api.github.com/repos/pliablepixels/zmNinja/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/pliablepixels/zmNinja/issues/135/comments","events_url":"https://api.github.com/repos/pliablepixels/zmNinja/issues/135/events","html_url":"https://github.com/pliablepixels/zmNinja/issues/135","id":125785439,"number":135,"title":"Notification icon and sound - add ability to play default sounds","user":{"login":"requa3r0","id":16628002,"avatar_url":"https://avatars.githubusercontent.com/u/16628002?v=3","gravatar_id":"","url":"https://api.github.com/users/requa3r0","html_url":"https://github.com/requa3r0","followers_url":"https://api.github.com/users/requa3r0/followers","following_url":"https://api.github.com/users/requa3r0/following{/other_user}","gists_url":"https://api.github.com/users/requa3r0/gists{/gist_id}","starred_url":"https://api.github.com/users/requa3r0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/requa3r0/subscriptions","organizations_url":"https://api.github.com/users/requa3r0/orgs","repos_url":"https://api.github.com/users/requa3r0/repos","events_url":"https://api.github.com/users/requa3r0/events{/privacy}","received_events_url":"https://api.github.com/users/requa3r0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pliablepixels/zmNinja/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-09T22:32:04Z","updated_at":"2016-02-10T21:22:59Z","closed_at":"2016-02-04T00:25:04Z","body":"Hi all. \r\nI recently installed a new ZM and ZmN + the event sever. Its not my first ZM by fare, but its the first with the API and the event server from pliablepixels.\r\n \r\nOne thing is still unresolved.\r\n\r\nThe APP and notification system is super cool, but on my system I don't always hear the alerts, or notice them afterwards. Am I the only one?\r\n\r\nI don't get any alert icon in the android status bar, and the sound volume on the notification sound is extremely low. so low i have to activity pay attention when i test to notice it. All volumes are on full!\r\nI must say, the chosen blub.mp3 does not make much of an alarm sound to begin with though.\r\n\r\nI suggest that the \"ZmN Bell icon\" is shown in the status bar on alerts, until they are \"cleared\" and that the APP will have options to customize the sound, with option to chose an mp3 and volume to achieve the following.\r\n\r\n1: The notification will be loud and clear even if the phone is a bit away or in a pocket.\r\n2: If you do not hear the sound, but later have a look at the phone, you should be alerted with a status bar ZmN icon.\r\n\r\nThanks for a cool APP and event server. It has made my Zoneminder a lot more fun ;O)\r\nI'm running a HTC M7, rooted, S-OFF with ViperOne 9.0.0 ◦ Sense 7"},"comment":{"url":"https://api.github.com/repos/pliablepixels/zmNinja/issues/comments/182587570","html_url":"https://github.com/pliablepixels/zmNinja/issues/135#issuecomment-182587570","issue_url":"https://api.github.com/repos/pliablepixels/zmNinja/issues/135","id":182587570,"user":{"login":"requa3r0","id":16628002,"avatar_url":"https://avatars.githubusercontent.com/u/16628002?v=3","gravatar_id":"","url":"https://api.github.com/users/requa3r0","html_url":"https://github.com/requa3r0","followers_url":"https://api.github.com/users/requa3r0/followers","following_url":"https://api.github.com/users/requa3r0/following{/other_user}","gists_url":"https://api.github.com/users/requa3r0/gists{/gist_id}","starred_url":"https://api.github.com/users/requa3r0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/requa3r0/subscriptions","organizations_url":"https://api.github.com/users/requa3r0/orgs","repos_url":"https://api.github.com/users/requa3r0/repos","events_url":"https://api.github.com/users/requa3r0/events{/privacy}","received_events_url":"https://api.github.com/users/requa3r0/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T21:22:59Z","updated_at":"2016-02-10T21:22:59Z","body":"I understand the issue has been closed, and that you have done quite a lot of work on the zmeventnotification.pl and app since.\r\n\r\nI have updated everything to newest version and do get notifications when the app is running, but nothing when its closed. Still the same low sound & still no flags, icons banners or mexican mariachi bands.\r\n\r\nFor any one with the same problem, or for your general inspiration,  here is a pretty good workaround.\r\n\r\nI wanted to push notifications to my android with alarm on/off status, to check my little hack on my exiting alarm which is now coupled to the zoneminder through a small audoino board that is keeping an \"eye\" on the exiting alarms red diod and setting ZM accordingly automatically ;O)\r\n\r\nNevermind that..I bought the pushover app and have implemented it for this purpose.\r\n\r\nI have now also implemented pushover into the  zmeventnotification.pl, just to see how that would work.\r\n\r\nWhen the app is running, ZMninja and pushover reacts pretty fast and at the same time.\r\n\r\nWhen ZMninja is not running, i now still get pushover notifications and because i can set a priority, the alarm status is set to normal (following the system sound scheme), but alarm events with priority 1 will override my sound settings and always be loud and clear. Pretty good if you have the phone turned down etc. (It does mean you need to fine tune the ZM pretty well to avoid false events etc.)\r\n\r\nI implemented pushover into the zmeventnotification.pl, like this.\r\n\r\non line 1044 i added this module ..its just at the end before the main part. it could be anyware ;O)\r\n\r\n#Pushover\r\nsub pushover{\r\nLWP::UserAgent->new()->post(\r\n                        'https://api.pushover.net/1/messages.json', [\r\n                        'token' => 'mysrecettoken',\r\n                        'user' => 'mysrecetuser',\r\n                         #'sound' => 'sirene', #here some sound could be selected\r\n                        'priority' => '1',\r\n                        'message' =>'ZM ALARM',\r\n                        ]);\r\n}\r\n\t\r\nAnd again here line 1094  .. tjis is where an event will trigger a notification of some sort.\r\n\r\n\t\t\tif (checkEvents())\r\n\t\t\t{\r\n\t\t\t\t#also send notification with pushover\r\n\t\t\t\tpushover();\r\n\r\n\r\nI like it...I can now control the priority, have sound settings override mute, DND, and quite hours etc, and select my own sound scheme...precisely just like I want it ;O)\r\n\r\nIf people with those notifications apps, prefer them, it could take the load of your event server. It may we worth while to incorporate them into the available options  inside zmeventnotification.pl. Just a thought.\r\n\r\nGood work on the zmeventnotification script and app.\r\n\r\nCheers."}}