No announcement yet.

Z-Wave Integration

  • Filter
  • Time
  • Show
Clear All
new posts

    Z-Wave Integration

    I am working through getting this plugin to send my z-wave devices to MQTT. The basics of it works really well, but I have a problem trying to templatize my efforts. Specifically, I cannot seem to figure out how to associate to the actual z-wave device name. The $$Name: variable associates to the specific property of the z-wave device (e.g. Temperature or Mode). I have looked through the documentation and cannot seem to find something that would work to give me the z-wave device name. I have included a picture for reference. Also is there a way to lookup/send the value labels instead of the value itself (or maybe both)? (E.g. on/off instead of 0/255.)

    The Topic being published could be able to be something like
    The Payload template could be
    This should result in a MQTT message Topic of 'Z-Wave/Workshop/Printshop/3d Printer Light' with Payload '{"label":"On","value":100}'

    Note that the $$NAME: resolves to what you have labeled as (UNKNOWN) and it also contains spaces. Depending upon the client that is receiving the message the spaces could be problematic. You will want to consider which option on General Tab, Outbound Management, URI Encode Topic row is best for you.


      Thank you for your response.

      So maybe that one was too simplified of an example. What I am finding is that $$NAME: corresponds to the actual element (not sure what to call it). For simple elements such as the switch, I think they would be one and the same, but in a multipart device such as a switch that monitors power usage or a thermostat there seems to be an issue. In these cases the $$NAME: variable comes out as "Temperature", "Relative Humidity", or "kWh". I haven't found the a variable that would correspond to the name of the thermostat or switch as a whole. Is there such a variable?

      I'm really hoping for something like

      (The payload code is spot on what I needed, thank you.)
      Last edited by jNimble; January 3, 2022, 02:58 PM. Reason: Fixing typos


        I still haven't found a good way to templatize these complex items. Has anyone used this plug in with Thermostats or other complex z-wave devices?


          In the tile grid view such as you are showing in screenshot of post #1, HS will show a Device as the Tile and typically display the status and controls of one of the features of the control. In post #1 the Device has only one feature.

          The feature that is shown will contains its status as a graphic and potentially text. It will also show the controls if it is a controllable feature.

          What you have labeled as (UNKNOWN) is the feature name which is $$NAME: as the replacement variable.
          What you have as VALUE LABELS ? are the labels of the feature's control. These are $$LABEL: as the replacement variable.
          What you have labeled as $$NAME: is the graphic and status text. There is no replacement variable for the graphic. For the text it will be $$LABEL:

          The $$LABEL: selection of control label vs. status text depends upon what is setup for Status Graphics on HS page. If there is no status text then $$LABEL wil be the control label. If there is status text then it will be the status label.

          Below is an example of a Device with multiple features. While this is not a thermostat it will have a similar structure with heat setpoints, mode controls, etc. In this example HS has elected to show the feature that has an on/off status and this feature has no control available. Note that the Status/Controls has a Status of OFF and ON and Control/Status columns shows "Status". For the "Status/Graphics" the Label is blank. In this case mcsMQTT will use the Status/Control Status for $$LABEL: because the Label for Status/Graphics is blank.

          Click image for larger version

Name:	Capture0.PNG
Views:	220
Size:	16.6 KB
ID:	1521226

          Click image for larger version

Name:	Capture.PNG
Views:	178
Size:	106.9 KB
ID:	1521227

          Can you provide a similar pair of screenshots for the Zwave device that you are using so more specific guidance can be provided?


            Thank you for helping me with this. Sometime after the original post one of the updates included $$PARENTNAME: as a new variable. This solved the issue perfectly. Thank you again.