Tokens.txt not updating

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Tokens.txt not updating

Post by cafftab »

I recently added another camera and I can't get notifications from it after it detects events, I made sure zmninja had the new one enabled on my 3 devices. Other cameras were still triggering notifications. I renamed the tokens.txt file and let the system recreate it but so far no tokens have been added. I did check the permission the push folder and the token file appears to be www-data www-data. Has anyone experienced this it was obviously updating at one point. Does it normally take time for the tokens to appear?

2020-01-09 15:21:00 zmeventnotification 11601 INF Event Notification daemon v 4.7 starting zmeventnotification.pl
2020-01-09 15:21:00 zmeventnotification 11601 INF Initializing FCM tokens... zmeventnotification.pl
2020-01-09 15:21:00 zmeventnotification 11601 INF Total event client connections: 0 zmeventnotification.pl
2020-01-09 15:21:00 zmeventnotification 11601 INF Reloading Monitors... zmeventnotification.pl
2020-01-09 15:21:00 zmeventnotification 11601 INF Re-loading monitors, emptying needsReload() list zmeventnotification.pl
2020-01-09 15:21:00 zmeventnotification 11601 INF About to start listening to socket zmeventnotification.pl
2020-01-09 15:21:00 zmeventnotification 11601 INF Secure WS(WSS) is enabled... zmeventnotification.pl
2020-01-09 15:21:00 zmeventnotification 11601 INF Web Socket Event Server listening on port 9000 zmeventnotification.pl
2020-01-09 15:20:59 zmeventnotification 11601 INF using config file: /etc/zm/zmeventnotification.ini zmeventnotification.pl
2020-01-09 15:20:59 zmeventnotification 11601 INF using secrets file: /etc/zm/secrets.ini zmeventnotification.pl
2020-01-09 15:20:59 zmeventnotification 11601 INF ES will be restarted at 10800 seconds zmeventnotification.pl
2020-01-09 15:20:59 zmeventnotification 11601 INF Push enabled via FCM zmeventnotification.pl
2020-01-09 15:20:59 zmeventnotification 11601 INF MQTT Disabled zmeventnotification.pl
2020-01-09 15:20:59 zmeventnotification 11601 INF You are running version: 4.7 zmeventnotification.pl
2020-01-09 15:20:57 zmeventnotification 10834 INF got a websocket connection from 1xx.2xx.xx.xx (0) active connections meventnotification.pl
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Tokens.txt not updating

Post by asker »

You have to go to zmNinja Menu->Settings->Event Server and enable that monitor
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
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Re: Tokens.txt not updating

Post by cafftab »

I did that, yet the log says it’s excluded. I set it the same as the others
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Tokens.txt not updating

Post by asker »

That means for whatever reason, your change did not take place. Give it a try again (enable the monitor from zmNinja) and see debug logs on the ES to make sure it got your change.
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
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Re: Tokens.txt not updating

Post by cafftab »

Tried that and also uninstalled zmninja, with the same result, something with that monitor that is doesn't want to be included. I don't have it skipped in object.ini either. When I restored the original tokens.txt file I have noticed that the contents is changed so I assume its usable by ES

2020-01-10 11:49:56 zmeventnotification 9999 INF Total event client connections: 3 zmeventnotification.pl
2020-01-10 11:49:56 zmeventnotification 9999 INF Reloading Monitors... zmeventnotification.pl
2020-01-10 11:49:56 zmeventnotification 9999 INF Re-loading monitors, emptying needsReload() list zmeventnotification.pl
2020-01-10 11:46:16 zmeventnotification 9999 INF Force updating event 152949 with desc:[x] detected:car:63% zmeventnotification.pl
2020-01-10 11:46:15 zmeventnotification 10138 INF Checking alarm rules for token ending in:...U7DIM1uIO- zmeventnotification.pl
2020-01-10 11:46:15 zmeventnotification 10138 INF should NOT send alarm as Monitor 9 is excluded zmeventnotification.pl
2020-01-10 11:46:15 zmeventnotification 10138 INF Checking alarm rules for token ending in:...1tDcGffRSO zmeventnotification.pl
2020-01-10 11:46:15 zmeventnotification 10138 INF should NOT send alarm as Monitor 9 is excluded zmeventnotification.pl
2020-01-10 11:46:15 zmeventnotification 10138 INF Ending process:10138 to handle alarms zmeventnotification.pl
2020-01-10 11:46:14 zmeventnotification 10138 INF For Monitor:9 event:152949, hook script returned with text:[x] detected:car:63% exit:0 zmeventnotification.pl
2020-01-10 11:46:14 zmeventnotification 10138 INF Matching alarm to connection rules... zmeventnotification.pl
2020-01-10 11:46:14 zmeventnotification 10138 INF Checking alarm rules for token ending in:...PFdLjnIsjO zmeventnotification.pl
2020-01-10 11:46:14 zmeventnotification 10138 INF should NOT send alarm as Monitor 9 is excluded zmeventnotification.pl
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Tokens.txt not updating

Post by asker »

Your changes are not working.

1. Start zmNinja
2. Open a terminal window and monitor debug logs of the ES
3. Go to zmNinja->Settings->Event Server -> Uncheck/check Monitor 9, press save
4. If you don't see a message in the debug logs of the ES at that time that shows monitor 9 in the "intlist" it is not being received
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
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Re: Tokens.txt not updating

Post by cafftab »

When I enable/disable any camera this is what my log reports below both logs at about the same time

