STZW402+ display outdoor temperature

Hi everyone.

I recently bought a couple STZW402+ to control my baseboard heaters. Their documentation says:

When connected to a Z-Wave network, the thermostat may display the outdoor temperature provided by an external sensor.

The OZW config doesn’t expose config values. For reference, here’s the device documentation: http://pro.stelpro.com/contenu/ca/pdf/guides/User/STZW402.pdf

I also found the manufacturer’s bindings for ST, but I’m not too sure how it can be translated for OZW and HA: Ki-Z-Wave-Thermostat/devicetypes/stelpro/stelpro-ki-thermostat.src/stelpro-ki-thermostat.groovy at d106ec8c640d3288850e672bf88352beff6f57c7 · stelpro/Ki-Z-Wave-Thermostat · GitHub

There’s also that post for another platform that actually gives a bit of code. It may be possible to reverse engineer the thing and write the appropriate OZW config: Indigo Domotics • View topic - [ANSWERED]: Outside Temp to Stelpro STZW402+ Thermostat

For example sending 0x31 0x05 0x01 0x01 0x17 to the device is supposed to display 23 °C as the outdoor temperature. Question 1: How can I send a raw output like that through HA?

I tried to understand a bit of the payload, but there are some constants I am not too sure what they mean:

0x31 : Constant
0x05 : Constant
0x01 : Constant (seems to indicate it is a temperature?)
0x01 : 3 bits to indicate the float precision - 2 bit for the unit (0=°C, 1=°F) - 3 bits for the size (bytes) of the value
0x17 : The value. This can span multiple bytes for .1 precision. Negatives seem to use the 4 MSB and positives the 4 LSB?

Question 2: is it possible to do that with a proper OZW xml config or am I gonna need to replicate the logic in my automation?

1 Like

An xml config file will not help you here. The xml file is used to define configuration parameters. You are trying to send a Multilevel Sensor Report command to the node from the controller, which OZW does not support. There is a Github issue with an explanation. However, In OZW 1.6 (HA uses 1.4), there is the ability to send raw commands to a node. Maybe that gives you the capability to construct your own Multilevel Sensor Report command manually.

The description of the Multilevel Sensor command is described in document SDS13781. The list of sensor types and values is in document SDS13812.

Thanks a lot for your detailed answer!

I will follow the 1.6 implementation in HA more closely. Very eager to try this out :slight_smile:

Can’t wait for a solution to this problem.

I have both Stelpro Ki z-wave and Stelpro Ki zigbee thermostats. For the zigbee, I just made a PR to Zigbee2Mqtt to fix this problem: https://github.com/Koenkk/zigbee2mqtt/pull/2628

But for the z-wave version, I’m still waiting for a real solution. If you have it, it would be awesome!!!

You can see the Stelpro’s implementation for SmartThings there: https://github.com/stelpro/Ki-Z-Wave-Thermostat/blob/d106ec8c640d3288850e672bf88352beff6f57c7/devicetypes/stelpro/stelpro-ki-thermostat.src/stelpro-ki-thermostat.groovy#L370

I haven’t switched over to OZW yet. Does this solution work?
I have the same thermostats and it would be nice to have ext display working finally.

Sorry to revive this old thread, is this problem solved now in 2021? I’m looking to switch from Vera Lite to Home Assistant soon and I have 10 of these thermostats in my home.

Thanks

Yes. It’s apparently working with the zwavejs2mqtt add-on. I’ll be testing it out shortly, but it’s definitely possible now.

1 Like

Can you provide any detail on how to proceed ?

Here’s the automation code I’m using to push temperature from a sensor to the thermostats (I have three of them at the moment) in my house as exterior temperature. The thermostats resolve to 1/2 increments. (Eg: 1.2 = 1.5, 2.9 = 3.0, etc)

I set up zwavejs2mqtt rather than the native zwavejs as it allows for these commands to be sent.

