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

daft question #12

Closed
asantaga opened this issue Sep 5, 2016 · 6 comments
Closed

daft question #12

asantaga opened this issue Sep 5, 2016 · 6 comments

Comments

@asantaga
Copy link

asantaga commented Sep 5, 2016

Hi there,

Daft question, when I run this (as sudo) , it simply comes back , no errors, nothing. and nothing appears to be running in the background.
Am I missing something? how do I debug perl?

@pliablepixels
Copy link
Member

Hi there, if you are manually running it (not via zmdc.pl) and its exiting, please do a tail -f /var/log/syslog to see what its outputting.

@pliablepixels
Copy link
Member

closing as no update from poster

@asantaga
Copy link
Author

asantaga commented Oct 3, 2016

Hi there, apologies for not responding.. the trials of a 1yr old baby, work going nuts and.. well no other excuses!!!

Anyway, looking in the log files tonight I realised I hadnt installed Net::WebSocket::Server , so I went through installed those and all works fine!

thanks again.

@pliablepixels
Copy link
Member

sounds good and congrats on the baby!

@asantaga
Copy link
Author

asantaga commented Oct 4, 2016

One question, Ive installed it and it appears to be running correctly, I can log in, ask its version number but Im not receiving any events . On the server side it appears to be sending the event (cant login to the server at the moment) but the client doesnt receive them.. Im using Simple WebSocket Client Chrome Extension.. Any ideas?

I'll get the syslog to you later

@pliablepixels
Copy link
Member

Depends on how you are connecting to it Chrome Simple Websocket client doesn't work with WSS, so change $useSecure to 0 in zmeventserver.

Then launch simple web socket client, and first connect with the right auth - this involves:

  • keep monitoring event server logs
  • open WS URL ws://ip:port
  • once open you need to send your auth information
    Paste this in the request text box:
{"event":"auth","data":{"user":"admin","password":"your password"}}

You will get a message saying

{"type":"","status":"Success","reason":"","version":"0.9","event":"auth"}

Now just force an alarm and you'll get a alarm message in the message box of your simplewebsocket client

{"status":"Success","events":[{"EventId":"27811","MonitorId":"1","Name":"Garage"}],"event":"alarm","type":""}

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