zmNinja
zmNinja copied to clipboard
Android 9 - No notification sound [with resolution]
Some Android 9 phones have problem with no notification sound even if its enabled in both the general android settings and zmNinja settings. It only vibrates when receiving an notification but plays no sound. Then you might have to change the notification sound in the "PhoneGap PushPlugin"as described below.
Workaround to fix this is to go to:
- Apps & notifications
- Select zmNinja to bring up App info
- Verify Notifications is set to "On" and click it (see first picture for example)
- Click "PhoneGap PushPlugin" (see secound picture for example)
- Here under "Sound" you will see its empty, you have to choose a custom sound and it should now work. (see third picture for example)
This worked on both OnePlus 6 and Samsung Galaxy A8 2018 running Android 9.
zmNinja version:1.3.056 (android) ZoneMinder version:1.32.3 OnePlus 6 with latest update 9.0.5, Android 9. Samsung Galaxy A8 2018 running Android 9.
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you follow the issue template or I may not respond.
Thanks - this is very useful (till I know if phonegap-plugin-push has a solution for this)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey, @twau tell me please - where did you find option to enable sound notifications in zmNinja settings? Searched throughly all main menu, looked for it here in docs - nothing... I have both - desktop and adroid latest versions (really look totally same) - none has alert notifications. The only thing I have now - red bell overlying alerted monitor, but silently(
Hey, @twau tell me please - where did you find option to enable sound notifications in zmNinja settings? Searched throughly all main menu, looked for it here in docs - nothing... I have both - desktop and adroid latest versions (really look totally same) - none has alert notifications. The only thing I have now - red bell overlying alerted monitor, but silently(
The steps and pictures above is for the Android system settings, these options is not located inside zmNinja. Open android Settings and then Apps & notifications and search for zmNinja in there.
I got it but you wrote:
enabled in both the general android settings and zmNinja settings.
Where is the latest - zmNinja part?
Where is the latest - zmNinja part?
Ah now I understand :-) Checked myself and I could not find it either anymore, found that it's now removed https://github.com/pliablepixels/zmNinja/commit/992a697072c71dc374f27add137ea73fb2444454, its now handled with the system notifications settings.
Oh, I see. Thank you for clarification!
The thing is that on Huawei tablet I have no PhoneGap PushPlugin item in zmNinja notifications.
@pliablepixels what could be wrong with that?
zmNinja is updated to the latest (just released) version.
@pliablepixels, perhaps there are any plans to move sound management back to the app? PG has a variety of sound plugins AFAIK... Plus this can make desktop version really equal to mobile one.
I am not sure what the issue is anymore. I just tested on Android 9.
a) You need to be on the latest zmNinja app on play store (1.6.002 I think) b) You need to be on the latest ES (6.0.6)
If you are not on ES 6.0.6 or not on 1.6.002 of zmN, things will not work as intended
Now, assuming you are on the latest:
I get the right sound for my notifications all the time
Hi, thank you for the prompt reply. I'm already on 1.6.000 (the latest available on Google Play for now) and my zmNinja settings are exactly as per screenshot above - no sound-related stuff. Couple of weeks ago I used the latest stable ES release according to install docs and have no idea how to check its version. According to CHANGELOG.md it's probably 5.15.6 (2020-06-30) Is 6.0.6 available in master? Can I just run master installation over already installed version or some steps to remove it first needed? Anyway, I get "red bell" notifications in zmNinja, so assume that ES part works probably. But silently(
Hi, the latest stable ES is 6.0.6.
A few notes:
- If you are not running ES 6.x then you are likely not receiving notifications on zmNinja 1.6 (see this)
- You seem to be referring to what happens when the app is running (since you mentioned the bell). When the app is running, and you are not running ES 6.x, the notification is delivered over websockets. There is no sound (I think - I don't 100% remember). With ES 6.0, you should see the notification banner show up. In your case, when your app is running, does the notification banner (system notification) show?
- I tested with ES 6.x and zmN 1.6 right now - when the app is running, I see the system notification and hear the notification sound. I also tested when the app is not running (or is in background). I see the system notification and hear the sound.
So bottom line:
- Please first make sure you are on ES 6.x
Hi, thank you for your help. "does the notification banner (system notification) show?"
- No, just red bell appears after a while, nothing else
I updated ES to 6.0.6 (no issues. all dependencies Ok), generated new certs, put them in /etc/apache2/ssl/, edited configs
=zmeventnotification.ini
[ssl]
# Enable SSL (default: yes)
enable = yes
cert = !ES_CERT_FILE
key = !ES_KEY_FILE
cert = /etc/apache2/ssl/zoneminder.crt
key = /etc/apache2/ssl/zoneminder.key
and
=secrets.ini
...
ES_CERT_FILE=/etc/apache2/ssl/zoneminder.crt
ES_KEY_FILE=/etc/apache2/ssl/zoneminder.key
but on recommended test run got the error
sudo -u www-data /usr/bin/zmeventnotification.pl --debug
INF:2020-11-17,09:30:02 PARENT: using config file: /etc/zm/zmeventnotification.ini
11/17/2020 09:30:02.394875 zmeventnotification[1323].INF [main:975] [PARENT: using config file: /etc/zm/zmeventnotification.ini]
INF:2020-11-17,09:30:02 PARENT: using secrets file: /etc/zm/secrets.ini
11/17/2020 09:30:02.504021 zmeventnotification[1323].INF [main:975] [PARENT: using secrets file: /etc/zm/secrets.ini]
11/17/2020 09:30:02.531902 zmeventnotification[1323].FAT [main:435] [Token:ES_CERT_FILE
/etc/apache2/ssl/zoneminder.crt not found in secret file]
What could be wrong with that?
It might be that it doesn’t have read permissions.
No, 755 for /ssl directory and 644 for both key files, owner is root off cause. Moreover - we run command with sudo...
You are running it with sudo www-data not root. If the file actually exists it means www-data likely cannot read it.
Oh, yes, missed that, thank you. Anyway 755 and 644 should be quite enough for www-data (as part of others) to be able to read...
File copied successfully by sudo -u www-data cp /etc/apache2/ssl/zoneminder.crt /var/www
What else in the script could produce such an error?
On looking at the error it actually seems to be a token issue. Note the weird line break in the error message.
Your zmeventnotification.ini as posted is wrong. You have duplicate definitions of cert and key.
Strings
cert = !ES_CERT_FILE
key = !ES_KEY_FILE
were looking like needed ones, so I decided just to uncomment and edit next two with paths. Commented them out and ES works now. Thank you!
Let me check the main issue - with sound
Unfortunately sound settings didn't appear - everything left in the state it was (and I posted above). Probably it's the matter of my particular Android? It's Huawei official, no tweaks, no changes.
One positive change - Android started to show system notifications for zmNinja alerts, so we can be sure that ES works.
Which android version are you running? I am testing on 8 and 9.
It's 7, tablet details screenshot I posted above. I'm trying to find another device where I can set up my google account to install zmNinija, old phone available has Android 4 unfortunately, not supported
If you are on android 7, try making use_fcmv1 = no
in zmeventnotification.ini
and see if that produces sound.
Thanks, I will test it and let you know.
I found more or less modern Redmi to check - it produces system notifications and alert sound
but again no sound specific items in system zmNinja settings, only switches to enable/disable - absolutely equivalent to screenshot I posted above for Amdroid 7/Huawei. So I can't chose sound for alert as you do.
use_fcmv1 = no
did the trick, now Huawei has default alarm sound too.
Thank you very much!
But sound settings are still unavailable, probably you can solve that in future releases.