alias: Ext Temp Display
description: ''
trigger:
  - platform: state
    entity_id: sensor.chicken_coop_temperature
condition: []
action:
  - service: mqtt.publish
    data:
      topic: zwave/_CLIENTS/ZWAVE_GATEWAY-mosquitto/api/sendCommand/set
      payload: |-
        { "args": [
          {
            "nodeId": 35,
            "commandClass": 49,
            "endpoint": 0,
            "property": "Air temperature"
          },
          "sendReport",   [1, 0, {{ states('sensor.chicken_coop_temperature')|round(2, default=99) }}]
          ]
        }
  - service: mqtt.publish
    data:
      topic: zwave/_CLIENTS/ZWAVE_GATEWAY-mosquitto/api/sendCommand/set
      payload: |-
        { "args": [
          {
            "nodeId": 33,
            "commandClass": 49,
            "endpoint": 0,
            "property": "Air temperature"
          },
          "sendReport",   [1, 0, {{ states('sensor.chicken_coop_temperature')|round(2, default=99) }}]
          ]
        }
  - service: mqtt.publish
    data:
      topic: zwave/_CLIENTS/ZWAVE_GATEWAY-mosquitto/api/sendCommand/set
      payload: |-
        { "args": [
          {
            "nodeId": 16,
            "commandClass": 49,
            "endpoint": 0,
            "property": "Air temperature"
          },
          "sendReport",   [1, 0, {{ states('sensor.chicken_coop_temperature')|round(2, default=99) }}]
          ]
        }
mode: single

2 Likes

Great, thanks for the info. I will be trying this shortly.

Thank you! I was literally trying to figure this same thing out at the same time you were. :slight_smile:

Now all four of my thermostats show the outside temperature. I re-implemented this in Node-RED and it works great!

2 Likes

Have you posted the Node-RED flow somewhere? I’d like to see it.

Does anybody know a way to update the outdoor temperature value with ZwaveJS2MQTT / Home-Assistant, but without the service “mqtt.publish”? I’m not sure why it’s not available in my setup and I never used MQTT before so I’d like to believe there’s a way without it right?

service: zwave_js.invoke_cc_api
data:
  command_class: "49"
  method_name: sendReport
  parameters:
    - 1
    - 0
    - 20
  endpoint: "0"
target:
  entity_id: sensor.4_in_1_sensor_air_temperature

Copy and paste that service code into the Services Dev Tools. Then use the target selector to choose your device or entity.

For parameters, 1 is the sensor type (1 == temperature), 0 is the scale (0 == Celsius, 1 == Fahrenheit), 20 is the temperature values (20 degrees Celsius in the above example).

2 Likes

wow thank you so much for the fast reply!
I know there is a ZwaveJS DB for parameters such as theses (Z-Wave JS Config DB Browser) , but it isn’t very populated for this device. Mind sharing where you got access to such info for this thermostat? I’d gladly help filling the fields if I knew what they were. Thanks again for you time

Well, did the command work?

Yes it worked thank you

Most of the information came from the original post. See my reply in the second post, which explained what needed to be done. That was almost three years ago, since then Z-Wave JS has come along and it implements the missing functionality that OZW did not want to do, which is the ability to send Multilevel Sensor Reports to end devices from the controller.

The integration supports the invoke_cc_api service call, which is a layer on top of the driver’s CC API. The CC API lets you call other methods that aren’t directly supported by the HA entities. In short, it’s a more advanced API for application developers, but it’s exposed for advanced usage in HA (and zwavejs2mqtt). The CC API for Multilevel Sensor CC supports the sendReport function. You can see the required parameters, sensor type, scale and value. This function sends a Z-Wave Multilevel Sensor Report Command to the given node using those parameters. This command is standardized, and nothing specific to the thermostat. It takes a little understanding of the driver code and z-wave commands to fully understand though.

The HA service call code I posted is also a literal translation of the MQTT code used earlier. HA’s invoke_cc_api and z2m’s sendCommand are essentially the same thing.