Newbie questions...
Posted: 22 Jun 2014 22:32
Hi, I am new to z-wave.me... so probably simple and stupid questions, but need to ask... as documentation is poor on that.
First... what Documentation lacks - some good advice for those who does not use JS and any Browser based UI, but really really pure REST. What I am missing is that "how to get the actual value of the devices in the network without cosntant polling".
Documentation speaks about JS callbacks which can be invoked when something changes in the network (like manual switch state change). 1st how it is realised in reality? But second... this way of operation does not help me, as I want get the actual value without JS running.
I am writing Android app to control my devices, and got one running in 30 mins, but I suppose it is wrong just go and constantly question the state of device...
I I will have >200 devices querying and parsing whole tree is hard... so as far as I undersatand device itself tells the controller that it's state changed, but how do my REST client (which is Android device) can get this without running WebViews...
Second question...
I didn't understand still what is instances for the devices?
Documentation lacks explanation of the actual terms and examples for this.
Coz in my programming career "instance" refers to physical one single object... when I buy some device I expect it to be exactly one device... how it can be in several instances? What is meaning of instance, and why actually you might need instances... can you switch one switch 2 instances one on other off... so what will be state of physical switch?
---
Update:
Here is part of Documentation I am not getting how to map to pure REST
>General note: Z-Way objects and it's decendents are NOT simple JS objects, but native JS
>objects, that does not allow object modication.
How it can help me if I am using REST?
> bind(function (type[, arg]) ..., [arg, [watchChildren=false]]): Bind function to a change of
> data tree element of its descendants
It might work on browser based... but how you realise that on pure REST client?
All what I have is network POST request over HTTP and syncrhonous response. How do I leverage this?
How actually it is realised on the low level? I suppose it is still some kind of polling happening under the hood?
First... what Documentation lacks - some good advice for those who does not use JS and any Browser based UI, but really really pure REST. What I am missing is that "how to get the actual value of the devices in the network without cosntant polling".
Documentation speaks about JS callbacks which can be invoked when something changes in the network (like manual switch state change). 1st how it is realised in reality? But second... this way of operation does not help me, as I want get the actual value without JS running.
I am writing Android app to control my devices, and got one running in 30 mins, but I suppose it is wrong just go and constantly question the state of device...
I I will have >200 devices querying and parsing whole tree is hard... so as far as I undersatand device itself tells the controller that it's state changed, but how do my REST client (which is Android device) can get this without running WebViews...
Second question...
I didn't understand still what is instances for the devices?
Documentation lacks explanation of the actual terms and examples for this.
Coz in my programming career "instance" refers to physical one single object... when I buy some device I expect it to be exactly one device... how it can be in several instances? What is meaning of instance, and why actually you might need instances... can you switch one switch 2 instances one on other off... so what will be state of physical switch?
---
Update:
Here is part of Documentation I am not getting how to map to pure REST
>General note: Z-Way objects and it's decendents are NOT simple JS objects, but native JS
>objects, that does not allow object modication.
How it can help me if I am using REST?
> bind(function (type[, arg]) ..., [arg, [watchChildren=false]]): Bind function to a change of
> data tree element of its descendants
It might work on browser based... but how you realise that on pure REST client?
All what I have is network POST request over HTTP and syncrhonous response. How do I leverage this?
How actually it is realised on the low level? I suppose it is still some kind of polling happening under the hood?