Jan 10 20:34:51 tom-ZX6971 zmdc[7802]: INF ['zmeventnotification.pl' started at 20/01/10 20:34:51]
Jan 10 20:34:51 tom-ZX6971 zmdc[7743]: INF ['zmeventnotification.pl' starting at 20/01/10 20:34:51, pid = 7802]
Jan 10 20:34:51 tom-ZX6971 zmeventnotification[7802]: INF [using config file: /etc/zm/zmeventnotification.ini]
Jan 10 20:34:51 tom-ZX6971 zmeventnotification[7802]: INF [using secrets file: /etc/zm/secrets.ini]
Jan 10 20:34:51 tom-ZX6971 zmeventnotification[7802]: INF [ES will be restarted at 10800 seconds]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Push enabled via FCM]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [MQTT Disabled]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [You are running version: 4.7]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Event Notification daemon v 4.7 starting]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Initializing FCM tokens...]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Total event client connections: 3]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Reloading Monitors...]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Re-loading monitors, emptying needsReload() list]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [About to start listening to socket]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Secure WS(WSS) is enabled...]
Jan 10 20:34:52 tom-ZX6971 zmeventnotification[7802]: INF [Web Socket Event Server listening on port 9000]
Jan 10 20:35:07 tom-ZX6971 zmeventnotification[7802]: INF [New event 152986 reported for Monitor:9 (Name:Garage-Road) Motion North Road]
Jan 10 20:35:07 tom-ZX6971 zmeventnotification[7823]: INF [Forking process:7823 to handle 1 alarms]
Jan 10 20:35:07 tom-ZX6971 zmeventnotification[7823]: INF [processAlarms: EID:152986 Monitor:Garage-Road (id):9 cause:Motion North Road]
Jan 10 20:35:08 tom-ZX6971 zmeventnotification[7823]: INF [Adding event path:/var/cache/zoneminder/events/9/2020-01-10/152986 to hook for image storage]
Jan 10 20:35:08 tom-ZX6971 zmeventnotification[7823]: INF [Invoking hook:'/usr/bin/detect_wrapper.sh' 152986 9 "Garage-Road" "Motion North Road" "/var/cache/zoneminder/events/9/2020-01-10/152986"]
Jan 10 20:35:14 tom-ZX6971 zmeventnotification[7823]: INF [For Monitor:9 event:152986, hook script returned with text: exit:1]
Jan 10 20:35:14 tom-ZX6971 zmeventnotification[7823]: INF [Ending process:7823 to handle alarms]
Jan 10 20:35:47 tom-ZX6971 zmeventnotification[7802]: INF [New event 152987 reported for Monitor:9 (Name:Garage-Road) Motion North Road]
Jan 10 20:35:47 tom-ZX6971 zmeventnotification[7855]: INF [Forking process:7855 to handle 1 alarms]
Jan 10 20:35:47 tom-ZX6971 zmeventnotification[7855]: INF [processAlarms: EID:152987 Monitor:Garage-Road (id):9 cause:Motion North Road]
Jan 10 20:35:47 tom-ZX6971 zmeventnotification[7855]: INF [Adding event path:/var/cache/zoneminder/events/9/2020-01-10/152987 to hook for image storage]
Jan 10 20:35:47 tom-ZX6971 zmeventnotification[7855]: INF [Invoking hook:'/usr/bin/detect_wrapper.sh' 152987 9 "Garage-Road" "Motion North Road" "/var/cache/zoneminder/events/9/2020-01-10/152987"]
Jan 10 20:35:54 tom-ZX6971 zmeventnotification[7855]: INF [For Monitor:9 event:152987, hook script returned with text: exit:1]
Jan 10 20:35:54 tom-ZX6971 zmeventnotification[7855]: INF [Ending process:7855 to handle alarms]
Jan 10 20:35:56 tom-ZX6971 zmeventnotification[7802]: INF [got a websocket connection from 192.168.0.128 (3) active connections]
Jan 10 20:35:56 tom-ZX6971 zmeventnotification[7802]: INF [Websockets: New Connection Handshake requested from 192.168.0.128:58081 state=pending auth, id=1578713756.88835]
Jan 10 20:35:56 tom-ZX6971 zmdc[7743]: ERR ['zmeventnotification.pl' exited abnormally, exit status 255]
Jan 10 20:35:58 tom-ZX6971 zmdc[7743]: INF [Starting pending process, zmeventnotification.pl]
Jan 10 20:35:58 tom-ZX6971 zmdc[7878]: INF ['zmeventnotification.pl' started at 20/01/10 20:35:58]
Jan 10 20:35:58 tom-ZX6971 zmdc[7743]: INF ['zmeventnotification.pl' starting at 20/01/10 20:35:58, pid = 7878]
Jan 10 20:35:58 tom-ZX6971 zmeventnotification[7878]: INF [using config file: /etc/zm/zmeventnotification.ini]
Jan 10 20:35:58 tom-ZX6971 zmeventnotification[7878]: INF [using secrets file: /etc/zm/secrets.ini]
Jan 10 20:35:58 tom-ZX6971 zmeventnotification[7878]: INF [ES will be restarted at 10800 seconds]
Jan 10 20:35:58 tom-ZX6971 zmeventnotification[7878]: INF [Push enabled via FCM]
Jan 10 20:35:58 tom-ZX6971 zmeventnotification[7878]: INF [MQTT Disabled]
Jan 10 20:35:58 tom-ZX6971 zmeventnotification[7878]: INF [You are running version: 4.7]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [Event Notification daemon v 4.7 starting]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [Initializing FCM tokens...]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [Total event client connections: 3]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [Reloading Monitors...]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [Re-loading monitors, emptying needsReload() list]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [About to start listening to socket]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [Secure WS(WSS) is enabled...]
Jan 10 20:35:59 tom-ZX6971 zmeventnotification[7878]: INF [Web Socket Event Server listening on port 9000]
Jan 10 20:36:10 tom-ZX6971 zmeventnotification[7878]: INF [got a websocket connection from 192.168.0.128 (3) active connections]
Jan 10 20:36:10 tom-ZX6971 zmeventnotification[7878]: INF [Websockets: New Connection Handshake requested from 192.168.0.128:58082 state=pending auth, id=1578713770.19251]
Jan 10 20:36:10 tom-ZX6971 zmdc[7743]: ERR ['zmeventnotification.pl' exited abnormally, exit status 255]
Jan 10 20:36:15 tom-ZX6971 zmdc[7743]: INF [Starting pending process, zmeventnotification.pl]
Jan 10 20:36:15 tom-ZX6971 zmdc[7743]: INF ['zmeventnotification.pl' starting at 20/01/10 20:36:15, pid = 7882]
Jan 10 20:36:15 tom-ZX6971 zmdc[7882]: INF ['zmeventnotification.pl' started at 20/01/10 20:36:15]
Jan 10 20:36:15 tom-ZX6971 zmeventnotification[7882]: INF [using config file: /etc/zm/zmeventnotification.ini]
Jan 10 20:36:15 tom-ZX6971 zmeventnotification[7882]: INF [using secrets file: /etc/zm/secrets.ini]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [ES will be restarted at 10800 seconds]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Push enabled via FCM]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [MQTT Disabled]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [You are running version: 4.7]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Event Notification daemon v 4.7 starting]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Initializing FCM tokens...]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Total event client connections: 3]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Reloading Monitors...]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Re-loading monitors, emptying needsReload() list]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [About to start listening to socket]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Secure WS(WSS) is enabled...]
Jan 10 20:36:16 tom-ZX6971 zmeventnotification[7882]: INF [Web Socket Event Server listening on port 9000]


Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [using secrets file: /etc/zm/secrets.ini]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [ES will be restarted at 10800 seconds]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Push enabled via FCM]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [MQTT Disabled]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [You are running version: 4.7]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Event Notification daemon v 4.7 starting]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Initializing FCM tokens...]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Total event client connections: 3]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Reloading Monitors...]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Re-loading monitors, emptying needsReload() list]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [About to start listening to socket]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Secure WS(WSS) is enabled...]
Jan 10 20:21:12 tom-ZX6971 zmeventnotification[7474]: INF [Web Socket Event Server listening on port 9000]

