Button Scenes in Node Red - Listening for scenes using zwave_js_value_notification by node_id - Want to replace node_id with Device Name

I have many sequences (flows?) to implement scene control on all my zwave switches & dimmers. Basically I have one events node listening to zwave_js_value_notification for any messages from X node_id.

image

This is where the issue lies… even though it doesn’t happen often, if I need to exclude and include or replace the device, the node_id changes.

Instead for listening for a node_id I would prefer to listen for the friendly_name or entity_id but I can’t figure out how. I looked at the information received by the events node but neither one is present, so I would need some way to look up the node_id I need to listen to by friendly_name or entity_id. Is this possible?

Edit: I am adding an example of what I am using:

[{"id":"8cf389e11fe0149e","type":"server-events","z":"d72cf2ab53741ef6","name":"zwave_js_value_notification","server":"6f1799ba.17e938","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"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":160,"y":2580,"wires":[["6d00b1d68f853633"]]},{"id":"6d00b1d68f853633","type":"switch","z":"d72cf2ab53741ef6","name":"Living Room Light (169)","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"169","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":450,"y":2580,"wires":[["457ea124fbe778c5"]]},{"id":"457ea124fbe778c5","type":"switch","z":"d72cf2ab53741ef6","name":"Scene ID Btn","property":"payload.event.property_key_name","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"num"},{"t":"eq","v":"002","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":690,"y":2580,"wires":[["c75b1c7cfcf1449a"],["c799344423c9bc3f"]],"outputLabels":["Scene 1","Scene 2"]},{"id":"c799344423c9bc3f","type":"switch","z":"d72cf2ab53741ef6","name":"Down","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"6","vt":"num"}],"checkall":"true","repair":false,"outputs":5,"x":850,"y":2640,"wires":[[],[],[],[],[]],"outputLabels":["1 Press","2 Press","3 Press","4 Press","5 Press"]},{"id":"c75b1c7cfcf1449a","type":"switch","z":"d72cf2ab53741ef6","name":"Up","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"6","vt":"num"}],"checkall":"true","repair":false,"outputs":5,"x":850,"y":2540,"wires":[[],[],[],[],[]],"outputLabels":["1 Press","2 Press","3 Press","4 Press","5 Press"]},{"id":"6f1799ba.17e938","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

Have you tried a device node? It can be set to the device and command.

@Mikefila The Device node looks promising but it has lots of issues. While playing with it my node-red started saying “502 Bad Gateway” and restarting. Also, it forces you to select the end point, scene 001 or 002 and the number of key presses so you would have to use an individual device node for each scene which would become very messy quickly and limiting. Also, when I tried to use it that way, it was not saving the key press option… it kept reverting back to single press.

If the maintainer were to just funnel all scene stuff through, I can easily pick out what I need using a single device node. The option seemed to be there on one of the devices I tested (the options appear to change based on device capability) but it was not doing anything (no debug output).

The maintainer says it is in alpha stage and it definitely seems so but I really hope the maintainer will keep developing it as it seems to be very useful! I’ll post some issues on the node’s github page.