How do I make ST answer a Z-Wave SensorMultilevelGet command?


(J-F) #1

In my current device handler, I want the SmartThings hub to return the outdoor temperature (fetched from a weather station) back to a querying thermostat.

The thermostat is sending a SensorMultilevelGet() command to the ST hub.

Does anyone has an idea or code example of a working solution?

Thanks!

J-F


(J-F) #2

So far, I tried this, but ST is not sending back the SensorMultilevelReport…

def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv3.SensorMultilevelGet cmd)
{
def map = [:]
log.debug “MultilevelSensor Get: $cmd”

zwave.sensorMultilevelV3.sensorMultilevelReport(sensorType: 1, scale: 1, precision: 1,  scaledSensorValue: 22.5).format()
map

}


#3

I’m confused…wouldn’t that kind of get belong in a smartapp, not the device handler?

Otherwise you’re talking to two devices from one device handler.

Or is this just some ST quirk I’m unfamiliar with?


(J-F) #4

Hi @JDRoberts,

No I’m not trying to talk to two devices within the device handler.

In my thermostat device handler, I have implemented a weather station as well. I want that temperature to be returned to the thermostat.

The weather station, is not a device by itself.

My device handler already sends out the outdoor temperature to the thermostat every once in a while, but I also want it to answer to SensorMultilevel Get command.


(Tim Slagle) #5

I’m also a little confused. You are having trouble parsing the local temp on the thermostat or the custom weather station code?


(J-F) #6

I have no issue parsing temperature.

What I want to achieve is to have ST answer to a SensorMultilevelGet command.

Then, I want the resulting report to include a temperature fetched from the weather station embedded in the device handler.

For now, let’s just pretend that I want to return a fixed temperature, do not even bother with the weather station, this is not the issue.

Usually, ST is the one that sends the Get command and the thermostat answer with its temperature. That works well.

But I want ST to do the opposite, I want the thermostat to issue a GET command to ST and I want the hub to answer back.

I’ve had a confirmation from ST that it’s doable.

My first approach was what is in my second post. The SensorMultilevelGet is received (appears in the log screen). I was hoping to be able to return a temperature back to the thermostat by sending zwave.sensorMultilevelV3.sensorMultilevelReport.

However, for an unknown reason, that does not work, at least, not in my implementation.