How to use Z-Wave JS payload from Zooz device double tap

I have a Zooz Zen30 which has a dimmer paddle and relay button.

I see the following payloads in the Z-Wave log. Here is a snippet (ccId and ccCommand lines repeat for each one of the payloads; comments added by me; I omitted nodeId and a header line of 5 words, all repeated for each payload; otherwise nothing else omitted):

"ccId": "Central Scene",
"ccCommand": "0x03",
"payload": "0x4c8001"   paddle single tap up
"payload": "0x4d8002"   paddle single down
"payload": "0x4e8301"   paddle double up
"payload": "0x4f8302"   paddle double down
"payload": "0x508003"   button on tap
"payload": "0x518003"   button off
"payload": "0x528303"   button double

If technically feasible, how do I translate that into the below form, which I assume is how I would access the Zen30 multi-tap features?

trigger:
  platform: event
  event_type: zwave_js_event
  event_data:
    device_id: eada56f82044648b3012dc28546c8c38
    command_class: "0x03"
- variables:
    value: '{{ trigger.event.data.value }}'
- choose:
  - conditions: '{{ value == ??? }}'
    sequence:
    - service: some service
  - conditions: '{{ value == ???? }}'
    sequence:
    - service: some other service

In the examples I find, the values are either 0 or 255. But hex to decimal conversion does not match up those values with the payloads.
Or is there a mapping already in Z-Wave JS and I should be referring to scene numbers?
I have not found the documentation on the home-assistant site yet. Any pointers are appreciated.
I found this page, but it might be for an older integration. It discusses scene values, which might be relevant given Zooz’s documentation.
My JS log data does not match anything discussed in the HASS JS page either.

I want to trigger off of a zooz double tap event.
After looking at the logs more, I realize the above payloads are not fixed (the values seem to change).

Questions: does anyone know how to use a z-wave device double tap in an automation?

- alias: guest_fan_timer_block
  trigger:
    platform: event
    event_type: zwave_js_event
    event_data:
      device_id: eada56f82044648b3012dc28546c8c38
      command_class: "0x03"
      basic_level: "0x4c8001"
  action:
    - service: input_boolean.turn_on
      entity_id: input_boolean.fan_timer_block

I figured it out with the help of this thread and post by @majorsl. I find this in this page also, though examples help. The JS log is not the place to monitor traffic. Rather the Developer Tools > Events page and listen for zwave_js_value_notification. This provides parsed or more complete information. For my trigger, I copied enough library data to be unique to the action at the device.

- alias: guest_fan_timer_block
  trigger:
    platform: event
    event_type: zwave_js_value_notification
    event_data:
      device_id: eada56f82044648b3012dc28546c8c38
      command_class: 91
      label: "Scene 003"
      value: "KeyPressed2x"
  action:
    - service: input_boolean.turn_on
      entity_id: input_boolean.fan_timer_block

This is getting me really close but still struggling. Any one have advice for translating this to node red? I know there are some sequences for inovelli switches but having a hard time getting this to translate. Thanks in advance

@CO_Jeeper I just set this up in NodeRED. First, import this into your NodeRED:

[{"id":"e87d222118683afc","type":"server-events","z":"8d09d343.b8b7b","name":"Listen to Zwave","server":"c34a8f9d.e3647","version":1,"event_type":"zwave_js_value_notification","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":1480,"y":1160,"wires":[["3592a63e126d9bb0","70f7645c8f49e170"]]},{"id":"3592a63e126d9bb0","type":"debug","z":"8d09d343.b8b7b","name":"raw debug data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1620,"y":1080,"wires":[]},{"id":"5a68c1d4891a8408","type":"switch","z":"8d09d343.b8b7b","name":"which button?","property":"payload.event.property_key","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"str"},{"t":"eq","v":"002","vt":"str"},{"t":"eq","v":"003","vt":"str"},{"t":"eq","v":"004","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1900,"y":1160,"wires":[["aeee8ae3f2ee0005"],["8d4b2fff8961749e"],["78121377c89bf90e"],["e0fb84f85d95f701"]]},{"id":"70f7645c8f49e170","type":"switch","z":"8d09d343.b8b7b","name":"which remote?","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"11","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1700,"y":1160,"wires":[["5a68c1d4891a8408"]]},{"id":"aeee8ae3f2ee0005","type":"switch","z":"8d09d343.b8b7b","name":"press, hold, release?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyHeldDown","vt":"str"},{"t":"eq","v":"KeyReleased","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":2140,"y":1060,"wires":[[],[],[]]},{"id":"8d4b2fff8961749e","type":"switch","z":"8d09d343.b8b7b","name":"press, hold, release?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyHeldDown","vt":"str"},{"t":"eq","v":"KeyReleased","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":2140,"y":1120,"wires":[[],[],[]]},{"id":"78121377c89bf90e","type":"switch","z":"8d09d343.b8b7b","name":"press, hold, release?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyHeldDown","vt":"str"},{"t":"eq","v":"KeyReleased","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":2140,"y":1180,"wires":[[],[],[]]},{"id":"e0fb84f85d95f701","type":"switch","z":"8d09d343.b8b7b","name":"press, hold, release?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyHeldDown","vt":"str"},{"t":"eq","v":"KeyReleased","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":2140,"y":1240,"wires":[[],[],[]]},{"id":"c34a8f9d.e3647","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

The first node listens to the event “zwave_js_value_notification” (as stated by yelkenli above). Now deploy, and press a button on your Zwave button. Look in the debug tab within NodeRED and you’ll see the listened data. Depending on your remote, the data might come through differently, but the way I set mine up was like this:

Node_ID is the remote itself, put that number in the first Switch node. The switch node is able to read that specific line of data (look at the property field to see how). The button itself (in my case a four button remote) is under property_key, I put 001,002,003,004 as options in the second switch node. Then in the third switch node I put if the value was KeyPressed, KeyHeldDown, or KeyReleased.

Now you can link anything to the end of these and your remote will trigger those actions. You can delete the debug node after you’re finished. There may be a way to optimize this process, but this got me going the fastest.

Side note: If you have Held and Released as options, I recommend only using one or the other for your purposes. I tend to use Released, since this way it will only trigger once you’ve let go on the button.

1 Like