-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with notifications. #468
Comments
I can't say. I just tried on my phone and I don't see any problems. What might help is this: d) Start zmNinja g) Make sure you see the event server registration in the logs i) Open up ZM, force an alarm. Make sure the monitor is NOT in record or monitor - it must be in mocord or modect - events are not registered otherwise j) Make sure you see logs in zmeventserver that the event was received - if not, there is a problem (not sure what, but we can get there later) Post logs. |
Ok, just a question, for: Here the log. When I start zmeventserver:
When I start zmNinja to save setting and then I kill it:
When there is a new event:
but I haven't received a notification on my phone. |
can you force a push now? Also please let me know the last part of your IP address so I can trace it |
Ok, I just saw a push on my server
Is this yours? IF the above (SALONE) belongs to you, then everything is working on the server side. That means only one thing - push is not configured properly on your app. Since you compiled from source, its hard to know if you have every dependency installed and configured correctly for push. My suggestion is to recompile the app and making sure the push plugin is added using |
Yes, SALONE is my ipcam and with gms push sometime i receive notifications and sometime not, just now I renabled in zmNinja the gms push notifications and at the moment I'm receiving them but when I took the logs them were disabled and i tried using only the websockets and with the websockets I never receive notifications. Anyway tomorrow I'll recompile the app with your SENDER_IT but this should be unrelated with the websockets, right? and then why I do not receive notifications via WebSockets? |
web sockets will only work if zmninja is running. |
I don't think that the problem could be related at the fact that I compiled the app by myself, if there has been some error I did not receive any notification; anyway I'm starting compile a new version but if sometime I receive the push notification I don't think that using a different SENDER_IT will do any difference. P.S.: I just discovered that at building time I have automatically: |
Based on what you've sent me so far, zmeventserver gets the event, it pushes it out, the push server gets the event and pushes it out. I can't think of anything besides thinking the problem is between GCM and the app you have. You're going to have to run adb logcat to see if the pushes arrive at all to the phone. |
Ok, I'll investigate and I'll report here as soon there is some news. |
You won't be able to run my server as-is without generating your own server side SSL certificates which are provided by Apple (and I can't offer them due to security reasons) That being said:
Note that in both cases, you will need to (as far as I know) sign up as an Apple Developer (costs $99 a year) so you can generate and download push certificates. As of late 2016, Apple also offers a token based system (like GCM) which is much better, but my server doesn't support it (because I forked another open source that did not). Its very likely 3rd party servers like pushover/pushwoosh etc will. |
Thanks alot for your detailed explanation. |
Ok I solved every problem with ZoneMinder but zmninja often fails to receive notifications. |
So when you say zmNinja fails to get events, do you see the events being caught by zmeventserver ? |
Yes, for example just now I'm having this:
without any push notifications on two phones. P.S.: my problems with ZoneMinder was caused by the modded version with ngnix support for OpenMediaVault that is now really old and with a lot of problem. Now I'm on Debian 8 with minimal install and ZoneMinder works without any problem. About zmNinja I noticed that when I stop receive notifications if I enter in the app I start receive notifications for a while, same behavior on two phones. Further this I noticed that zmNinja has a lot of problems in saving settings, sometime it crashes at exit and also the notification icon is really strange, a blank square? |
Can you send me an email - pliablepixels@gmail |
Just done, that strange address it's me. |
I have a strong feeling its related to the fact that you don't have a google play account. I don't know if GCM will route messages to a phone that it doesn't have a registration for. I actually think the only pushes you are receiving are over web sockets (not GCM) - that is when the app is running Try this - Connect your phone to your computer, and run Start zmNinja, make sure it registers with a push token and then kill zmNinja (from task bar). Keep logcat on. Force a push You should see logs like this on logcat. If not, I strongly suspect your lack of a play account being the key reason. Let me know if you see logs like this when you force a push
|
This is what microG GMS Core does, it really is a great project.
Anyway I had already checked in the past and everything is working with microG:
|
If I had time at hand I'd like to help but I don't. I really won't have the time right now to help debug what microGMS does or does not do. However if you do figure out how to solve it in happy to accept PR. |
No problem, I have other 3 phones and I can restore one of them at the factory conditions with the PlayServices to test zmNinja but I don't think that my problem is caused by microG, I use it from almost two years and I have never had problem with push notifications, for example I use without problems Signal and WhatsApp. Anyway I'm really a lot confused, I restarted my server almost an hour ago and from then I don't have any problem. This is the second time that I noticed this and with two different configurations, some days ago with OpenMediaVault and ZoneMinder 1.29 and 1.30, and now with Debian 8 and ZoneMinder 1.29. My server is on 24h/24 and 7d/7 and seems that if I reboot it when zmNinja fails to get notifications, then everything return to work without problems. So when I start the server everything works without problems for a while but after some time I only have notifications when zmNinja is opened. In this case If I reboot the server I restart to receive notifications without doing nothing on zmNinja and also if the app isn't opened. Could this be possible? ZoneMinder is properly configured and I don't have any warning or error in its logs. At the moment on my server there only is a clean install of Debian 8 with only ZoneMinder 1.29. Everything is really strange, I know, and at the moment I don't have any idea on how to debug this problem. For now I'll try to use a phone with Play Services instead of microG to be sure that the problem isn't it. |
Confirmed, just now zmNinja stopped receiving push notifications, I only rebooted the server (without touching the phone, not entering or exiting from the app) and zmNinja restarted receiving the notifications. What can I do? What could be the problem? |
Okay, lets see if we can be a bit more specific: (lets not use the term server - I get confused what that means)
Questions: When push does not work: |
Also, if you are available tomorrow morning, please join irc.freenode.net #zoneminder - we can do some parallel debugging (I usually am av. in that channel after 9AM US ET) |
Sure, excuse me. About the questions:
The next time instead of rebooting Debian I'll try to reboot only ZoneMinder. |
Tomorrow I'll try but I'm not sure, but this weekend I'm surely available at every hour. |
Okay, this is the core problem (please make sure you are typing IF its not, then that means its getting lost somewhere between my server to Google to your phone. Given you are using a non standard GCM layer, its impossible for me to know what is going on. And since I don't use what you are using, I can't debug it either. If GCM is not getting it, the app won't get it. The fact that it works for a while and them stops - maybe google throttles the messages after a while if it detects something wrong with registration - hard to know |
Also, I'm recording logs to a file - please see if you can generate a situation where push does not work and then please let me know the IP address -I'll see what logs I see at the server for a failed push |
Sure, the command is with the OR, I wrongly wrote in the previous post. Just a question, can I install zmNinja on Android 4.4.4, the stock rom of the phone that i would use for test with PlayServices? Anyway thanks a lot for your patience and your time and sorry if it is hard to understand me for my bad english. |
Unfortunately at the moment everything is working -.-" and I think that i have to go to sleep because here to me is really to late. |
Ok, there are news, I'm now testing everything with 3 phones, 2 with microg and one with google play services and they have the same behavior. Further than this I noticed that is enough restarting ZoneMinder to solve the problem for a while. Just few minutes ago my phones have stopped receive notifications, forcing an event from ZoneMinder I did not have any notifications and these this was the logs:
Then I simply restarted ZoneMinder:
My IP at the moment of these log was: So the problem seems to be the ZMES Event Server (zmeventserver.pl). The next time that I start to missing the push notifications I will only stop and restart it to be sure of this: |
So it looks like zmeventserver is catching the event
But for whatever reason, it is not sending the push out to the push server (this should be 5 devices)
Correct? |
Yes, seems that zmeventserver alwasy catchs the events but after a while it stops to sending the push notifications. A the moment I'm using 3 devices:
and they all have the same behavior. |
Can you check if in /etc/private/token.txt what is the value of push - is it 'enabled' or 'disabled' when push stops working? |
Yes, I'll do, but my tokex.txt is really strange, now everything is working and I have
on only one row, anyway I just sent to you via email my actual tokens.txt. |
Okay, thanks - saw that file. Lets do this to reach a stable state.
When done, please email your tokens.txt |
I already did this some days ago, anyway I'll retry and I'll send you the new tokens.txt via email in few minutes. |
After a while that I sent you the last email I stopped receiving notifications, so I did: and everything restart working but after this I noticed that now the tokens.txt is a bit different, I'm sending it to you via email. So the problem is surely zmeventserver. |
Can you stop zmeventserver, clear your tokens file and download the new version then start and let me know. I want to get to a state where your tokens.txt has 'enabled' for your tokens in all entries |
Just done, no success, I have 'enabled' only on one token. |
I sent you numerous email, if you want today I'm available also for irc. |
1) Please stop zmeventserver
2) Empty tokens.txt
3) Please download
https://raw.githubusercontent.com/pliablepixels/zmeventserver/dev/zmeventnotification.pl
4) Please run this from command line (Not daemon)
5) It will print logs - (Directly in terminal, not syslog) - please let me
know what it prints as you start adding phones
…On Sat, Mar 4, 2017 at 9:01 AM, tecufanujacu ***@***.***> wrote:
I sent you numerous email, if you want today I'm available also for irc.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/pliablepixels/zmNinja/issues/468#issuecomment-284153222>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD7QrtCoxtQuTloJNRy2HIuwvN8DKNaeks5riW69gaJpZM4MMDHF>
.
|
Sorry, I saw this message only now, I'll do now. |
I am closing this - problem was resolved - there were bugs in zmeventserver that were fixed. Thanks @tecufanujacu |
I have a lot of problems with notifications:
From my server:
and when I start zmNinja on my phone:
Is everything ok? Could you help me to solve my problems?
My server config:
OpenMediaVault 2.2.13 - based on Debian 7
ZoneMinder 1.30.2
My phone:
Android 6.0.1 with CyanogenMod13 without gapps and with microG GmsCore
zmNinja 1.2.38
On the router I also opened in TCP the port 9000 for the IP of my server.
The text was updated successfully, but these errors were encountered: