Device handler for Stelpro STZB402+ ? (Zigbee thermostat)

(prachi) #1

Has anyone written a device handler that I can use.

(Carl) #2

The code has been published by Stelpro… You can find it on their github at the following address:

And if you want to use your own sensor to “push” the external temperature to your thermostats, you need the following:

 *  Copyright 2015 Stelpro
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *  Get Remote Temperature
 *  Author: Stelpro

    name: "Get Remote Temperature",
    namespace: "stelpro",
    author: "Stelpro",
    description: "Retrieves the temperature from a sensor and sends it to a specific device.",
    category: "Convenience",
    iconUrl: "",
    iconX2Url: ""

preferences() {
    section("Choose remote device to read temperature from... ") {
        input "sensor", "capability.temperatureMeasurement", title: "Select a remote temperature reading device", required: true
    section("Choose the thermostats that will receive the remote device's temperature... ") {
        input "thermostats", "capability.thermostat", title: "Select Thermostats", multiple: true, required: true

def installed()
    subscribe(sensor, "temperature", temperatureHandler)
    log.debug "enter installed, state: $state"

def updated()
    log.debug "enter updated, state: $state"
    subscribe(sensor, "temperature", temperatureHandler)

def temperatureHandler(evt)
    log.debug "temperature received from remote device: $evt.value"

(J-F) #3

There you go!