Zooz ZSE29 - Automation with HA

Hello everyone,
My fist post here and i am a newbie when it comes to HA, just started. Please forgive my stupid questions . I am very excited to be part of this community .

I am running HA on a docker hosted on Ubuntu VM. I got a Aeotec USB controller and my first Z-wave device is a Zooz ZSE 29 motion sensor.
I was able to pair it with Z-wave controller and add it to HA. When i go to HA > Configuration > Z-Wave management i see it and its showing Node Complete & i can see multiple entities for it. It does show status “sleeping” and i am not sure if that is normal .
I tried to create a test automation: when motion is detected to turn the lights on outside. I tried manually and using HA GUI by going to devices > selecting Motion Sensor > and below was section for Automation & Do something when … Zooz ZSE29 Outdoor Motion Sensor Sensor Turned on.

here is automation using gui:

- id: '1572198965302'
  alias: Motion
  description: ''
  trigger:
  - device_id: ae5f4495bc264849afc0ca3e3e9632a8
    domain: binary_sensor
    entity_id: binary_sensor.zooz_zse29_outdoor_motion_sensor_sensor
    platform: device
    type: turned_on
  condition: []
  action:
  - device_id: b59974be66d540838d17170d4a30af31
    domain: light
    entity_id: light.hue_color_lamp_2
    type: turn_on

here is what i did manually:

- id: '1572205913130'
  alias: Test for Motion
  description: ''
  trigger:
  - device_id: ae5f4495bc264849afc0ca3e3e9632a8
    domain: binary_sensor
    entity_id: binary_sensor.zooz_zse29_outdoor_motion_sensor_sensor
    platform: device
    type: turned_on
  condition: []
  action:
  - data:
      entity_id: switch.outside_lights
    service: switch.turn_on

When i walk by, i see sensor blinks red but nothing happens. When trigger Automation manually, the lights turn on that means my automation is working.

Any pointers how to get this resolved? i spend many hours on it. How can i tell that Motion Sensor is sending a trigger to HA?

Front Yard Motion Sensor ZooZ Sleeping
node_id: 4
node_name: Zooz ZSE29 Outdoor Motion Sensor
manufacturer_name: Zooz
product_name: ZSE29 Outdoor Motion Sensor
query_stage: Complete
is_awake: false
is_ready: true
is_failed: false
is_info_received: true
max_baud_rate: 40000
is_zwave_plus: true
capabilities:

  • beaming
  • routing
  • zwave_plus
    neighbors:
  • 1
    sentCnt: 14
    sentFailed: 0
    retries: 0
    receivedCnt: 8
    receivedDups: 0
    receivedUnsolicited: 0
    sentTS: '2019-10-27 12:41:35:074 ’
    receivedTS: '2019-10-27 12:41:35:072 ’
    lastRequestRTT: 27
    averageRequestRTT: 30
    lastResponseRTT: 45
    averageResponseRTT: 52
    battery_level: 0
    wake_up_interval: 14400
    application_version: ‘1.04’
    friendly_name: Front Yard Motion Sensor ZooZ

Thanks in advance for support .

Welcome. It’s hard to read your automations since they aren’t formatted as code. Take a read here where it explains how to use code blocks.

“Sleeping” is normal for battery devices, so I presume you are using batteries instead of USB power.

I did notice a couple things though. First, for the device based automation, it’s likely your motion detector is incorrectly creating a binary entity. I am assuming you did not create binary_sensor.zooz_zse29_outdoor_motion_sensor_sensor yourself, based on the naming, and if that’s true unfortunately it’s a common problem with door & motion sensors that produce a non-existent binary sensor (not sure if it’s a software or hardware issue). The ZSE29 manual does not show it supports the Command Class Binary, and it doesn’t look like there are any options to enable it. You can confirm if you examine your zwcfg*.xml file.

For your second automation, the state trigger for entity sensor.zooz_zse29_outdoor_motion_sensor_burglar looks incorrect. Again, based on the naming, I am assuming this is the burglar notification sensor created by the device. In that case, you’re not going to get the value on for the state, you should get 8 for motion and 0 for no motion. You can verify this by going to the Developer Tools -> States page and watch the state change as motion occurs. If you want an “on/off” sensor, you can create a binary_sensor template, an example is given here using the burglar entity.

Besides the state page, you can watch the OZW_Log.txt file to see when the sensor sends events to HA.