<<<<zmninja start here


Jan 10, 2020 08:33:37 PM INFO -->Clearing online/offine
Jan 10, 2020 08:33:37 PM INFO ROOT APP:App is going into background
Jan 10, 2020 08:33:37 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:33:37 PM DEBUG EventSever: Closing native websocket as websocket = 0EBD37CB-94E3-4494-9535-DB9C30BCF991
Jan 10, 2020 08:33:37 PM INFO Cancelling zmAutologin timer
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:37 PM INFO Login screen going to background, saving data
Jan 10, 2020 08:33:39 PM INFO ******* resumeHandler device ready
Jan 10, 2020 08:33:39 PM INFO App is resuming from background
Jan 10, 2020 08:33:39 PM INFO -->Re-registering online/offine
Jan 10, 2020 08:33:39 PM DEBUG going to portal login
Jan 10, 2020 08:33:40 PM INFO Entering Portal Main
Jan 10, 2020 08:33:40 PM DEBUG Inside Portal login Enter handler
Jan 10, 2020 08:33:40 PM DEBUG Sliding menu close
Jan 10, 2020 08:33:40 PM INFO User credentials are provided
Jan 10, 2020 08:33:40 PM INFO not checking for touchID
Jan 10, 2020 08:33:40 PM DEBUG unlock called with check PIN=true
Jan 10, 2020 08:33:40 PM DEBUG PIN code entered is correct, or there is no PIN set
Jan 10, 2020 08:33:40 PM INFO Cancelling zmAutologin timer
Jan 10, 2020 08:33:40 PM DEBUG ------> Not starting login timer for token. We will start a one time timer when we know how soon the access token will live
Jan 10, 2020 08:33:40 PM DEBUG Inside _doLogin()
Jan 10, 2020 08:33:40 PM DEBUG No need for re-captcha checks with tokens
Jan 10, 2020 08:33:40 PM DEBUG Resetting zmCookie...
Jan 10, 2020 08:33:40 PM INFO Detected token login supported
Jan 10, 2020 08:33:40 PM INFO Access token still has 84 minutes left, using it
Jan 10, 2020 08:33:40 PM INFO ----> Setting token re-login after 5040 seconds
Jan 10, 2020 08:33:40 PM DEBUG auth-success broadcast:Successful
Jan 10, 2020 08:33:40 PM DEBUG _doLogoutAndLogin: Clearing cookies
Jan 10, 2020 08:33:40 PM INFO Adding to chain stack: At Home>http://192.168.0.112/zm
Jan 10, 2020 08:33:40 PM INFO Fallback of At Home is
Jan 10, 2020 08:33:40 PM INFO reached end of chain loop
Jan 10, 2020 08:33:40 PM INFO No need to do a reachability test, as there are no fallbacks
Jan 10, 2020 08:33:40 PM INFO No need for logout!
Jan 10, 2020 08:33:40 PM DEBUG Inside _doLogin()
Jan 10, 2020 08:33:40 PM DEBUG No need for re-captcha checks with tokens
Jan 10, 2020 08:33:40 PM DEBUG Resetting zmCookie...
Jan 10, 2020 08:33:40 PM INFO Detected token login supported
Jan 10, 2020 08:33:40 PM INFO Access token still has 84 minutes left, using it
Jan 10, 2020 08:33:40 PM INFO ----> Setting token re-login after 5040 seconds
Jan 10, 2020 08:33:40 PM DEBUG auth-success broadcast:Successful
Jan 10, 2020 08:33:40 PM DEBUG PortalLogin: auth success
Jan 10, 2020 08:33:40 PM DEBUG getAPIversion called with http://192.168.0.112/zm/api/host/getVer ... n=<removed>
Jan 10, 2020 08:33:40 PM DEBUG returning promise
Jan 10, 2020 08:33:40 PM DEBUG CACHE: found for key: cached_api_version with expiry of:86400s
Jan 10, 2020 08:33:40 PM DEBUG CACHE: cached value for key:cached_api_version is good as 566 <86400
Jan 10, 2020 08:33:40 PM DEBUG snapshot supported in image.php
Jan 10, 2020 08:33:40 PM DEBUG Setting server version to:1.33.16
Jan 10, 2020 08:33:40 PM DEBUG getAPI version succeeded with 1.33.16
Jan 10, 2020 08:33:40 PM INFO Got API version: 1.33.16
Jan 10, 2020 08:33:40 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:33:40 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:33:40 PM DEBUG Transitioning state to: app.log with param undefined
Jan 10, 2020 08:33:40 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:33:40 PM DEBUG Real value of PRIVACY is:0
Jan 10, 2020 08:33:51 PM DEBUG Does login need to hear the wizard? false
Jan 10, 2020 08:33:54 PM DEBUG Saving settings before going to Event Server settings
Jan 10, 2020 08:33:54 PM INFO Returning pre-loaded list of 3 monitors
Jan 10, 2020 08:33:54 PM INFO Login data not changed, not saving
Jan 10, 2020 08:34:01 PM DEBUG Saving Event Server data
Jan 10, 2020 08:34:01 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:34:01 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:34:01 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:34:01 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:34:01 PM DEBUG Sending Control message 'filter' with monlist=9,8 and interval=0,0
Jan 10, 2020 08:34:01 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"9,8","intlist":"0,0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:34:01 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:01 PM DEBUG Sending token state enabled
Jan 10, 2020 08:34:01 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:34:01 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:05 PM DEBUG Saving Event Server data
Jan 10, 2020 08:34:05 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:34:05 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:34:05 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:34:05 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:34:05 PM DEBUG Sending Control message 'filter' with monlist=9,8 and interval=0,0
Jan 10, 2020 08:34:05 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"9,8","intlist":"0,0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:34:05 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:05 PM DEBUG Sending token state enabled
Jan 10, 2020 08:34:05 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:34:05 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:11 PM DEBUG Saving Event Server data
Jan 10, 2020 08:34:11 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:34:11 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:34:11 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:34:11 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:34:11 PM DEBUG Sending Control message 'filter' with monlist=8 and interval=0
Jan 10, 2020 08:34:11 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"8","intlist":"0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:34:11 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:11 PM DEBUG Sending token state enabled
Jan 10, 2020 08:34:11 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:34:11 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:13 PM DEBUG Saving Event Server data
Jan 10, 2020 08:34:13 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:34:13 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:34:13 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:34:13 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:34:13 PM DEBUG Sending Control message 'filter' with monlist=8 and interval=0
Jan 10, 2020 08:34:13 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"8","intlist":"0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:34:13 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:13 PM DEBUG Sending token state enabled
Jan 10, 2020 08:34:13 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:34:13 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:15 PM DEBUG Does login need to hear the wizard? false
Jan 10, 2020 08:34:15 PM DEBUG Saving Event Server data
Jan 10, 2020 08:34:15 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:34:15 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:34:15 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:34:15 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:34:15 PM DEBUG Sending Control message 'filter' with monlist=8 and interval=0
Jan 10, 2020 08:34:15 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"8","intlist":"0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:34:15 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:15 PM DEBUG Sending token state enabled
Jan 10, 2020 08:34:15 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:34:15 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:17 PM DEBUG User tapped save, calling SaveItems
Jan 10, 2020 08:34:17 PM DEBUG Clearing Multiport...
Jan 10, 2020 08:34:17 PM DEBUG CACHE: Flushing all network API caches...
Jan 10, 2020 08:34:17 PM DEBUG Inside save Items
Jan 10, 2020 08:34:17 PM DEBUG Setting isFirstUse to:false
Jan 10, 2020 08:34:17 PM DEBUG Setting server version to:
Jan 10, 2020 08:34:17 PM DEBUG Setting multi-port to:false
Jan 10, 2020 08:34:17 PM INFO >>>> Enabling strict SSL checking (turn off in Dev Options if you can't connect)
Jan 10, 2020 08:34:17 PM DEBUG Clearing cloud settings...
Jan 10, 2020 08:34:17 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:34:17 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:34:17 PM DEBUG _doLogoutAndLogin: Clearing cookies
Jan 10, 2020 08:34:17 PM INFO Adding to chain stack: At Home>http://192.168.0.112/zm
Jan 10, 2020 08:34:17 PM INFO Fallback of At Home is
Jan 10, 2020 08:34:17 PM INFO reached end of chain loop
Jan 10, 2020 08:34:17 PM INFO No need to do a reachability test, as there are no fallbacks
Jan 10, 2020 08:34:17 PM INFO No need for logout!
Jan 10, 2020 08:34:17 PM DEBUG Inside _doLogin()
Jan 10, 2020 08:34:17 PM DEBUG No need for re-captcha checks with tokens
Jan 10, 2020 08:34:17 PM DEBUG Resetting zmCookie...
Jan 10, 2020 08:34:17 PM INFO Detected token login supported
Jan 10, 2020 08:34:17 PM INFO Access token still has 83 minutes left, using it
Jan 10, 2020 08:34:17 PM INFO ----> Setting token re-login after 4980 seconds
Jan 10, 2020 08:34:17 PM DEBUG auth-success broadcast:Successful
Jan 10, 2020 08:34:17 PM INFO Validating APIs at http://192.168.0.112/zm/api/host/getVer ... n=<removed>
Jan 10, 2020 08:34:17 PM DEBUG cloud data cleared
Jan 10, 2020 08:34:17 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:34:17 PM INFO Making sure we get push notifications
Jan 10, 2020 08:34:17 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:34:17 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:17 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"8","intlist":"0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:34:17 PM DEBUG EventSever: not initalized, not sending message
Jan 10, 2020 08:34:17 PM DEBUG Saved isFirstUse ok
Jan 10, 2020 08:34:17 PM INFO First invocation of TimeZone, asking server
Jan 10, 2020 08:34:17 PM DEBUG returning promise
Jan 10, 2020 08:34:17 PM DEBUG EventSever: Calling websocket init
Jan 10, 2020 08:34:17 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:34:17 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:34:17 PM DEBUG refreshing API version...
Jan 10, 2020 08:34:17 PM DEBUG getAPIversion called with http://192.168.0.112/zm/api/host/getVer ... n=<removed>
Jan 10, 2020 08:34:17 PM DEBUG returning promise
Jan 10, 2020 08:34:17 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Jan 10, 2020 08:34:17 PM DEBUG CACHE: NOT found for:cached_timezone reverting to HTTP
Jan 10, 2020 08:34:17 PM DEBUG CACHE: NOT found for:cached_api_version reverting to HTTP
Jan 10, 2020 08:34:17 PM DEBUG CACHE: storing key data in cache now, with expiry of 86400
Jan 10, 2020 08:34:17 PM DEBUG CACHE: storing key data in cache now, with expiry of 86400
Jan 10, 2020 08:34:17 PM DEBUG Timezone API response is:America/Yellowknife
Jan 10, 2020 08:34:17 PM DEBUG snapshot supported in image.php
Jan 10, 2020 08:34:17 PM DEBUG Setting server version to:1.33.16
Jan 10, 2020 08:34:17 PM DEBUG getAPI version succeeded with 1.33.16
Jan 10, 2020 08:34:17 PM INFO getMonitors:Force reloading all monitors
Jan 10, 2020 08:34:17 PM INFO Checking value of ZM_MIN_STREAMING_PORT for the first time
Jan 10, 2020 08:34:17 PM DEBUG returning promise
Jan 10, 2020 08:34:17 PM DEBUG CACHE: NOT found for:cached_multi_port reverting to HTTP
Jan 10, 2020 08:34:17 PM DEBUG CACHE: storing key data in cache now, with expiry of 86400
Jan 10, 2020 08:34:17 PM DEBUG Setting multi-port to:false
Jan 10, 2020 08:34:17 PM INFO ZM_MIN_STREAMING_PORT not configured, disabling
Jan 10, 2020 08:34:17 PM DEBUG ZMS Multiport reported: 0
Jan 10, 2020 08:34:17 PM DEBUG Monitor URL to fetch is:http://192.168.0.112/zm/api/monitors/index/Type !=:WebSite.json?&token=<removed>
Jan 10, 2020 08:34:17 PM DEBUG returning promise
Jan 10, 2020 08:34:17 PM DEBUG CACHE: NOT found for:cached_monitors reverting to HTTP
Jan 10, 2020 08:34:18 PM DEBUG CACHE: storing key data in cache now, with expiry of 86400
Jan 10, 2020 08:34:18 PM DEBUG CACHE: encrypting request
Jan 10, 2020 08:34:18 PM DEBUG Loading hidden/unhidden status for profile:
Jan 10, 2020 08:34:18 PM DEBUG no packery profile, making sure monitors are show
Jan 10, 2020 08:34:18 PM DEBUG Inside getMonitors, will also regen connkeys
Jan 10, 2020 08:34:18 PM DEBUG Now trying to get multi-server data, if present
Jan 10, 2020 08:34:18 PM DEBUG returning promise
Jan 10, 2020 08:34:18 PM INFO Monitor load was successful, loaded 3 monitors
Jan 10, 2020 08:34:18 PM DEBUG CACHE: NOT found for:cached_multi_servers reverting to HTTP
Jan 10, 2020 08:34:18 PM DEBUG CACHE: storing key data in cache now, with expiry of 86400
Jan 10, 2020 08:34:18 PM DEBUG CACHE: encrypting request
Jan 10, 2020 08:34:18 PM INFO multi server list loaded
Jan 10, 2020 08:34:18 PM DEBUG default multi-server protocol will be:http://
Jan 10, 2020 08:34:18 PM DEBUG No servers matched, filling defaults...
Jan 10, 2020 08:34:18 PM DEBUG Storing streaming=http://192.168.0.112/zm/cgi-bin recording=http://192.168.0.112/zm
Jan 10, 2020 08:34:18 PM DEBUG No servers matched, filling defaults...
Jan 10, 2020 08:34:18 PM DEBUG Storing streaming=http://192.168.0.112/zm/cgi-bin recording=http://192.168.0.112/zm
Jan 10, 2020 08:34:18 PM DEBUG No servers matched, filling defaults...
Jan 10, 2020 08:34:18 PM DEBUG Storing streaming=http://192.168.0.112/zm/cgi-bin recording=http://192.168.0.112/zm
Jan 10, 2020 08:34:18 PM DEBUG Loading hidden/unhidden status for profile:
Jan 10, 2020 08:34:18 PM DEBUG no packery profile, making sure monitors are show
Jan 10, 2020 08:34:22 PM DEBUG Force reloading monitors...
Jan 10, 2020 08:34:34 PM DEBUG StateCtrl/getRunStatus: http://192.168.0.112/zm/api/host/daemon ... n=<removed>
Jan 10, 2020 08:34:34 PM DEBUG StateCtrl/getLoadStatus: http://192.168.0.112/zm/api/host/getLoa ... n=<removed>
Jan 10, 2020 08:34:34 PM DEBUG StateCtrl: getting state using http://192.168.0.112/zm/api/States.json?&token=<removed>
Jan 10, 2020 08:34:34 PM DEBUG StorageStatus: http://192.168.0.112/zm/api/storage.jso ... n=<removed>
Jan 10, 2020 08:34:34 PM DEBUG ServerStatus: http://192.168.0.112/zm/api/storage.jso ... n=<removed>
Jan 10, 2020 08:34:34 PM INFO Login data not changed, not saving
Jan 10, 2020 08:34:34 PM DEBUG State results: {"data":{"states":[{"State":{"Id":"1","Name":"default","Definition":"","IsActive":"1"}}]}}
Jan 10, 2020 08:34:34 PM DEBUG Load results: {"data":{"load":[0.59,0.9,0.96]}}
Jan 10, 2020 08:34:34 PM DEBUG StateCtrl/getLoadStatus: success
Jan 10, 2020 08:34:34 PM DEBUG StateCtrl/getRunStatus: success
Jan 10, 2020 08:34:34 PM DEBUG Run results: {"data":{"result":1}}
Jan 10, 2020 08:34:45 PM DEBUG inside performZMoperation with restart
Jan 10, 2020 08:34:45 PM DEBUG StateCtrl/controlZM: POST Control command is http://192.168.0.112/zm/api/states/change/restart.json
Jan 10, 2020 08:34:51 PM DEBUG StateCtrl/controlZM: returned success with:{"data":{"blah":""}}
Jan 10, 2020 08:34:51 PM DEBUG StateCtrl: getting state using http://192.168.0.112/zm/api/States.json?&token=<removed>
Jan 10, 2020 08:34:51 PM DEBUG State results: {"data":{"states":[{"State":{"Id":"1","Name":"default","Definition":"","IsActive":"1"}}]}}
Jan 10, 2020 08:35:09 PM INFO file location:file:///var/mobile/Containers/Data/Application/34ADF812-1A95-426E-B976-55476F622391/Library/NoCloud/zmNinjaLog.txt
Jan 10, 2020 08:35:43 PM INFO Share completed? undefined
Jan 10, 2020 08:35:43 PM INFO Shared to app: undefined
Jan 10, 2020 08:35:46 PM DEBUG Does login need to hear the wizard? false
Jan 10, 2020 08:35:50 PM DEBUG Saving settings before going to Event Server settings
Jan 10, 2020 08:35:50 PM INFO Returning pre-loaded list of 3 monitors
Jan 10, 2020 08:35:50 PM INFO Login data not changed, not saving
Jan 10, 2020 08:35:56 PM DEBUG Saving Event Server data
Jan 10, 2020 08:35:56 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:35:56 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:35:56 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:35:56 PM DEBUG EventSever: WebSocket open called with:{"webSocketId":"E4EECC53-8E81-4100-9A83-F59384E1D148","code":1000}
Jan 10, 2020 08:35:56 PM INFO EventSever: openHandshake: Websocket open, sending Auth
Jan 10, 2020 08:35:56 PM DEBUG EventSever: sendMessage: received->{"event":"auth","data":{"user":"ZNinja",<password removed>,"monlist":"9,8","intlist":"0,0"}}
Jan 10, 2020 08:35:56 PM DEBUG EventServer: ok to send message
Jan 10, 2020 08:35:56 PM DEBUG EventSever: openHandShake: state of push is enabled
Jan 10, 2020 08:35:56 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","monlist":"9,8","intlist":"0,0","state":"enabled"}}
Jan 10, 2020 08:35:56 PM DEBUG EventSever: Connection not yet authenticated, adding message to queue
Jan 10, 2020 08:35:56 PM DEBUG Sending Control message 'filter' with monlist=9,8 and interval=0,0
Jan 10, 2020 08:35:56 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"9,8","intlist":"0,0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:35:56 PM DEBUG EventSever: Connection not yet authenticated, adding message to queue
Jan 10, 2020 08:35:56 PM DEBUG Sending token state enabled
Jan 10, 2020 08:35:56 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:35:56 PM DEBUG EventSever: Connection not yet authenticated, adding message to queue
Jan 10, 2020 08:35:57 PM DEBUG EventSever: App closed socket, not reconnecting
Jan 10, 2020 08:36:10 PM DEBUG Does login need to hear the wizard? false
Jan 10, 2020 08:36:10 PM DEBUG Saving Event Server data
Jan 10, 2020 08:36:10 PM INFO EventSever: Clearing error/close cbk, disconnecting and deleting Event Server socket...
Jan 10, 2020 08:36:10 PM DEBUG EventSever: Closing native websocket as websocket = E4EECC53-8E81-4100-9A83-F59384E1D148
Jan 10, 2020 08:36:10 PM INFO EventSever: Initializing Websocket with URL wss://192.168.0.112:9000
Jan 10, 2020 08:36:10 PM DEBUG EventSever: Using native websockets...
Jan 10, 2020 08:36:10 PM DEBUG EventSever: WebSocket open called with:{"webSocketId":"8A1093ED-7AF5-48C8-B720-0E31456F617B","code":1000}
Jan 10, 2020 08:36:10 PM INFO EventSever: openHandshake: Websocket open, sending Auth
Jan 10, 2020 08:36:10 PM DEBUG EventSever: sendMessage: received->{"event":"auth","data":{"user":"ZNinja",<password removed>,"monlist":"9,8","intlist":"0,0"}}
Jan 10, 2020 08:36:10 PM DEBUG EventServer: ok to send message
Jan 10, 2020 08:36:10 PM DEBUG EventSever: openHandShake: state of push is enabled
Jan 10, 2020 08:36:10 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","monlist":"9,8","intlist":"0,0","state":"enabled"}}
Jan 10, 2020 08:36:10 PM DEBUG EventSever: Connection not yet authenticated, adding message to queue
Jan 10, 2020 08:36:10 PM DEBUG Sending Control message 'filter' with monlist=9,8 and interval=0,0
Jan 10, 2020 08:36:10 PM DEBUG EventSever: sendMessage: received->{"event":"control","data":{"type":"filter","monlist":"9,8","intlist":"0,0","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO"}}
Jan 10, 2020 08:36:10 PM DEBUG EventSever: Connection not yet authenticated, adding message to queue
Jan 10, 2020 08:36:10 PM DEBUG Sending token state enabled
Jan 10, 2020 08:36:10 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"token","platform":"ios","token":"cL_NDZ8DgUI:APA91bE1D5azr5SQhvg1pjyvZLracj6rJL_g84e9BsToe4mbsgRusFiW5KxnGOeOwzPoUbBmCbxJVUFT4JIOMCAvuze5seYbIgxtbGea1ir7RNwZEFcy4NCo3wNiN4HSfwPFdLjnIsjO","state":"enabled"}}
Jan 10, 2020 08:36:10 PM DEBUG EventSever: Connection not yet authenticated, adding message to queue
Jan 10, 2020 08:36:10 PM DEBUG EventSever: App closed socket, not reconnecting
Jan 10, 2020 08:36:12 PM INFO Login data not changed, not saving
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Tokens.txt not updating

