How do I use Freeze sensor

Hi friends. I’m trying to set up an automation for an Ecolink Zwave Flood and Freeze sensor. I can’t figure out what trigger to use.

Here are the device logs when I immerse the sensor in water and take it out again:

*4/6/2024, 10:21:07 AM* - **value updated** Arg 0: └─commandClassName: Binary Sensor └─commandClass: 48 └─property: Water └─endpoint: 0 └─newValue: false └─prevValue: true └─propertyName: Water

*4/6/2024, 10:21:07 AM* - **notification** Arg 0: 113 Arg 1: └─type: 5 └─event: 4 └─label: Water Alarm └─eventLabel: Water level dropped

*4/6/2024, 10:21:07 AM* - **value updated** Arg 0: └─commandClassName: Notification └─commandClass: 113 └─property: alarmLevel └─endpoint: 0 └─newValue: 0 └─prevValue: 0 └─propertyName: alarmLevel

*4/6/2024, 10:21:07 AM* - **value updated** Arg 0: └─commandClassName: Notification └─commandClass: 113 └─property: alarmType └─endpoint: 0 └─newValue: 0 └─prevValue: 0 └─propertyName: alarmType

*4/6/2024, 10:21:05 AM* - **value updated** Arg 0: └─commandClassName: Binary Sensor └─commandClass: 48 └─property: Water └─endpoint: 0 └─newValue: true └─prevValue: false └─propertyName: Water

*4/6/2024, 10:21:05 AM* - **value updated** Arg 0: └─commandClassName: Notification └─commandClass: 113 └─property: Water Alarm └─propertyKey: Sensor status └─endpoint: 0 └─newValue: 2 └─prevValue: 2 └─propertyName: Water Alarm └─propertyKeyName: Sensor status

*4/6/2024, 10:21:05 AM* - **value updated** Arg 0: └─commandClassName: Notification └─commandClass: 113 └─property: alarmLevel └─endpoint: 0 └─newValue: 0 └─prevValue: 0 └─propertyName: alarmLevel

*4/6/2024, 10:21:05 AM* - **value updated** Arg 0: └─commandClassName: Notification └─commandClass: 113 └─property: alarmType └─endpoint: 0 └─newValue: 0 └─prevValue: 0 └─propertyName: alarmType

What would the YAML be for the Water alarm?

I tried this:

platform: device
device_id: 6d77355875ba922490d2380ed5e062b7
domain: zwave_js
type: zwave_js.value_updated.value
command_class: 113
property: alarmLevel
endpoint: "0"
from: "0"
to: "2"

but got this error: “Message malformed: Value 12-113-0-alarmLevel can’t be found on node Node(node_id=12)”

Thank you.

First, don’t trigger off of device. Use an entity state.

In your device, it should have a binary sensor of ‘sensor_state_water’. That’s what you should trigger off of. You can also trigger off the leak alarm itself.

Thank you. I can’t find that. Here’s what I see:

A lot of them are disabled.

There’s also this:

and this:

Any thoughts?

You are entering in the wrong information thats why you get that error.

All the information you need to input in the Value Change on a Z-Wave JS Value fields is displayed in the Z-Wave JS UI control panel.

In the last screenshot here’s what you have and here’s what it means.
[12-113-0-Water Alarm-Sensor Status]
12 is the node id of the device you are currently viewing
113 is the command class id for the notification command class. Depending on what you are doing it may ask you for one or the other.
0 is the endpoint
Water Alarm is the property
Sensor Status is the property key
2 would be what you would enter in the Value fields.

1 Like

Huh, that’s weird. What version of zwave2js are you running?

Based on this post there should be some disabled binary sensors on the device page (should be under the sensors section not the diagnostics section).

If you can find them, enable them and see if they respond how you expect. Then you can create an automation using them.

1 Like

I appreciate all of the replies. I’m using:
zwave-js-ui: 9.10.2
zwave-js: 12.5.2

I see in this ZUI :

image

False switches to true when I get the sensor wet.

The matching event is:

4/7/2024, 8:24:08 AM - value updated
Arg 0:
└─commandClassName: Binary Sensor
└─commandClass: 48
└─property: Water
└─endpoint: 0
└─newValue: true
└─prevValue: false
└─propertyName: Water

I’m trying to understand the logic that determines what code to use. I think “value updated” means I should be using zwave_js_value_notification and not zwave_js_notification. Is that correct?

So then my trigger should be this, right?

platform: event
event_type: zwave_js_value_notification
event_data:
  property: "Water"
  property_name: "Water"
  command_class: 48
  node_id: 12
  endpoint: "0"
  value: "true"

But that doesn’t seem to be working.

I’m not ignoring your suggestion @cornellrwilliams. I tried changing the trigger based on your suggestion, and that didn’t work either. I might need to go back and look at it again.

edit: should I be triggering off of this event?

4/7/2024, 8:24:08 AM - value updated
Arg 0:
└─commandClassName: Notification
└─commandClass: 113
└─property: Water Alarm
└─propertyKey: Sensor status
└─endpoint: 0
└─newValue: 2
└─prevValue: 2
└─propertyName: Water Alarm
└─propertyKeyName: Sensor status

Re-interview your device, the initial interview looks like failed as the command class versions are “vundefined”.

1 Like

I did, and it is still vundefined. Does it matter, given that the value is changing when the sensor gets wet? I.e., it seems to be working.

It matters if the value metadata is not being presented to HA. Given you aren’t seeing any of the entities, that seems likely. Just because ZUI shows it doesn’t mean will work properly in HA. Is the node in the “Ready” state (HA) or Interview “Complete” (ZUI)?

It’d be more helpful if you could post some of the following:

  • the device diagnostic file (downloadable from device page), it shows all the discovered values that map to entities.
  • driver debug log of the interview process so we could see why the CC versions are undefined
  • integration debug logs that would show if the value updates are reaching HA (although this one is busy and may contain sensitive information since it’s the full HA logs, so post only the relevant logs)

Nope, “value update” corresponds to entity state changes, or the low-level zwave_js.value_updated platform event. The latter is only required in exceptional cases, which this one should be not.

1 Like

Yeah, you’re kinda trying to use a sensor that hasn’t been fully interviewed which could lead to other problems. Best to either try to reinterview it or remove/re-pair it closer to the coordinator. Mine (I have 2 of them) took a couple of pairings to get right in HA. Once they both got interviewed properly, they work really well with just the binary sensors.

It’s been re-interviewing for about 24 hours now. Is it important to do something besides hit the re-interview button in ZUI?

You have to manually wake the device up.

1 Like

The re-interview did the trick! Everything is working perfectly now. No need to manually edit the YAML, I just had to click on this for a new automation:

I really appreciate everybody’s help!

2 Likes

To be on the safe side, avoid using device triggers and instead use entity state triggers. Device triggers can fail when the device is changes.