Thanks for your reply. I just fixed formating on my code, sorry about that & thanks for pointing it out.

At first, i did try to create a binary sensor myself, code below. But i did not have had much luck with it. so i commented it out and tried via GUI

#sensors:
  front_yard_motion:
    friendly_name: "Front Yard Motion Sensor Zooz"
    device_class: motion
    value_template: "{{ is_state('sensor.zooz_zse29_outdoor_motion_sensor_burglar', '8') }}"

and

platform: template
sensors:
  front_yard_motion:
    friendly_name: "Front Yard Motion Sensor"
    device_class: motion
    value_template: "{{ is_state('sensor.front_yard_motion_burglar', '8') }}"

I do see communication in OZW_Log.txt

Which one is the zwave burglar sensor? Is it sensor.zooz_zse29_outdoor_motion_sensor_burglar or did you rename it to sensor.front_yard_motion_burglar? The contents of your templates look OK to me, assuming they are using the original z-wave sensors and they are located under binary_sensor somewhere.

The template

binary_sensor:
  - platform: template
    sensors:
      front_yard_motion:
        friendly_name: "Front Yard Motion Sensor"
        device_class: motion
        value_template: "{{ is_state('sensor.front_yard_motion_burglar', '8') }}"

would produce a binary_sensor.front_yard_motion that you can use in your automation with on.

You can confirm whether your template is working by watching the states in the States page. But also make sure sensor.front_yard_motion_burglar is changing to 8 with motion, otherwise the template won’t work as expected.

yes, I renamed sensor.zooz_zse29_outdoor_motion_sensor_burglar or to sensor.front_yard_motion_burglar. I did that under Z-Wave Management.

Correct, this template is in my binary_sensor.yaml file

When i go to states i dont see sensor.front_yard_motion_burglar. I see only sensor.zooz_zse29_outdoor_motion_sensor_burglar and its showing State 254. I think that is my problem or part of it.
Do i create this sensor manually? this feels like a spiral. What would be best way to resolve or solve this?

Thank you so much for your help.

this is only motion burglar sensor that i found under states:

For whatever reason, looks like the rename did not stick. The sensor is still sensor.zooz_zse29_outdoor_motion_sensor_burglar.

Seems like the value 254 means deep sleep. Does it change if you trigger motion?

No it does not. Tried several times.
Not sure if I should try to remove it and start over. Tried few times already. It’s showing as nodes 4 and it’s my first device. :confused:

Everything else is working fine but zwave

in OZW_log i see that its communicating
2019-10-27 18:23:29.478 Detail, Node004, Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2019-10-27 18:23:29.478 Detail, Node004, ZW_SEND_DATA delivered to Z-Wave stack
2019-10-27 18:23:29.496 Detail, Node004, Received: 0x01, 0x07, 0x00, 0x13, 0x1d, 0x00, 0x00, 0x02, 0xf4
2019-10-27 18:23:29.496 Detail, Node004, ZW_SEND_DATA Request with callback ID 0x1d received (expected 0x1d)
2019-10-27 18:23:29.496 Info, Node004, Request RTT 26 Average Request RTT 28
2019-10-27 18:23:29.496 Info, Node004, Node 4 has been marked as asleep
2019-10-27 18:23:29.496 Detail, Expected callbackId was received
2019-10-27 18:23:29.496 Detail, Expected reply was received
2019-10-27 18:23:29.496 Detail, Message transaction complete

You would want to see alarm reports like this, but with value 8 instead of 2.

2019-10-27 15:46:31.141 Info, Node008, Received Alarm report: type=7, level=0, sensorSrcID=0, type:Burglar event:2, status=255
2019-10-27 15:46:31.141 Detail, Node008, Refreshed Value: old value=7, new value=7, type=byte
2019-10-27 15:46:31.141 Detail, Node008, Changes to this value are not verified
2019-10-27 15:46:31.141 Detail, Node008, Refreshed Value: old value=255, new value=0, type=byte
2019-10-27 15:46:31.142 Detail, Node008, Changes to this value are not verified
2019-10-27 15:46:31.142 Detail, Node008, Refreshed Value: old value=0, new value=0, type=byte
2019-10-27 15:46:31.142 Detail, Node008, Changes to this value are not verified
2019-10-27 15:46:31.142 Detail, Node008, Refreshed Value: old value=2, new value=2, type=byte
2019-10-27 15:46:31.142 Detail, Node008, Changes to this value are not verified
2019-10-27 15:46:31.142 Detail, Node008, Notification: ValueChanged
2019-10-27 15:46:31.152 Detail, Node008, Notification: ValueChanged
2019-10-27 15:46:31.161 Detail, Node008, Notification: ValueChanged
2019-10-27 15:46:31.171 Detail, Node008, Notification: ValueChanged

If you don’t see any messages like that, then the z-wave controller is not receiving any notifications from the device. The only other thing I can think of would be to put the device into test mode, if that’s not already the case, to make sure that it’s not the lux and timer settings that are preventing notifications.

Feel free to post the entire contents of the OZW_Log.txt to a pastebin if you want.

here it is: https://pastebin.com/MC97SFFz

i kicked off ZWave Node Heal. I do see entries like this:


2019-10-27 18:23:29.377 Info, Node004, Received Alarm report: type=0, level=0, sensorSrcID=0, type:Burglar event:254, status=255

Hmm, not sure what else to suggest, the log file shows that the motion detection is working. At the beginning of the logs it shows 254 as you posted, but at the end it is showing motion detected (type:Burglar event:8) and motion cleared (type:Burglar event:0). Those should translate to the HA sensor changing.

Motion detected:

2019-10-27 19:15:06.337 Info, Node004, Received Alarm report: type=0, level=0, sensorSrcID=0, type:Burglar event:8, status=255

Motion detection cleared:

2019-10-27 19:15:11.859 Info, Node004, Received Alarm report: type=0, level=0, sensorSrcID=0, type:Burglar event:0, status=255

Well good news is that I’m seeing now value changing to 8 when motion is detected. When I check the history now is first time to display 8 or 0, entire time was 254. Status of the node is not complete, it’s showing
CacheLoad. Reading the documentation it seems CacheLoad is not a bad thing.

Also wondering if I should use instead of battery a power plug.

I Will have to double check my automation template once and when shows status complete

So back to square one.
You can see below that my motion sensor is changing value to 8 now. Thats how it should be.

Here is the list of all sensors and binary sensors that i have:

any clue why my automation template is not triggering turning on the lights? I cant figure it out. If i trigger it manually, the lights turn on. So that part is correct. Not sure what i am missing

- id: '1571263968001'
  alias: Motion Detected Outdoors
  initial_state: false
  trigger:
  - platform: state
    entity_id: sensor.zooz_zse29_outdoor_motion_sensor_burglar, binary_sensor.zooz_zse29_outdoor_motion_sensor_burglar
    to: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.outside_lights

Are you sure you are using the correct entity ID in your automation?

sensor.zooz_zse29_outdoor_motion_sensor_burglar toggles between 8 and 0, it will never be on or off, so it cannot trigger the automation.

Is binary_sensor.zooz_zse29_outdoor_motion_sensor_burglar really your template binary sensor? It looks like the “phantom” sensor that is sometimes created, and in that case will never be on or off. I would be surprised that the devices page is showing this as part of the Z-Wave node if it were a template.

Yes it does toggles between 0 - 8 , below is screenshot of 0 and screenshot that is showing history. you can tell by different colors that it toggles.

i think you might be right about “phantom” sensor. It was created before, now is “commented out”.

If i create entry in my binary_sensor.yaml entry like this, this should do it? I used Friendly on purp

platform: template
sensors:
  zooz_sensor:
    friendly_name: "Zooz Motion Sensor"
    device_class: motion
    value_template: "{{ is_state('sensor.zooz_sensor_burglar', '8') }}"

if thats correct i should call this entity in my automation script?

You can either use the template binary sensor, binary_sensor.zooz_sensor in this case, and trigger on state on, or change your automation to trigger on state 8, using the burglar entity. Either would have the same result.

The binary sensor is also useful for display in the UI.

1 Like

Thank you so much for your help and guidance. Good news, when i changed the automation to use burglar entity on state 8 it worked like a charm. It is not working with binary sensor. Makes me think my binary sensor is not configured/setup properly.

when i tried to add it to the UI i get an error in UI: Entity not available: binary_sensor.zooz_sensor_burglar
In groups. yaml i added entry:

- binary_sensor.zooz_sensor_burglar

just like i did for other 2 that are working fine below i can see them in UI and the state they are in

 - sensor.front_yard_motion_sensor_battery
 - sensor.zooz_zse29_outdoor_motion_sensor_burglar