Post by asker »

From your logs, it looks like zmNinja cannot connect to your Event Server using websockets. There are several logs like this:

Code: Select all

Jan 10, 2020 08:34:17 PM DEBUG EventSever: Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn’t be completed. Connection refused
Your ES seems to be running on wss://192.168.0.112:9000 --> this is a LAN IP address. Make sure it is reachable from your phone. Also make sure the certificate is valid (what works from zmNinja desktop may not work on zmNinja mobile - mobile devices are more restrictive) - for example if its a self signed certificate, the certificate also needs to be installed in the phone (for Android). Further, if you generate a certificate with the hostname of your server, you cannot use its IP address to connect.

The way push works is:
a) zmNinja connects to the the ES via web sockets for "control" messages (which include modifying monitors etc). Once the control messages are exchanged and tokens.txt is updated, push notifications are sent directly via Apple/Google servers, so even if the direct connection no longer works (from zmNinja to ES), push will continue to work till the token is active (apple/google decide how long it is active)
b) But if this happens, you will not be able to update the ES with changes in monitors etc.

So right now you need to investigate why zmNinja cannot reach your ES (LAN vs WAN, maybe?)

For now, you can hack it by manually editing tokens.txt and restarting the ES, but eventually, you need to figure out why your app can't connect to the ES.


