c++ and api
Posted: 24 Feb 2016 12:24
Hello,
I am an absolutely newbee in the razberry business.
After reading a lot in the manuals, faq, forum, I can access my door sensor (battery) and my binary switch (wired) via the following browser commands:
http://IP:8083/ZWaveAPI/Run/devices[2]. ... Classes[48]
which leads to:
{"name":"SensorBinary","data":{"invalidateTime":1456220566,"updateTime":1456220567,"type":"empty","value":null,"supported":{"invalidateTime":1456220566,"updateTime":1456220567,"type":"bool","value":true},"version":{"invalidateTime":1456220764,"updateTime":1456220765,"type":"int","value":1},"security":{"invalidateTime":1456220566,"updateTime":1456220567,"type":"bool","value":false},"interviewDone":{"invalidateTime":1456220566,"updateTime":1456220766,"type":"bool","value":true},"interviewCounter":{"invalidateTime":1456220566,"updateTime":1456220766,"type":"int","value":9},"typemask":{"invalidateTime":1456220566,"updateTime":1456220766,"type":"int","value":2},"1":{"invalidateTime":1456220765,"updateTime":1456298977,"type":"empty","value":null,"sensorTypeString":{"invalidateTime":1456220765,"updateTime":1456220766,"type":"string","value":"General purpose"},"level":{"invalidateTime":1456301400,"updateTime":1456298977,"type":"bool","value":false}}},"id":48}
and
http://IP:8083/ZWaveAPI/Run/devices[4]. ... 32].Set(x)
x=0 or x=255 to toggle to switch.
Now, I want to go one step further. I successfully installed NetBeans on my Raspberry and I added
To start with, I want to write a really small and tiny c++ application, which gets the level-updateTime and the level-value of the door sensor, each time the application runs. Or an application, that sends the on/off command to the binary switch, each time the application runs.
What I need is the very very basic construction in c++ to access the sensors in both directions. It should lead me to do my first "Hello World!" in the huge world of c-api.
I went through the code samples, especially the different libzway include files, but they are way to complex for now.
Thank you for an idea, how to start.
Best reagards,
skohrt
I am an absolutely newbee in the razberry business.
After reading a lot in the manuals, faq, forum, I can access my door sensor (battery) and my binary switch (wired) via the following browser commands:
http://IP:8083/ZWaveAPI/Run/devices[2]. ... Classes[48]
which leads to:
{"name":"SensorBinary","data":{"invalidateTime":1456220566,"updateTime":1456220567,"type":"empty","value":null,"supported":{"invalidateTime":1456220566,"updateTime":1456220567,"type":"bool","value":true},"version":{"invalidateTime":1456220764,"updateTime":1456220765,"type":"int","value":1},"security":{"invalidateTime":1456220566,"updateTime":1456220567,"type":"bool","value":false},"interviewDone":{"invalidateTime":1456220566,"updateTime":1456220766,"type":"bool","value":true},"interviewCounter":{"invalidateTime":1456220566,"updateTime":1456220766,"type":"int","value":9},"typemask":{"invalidateTime":1456220566,"updateTime":1456220766,"type":"int","value":2},"1":{"invalidateTime":1456220765,"updateTime":1456298977,"type":"empty","value":null,"sensorTypeString":{"invalidateTime":1456220765,"updateTime":1456220766,"type":"string","value":"General purpose"},"level":{"invalidateTime":1456301400,"updateTime":1456298977,"type":"bool","value":false}}},"id":48}
and
http://IP:8083/ZWaveAPI/Run/devices[4]. ... 32].Set(x)
x=0 or x=255 to toggle to switch.
Now, I want to go one step further. I successfully installed NetBeans on my Raspberry and I added
- /opt/z-way-server/libzway
To start with, I want to write a really small and tiny c++ application, which gets the level-updateTime and the level-value of the door sensor, each time the application runs. Or an application, that sends the on/off command to the binary switch, each time the application runs.
What I need is the very very basic construction in c++ to access the sensors in both directions. It should lead me to do my first "Hello World!" in the huge world of c-api.
I went through the code samples, especially the different libzway include files, but they are way to complex for now.
Thank you for an idea, how to start.
Best reagards,
skohrt