Zooz 4-in-1 Sensor

I use the following for Motion and Tamper which works well for me:


  binary_sensor:
    - platform: template
      sensors:
        basement_hall_multisensor_motion:
          value_template: "{{ is_state('sensor.basement_hall_multisensor_burglar', '8') }}"
          friendly_name: "Basement Hall Multisensor Motion"
          device_class: motion
          # entity_id: sensor.basement_hall_multisensor_burglar

        basement_hall_multisensor_tamper:
          value_template: "{{ is_state('sensor.basement_hall_multisensor_burglar', '3') }}"
          friendly_name: "Basement Hall Multisensor Tamper"
          device_class: safety
          # entity_id: sensor.basement_hall_multisensor_burglar

One final reply - I use packages for my multisensors to make setup easy and contain all bits in a single spot. Here is an example:


basement_hall_multisensor_package:

  sensor:
    - platform: template
      sensors:
        basement_hall_multisensor_battery:
          friendly_name: "Basement Hall Multisensor Battery"
          value_template: "{% if states.zwave.basement_hall_multisensor %}
              {{ states.zwave.basement_hall_multisensor.attributes.battery_level }}
            {% else %}
              unknown
            {% endif %}"
          unit_of_measurement: '%'
          # entity_id: zwave.basement_hall_multisensor
          icon_template: >-
            {% set battery_level = states('sensor.basement_hall_multisensor_battery')|int('unknown') %}
            {% set battery_round = (battery_level|int / 10)|int * 10 %}
            {% if battery_level == 'unknown' %}
              mdi:battery-unknown
            {% else %}
              {% if battery_round >= 100 %}
                mdi:battery
              {% elif battery_round > 0 %}
                mdi:battery-{{ battery_round }}
              {% else %}
                mdi:battery-alert
              {% endif %}
            {% endif %}


  binary_sensor:
    - platform: template
      sensors:
        basement_hall_multisensor_motion:
          value_template: "{{ is_state('sensor.basement_hall_multisensor_burglar', '8') }}"
          friendly_name: "Basement Hall Multisensor Motion"
          device_class: motion
          # entity_id: sensor.basement_hall_multisensor_burglar

        basement_hall_multisensor_tamper:
          value_template: "{{ is_state('sensor.basement_hall_multisensor_burglar', '3') }}"
          friendly_name: "Basement Hall Multisensor Tamper"
          device_class: safety
          # entity_id: sensor.basement_hall_multisensor_burglar
   

  homeassistant:
    customize:

      sensor.basement_hall_multisensor_alarm_level:
        hidden: true
      sensor.basement_hall_multisensor_alarm_type:
        hidden: true
      sensor.basement_hall_multisensor_burglar:
        hidden: true
      sensor.basement_hall_multisensor_clock:
        hidden: true
      sensor.basement_hall_multisensor_sourcenodeid:
        hidden: true
      binary_sensor.basement_hall_multisensor_sensor:
        hidden: true
      sensor.basement_hall_multisensor_system:
        hidden: true
      sensor.basement__hall_multisensor_emergency:
        hidden: true
      sensor.basement_hall_multisensor_power_management:
        hidden: true
      sensor.basement_hall_multisensor_homehealth:
        hidden: true        



      sensor.basement_hall_multisensor_luminance:
        friendly_name: Luminance
        icon: mdi:brightness-5
      sensor.basement_hall_multisensor_relative_humidity:
        friendly_name: Humidity
        icon: mdi:water-percent
      sensor.basement_hall_multisensor_temperature:
        friendly_name: Temperature
        icon: mdi:temperature-fahrenheit
      sensor.basement_hall_multisensor_battery:
        custom_ui_state_card: state-card-custom-ui
        friendly_name: Basement Hall Multisensor Battery
        group:
          group.basement_hall_multisensor:  
            friendly_name: Battery
          group.battery_group:  
            friendly_name: Basement Hall Multi

      binary_sensor.basement_hall_multisensor_tamper:
        friendly_name: Tamper
      binary_sensor.basement_hall_multisensor_motion:
        custom_ui_state_card: state-card-custom-ui
        friendly_name: Basement Hall Motion
        group:
          group.basement_hall_multisensor:  
            friendly_name: Motion
          group.motionsensors:  
            friendly_name: Basement Hall


      group.basement_hall_multisensor:
        custom_ui_state_card: state-card-custom-ui
        group:
          group.motion_sensors:
            friendly_name: Basement Hall Alarm



  group:
    basement_hall_multisensor:
      name: Basement Hall MultiSensor
      control: hidden
      entities:
        - binary_sensor.basement_hall_MultiSensor_motion
        - binary_sensor.basement_hall_MultiSensor_tamper
        - sensor.basement_hall_MultiSensor_luminance
        - sensor.basement_hall_MultiSensor_relative_humidity
        - sensor.basement_hall_MultiSensor_temperature
        - sensor.basement_hall_MultiSensor_battery