To hack manually:

Code: Select all

cat /var/lib/zmeventnotification/push/tokens.txt                                                                          
<some token>:1,2,3:0,0,0:android:enabled     
In the above example, push will be sent to monitor IDs 1,2,3 as soon as an event is detected. The format is

Code: Select all

<list of monitor ids>:<list of intervals>:<phone platform>:<enabled or disabled>
The list of intervals is basically the minimum time the ES will wait (in seconds) before reporting another event of the same monitor.

To add a monitor manually, say ID=9:

Code: Select all

                                                                    
<some token>:1,2,3,9:0,0,0,0:android:enabled     
(Note we added 9 to list of monitor IDs and an extra 0 to list of intervals)

and then restart the ES.
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
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Re: Tokens.txt not updating

Post by cafftab »

The same thing happens when I use my domain name. I used the lan to demo so I wouldn’t have remove references. So you think it has nothing to do with zmeventnotification abnormally exit after I save or restart zmNinja? It does restart after a delay. I did the hack as you suggested, might have to wait until daylight to see if I get notifications on the new camera. I wonder if a flaky router could cause this behavior. The new camera is on an wifi extender as well, but so was the old camera

Jan 10 22:13:42 tom-ZX6971 zmeventnotification[9820]: DBG [---------->onConnect:handshake END<--------------]
Jan 10 22:13:42 tom-ZX6971 zmeventnotification[9820]: DBG [---------->onConnect msg START<--------------]
Jan 10 22:13:42 tom-ZX6971 zmeventnotification[9820]: DBG [Raw incoming message: {"event":"auth","data":{"user":"ZNinja","password":"xxxxxx","monlist":"1,9,8","intlist":"0,0,1"}}]
Jan 10 22:13:42 tom-ZX6971 zmdc[9558]: ERR ['zmeventnotification.pl' exited abnormally, exit status 255]

