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.
How to use JavaScript sockets?
-
- Posts: 5
- Joined: 20 Jul 2015 21:21
How to use JavaScript sockets?
Last edited by ArthurMaroulier on 21 Jul 2015 13:39, edited 1 time in total.
Re: How to use JavaScript sockets?
What/Which Fibaro module?ArthurMaroulier wrote:Hello every one, I use the great RaZberry module and I try to use JavaScript sockets to control my Fibaro Module.
-
- Posts: 5
- Joined: 20 Jul 2015 21:21
Re: How to use JavaScript sockets?
Hello pz1, for now I have installed one FGS-221.
Re: How to use JavaScript sockets?
This module only communicates over the Z-Wave protocol. So please explain why/what you intend to use sockets for?
-
- Posts: 5
- Joined: 20 Jul 2015 21:21
Re: How to use JavaScript sockets?
To access the APIs to query the z-way server about my modules. Somethining like http://server:8083/ZWaveAPI/Run/devices ... c.Set(255)
or
http://server:8083/JS/Run/zway.devices[2].Basic
But through socket to make it real time.
or
http://server:8083/JS/Run/zway.devices[2].Basic
But through socket to make it real time.
Re: How to use JavaScript sockets?
What do you use as a client?
-
- Posts: 5
- Joined: 20 Jul 2015 21:21
Re: How to use JavaScript sockets?
A simple custom mobile web app I made with Ionic framework (angularJS) to use with any device in the house network.
Really simple to use for the family.
Really simple to use for the family.
Re: How to use JavaScript sockets?
I only know a little about sockets, but I do understand that Z-Way also supports websockets. There are a couple of posts about that.
I don't know sockets work in mobile applications. The UDP send functions I described work between always on/connected devices.
I am afraid I have to leave the answer to more technical oriented people.
I don't know sockets work in mobile applications. The UDP send functions I described work between always on/connected devices.
I am afraid I have to leave the answer to more technical oriented people.
Re: How to use JavaScript sockets?
Z-Way supports three types of connections:
1) classical HTTP connection (TCP socket to 8083 port)
2) websockets (again, TCP, but with special websocket extension of HTTP)
3) TCP/UPD sockets - raw mode to control anything via TCP/IP protocol. Even multicast is here!
1) classical HTTP connection (TCP socket to 8083 port)
2) websockets (again, TCP, but with special websocket extension of HTTP)
3) TCP/UPD sockets - raw mode to control anything via TCP/IP protocol. Even multicast is here!
-
- Posts: 5
- Joined: 20 Jul 2015 21:21
Re: How to use JavaScript sockets?
Hi PoltoS, thanks for the reply.
So, for case 2, how to setup and use websocket for Z-Way.
So, for case 2, how to setup and use websocket for Z-Way.