Page 1 of 1
Switch Status Module ** Need help with index.js **
Posted: 21 Jul 2014 15:58
by islipfd19
So I'm trying to write my own module which gets the switch status'. I was able to work out the json module and it loads into the UI without any issues. My module is based off of the SensorsPolling module (actually it's almost an exact duplicate of it). I'm having a difficult time in writing the actual function in index.js that will perform the get status command of the switch (either binary or multilevel) for this module. Any help is greatly appreciated. I've also attached what I have so far.
Re: Switch Status Module ** Need help with index.js **
Posted: 21 Jul 2014 21:20
by n0ahg
I'm away from my computer so can't look at your code but just wondered what type of switch you are trying to read?
I want to add support for the UPiS but as ZWay doesn't allow GPIO and/or i2c access I have to decide if my plugin should shell out to a command line utility or perform JSON request to a Node process to retreive the required information.
Re: Switch Status Module ** Need help with index.js **
Posted: 21 Jul 2014 22:47
by pz1
For external access to GPIO with versions 1.3-1.4.1 I wrote a little piece of JS as decribed here:
http://www.openremote.org/display/docs/ ... spberry+Pi.
Re: Switch Status Module ** Need help with index.js **
Posted: 02 Aug 2014 15:45
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