EDIT The above doesn't happen if i use ws instead of wss in app
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Tokens.txt not updating

Post by asker »

cafftab wrote: Sat Jan 11, 2020 4:34 am So you think it has nothing to do with zmeventnotification abnormally exit after I save or restart zmNinja?
Oh it absolutely does. I missed the fact that it is abnormally exiting. If it only happens in WSS then its an SSL certificate related issue.
Maybe this section may help to debug more? https://zmninja.readthedocs.io/en/lates ... l-settings

Also you should run the ES manually and see what error message it generates on crash. Please see the docs on how to run it in manual mode.
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
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Re: Tokens.txt not updating

Post by cafftab »

ES tries to update the tokens.ini then it crashes, only the file times is changed. But if I use the original tokens.txt with the hack I get notifications for the new monitor 9.

The help link wasn't much help because I am using apache2. If I recall correctly I had issues originally setting zm up with nginx, I couldn't find a similar solution for apache ssl. As far as I can tell it is setup correct... at least for zm.

I am not using self signed but I did correct an issue I had with the certificate chain file, but it didn't help ES.

The syslog doesn't tell me anything extra with all debug option in zoneminder. When it crashes seems to restart right away.

Are you aware of any logs for ES that I might be overlooking?

I am preventing the crash now by disabling port forwarding for port 9000, this will keep me going until the tokens.txt needs to be fully updated.

