Can the SmartThings hub receive a temperature from a device and transfer it to another device?

The device is expecting a MultilevelSensor Report Z-Wave Command

If there is any way to send the sensor’s temperature from the SmartApp to the thermostat, I am willing to know it.

The design may still be changed if need be.

in short, no, you can’t send Z-Wave command from your smartapp. Z-Wave commands can only be sent out by device-types only.

However, here’s what you can do to solve your problem, and it’s mostly answered by @obycode :

  1. in your thermostat device type, create a command http://docs.smartthings.com/en/latest/device-type-developers-guide/definition-metadata.html#commands setTemperature

  2. put in your zwave commands there

    zwave.sensorMultilevelV3.sensorMultilevelReport(sensorType: 1, scale: deviceScale, precision: p, scaledValue: convertedDegrees).format()

  3. in your smartapp, make sure you can set preference to select your outdoor sensor and your thermostat

    input “outTemp”, “capability.temperatureMeasurement”, title: "Select an outdoor sensor"
    input “therm”, “device.deviceTypeName”, title: “Select thermostat”

  4. make sure you subscribe to the outTemp

    def install() { subscribe(outTemp, “temperature”, tempHandler) }

  5. in the smartapp event handler for your outdoor temperature, send your outdoor temperature to the thermostat device type using the command you’ve extended in step 1

    def tempHandler(evt) {
    therm.setTemperature(evt.value)
    }

3 Likes

@copyninja That’s it!

This is what I was looking for!

Thank you so much!

2 Likes