[RELEASE] Device driver for Stelpro Ki Thermostat STZB402+ (ZigBee)

Alright. Here's a first draft of a dedicated driver. It's basically a stripped down version of Stelpro's SmartThing driver, as posted in this thread:

Link is here:

What works:

  • Read current temperature, state changes and command values
  • Modify Heat Setpoint
  • Change mode (Heat, Eco, Off)

What doesn't:

  • °F. Currently the driver only reports in °C
  • Google Home Integration.
1 Like

Since it's my first driver, there are a few points I'm wasn't too sure about:

1- I have no idea what is needed for the driver to be compatible with the Google Home App. When I try to add the device to the App, it gets filtered out with this message in the logs:
The following devices are not supported by Google Home and will be removed from your device list[**Device Name**].

I'm guessing it's missing specific functions that the app is looking for? Or does the capability has to be "Thermostat" (and not just the separate functions "ThermostatMode", "TemperatureMeasurement", etc...).

2- I wish I could change the Enum values of the "Set Thermostat Mode" function to only have the relevant modes (and not the janky mapping i've used). Is this possible?

I'd really appreciate your pointers!
Thanks.

Yes, capability needs to be thermostat, heatingsetpoint, coolingSetpoint and thermostatSetpoint all need to be maintained.

You can use the temp code from this driver to report the temperatures based on the users location preference setting.
Have a look at the code starting at line 124

1 Like

Alright, I guess it's not too hard to add those capabilities.
What's the usual approach for "Unimplemented Functions"? Since this thermostat controls line voltage heating-only systems, what should setCoolingSetpoint(temp) do? Nothing? Set the heatpoint? Set a coolingpoint state but don't send it to the device?

Interesting. Thanks for the head's up.

The temperature scale is configurable on the device, and the value is reported by the device. Should the driver match the user's preferences as in your example or should it match the device's configuration?

well that's a whole other kettle of fish, currently GH doesn't know what to do with a heating only thermostat, what you can do is set the coolingSetpoint once to an unrealistic value such as 80F
I usually put these in the installed method:

sendEvent(name:"coolingSetpoint", value:80)

Regarding unimplemented functions, just send a log event for them, such as:

def setCoolingSetpoint(degrees) {
    log.info "setCoolingSetpoint is not available for this device"
}
1 Like

wow, finally a drivers code that work. I can now rise or lower the temp of my thermostat! a HUGE thanks Philippe. I was waiting for that day since more than a year. I have 4x STZB402+.
I don't want/need the Google integration.
I need Heat, Eco, AND OFF. And the capability to rise or lower the Heating Setpoint
The commands Auto, Cool and Emergency Heat can be removed as they are useless in that kind of equipement
I will be happy to test you future release of this driver.

I updated the driver! Now with working Google Home Integration and Fahrenheit scale support! Link to the GitHub in the first post.

I followed Mike's instructions and added the aforementioned capabilities, and implemented their functions.

I also added a "lastRunningMode" data value (from this thread). It's value is fixed to "heat" since GH doesn't like the custom mode "eco" or even the simple "off".

The temperature scale follows HE user's preferences. Again thanks Mike. If you change your temperature settings, click "Configure" in the device's page to update the various values.

Regarding the Google Home integration with the Fahrenheit scale, I couldn't test as much as I'd like. Even if I set the Hub to "F", the Google Home app still shows values in "C". I couldn't find a temperature scale in the GH App either. But it still works. Even with the Hub set to F, in the app I can set the setpoint (in C) and it shows up correctly (in F) in the Hub interface.

Let me know what you guys think!

1 Like

One thing that i see that can maybe be corrected can be seen in the picture attached.
In ECO mode, i loose the arrow to adjust the température.

Not a big problem. I can adjust it from the thermostat when it is in ECO mode then it keep it
Thanks again from Québec ! I use the 3 mode Heat-Eco-Off

Hi Dan,

This is unfortunately by design. The setpoint in Eco mode is settable only on the device itself, with the hardware buttons. I can read that setpoint, but I can't set it.

I agree it's a bit strange, but in Stelpro's defense at least that behaviour is detailed in the user's guide (on page 8 if you're interested).

Merci pour les commentaires et bonne journée!

Hello, anyone tried this with HomeKit Homebridge integration? If not, what's the likelyhood that "It Just Works"? Considering buying these.

going to answer my own question here. It mostly works with HomeKit using the homebridge hubitat plugin. Reported temperature always seems 70 degrees F but setting temperature works.

Thanks for creating this driver. I bought the device just because of your work.

Hi Alex.

I know nothing about HomeKit Homebridge. (That's why I kept quiet).

Regarding the reported temperature, is it properly reported in Hubitat's web interface?

Hi Philippe,

OK. Thanks for the hint. I stand corrected. HomeKit reports what Hubitat reports.
The issue seems to be that the Hubitat driver in my installation isn't doing an automatic refresh
to obtain the current temperature. If I go in and hit the "Refresh" control
on the driver manually then both Hubitat and HomeKit show the same updated
temperature.

So my next question is. Did I miss something to make the driver auto refresh periodically?

I am using commit 7b92536a60198be85894bc5b94778cead9dad0f1 from Aug 10th. However, I have not updated the firmware in my hub. Its still 2.1.1.122

Hmmm, it looks like the hub isn't subscribed to receive values from the device. Try to click on "Configure". It could be as simple as that.

Hi Philippe,
You got it. It works beautifully now! Keeps working this well over the course of a week or so and I'll replace all my house thermostats with this unit. Thanks for your help and making this driver.

BR,
-Alex

Hello Philippe, could this device driver be ported over to the Maestro SMT402? I have 8 of these things in the house (I came from the Maestro Controller and then Vera). I found the Smartthings Device Handler, but haven't been able to get it to work yet. I have no experience with device handlers or coding in general so it's been a slow go for me trying to get this to work. I'd be willing to lend one of my SMT402s to someone in QC (preferably Mtl area) to test.

Cheers,

Hi!

I took a quick look at the SmartThings driver. It's very close to the Ki driver, which is good news. The command codes are the same. Looks like the Maestro have an humidity sensor, which the Ki doesn't have.

I'm pretty sure it would be a simple job to adjust the Hubitat's Ki driver to make it work with the Maestro. Hopefully I'm not missing something!

When I have a free moment I'll try and whip up a version for you.

In the meantime, If you want to try yourself, start with my driver and try and match the Maestro's SmartThings command codes. You can probably ignore the humidity sensor to start.

Ok, I'll try that tonight. If you want to borrow an SMT402 for testing, let me know. I have 1 still in the box until I get everything working.

Cheers,

Hi Philippe, tried using your driver but it didn't seem to work. I wish I could tell you what went wrong.

Sorry,

Phil