Bind to SensorBinary Data -JS API
Posted: 12 Aug 2017 18:57
Hi All,
New to this forum, zway..... and zwave in general. Love it!
Im having a bit of an issue trying to bind to my MultiSensor. I want to bind to the motion sensor. Reading the docs I see you can do this with the following - http://YOURIP:8083/JS/Run/zway.devices[3].*: Client Side URL access using the JS API
Here is my SensorBinary data:
http://192.168.0.206:8083/JS/Run/zway.devices[4].SensorBinary.data[1].level --- this will return the following:
Result:
{
invalidateTime: 1502547598,
updateTime: 1502552454,
type: "bool",
value: true
}
So, should the following work when called in the browser?
http://192.168.0.206:8083/JS/Run/zway.devices[4].SensorBinary.data[1].level.bind(function(){console.log('CHANGED TO: ' + this.value + '\n');});
Kind Regards
New to this forum, zway..... and zwave in general. Love it!
Im having a bit of an issue trying to bind to my MultiSensor. I want to bind to the motion sensor. Reading the docs I see you can do this with the following - http://YOURIP:8083/JS/Run/zway.devices[3].*: Client Side URL access using the JS API
Here is my SensorBinary data:
http://192.168.0.206:8083/JS/Run/zway.devices[4].SensorBinary.data[1].level --- this will return the following:
Result:
{
invalidateTime: 1502547598,
updateTime: 1502552454,
type: "bool",
value: true
}
So, should the following work when called in the browser?
http://192.168.0.206:8083/JS/Run/zway.devices[4].SensorBinary.data[1].level.bind(function(){console.log('CHANGED TO: ' + this.value + '\n');});
Kind Regards