Which gives me something like this:

image

NOTE: Iā€™ve found that the reported battery is not very accurate or reliable - lol. Youā€™ll notice the battery shows 0% but itā€™s still workingā€¦ been this way for a few months.

10 Likes

Quick question about that. Does it require custom UI components?

It shouldnā€™t. Iā€™m using custom ui for some stuff but the what I showed does not. You can remove any of it and it should still function the same.

I will say that for me alarm level for motion is 255 not 8, but is 0 for no motion,

thats why used this, figure its a catch all

value_template: ā€œ{{ states(ā€˜sensor.motion_sensor_front_door_alarm_levelā€™)|float > 0 }}ā€

I believe Tamper alerts show up under Alarm Level as well. If you take the back off the sensor, does it trigger your motion?

Iā€™m using the _burglar entity which is why 8/3 work.

Got it Youā€™re right I was looking at alarm level. I only see 255 and 0 for alarm level, but burgler has 254, 8, and 0, and probably 3 like you said if I get a tamper alert. Good deal, thanks

One super minor typo (probably), I was doing a find/replace and this one got missed. Noticed an extra underscore. I mean I dont even know what that sensor does anyway, so its not a big deal.haha Just letting you know. Thanks for this, its awesome

I could not get the customize to work in the package. Not sure if it was because I already had a customize.yaml file? I moved the items from the customize part of the package into my customize.yaml, and it worked fine.

Thanks again

Edit: A few more minor typos. There was a space for motion and tamper in the is_state. and a few of the customize items had an extra space., but Itā€™s all working great now (except for having to seperate out the customize. which is not a big deal at all.

Thanks for the example code! Packages are cool too! I learned something new while trying to figure out how to configure multisensor! Cheers

1 Like

How are you able to use numbers for the states? My states are represented as strings: ā€˜Not Activeā€™ and ā€™ Burglar - Unknownā€™. I am using the Dev branch of open-zwave. Maybe thatā€™s why.

I think it depends on the sensor. I would look at your entity list and see what the states and attributes look like there. If you donā€™t like the default, you can use templates to have it display however youā€™d like (numbers or different text). The device class can also affect how sensor states are displayed as well (open/close, safe/unsafe, etc.). In kylerrwā€™s code, he creates two new binary sensors (based on non-binary states from the motion and tamper sensors). The ā€˜8ā€™ and ā€˜3ā€™ he is using could easily be replaced with ā€˜Burglarā€™ if that is what your sensor state is. The device class motion will display clear/detected and the safety will display safe/unsafe. I hope that makes some sense! Iā€™m sure Kylerrw could explain better as I just pirated his code!

binary_sensor:
- platform: template
sensors:
basement_hall_multisensor_motion:
value_template: ā€œ{{ is_state(ā€˜sensor.basement_hall_multisensor_burglarā€™, ā€˜8ā€™) }}ā€
friendly_name: ā€œBasement Hall Multisensor Motionā€
device_class: motion
# entity_id: sensor.basement_hall_multisensor_burglar

    basement_hall_multisensor_tamper:
      value_template: "{{ is_state('sensor.basement_hall_multisensor_burglar', '3') }}"
      friendly_name: "Basement Hall Multisensor Tamper"
      device_class: safety
      # entity_id: sensor.basement_hall_multisensor_burglar

any ideas on how to change teh zwave config parameters? when i try to turn off the led (parameter 7) the change doesnt stick. I try waking up the device with the button before issuing the command, but when i read it back it still doesnt change

Iā€™ve got two Zooz 4-in-1s hooked up to HA without much fuss, but am having some inconsistent issues related to the attributes found within the node and simplifying the display. This post seems to be the best resource for this particular sensor.

First off, the battery_level attribute is nowhere to be found on either of my sensors. Also, when I added the sensors (which are identical) they didnā€™t add with the same attributes. The living room has sensor.living_room_multisensor_emergency and sensor.living_room_multisensor_homehealth and the basement sensor doesnā€™t have those values. The basement sensor also has sensor.basement_multisensor_appliance which the living room doesnā€™t have. Whatā€™s going on here? Both nodes report ā€œquery_stage: Completeā€ and seemingly are reporting good data.

I really like what @kylerw has done with his script and would love to recreate it. Problem is Iā€™m brandy new to this and Iā€™m clueless by a lot so far. I havenā€™t really wrapped my head around templates yet, nevermind packages. I tried to recreate his code to match my environment, but I honestly have no idea where I should be putting that. Not to mention, I donā€™t even have the battery level attributes showing anywhere.

Any help with those two points would be really appreciated!

Hey @borsaid, check out the packages documentation where you can see where/how to configure. Iā€™m using the include option in my configuration.yaml so I can have each package in itā€™s own file.

@borsaid

Iā€™m guessing you mean Sensors, try leaving the cover off for a while longer and all sensors should populate, as this will force the sensor to stay awake and report more often, The sensorā€™s wake-up interval is set to 12 hours by default to save battery life.

You have to wake it up a couple of times so it can read the complete configuration. If you only add it and then restart HA it may not have finished reporting itā€™s sensors.

CP from manual:

MANUAL WAKE-UP

Press and release the Z-Wave button once to wake the device up.
The LED indicator will ļ¬‚ash once (blue or orange).
You may need to wake the sensor up manually IF:
1. It doesnā€™t fully conļ¬gure during set-up (values are not displayed or errors pop up in your hubā€™s interface).
2. You change advanced settings for the sensor and want them to update.

The sensor definitely needs to be awake to receive the parameter changes, below is what worked for me.

  1. Removed the sensor back cover.
  2. Set the parameters in HA Z-Wave Control Panel.
  3. Press and Release the button in the sensor quickly 1 time to wake it up.
  4. Immediately after button press and release, hit the update button in HA Z-Wave Control Panel.
  5. The parameter changes should change on the sensor immediately.
  6. Repeat steps above each time to set a parameter.

You can press the button once again after a few seconds, which would update the sensor parameters in HA.

I have four of the Zooz 4 in 1 v2 sensors (as well as a mish mosh of other stuffā€¦ an Aeotec 6 in 1, ECO PIR , a couple of X30 PIRs and bunch of Insteon in wall switches). Anyway, Iā€™m migrating from SmartThings where I had all of them working flawlessly. Except for the constant platform outages, it was really good. Hearing a bunch of good things about HA and wanting an on-prem solution, I decided to dive inā€¦. thereā€™s a big learning curve with this platform.

I built a HASS.IO with a Raspberry Pi 3 along with an Insteon USB PLM and Aeotec Z Wave stick. The Insteon stuff installed easily. Z-wave, however, was a pain in the ass. Some YouTube videos didnā€™t help in that they had you remove the stick and use the button on it, others had you use the link under Configuration\Integrations and others said to use Configuration\Z-Wave. Finally, after much pain, I used the Configuration\Z-Wave\Add Node option while tailing the log (thereā€™s got to be a better way). I added everything, one at a time, applying friendly names to each of the entities. Iā€™m still working on my groupings, although I have some views set up and can control everything in my place. So I got that going for me, which is nice.

Iā€™ve gone through a bunch of different threads about the Zooz sensor and Iā€™m still having issues getting automation working with them. Some of the recommendations are bit outdated or obsolete based on the HA release or version of the sensors. As others have mentioned, the Zooz (and other z-wave devices create a bunch of entities)ā€¦

I see two on the Zooz that change based on motion.
sensor.zooz_zse40_4_in_1_sensor_alarm_level - this entity changes from 0 to 255 when thereā€™s motion
sensor.zooz_zse40_4_in_1_sensor_burglar - this one changes from 0 to 8 when thereā€™s motion

I also see this binary entity, but it doesnā€™t change: binary_sensor.zooz_zse40_4_in_1_sensor_sensor

Additionally, my other motion / PIR sensors also have similar entities, one for alarm level and one for burglar. Although the alarm level never changes on these. The burglar entity does change from 0 to 8.

X30 PIR: sensor.kaipule_unknown_type_0002_id_0002_burglar
Eco PIR: sensor.ecolink_motion_detector_burglar

(The Aeotec, aka my Server Room Sensor, doesnā€™t change at all for alarm level or burglar (stays at 3)ā€¦ donā€™t know if itā€™s added correctly even though itā€™s reporting temp and humidity correctly.)

I guess first, whatā€™s the difference between the alarm level and burglar entities? Second, which one is the preferred, most current way using these for motion to trigger automation?

How do I get them working? Admittedly, Iā€™m an infrastructure guy and dumb as a rock when it comes to codingā€¦ I had tried this snipit that has been used in prior posts, but I wasnā€™t very successful. Iā€™d prefer to standardize motion on the burglar sensors since I consistently see them change from 0 to 8. I guess Iā€™m a bit fuzzy where the code should go (an include file vs in configuration.yamlā€¦ especially for multiple sensors) and what it also depends on.

binary_sensor:

  • platform: template
    sensors:
    kitchen_motion:
    friendly_name: ā€œKitchen Motionā€
    device_class: motion
    value_template: ā€œ{{ states(ā€˜sensor.zooz_zse40_4_in_1_sensor_burglarā€™)|float > 0 }}ā€

IMG_5120

I have several of the zooz sensors and while they can be a bit of a pain to setup, they are the best ones I have tried so far. The alarm_level goes in conjunction with alarm_type. I think this was to provide functionality for a temperature or humidity alarm to be configured sometime in the future, or may just be part of a standard command set. I use burglar. It probably duplicates a specific alarm_type/alarm_level combination. The problem with multiple vendors is that they all meet the standard by providing the fields, they just donā€™t all fill the fields consistently. So you have some sensors that provide burglar regularly, and others that provide the alarm_type/level consistently. Itā€™s kind of a plug-in-play situation in the worst sense of the phrase. Plug it in and play with it till it works.

This this all explained in the HA Z-Wave docs and those docs have a link to a more detailed explanation in the OZW Wiki.

Basically, alarm_level and alarm_type are relics from V1 of the Z-Wave Alarm command class and Alarm V2 is a replacement that standardized the alarm types and values. For V2 devices, OZW is generating the alarm_level and alarm_type values even if they are unused (itā€™s just how itā€™s coded in the current version), so itā€™s really better to just ignore those unless the others are not provided.

Those HA docs have a list of the V2 alarm types, and example templates for using the access_control and burglar entities. Value 8 for burglar means motion detection and 3 means the device cover is removed. There is a template example here.

Most devices now support the Notification command class which is now used in place of Alarm. Itā€™s backwards compatible with the notification types supported by Alarm V2. OZW only supports the Alarm V2 class so a number of notifications are not yet usable. The Development version of OZW supports the Notification class.

If youā€™re curious, the complete list of notification types and values is published in a spreadsheet, SDS13713 Notification Command Class, list of assigned Notifications. It shows why you get a value of 8 for a motion detection event (Home Security, Motion detection == 8), because the spec defines it as such. It also shows which version the notification values were added in.

As for the binary_sensor entity, thatā€™s kind of a mystery for me. A binary_sensor is created usually if a node supports the Binary Sensor command class. Most newer devices donā€™t because itā€™s deprecated and use Alarm/Notification instead. None of my door sensors support that class, yet OZW creates values for them anyways. Iā€™m not sure if this is a bug in OZW, or a bug in the devices (they could be reporting they support Sensor Binary and really donā€™t). As mentioned in the linked HA docs, some devices will let you set whether the device reports via binary sensor (Aeotec notably), but that is enabled in a configuration setting.

9 Likes