Page 1 of 1

Need help with JS command

Posted: 25 Jul 2014 00:15
by islipfd19
I'm modifying the AutoOff module in a way so that it actually polls the device and updates the UI. I'd like to know I could get the device status from the device itself? The device I have selected for the "new" module ends up being device 13. The actual command I see in the logs is 'zway.devices[13].instances[0].commandClasses[37].Get()' and I'm trying to get the value at the end of the sequence where the line looks like this "SETDATA devices.13.instances.0.commandClasses.37.data.level = False". The word 'False' is what I'm trying to return back to the index.js so I can use some logic to update the UI.
I can set the switch 'On' or 'Off' with vDev.performCommand("on") or vDev.performCommand("off") but I can't figure out how to get the current state of the switch without using the 'on' or 'off' command. Any help is appreciated.

Re: Need help with JS command

Posted: 02 Aug 2014 15:43
by islipfd19
For all of those that read this post. I was able to figure out the correct syntax and was able to get the module working properly. You can download it you like @ viewtopic.php?f=3424&t=20588