Page 1 of 1

How to get luminescence from a sensor through ZWaveAPI?

Posted: 12 May 2014 15:21
by xzuttz
I have a sensor which can measure humidity, luminescence and temperature. It has device ID 3.

When requesting: http://localhost:8083/ZWaveAPI/Run/devi ... nstances[0] it returns json data which i have uploaded to the following link:

http://pastebin.com/R1iWq3VT

The value I am looking for resides in commandClass 49. Under this class, there is a variable (or class?) called 3. The "val" attribute in 3 holds the luminescence which is 1000.

I have tried various ways to construct a URL to retrieve this value but can't get it right.

What should the URL look like?

Thanks

Re: How to get luminescence from a sensor through ZWaveAPI?

Posted: 12 May 2014 16:36
by pz1
From the top of my head I would say:
http://localhost:8083/ZWaveAPI/Run/devi ... .val.value

I am a bit in doubt about the val.value part

Re: How to get luminescence from a sensor through ZWaveAPI?

Posted: 12 May 2014 16:40
by xzuttz
It works!

Thanks alot :)

Re: How to get luminescence from a sensor through ZWaveAPI?

Posted: 12 May 2014 17:01
by pz1
good!
On my Windows7 machine I use the text editor notepad++ in which you can install a JSON browser. That gives a graphical view of the JSON blurb. Helped me a lot to understand these structures.