Android push notifications not working

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
mboze
Posts: 4
Joined: Wed Feb 19, 2020 12:01 pm

Android push notifications not working

Post by mboze »

Hello,

I have a problem with push notifications on Android device.
I did a fresh install of Debian 10, latest ZM, ES, etc...

I checked the board for a similar problem, and found this thread:
viewtopic.php?t=29019

I checked my logs and everything seems OK:

Feb 19, 2020 11:54:40 AM INFO EventSever: Initializing Websocket with URL wss://xxxx:9000
Feb 19, 2020 11:54:40 AM DEBUG EventSever: Using native websockets...
Feb 19, 2020 11:54:40 AM DEBUG Transitioning state to: app.log with param {}
Feb 19, 2020 11:54:40 AM DEBUG CACHE: found for key: cached_timezone with expiry of:86400s
Feb 19, 2020 11:54:40 AM DEBUG CACHE: cached value for key:cached_timezone is good as 258 <86400
Feb 19, 2020 11:54:40 AM DEBUG Timezone API response is:Europe/Paris
Feb 19, 2020 11:54:40 AM DEBUG Real value of PRIVACY is:0
Feb 19, 2020 11:54:40 AM DEBUG EventSever: WebSocket open called with:{"webSocketId":"039d119e-942f-484a-9f1c-0d5bf92058c4","code":101}
Feb 19, 2020 11:54:40 AM INFO EventSever: openHandshake: Websocket open, sending Auth
Feb 19, 2020 11:54:40 AM DEBUG EventSever: sendMessage: received->{"event":"auth","data":{"user":"admin",<password removed>,"monlist":"1","intlist":"0"}}
Feb 19, 2020 11:54:40 AM DEBUG EventServer: ok to send message
Feb 19, 2020 11:54:40 AM DEBUG EventSever: Initializing FCM push
Feb 19, 2020 11:54:40 AM INFO EventSever: Setting up push registration
Feb 19, 2020 11:54:41 AM DEBUG EventSever: Push Notification registration ID received: {"registrationId":"XXXX","registrationType":"FCM"}


but still nothing on my device (Xiaomi Mi 9)

I modified the push notifications settings on zmninja App on my Phone (all boxes to "on") still nothing

I'm lost :/ :P

Can someone help me? :)

thank you
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Android push notifications not working

Post by asker »

Post logs of the event server when an event occurs.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
mboze
Posts: 4
Joined: Wed Feb 19, 2020 12:01 pm

Re: Android push notifications not working

Post by mboze »

20/02/2020 09:56:11.811246 zmeventnotification[637].INF [main:836] [PARENT: New event 42 reported for Monitor:1 (Name:cour) Motion All]
20/02/2020 09:56:11.814310 zmeventnotification[637].INF [main:836] [PARENT: There are 1 new Events to process]
20/02/2020 09:56:11.831337 zmeventnotification[756].INF [main:836] [PARENT: Forked process:756 to handle alarm eid:42]
20/02/2020 09:56:11.836910 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Invoking hook on event start:'/var/lib/zmeventnotification/bin/zm_event_start.sh' 42 1 "cour" "Motion All" "/var/cache/zoneminder/events/1/2020-02-20/42"]
20/02/2020 09:56:16.806402 zmeventnotification[637].INF [main:836] [PARENT: There are 1 active child forks...]
20/02/2020 09:56:16.811370 zmeventnotification[637].INF [main:836] [PARENT: There are 0 new Events to process]
20/02/2020 09:56:21.805263 zmeventnotification[637].INF [main:836] [PARENT: There are 1 active child forks...]
20/02/2020 09:56:21.809641 zmeventnotification[637].INF [main:836] [PARENT: There are 0 new Events to process]
20/02/2020 09:56:26.685315 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 hook start returned with text: json:[] exit:1]
20/02/2020 09:56:26.688575 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Event 42 for Monitor 1 has finished]
20/02/2020 09:56:26.806205 zmeventnotification[637].INF [main:836] [PARENT: There are 1 active child forks...]
20/02/2020 09:56:26.809396 zmeventnotification[637].INF [main:836] [PARENT: There are 0 new Events to process]
20/02/2020 09:56:28.691368 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Matching alarm to connection rules...]
20/02/2020 09:56:28.696600 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Checking alarm rules for token ending in:...Bxc5SUbW1X]
20/02/2020 09:56:28.699012 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Monitor 1 event: should send out as 309.280100107193 is >= interval of 0]
20/02/2020 09:56:30.709297 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Invoking hook on event end:'/var/lib/zmeventnotification/bin/zm_event_end.sh' 42 1 "cour" "Motion: All" "/var/cache/zoneminder/events/1/2020-02-20/42"]
20/02/2020 09:56:30.720725 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 hook end returned with text:Motion: All json:[] exit:0]
20/02/2020 09:56:31.809209 zmeventnotification[637].INF [main:836] [PARENT: There are 1 active child forks...]
20/02/2020 09:56:31.813369 zmeventnotification[637].INF [main:836] [PARENT: There are 0 new Events to process]
20/02/2020 09:56:32.724022 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Not sending event end alarm, as we did not send a start alarm for this, or start hook processing failed]
20/02/2020 09:56:36.728073 zmeventnotification[756].INF [main:836] [|----> FORK:cour (1), eid:42 Ending process:756 to handle alarms]
20/02/2020 09:56:36.806723 zmeventnotification[637].INF [main:836] [PARENT: There are 0 active child forks...]
20/02/2020 09:56:36.809983 zmeventnotification[637].INF [main:836] [PARENT: There are 0 new Events to process]
mboze
Posts: 4
Joined: Wed Feb 19, 2020 12:01 pm

Re: Android push notifications not working

Post by mboze »

OK, I got it :D

I modified tokens.txt and replaced at the end disabled by enabled
and now, everthing is OK

Sorry for the inconvenience
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Android push notifications not working

Post by asker »

mboze wrote: Thu Feb 20, 2020 1:28 pm OK, I got it :D

I modified tokens.txt and replaced at the end disabled by enabled
and now, everthing is OK

Sorry for the inconvenience
You should also do this through zmNinja otherwise it may get disabled again. zmNinja->Menu->Settings->Event server settings. Make sure the monitors are enabled.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
mboze
Posts: 4
Joined: Wed Feb 19, 2020 12:01 pm

Re: Android push notifications not working

Post by mboze »

I was too hurry, tokens.txt fall back to disabled...

edit:
[/quote]

You should also do this through zmNinja otherwise it may get disabled again. zmNinja->Menu->Settings->Event server settings. Make sure the monitors are enabled.
[/quote]

didn't see your reply

ok, I'll check this, thx
Post Reply