How to explicitly pull thermostat current set point value using JSON API?
When I tried:
http://hostname:8083/ZWaveAPI/Run/devic ... .val.value
the value I'm getting can be null. I would like to to initiate SetPoint Get command and then wait somehow when response will be available. Is it possible?
Thank you.
THERMOSTAT_SETPOINT_GET command using JSON API
Re: THERMOSTAT_SETPOINT_GET command using JSON API
Of course, you can issue Get command:
But there's no clue when the value will be reported back, because device is likely sleeping, and the value will be reported only when it wakes up. So it might take too long to wait for value.
Code: Select all
http://ip:8083/ZWaveAPI/Run/devices[2].ThermostatSetPoint.Get()
Re: THERMOSTAT_SETPOINT_GET command using JSON API
ThermostatSetPoint.Get() always returns null. The device is "Frequently listening battery operated", I'm getting reply from it using Z-Wave API in about a second:
sent: 01 0A 00 13 46 03 43 02 01 05 01 E7
recv: 06
recv: 01 04 01 13 01 E8
sent: 06
recv: 01 05 00 13 01 00 E8
sent: 06
recv: 01 0B 00 04 00 46 05 43 03 01 09 44 BF <-- 0.5 - 1 second delay for this packet
sent: 06
Is it possible to wait for result during some provided timeout interval?
sent: 01 0A 00 13 46 03 43 02 01 05 01 E7
recv: 06
recv: 01 04 01 13 01 E8
sent: 06
recv: 01 05 00 13 01 00 E8
sent: 06
recv: 01 0B 00 04 00 46 05 43 03 01 09 44 BF <-- 0.5 - 1 second delay for this packet
sent: 06
Is it possible to wait for result during some provided timeout interval?
Re: THERMOSTAT_SETPOINT_GET command using JSON API
You better wait on the client side (between requests), because waiting on server side may block other requests.
Re: THERMOSTAT_SETPOINT_GET command using JSON API
I suppose the right sequence of call in this case will be:
- /ZWaveAPI/Run/devices[x].ThermostatSetPoint.Get()
- if null then wait
- get value using /ZWaveAPI/Run/devices[2].instances[0].ThermostatSetPoint.data[1].val.value
correct?
- /ZWaveAPI/Run/devices[x].ThermostatSetPoint.Get()
- if null then wait
- get value using /ZWaveAPI/Run/devices[2].instances[0].ThermostatSetPoint.data[1].val.value
correct?
Re: THERMOSTAT_SETPOINT_GET command using JSON API
If you do it quite often, it will drain device battery pretty quickly because of frequent wake ups.
So you'd better request value first, and if it is null then do Get(), wait and request it again.
So you'd better request value first, and if it is null then do Get(), wait and request it again.
Re: THERMOSTAT_SETPOINT_GET command using JSON API
I assume '/ZWaveAPI/Run/devices[2].instances[0].ThermostatSetPoint.data[1].val.value' returns last received value from server's memory, where '/ZWaveAPI/Run/devices[x].ThermostatSetPoint.Get()' sends actual SetPoint Get command to the device. Is this assumption correct?