Page 1 of 1

"null" response from Get() on http api

Posted: 03 Jan 2016 01:55
by geirgp
Should it not be possible to get status by executing a http request like this one?

http://192.168.1.34:8083/ZWaveAPI/Run/d ... ilevel.Get()

All I get in the response is "null", goes for all combinations of devices and command classes.

Re: "null" response from Get() on http api

Posted: 03 Jan 2016 13:01
by pz1
IIRC the Get() command is meant to force a device to update the data in the ZWay data tree. The null means that this part has been successful. Next you have to get the data from there.

This snippet shows how we did it in OpenRemoteHelpers (see modules folder):

Code: Select all

           case "TemperatureLevel":
                var S = 1;
                zway.devices[N].instances[I].SensorMultilevel.Get();
                return zway.devices[N].instances[I].SensorMultilevel.data[S].val.value;