Zen16 issue with z-wave JS

Hello!

I am running Z-wave JS integration and I want to configure a Zooz ZEN16 for my garage door.

I was easily able to add it in HA however, it is not seen as a binary switch.

I found this documentation for open-zwave: https://www.home-assistant.io/docs/z-wave/device-specific/#zooz-s2-multirelay-zen16

Is there an equivalent for ZwaveJS?

Thank you!

The ZEN16 should just work with zwave-js, though you’ll need to template a cover entity to have an actual cover entity. What is it coming through as if not a switch? Try reinterviewing the device through the zwavejs2mqtt UI.

In configuration.yaml:

cover:
    - platform: template
      covers:
          garage_door:
              device_class: garage
              friendly_name: 'Garage Door'
              value_template: "{{is_state('binary_sensor.garage_door', 'on')}}"
              open_cover:
                  service: switch.turn_on
                  entity_id: switch.garage_door
              close_cover:
                  service: switch.turn_on
                  entity_id: switch.garage_door
              stop_cover:
                  service: switch.turn_on
                  entity_id: switch.garage_door

Thanks for the reply.

I tried your solution. But I have a question
 where does your

binary_sensor.garage_door

Come from? It comes from a tilt/door sensor I guess?

The ZEN17 lets you dissociate a switch from a relay and set it up as a door sensor. I have a reed switch wired to it. You could do the same thing with the second relay on the ZEN16 and the second relay with nothing connected to it would just physically change too. You’d replace the binary sensor with that switch. Or you can use any tilt sensor and plug it in there.

Basically this but without the Shelly: Ditching MyQ on Security 2.0+ Garage Lifts (On a Budget)

1 Like

OK I can give it a try.

Now for ZEN16 device itself


It seems like I always have to click 2 times on the button to toggle it to « off » or « on » .

For example, if the switch state is initially to OFF:

  • I toggle the switch a first time:

    • I can hear the « click » on the relay and the garage door will open/close

    • In HA I see it goes briefly to ON, then comes back to OFF after a second.

  • I toggle another time the switch to make sure that HA is synchronized with the Zen16 now it’s ON

    • I don’t hear the physical « click » on the relay; the garage door is not moving

    • Now in HA the state is ON

  • I toggle the switch a 3rd time:

    • I can hear the « click » on the relay and the garage door will open/close

    • in HA the state is ON

It’s supposed to go on and off. It’s a momentary button press. Do you hold your garage door button down normally? The relay is doing the same thing. When you think you’re synchronizing it you’re actually taking it out of sync.

Yes, I realized that. Thank you also for the tip about the reed switch, I like the idea VS a tilt sensor where I would have to change the battery when it’s dead, and it’s cheaper.

I will think about that and update this thread when I have fully working setup. Right now at least I am able to make it open or close.

OK so just a quick follow-up!

In order to solve my problem, I installed zwavejs2mqtt, which allows me to change the configuration of my ZEN16 so I could configure the relays for garage door (and use them as momentary switches)

Then I connected a reed switch on relay 2 to detect if the door is completely opened and another one on relay 3 to detect if the door is completely closed.

Also I created a sensor based on that that tells my what exactly is the status of the door, so it’s easier after to create automations.

here is the yaml that is based on @blhoward2 suggestions for the cover (thank you again!)

cover:
  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Porte de garage"
        value_template: "{{is_state('switch.garage_multi_relais_2', 'on')}}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.garage_multi_relais_1
        close_cover:
          service: switch.turn_on
          entity_id: switch.garage_multi_relais_1
        stop_cover:
          service: switch.turn_on
          entity_id: switch.garage_multi_relais_1

sensor:
  - platform: template
    sensors:
      garage_door_state:
        value_template: >-
          {% if is_state('switch.garage_multi_relais_2', 'on') %}
            Ouvert
          {% elif is_state('switch.garage_multi_relais_3', 'on') %}
            Fermé
          {% else %}
            Entrouvert
          {% endif %}
        icon_template: >-
          {% if is_state('switch.garage_multi_relais_3', 'on') %}
          mdi:garage
          {% else %}
          mdi:garage-open
          {% endif %}
        friendly_name: "État du garage"

Now everything works flawlessly and here is the result in my dashboard:

2 Likes

Figured I’d share my setup as well. I use HomeKit for Siri usage while biking back home, can open my garage. HomeKit was sending “close” commands to the garage, after it already closed, couldn’t figure out why, but that’s why I have some extra logic to not execute the script if one is attempting to close/open it after it is already closed/open. I only had one reed sensor for fully closed, but used both sensors/relays, on a Zen17, for two separate garage doors.

