Help Getting Started
Posted: 04 Feb 2015 09:11
I am new to zway (and zwave). So far I have managed to get my razberry (v2.0.1-rc11) working with four sensors and a relay, but I am still struggling with two issues. (Disclaimer: I am not a programmer. JavaScript scares me. But I know my way around Linux fairly well.)
The first problem is interacting with the JSON API. I want to be able to interact with the razberry using cURL, but every time I include a "Get" or "Set" command, it just returns "null."
For example, this returns a JSON object with sensor data, great:
However, this returns "null" no matter what I put in Get(). Ditto for Set(), and nothing shows up in the queue or the z-way server log. Am I missing something obvious or doing something stupid?
My second problem is with a door/window sensor (Aeotec). I associates with the controller and periodically sends data, but I cannot get it to "push" open/close events. I connected it to the HTTP GET logger in the Z-Way UI and attached a graph of the data to this post. I see clusters of data when I let Walter (our cat) in and out, but all zeroes. With the Fibaro motion sensors, I had to explicitly set the "on" and "off" values to 0 and 255, but the configuration for the Aeotec window sensor in the expert UI only shows wakeup time.
Is this the normal behavior for the window sensor? That is, does it just send a "0" when it opens or closes? Or can I get it to output 255 when open and then 0 when closed again? I would like to be able to have other devices poll the window sensor and get an explicit answer of "open" or "closed" to determine what they should be doing or to warn me that I forgot to close the window if I'm upstairs after a certain time.
Any help would be much appreciated.
The first problem is interacting with the JSON API. I want to be able to interact with the razberry using cURL, but every time I include a "Get" or "Set" command, it just returns "null."
For example, this returns a JSON object with sensor data, great:
Code: Select all
curl -H "Content-Type:application/json" 'http://razberry:8083/ZWaveAPI/Run/devices\[14\].instances\[0\].Configuration'
Code: Select all
curl -H "Content-Type:application/json" 'http://razberry:8083/ZWaveAPI/Run/devices\[14\].instances\[0\].Configuration.Get(1,null,null)'
Is this the normal behavior for the window sensor? That is, does it just send a "0" when it opens or closes? Or can I get it to output 255 when open and then 0 when closed again? I would like to be able to have other devices poll the window sensor and get an explicit answer of "open" or "closed" to determine what they should be doing or to warn me that I forgot to close the window if I'm upstairs after a certain time.
Any help would be much appreciated.