How to use JavaScript sockets?
Posted: 20 Jul 2015 21:39
Hello every one, I use the great RaZberry module and I try to use JavaScript sockets to control my Fibaro Module. I saw that the feature is available since v2.
I wanted to retrieve live updates of the state of the modules in my app.
I found on the forum the two main topics on sockets:
viewtopic.php?f=3422&t=20881
viewtopic.php?f=3424&t=20849
and this one viewtopic.php?f=3422&t=20816
But It's still unclear on how to setup socket and use it on both server and client side.
And beside, the up to date dev documentation from the github repo https://github.com/Z-Wave-Me/Z-Way-Manual is very light.
I'm a little bit familiar with socket.io and meteor, but here I'm stuck.
I don't think that I'm the only one that try to do this.
Is anybody can help me to setup everything? Is there a skeleton of code for server and client side anywere?
Thank you for your help.
[EDIT]
I think I didn't express myself correctly: I want to setup and use a websocket with js on server and client side (in a web app) to have live states of z-wave modules from apis through the websocket. And make apis calls to change state of z-wave modules through the websocket.
I wanted to retrieve live updates of the state of the modules in my app.
I found on the forum the two main topics on sockets:
viewtopic.php?f=3422&t=20881
viewtopic.php?f=3424&t=20849
and this one viewtopic.php?f=3422&t=20816
But It's still unclear on how to setup socket and use it on both server and client side.
And beside, the up to date dev documentation from the github repo https://github.com/Z-Wave-Me/Z-Way-Manual is very light.
I'm a little bit familiar with socket.io and meteor, but here I'm stuck.
I don't think that I'm the only one that try to do this.
Is anybody can help me to setup everything? Is there a skeleton of code for server and client side anywere?
Thank you for your help.
[EDIT]
I think I didn't express myself correctly: I want to setup and use a websocket with js on server and client side (in a web app) to have live states of z-wave modules from apis through the websocket. And make apis calls to change state of z-wave modules through the websocket.