Two input booleans allow me to disable control, as well as enable/disable the auto-toggle-off. I had issues with the built in Zen17 setting to toggle the relay back off after 1 second (until I updated the firmware), so I had this written.

input_boolean:
  allow_garage_control:
    name: Allow Garage Control
    icon: mdi:garage
  turn_off_garage_relays_after_delay:
    name: Turn off garage relays automatically after delay
    icon: mdi:garage
script:
  toggle_garage_door:
    sequence:
      - condition: state
        entity_id: input_boolean.allow_garage_control
        state: "on"
      - condition:
        alias: "Don't open if open"
        condition: template
        value_template: "{{ not is_state(cover, mode) }}"
      - service: switch.turn_on
        target:
          entity_id: "{{ relay }}"
      - delay:
          milliseconds: "500"
      - condition: state
        entity_id: input_boolean.turn_off_garage_relays_after_delay
        state: "on"
      - service: switch.turn_off
        target:
          entity_id: "{{ relay }}"
  toggle_left_garage_door:
    sequence:
      - service: script.toggle_garage_door
        data:
          relay: "switch.zooz_zen17_r2_left_garage_door"
          sensor: "binary_sensor.zooz_zen17_s2_left_garage_door"
          cover: "cover.left_garage_door"
          mode: "{{ mode }}"
  toggle_right_garage_door:
    sequence:
      - service: script.toggle_garage_door
        data:
          relay: "switch.zooz_zen17_r1_right_garage_door"
          sensor: "binary_sensor.zooz_zen17_s1_right_garage_door"
          cover: "cover.right_garage_door"
          mode: "{{ mode }}"
cover:
  - platform: template
    covers:
      left_garage_door:
        friendly_name: "Left Garage Door"
        device_class: garage
        open_cover:
          service: script.toggle_left_garage_door
          data:
            mode: "open"
        close_cover:
          service: script.toggle_left_garage_door
          data:
            mode: "close"
        stop_cover:
          service: script.toggle_left_garage_door
          data:
            mode: "stop"
        value_template: "{{is_state('binary_sensor.zooz_zen17_s2_left_garage_door', 'on')}}"
      right_garage_door:
        friendly_name: "Right Garage Door"
        device_class: garage
        open_cover:
          service: script.toggle_right_garage_door
          data:
            mode: "open"
        close_cover:
          service: script.toggle_right_garage_door
          data:
            mode: "close"
        stop_cover:
          service: script.toggle_right_garage_door
        value_template: "{{is_state('binary_sensor.zooz_zen17_s1_right_garage_door', 'on')}}"
2 Likes

How do you get this temple in to the config

How do you get this template into the configuration I’ve tried and can’t get the zen17 setup as a garage door opener

I know the thread is old, but to assist others here.
In order to get the Zen17 relay switches to turn back off, you can do the following without a automation rule.

To have the Zen17 unit auto-off the switches in HA, you can do the following:

  1. Makes sure all sensors on the Xen17 are in the ‘Off’ state before making changes
  2. Firmware 1.4.1
  3. Parameter #15 & #17 → set to ‘Seconds’
  4. Parameter #6 & #8 → set to 1 (or to your choosing)
  5. Then re-interview

Below is are my settings.

Ok, I need help please understanding your post due to starting home assistant just this month.

I have HA running on a Pi4, Zooz zen 16 connected to my Chamberlin Garage door opener thru Zooz z wave. I configured the zen16 parameters to work like a garage door opener so the HA works with momentary on/off when toggling this “switch”?

I can’t figure out how to add it to HomeKit bridge in a way that it comes over as a garage door opener. Only options are light, fan, and switch. These don’t carry over the momentary “on” function like a garage remote in HA to apple home.

It seems your code was the answer, but I don’t know where I edit this code into as I setup HomeKit bridge using the UI. I haven’t used yaml configuration yet.

Does your code go in the main yaml configuration file? Does that mean I will have to abandon the UI config o HomeKit Bridge as my understanding is you can’t have a UI configured instance with a yaml configured instance?

Does your code go in the Z-wave JS add on? I could not find a configuration type file in this add on.

Of coarse Ive tried googling to no avail, and prior to opening my questions to larger group, I am inclined to think based on your post above, you may be the closest to answering my question.

Amit