If I upgraded to ES 5.4 would that be a possible fix, or are you certain this has to do with my network?
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Tokens.txt not updating

Post by asker »

I had suggested above that you run the ES manually - doesn't look like you have.
If you run it manually, it will show the exact error (Not in log files - it will show it on the terminal). If you are saying its crashing while trying to modify tokens, then a) its a permission issue b) Its a mix up of versions -> In either case I can't see how SSL/not SSL helps.

Failing that:
My suggestion is you completely remove the ES and re-do it. Please don't restore old files (tokens etc). That just creates a complete mish-mash of things.

1. sudo zmdc.pl stop zmeventnotification.pl
2. Remove /var/lib/zmeventnotification completely
3. Follow the install procedure here https://zmeventnotification.readthedocs ... stall.html but don't install hooks
4. Get the basics working, then add the hooks

Then when you post logs, please use gist.github.com/pastebin/etc without truncating any logs. It is easier for me to read.
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
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Re: Tokens.txt not updating

Post by cafftab »

Ok I will do the reinstalls, but I I did run es manually from the terminal and viewed the logs didn’t see any errors other than exiting and restarting
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Tokens.txt not updating

Post by asker »

cafftab wrote: Sun Jan 12, 2020 12:47 am Ok I will do the reinstalls, but I I did run es manually from the terminal and viewed the logs didn’t see any errors other than exiting and restarting
Then you did not post manual logs (its useful for me to see them if you think you don't see an issue - maybe I'll find a hint somewhere)

