-
-
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
zmninja cannot talk to zmeventserver #136
Comments
Hmm, so it looks like someone is able to connect but keeps disconnecting
Can you please enable DEBUG logs in zmNinja as well? (Developer settings) |
I've just mailed this over... Thank you very much for taking the time to look at my problem! |
For the benefit of others... Jan 11, 2016 12:22:45 AM INFO Websocket closed |
Folks, my push server is down - I am on travel till 17th of Jan - not quite sure what happened, but till then you won't get push notifications on your phone in the background - sorry about that. Its supposed to restart but hasn't @g4dge are you sure you have installed the SSL certificates on the phone - the same one that zmeventserver uses? |
There is something wrong in your configuration
Can you re-check what you have entered? The logs should show |
Thanks for the continued feedback and support on this issue... I'd not previously seen this guide before (https://github.com/pliablepixels/zmNinja/blob/master/docs/SSL-Configuration.md#install-certificates-cer-file-in-yout-phone), might be useful to link to it from your event server readme. I'm not using SSL, nor was I using authentication between my desktop clients and ZM, since I've got it all behind a VPN and firewall. I've switched on authentication, and generated the keys as that was mentioned on eventserver readme (https://github.com/pliablepixels/zmeventserver/blob/master/README.md) - this was based on your comment - If you are not already using SSL for ZoneMinder and don't have certificates, generating them is as easy as: - I admit I just spammed return to get these created using default values. I've attached logs from today, as well as some screenshots from the app. Looks like I've got a registrationid, which is something I've not seen previously. Jan 11, 2016 11:39:24 AM DEBUG DataModel/setLogin: writing {"serverName":"Behemoth","username":"","password":"","url":"http://","apiurl":"http:///api","eventServer":"wss://","maxMontage":"10","streamingurl":"http:///cgi-bin","maxFPS":"3","montageQuality":"50","singleImageQuality":"50","useSSL":false,"keepAwake":true,"isUseAuth":"1","isUseEventServer":"1","disablePush":"1","eventServerMonitors":"3","eventServerInterval":"60","refreshSec":"2","enableDebug":true,"usePin":false,"pinCode":"","canSwipeMonitors":true,"persistMontageOrder":false,"onTapScreen":"events","enableh264":true,"gapless":true,"montageOrder":"","montageHiddenOrder":"","montageArraySize":"1:1:1","graphSize":200,"minAlarmCount":"1","montageSize":"1","useNphZms":true} |
Okay so that's the problem The event server uses SSL (WSS == Web Sockets Secure/SSL) so you need to have the certificates both generated at the event server and installed in the phone. I'll add the install to phone part to the readme When generating the certificate its very important to make sure the "common name" is the same server hostname or IP you will use. In your case its 10.1.3 Once you install the certificate in your phone you should be able to connect The "registration ID" is a push notification id - it still shows you can't connect to your event server. |
Thank you very much, I'll give it a try and report back later today! |
Hey,,, So regenerated the key, and restarted both apache and zoneminder. Got the following once I fired up the app. Jan 11 22:03:24 behemoth zmeventnotification[10829]: INF [got a websocket connection from ::ffff:10.1.1.19 (0) active connections] Then forced an alert... Jan 11 22:06:28 behemoth zmeventnotification[10829]: INF [New event 479 reported for HD-Feed] Now, I've yet to recieve anything to my phone, but then I'm guessing that's because your push proxy is down. Hopefully this is a clean bill of health, could you cast your eye and let me know if it looks good. Once again thank you very much for all your assistance through this, and making this excellent app and tool! Cheers Rob |
Awesome, you are almost there. My push proxy is up again.
This log says your phone has not enabled push notifications. Please ensure that a) you have not blocked push notifications for this app in android b) You have the "use only web sockets" toggle button to OFF on event server When you see a log in the event server that says "push state:enabled" you are all set |
Hi There, I've now got everything working, and I've tested a few scenarios upon my phone to confirm that it comes through. Thanks very much for your guidance and support in getting this in place. One slight request if I may be so cheeky - Have you heard of pushover? It's a free(ish - paid app / 7,500 messages per month limit). https://pushover.net/faq#library-perl I think that this would integrate fairly easy with zmeventnotification, and could be a third method of sending alerts. for those that don't wish to run WSS. As I see it there are the following benefits. +Simple user config (No WSS, or putting SSL keys onto phone) -I don't think that this would automatically fire up zmNinja (however it would certainly alert me to needing to go there). If you could consider this it would be very much appreciated! However appreciate how busy you must be, especially given the time that you share with your users. Keep up the good work! Best wishes Rob |
Thanks Rob - glad you have it resolved. Yes, I am aware of these 3rd party push servers - hopefully sometime in the future :) |
Continuation of ZoneMinder/zmeventnotification#5
@g4dge reports that zmNinja cannot connect to zmeventserver
@g4dge, based on your logs, please check the following:
a) That you have configured your WSS URL correctly - the logs strip the server name out for privacy, so I don't know what you have there
b) That you have installed the SSL certificate in the phone - other wise it won't be able to connect
The text was updated successfully, but these errors were encountered: