How to get scene commands treated as events?

I recently bought a Hank a-wave button http://manuals-backend.z-wave.info/make.php?lang=en&sku=HKZW-SCN04&cert=ZC10-16095219. It seems to operate by just issuing scene-activate commands. It’s very similar to the Aeon Minimote, and I found some config snippets for how to incorporate that one.

Where I’m stuck is figuring out the exact entity_id and scene number to match on. By looking at the ZwaveJS logs, I can see the ccControl messages, but the data payload is multiple bytes, so I’m not sure which byte I need to be referencing in the trigger section of automations. I looked in the main core logs, but I didn’t see any references to the events that core sees after ZwaveJS delivers them. Is there a way to see unhandled scene events?

go to the dev tools section and click on “events” at the top. then listen for “zwave_js_value_notification”.

when you push a button you will see data populated in the window.

you can use that data in your trigger for the automation.

1 Like

Hmmm. That doesn’t seem to be working.

When I look in the ZWaveJS log, I see the following events for the four buttons:

2021-11-30T18:19:28.356Z CNTRLR « [Node 031] received CentralScene notification {
                                      "nodeId": 31,
                                      "ccId": "Central Scene",
                                      "ccCommand": "0x03",
                                      "payload": "0x540002"
                                  }
2021-11-30T18:19:31.655Z CNTRLR « [Node 031] received CentralScene notification {
                                      "nodeId": 31,
                                      "ccId": "Central Scene",
                                      "ccCommand": "0x03",
                                      "payload": "0x550001"
                                  }
2021-11-30T18:19:33.835Z CNTRLR « [Node 031] received CentralScene notification {
                                      "nodeId": 31,
                                      "ccId": "Central Scene",
                                      "ccCommand": "0x03",
                                      "payload": "0x560003"
                                  }
2021-11-30T18:19:35.714Z CNTRLR « [Node 031] received CentralScene notification {
                                      "nodeId": 31,
                                      "ccId": "Central Scene",
                                      "ccCommand": "0x03",
                                      "payload": "0x570004"
                                  }

Yet, when I got to Developer Tools->Events, I paste “zwave_js_value_notification” into the “Event to subscribe to” field and press “Start listening”, I don’t see anything show up when I push the buttons.

Incidentally, I see that there is one listener for “zwave_js_value_notification” and two listeners for “zwave.scene_activated”. How does one find out what those listeners are?

I’m pretty sure the “zwave.scene_activated” is from the older zwave integration.

As far as I know there are only two events generated by zwavejs - “zwave_js_value_notification” and “zwave_js_notification”. see here.

and the listeners are generated (usually…I think) by autmations waiting to be triggered.

are you sure you are using the zwavejs integration and not the older integration?

Makes sense. I looked in automations.yaml, and the two occurrences were from an example I yanked from another forum thread, so they were probably using the older Zwave integration.

What’s strange is that, even though I changed the event type of those two to zwave_js_value_notification for those two automations (through the UI, even, and restarted HA Core), Developer Tools->Events is still saying that there are two listeners for zwave.scene_activated.

But that still doesn’t shed any light on the problem of what events are being triggered by this scene button. Is there a way to see all of the events being generated (the “Listen to events” section in Developer Tools requires to you already know what you’re looking for). Is the only way to see them all to query the sqlite db, directly?

I think you can put * in the listen box and then you will see every event in the system as they happen.