Code: Select all

Jan 10 22:13:42 tom-ZX6971 zmdc[9558]: ERR ['zmeventnotification.pl' exited abnormally, exit status 255]
If you run it manually, zmdc should not be posting logs. zmdc only post logs when you run the ES via zmdc (not manually). Also, I'd like to see the full manual logs if you ran it manually (via pastebin/gist). The logs should start at app start and end when it crashes.

Note that when you run manually, I want to see the "CONSOLE" logs (i.e lines that start with those words, printed on the terminal) (not the /var/log/zm logs)
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
cafftab
Posts: 48
Joined: Mon May 06, 2019 6:03 pm

Re: Tokens.txt not updating

Post by cafftab »

Does this help or do you need more

https:/gist.github.com/tombu2130/ad61ce6c0eeeee41106e65ed56d30a73
line 18 is where I started zmninja



Just in case the link doesn't work

/2020-01-11 19:26:00.747068 zmeventnotification[9741].INF [main:619] [Event Notification daemon v 4.7 starting]
2020-01-11 19:26:00.781287 zmeventnotification[9741].INF [main:619] [Initializing FCM tokens...]
2020-01-11 19:26:00.847827 zmeventnotification[9741].INF [main:619] [Total event client connections: 3]
2020-01-11 19:26:00.922227 zmeventnotification[9741].INF [main:619] [Reloading Monitors...]
2020-01-11 19:26:00.955887 zmeventnotification[9741].INF [main:619] [Re-loading monitors, emptying needsReload() list]
2020-01-11 19:26:00.991784 zmeventnotification[9741].INF [main:619] [About to start listening to socket]
2020-01-11 19:26:01.025543 zmeventnotification[9741].INF [main:619] [Secure WS(WSS) is enabled...]
2020-01-11 19:26:01.081017 zmeventnotification[9741].INF [main:619] [Web Socket Event Server listening on port 9000]
2020-01-11 19:26:08.263349 zmeventnotification[9741].INF [main:619] [got a websocket connection from ::ffff:162.208.37.32 (3) active connections]
2020-01-11 19:26:08.289429 zmeventnotification[9741].INF [main:619] [Websockets: New Connection Handshake requested from ::ffff:162.208.37.32:58949 state=pending auth, id=1578795968.2891]
bad bcrypt settings at /usr/bin/zmeventnotification.pl line 942.
Post Reply