Skip to content
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

Zmeventnotification.pl Working but no push notifications #664

Closed
BradleyHull opened this issue Jul 3, 2018 · 3 comments
Closed

Zmeventnotification.pl Working but no push notifications #664

BradleyHull opened this issue Jul 3, 2018 · 3 comments

Comments

@BradleyHull
Copy link

BradleyHull commented Jul 3, 2018

Hi there pliablepixels, I am in a spot of bother, I am so close to getting the event notification working however, I seem to have an FCM issue maybe? I am not sure but here is the error that I am getting:

Jul 3 00:13:23 CTS web_php[1337]: INF [Login successful for user "CTS"]
Jul 3 00:14:25 CTS zmc_m1[1411]: INF [IPCAM2: 8000 - Capturing at 6.99 fps]
Jul 3 00:14:45 CTS web_php[1335]: INF [User "CTS" logged out]
Jul 3 00:14:45 CTS web_php[1335]: INF [Login successful for user "CTS"]
Jul 3 00:14:47 CTS zma_m1[1734]: INF [IPCAM2: 4000 - Analysing at 6.94 fps]
Jul 3 00:15:06 CTS web_php[1560]: INF [User "CTS" logged out]
Jul 3 00:15:06 CTS web_php[1561]: INF [Login successful for user "CTS"]
Jul 3 00:15:20 CTS zma_m1[1734]: INF [IPCAM2: 4226 - Gone into alarm state]
Jul 3 00:15:20 CTS zma_m1[1734]: INF [IPCAM2: 4226 - Opening new event 18, alarm start]
Jul 3 00:15:20 CTS zma_m1[1734]: INF [IPCAM2: 4227 - Gone into alert state]
Jul 3 00:15:22 CTS zma_m1[1734]: INF [IPCAM2: 4242 - Gone back into alarm state]
Jul 3 00:15:22 CTS zma_m1[1734]: INF [IPCAM2: 4243 - Gone into alert state]
Jul 3 00:15:23 CTS zma_m1[1734]: INF [IPCAM2: 4250 - Gone back into alarm state]
Jul 3 00:15:23 CTS zma_m1[1734]: INF [IPCAM2: 4251 - Gone into alert state]
Jul 3 00:15:24 CTS zmeventnotification[1767]: INF [New event 18 reported for IPCAM2 Forced Web]
Jul 3 00:15:24 CTS zmeventnotification[1767]: INF [Broadcasting new events to all 1 websocket clients]
Jul 3 00:15:24 CTS zmeventnotification[1767]: INF [Checking alarm rules for token ending in:...Ht8o14AKmA]
Jul 3 00:15:24 CTS zmeventnotification[1767]: INF [Monitor 1 event: sending this out as 490 is >= interval of 0]
Jul 3 00:15:24 CTS zmeventnotification[1767]: INF [Sending notification over PushProxy]
Jul 3 00:15:24 CTS zma_m1[1734]: INF [IPCAM2: 4261 - Gone back into alarm state]
Jul 3 00:15:24 CTS zmeventnotification[1767]: INF [FCM push message returned a 200 with body {"multicast_id":7939869551713425793,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"NotRegistered"}]}]
Jul 3 00:15:25 CTS zmeventnotification[1767]: ERR [Error sending FCM for token:dCAGmegLrqY:APA91bHf3fNQr-aMW8FmU7vO-KbJU7smJiE20jEHD79AnRV-vqfWRZEPVjbUjcHKyv6leXkPUFdvbIM8NZSHNVX4B3PxWMyKjxsK79QM-Ih-dHYWD6whbhc5r4elzY6jeTC3tBaSMBmzaRBBTQMeyWZWHt8o14AKmA]
Jul 3 00:15:25 CTS zmeventnotification[1767]: ERR [Error value =NotRegistered]
Jul 3 00:15:25 CTS zmeventnotification[1767]: INF [Removing this token as FCM doesn't recognize it]
Jul 3 00:15:30 CTS zma_m1[1734]: INF [IPCAM2: 4285 - Gone into alert state]
Jul 3 00:15:33 CTS zma_m1[1734]: INF [IPCAM2: 4310 - Left alarm state (18) - 109(27) images]
Jul 3 00:15:33 CTS zma_m1[1734]: INF [IPCAM2: 4310 - Closing event 18, alarm end]

Is there anything you have seen before? I have put the suspect in Bold, I have been trying to find forum post or diddling around for hours without luck.

@pliablepixels
Copy link
Member

I've seen this issue before where the push registration value becomes invalid. Some suggestions/questions:

  1. Did you build zmNinja on your own our buy it from the store?
  2. Is this iOS or Android?
  3. Stop the event server, empty tokens.txt, start server
  4. Delete zmNinja app, install again (this should generate a new token)

@BradleyHull
Copy link
Author

Hello,

So I bought the app on the store for Android. It has now started working after I uninstalled the app.

I rebooted the server after I put a # in front of the "runcommand" in zmpkg.pl, then I started the machine.

On a second window I started the monitoring, (tail -f /var/log/syslog | grep zmeventnotification
), once it was up I started the event server with ( zmdc.pl start zmeventnotification.pl ) I could then see in the log window that things were moving in the right direction as I could see the same things as on your install page.

Then I installed the app on my phone, and input the settings on the expert mode, inputted the IP and the login, once the identification was successful I activated the event server which caused the logs to show a new client. And from there it was a GO! XD

Thanks a lot @pliablepixels your fix did the trick, hope that it helps others and your app is awesome!

@pliablepixels
Copy link
Member

sounds good! Glad things worked out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants