Zooz 4-in-1 Sensor

@mike1237 thank you for that input. I guess, and again, give room for my quirky ways, my larger concern with using templates, particularly if you use a lot of them is the number of breaking changes that come across in HA. My thought process was to keep things as simple as possible. I’ve been dinged a couple times with breaking changes and it’s kind of wore on me, LOL

Anyway, here’s what I will do since you seem adamant about giving it a shot, I will try and do that. Since this is a test sensor (I have a ‘Testing’ tab in HA where I put all such devices until I am ready to deploy them) I will play with it and see if I can get comfortable with using the templates. I see the value in what you are saying, I am just concerned about some breaking change coming down the pipe that just mucks up all the work.

I may need your help to get my head around them but let me take a stab at getting it done first. Maybe if I can work through the process then I can, in turn, have a better understanding to help someone else.

Bam! And just like that, I can now see my battery levels. I will be curious to see how frequently this updates. I assume, since battery power devices would go into a sleep state, that they would only report once a day or whenever their wake up time is to see if there are any configuration changes.

1 Like

Anytime the sensor updates the battery level should update.

You can also set the zwave polling period to be more or less frequent as to when the controller polls the device (versus the device waking up due to external input and sending the command).

The config component released in 0.39 allows you to configure the zwave polling (or choose to ignore certain zwave devices completely) easily!

I just upgraded to 0.40.2 today. I was on .37 or .38, I was a few steps behind due to breaking changes. Kinda got frustrating to keep fighting those, but I think I got the kinks worked out and thus upgraded today and discovered the Configuration Panel and that’s when I saw the battery levels in the entities list. I will monitor the update frequency and see how it goes.

I ask because the Master Bedroom Sensor and Front Door Sensor have been running a while and I highly doubt they are sitting at 100%, especially as much as those two sensors are triggered.

Anyway, now I got to learn about templates to see if I can make the Zooz motion sensor work like I hoped it would.

Byt the way @mike1237, since you have experience with the Zooz, what kind of battery life are you getting out of those things?

Again, thank you for all of your help.

No problem, my pleasure to speak to someone else who enjoys the hobby as much as I do.

I got 3 months out of my first set of batteries, but that’s because I changed one of the parameters to a higher battery use setting, I forget which exactly, but even the manual said it would be bad for the battery.

I changed the batteries and set it to its defaults and those have lasted 6 months and are reading 20%. although i must say all my devices, regardless of brand, seem pretty bad at accurately reporting their battery status. I only store them because some data is better than none.

So mine always reports a battery level of 0%.

I removed and then re-secure-added it via HASS, and I now have a bunch of new sensors (appliance? clock??), but battery_level on zwave.vision_zp3111_multisensor_4in1 always says 0.

Thoughts, anyone?

Edit: This thread should be moved the Z-Wave section. Anyone (admin) help with that?

I am also looking for some help with this sensor and getting motion working.

I bought it at Monoprice found here:

[https://www.monoprice.com/product?p_id=15271](http://Monoprice Z-Wave Plus Motion Sensor)

I have this added to my Z-wave network in a secure mode, as suggested in this thread. Home Assistant/Openzwave finds the device, and adds a bunch of devices: I have

sensor.vision_zp3111_multisensor_4in1_temperature_4:
sensor.vision_zp3111_multisensor_4in1_luminance_4:
sensor.vision_zp3111_multisensor_4in1_relative_humidity_4:
sensor.vision_zp3111_multisensor_4in1_sourcenodeid_4:
sensor.vision_zp3111_multisensor_4in1_burglar_4:

Earlier in this thread, the recommendation is to create a binary sensor with the alarm sensor that is created automatically. However, I don’t see the “alarm” mentioned in this thread. But, whenever I trigger the device, I see in the open zwave log shows “something” (I don’t know how to identify the device) jump to 255. Here are some log entries from OZW_Log.txt:

2018-03-26 11:59:22.606 Detail, Node018, Decrypted Packet: 0x00, 0x20, 0x01, 0xff
2018-03-26 11:59:22.606 Detail, 
2018-03-26 11:59:22.606 Info, Node018, Received Basic set from node 18: level=255. Treating it as a Basic report.
2018-03-26 11:59:22.606 Detail, Node018, Refreshed Value: old value=0, new value=255, type=byte
2018-03-26 11:59:22.606 Detail, Node018, Changes to this value are not verified
2018-03-26 11:59:22.606 Detail, Node018, Notification: ValueChanged

and back:

2018-03-26 12:02:31.140 Detail, Node018, Decrypted Packet: 0x00, 0x20, 0x01, 0x00
2018-03-26 12:02:31.140 Detail, 
2018-03-26 12:02:31.140 Info, Node018, Received Basic set from node 18: level=0. Treating it as a Basic report.
2018-03-26 12:02:31.140 Detail, Node018, Refreshed Value: old value=255, new value=0, type=byte
2018-03-26 12:02:31.140 Detail, Node018, Changes to this value are not verified
2018-03-26 12:02:31.140 Detail, Node018, Notification: ValueChanged

I know that Home Assistant, Open Zwave, have issues with the “Basic Set”, but I’m unable to make this do a binary set, as I don’t think the device supports it.

Any ideas on how to make this be recognized device I can use?

I’m having problems with this and hoping it’s just me messing up on the template or something.

I have this

 - platform: template
   sensors:
     front_door_motion:
       value_template: "{{ states(sensor.front_door_motion_sensor_alarm_level) > 0 }}"
       friendly_name: "Front Door Motion"
       device_class: motion
       entity_id: sensor.front_door_motion_sensor_alarm_level

sensor.front_door_motion_sensor_alarm_level is the name of the sensor. That sensor does go from 0 to 255 immediately when motion is detected, but the template never changes to on.

      front_door_motion_battery:
        value_template: "{{ states.zwave.front_door_motion_sensor.attributes.battery }}"
        friendly_name: "Front Door Motion Sensor Battery Level"
        entity_id: zwave.front_door_motion_sensor
        unit_of_measurement: '%'

I also have a battery template that is not reporting anything either.

I know this post was from more than a year ago, so maybe the syntax has changed?

Edit:

Posting for others.

 - platform: template
   sensors:
     front_door_motion:
       value_template: "{{ states('sensor.front_door_motion_sensor_alarm_level')|float > 0 }}"
       friendly_name: "Front Door Motion"
       device_class: motion
       entity_id: sensor.front_door_motion_sensor_alarm_level

This works for me, found on another post in the community

1 Like

@ptdalen I found your comment about 5 minutes after I had come to the same solution!

I was able to get my battery level working also!

- platform: template
  sensors:
    mudroom_battery:
      value_template: "{{ states.zwave.unknown_id027a_unknown_type2021_id2101_3.attributes.battery_level }}"
      friendly_name: "Mudroom Battery"
      entity_id:  zwave.unknown_id027a_unknown_type2021_id2101_3
      unit_of_measurement: '%'

The key was to use the actual zwave device node, which has the battery level attribute (and others).

If you’re interested in custom/dynamic icon based on the battery level, here is what I use:


  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 %}

The value_template also catches the zwave startup timeframe and scenarios where the device may be disconnected or unavailable.

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.