ZwaveJS: Heres a node red scenes subflow

Can control 1x,2x,3x,4x,5x presses up or down. And press of the config button.

Typical setup would be tying an events all node looking at zwave_js_event to the input and then tying whatever you want to happen for each “scene” to the nodes outputs. (For my testing purposes, I just tied them to input booleans)

This is just an edit of a subflow someone made for OZW 1.6. I cant remember who made it, but credit to them, lol.

[{"id":"8411e384.fb1f9","type":"subflow","name":"Inovelli Scenes Z Wave JS","info":"","category":"","in":[{"x":140,"y":220,"wires":[{"id":"1adf8d0e.cac7f3"}]}],"out":[{"x":680,"y":40,"wires":[{"id":"3faf3597.ea43ba","port":0}]},{"x":680,"y":80,"wires":[{"id":"3faf3597.ea43ba","port":1}]},{"x":680,"y":120,"wires":[{"id":"3faf3597.ea43ba","port":2}]},{"x":680,"y":160,"wires":[{"id":"3faf3597.ea43ba","port":3}]},{"x":680,"y":200,"wires":[{"id":"3faf3597.ea43ba","port":4}]},{"x":680,"y":240,"wires":[{"id":"8b49eafc.a02138","port":0}]},{"x":680,"y":280,"wires":[{"id":"8b49eafc.a02138","port":1}]},{"x":680,"y":320,"wires":[{"id":"8b49eafc.a02138","port":2}]},{"x":680,"y":360,"wires":[{"id":"8b49eafc.a02138","port":3}]},{"x":680,"y":400,"wires":[{"id":"8b49eafc.a02138","port":4}]},{"x":680,"y":440,"wires":[{"id":"7247d146.a727a","port":0}]}],"env":[],"color":"#DDAA99","outputLabels":["Single tap up","Double tap up","Triple tap up","Quad tap up","5 taps up","Single tap down","Double tap down","Triple tap down","Quad Tap down","5 taps down","Config tap"]},{"id":"1adf8d0e.cac7f3","type":"switch","z":"8411e384.fb1f9","name":"Scene ID","property":"payload.event.property_key_name","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"str"},{"t":"eq","v":"002","vt":"str"},{"t":"eq","v":"003","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":260,"y":220,"wires":[["8b49eafc.a02138"],["3faf3597.ea43ba"],["7247d146.a727a"]]},{"id":"3faf3597.ea43ba","type":"switch","z":"8411e384.fb1f9","name":"Scene Value (Up)","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyPressed2x","vt":"str"},{"t":"eq","v":"KeyPressed3x","vt":"str"},{"t":"eq","v":"KeyPressed4x","vt":"str"},{"t":"eq","v":"KeyPressed5x","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":450,"y":180,"wires":[[],[],[],[],[]],"outputLabels":["Single Tap Up","Double Tap Up","Triple Tap Up","Quad Tap Up","5 Tap Up"]},{"id":"7247d146.a727a","type":"switch","z":"8411e384.fb1f9","name":"Scene Value (Config)","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":320,"wires":[[]],"outputLabels":["Single Config Tap"]},{"id":"8b49eafc.a02138","type":"switch","z":"8411e384.fb1f9","name":"Scene Value (Down)","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyPressed2x","vt":"str"},{"t":"eq","v":"KeyPressed3x","vt":"str"},{"t":"eq","v":"KeyPressed4x","vt":"str"},{"t":"eq","v":"KeyPressed5x","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":460,"y":260,"wires":[[],[],[],[],[]],"outputLabels":["Single Tap Up","Double Tap Up","Triple Tap Up","Quad Tap Up","5 Tap Up"]}]
2 Likes

Well, you better give credit to the person who made it for the original, not me, haha. Thanks for posting, hopefully I’ll be able to use it soon.

I’ve updated the flow to include up released and down released. I cant seem to edit original post. So heres a completely new post…

Can set up to 15 unique “scenes”:

1x,2x,3x,4x,5x up/down
Up held
Up released
Down held
Down released
Config tap

Typical setup would be tying an events all node looking at zwave_js_event to a switch node to tell is what switch it cares about, before going into the subflow. In below example I have 2x up turning on lamp and 4x down turning off lamp.

Heres the actual subflow

[{"id":"3985bb90.d67e54","type":"subflow","name":"Inovelli scenes ZwaveJS","info":"","category":"","in":[{"x":65,"y":360,"wires":[{"id":"fe008dc7.1d271"}]}],"out":[{"x":749,"y":180,"wires":[{"id":"6592ff44.c9c2d","port":0}]},{"x":749,"y":225,"wires":[{"id":"6592ff44.c9c2d","port":1}]},{"x":749,"y":270,"wires":[{"id":"6592ff44.c9c2d","port":2}]},{"x":749,"y":315,"wires":[{"id":"6592ff44.c9c2d","port":3}]},{"x":749,"y":360,"wires":[{"id":"6592ff44.c9c2d","port":4}]},{"x":749,"y":405,"wires":[{"id":"6592ff44.c9c2d","port":5}]},{"x":749,"y":450,"wires":[{"id":"6592ff44.c9c2d","port":6}]},{"x":758,"y":522,"wires":[{"id":"54e15801.d11ee8","port":0}]},{"x":758,"y":567,"wires":[{"id":"54e15801.d11ee8","port":1}]},{"x":758,"y":612,"wires":[{"id":"54e15801.d11ee8","port":2}]},{"x":758,"y":657,"wires":[{"id":"54e15801.d11ee8","port":3}]},{"x":758,"y":702,"wires":[{"id":"54e15801.d11ee8","port":4}]},{"x":758,"y":747,"wires":[{"id":"54e15801.d11ee8","port":5}]},{"x":758,"y":792,"wires":[{"id":"54e15801.d11ee8","port":6}]},{"x":758,"y":909,"wires":[{"id":"31e08d55.b38372","port":0}]}],"env":[],"color":"#DDAA99","outputLabels":["Up 1x","Up 2x","Up 3x","Up 4x","Up 5x","Up held","Up released","Down 1x","Down 2x","Down 3x","Down 4x","Down 5x","Down held","Down released","Config tap"]},{"id":"fe008dc7.1d271","type":"switch","z":"3985bb90.d67e54","name":"Scene ID","property":"payload.event.property_key_name","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"num"},{"t":"eq","v":"002","vt":"num"},{"t":"eq","v":"003","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":231,"y":360,"wires":[["54e15801.d11ee8"],["6592ff44.c9c2d"],["31e08d55.b38372"]]},{"id":"6592ff44.c9c2d","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (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"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":558,"y":270,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Up 1x","Up 2x","Up 3x","Up 4x","Up 5x","Up hold",null]},{"id":"31e08d55.b38372","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (Config)","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":560,"y":909,"wires":[[]],"outputLabels":["Single Config Tap"]},{"id":"54e15801.d11ee8","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (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"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":550,"y":639,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Down 1x","Down 2x","Down 3x","Down 4x","Down 5x","Down held",""]},{"id":"15848ee1.f54db1","type":"comment","z":"3985bb90.d67e54","name":"Edit to raw values. 3-6-21","info":"","x":156,"y":81,"wires":[]},{"id":"54326eea.b4b64","type":"comment","z":"3985bb90.d67e54","name":"Added up released and down released 3-21-21","info":"","x":226,"y":45,"wires":[]}]

Heres the flow from the example picture below:

[{"id":"3985bb90.d67e54","type":"subflow","name":"Inovelli scenes ZwaveJS","info":"","category":"","in":[{"x":65,"y":360,"wires":[{"id":"fe008dc7.1d271"}]}],"out":[{"x":749,"y":180,"wires":[{"id":"6592ff44.c9c2d","port":0}]},{"x":749,"y":225,"wires":[{"id":"6592ff44.c9c2d","port":1}]},{"x":749,"y":270,"wires":[{"id":"6592ff44.c9c2d","port":2}]},{"x":749,"y":315,"wires":[{"id":"6592ff44.c9c2d","port":3}]},{"x":749,"y":360,"wires":[{"id":"6592ff44.c9c2d","port":4}]},{"x":749,"y":405,"wires":[{"id":"6592ff44.c9c2d","port":5}]},{"x":749,"y":450,"wires":[{"id":"6592ff44.c9c2d","port":6}]},{"x":758,"y":522,"wires":[{"id":"54e15801.d11ee8","port":0}]},{"x":758,"y":567,"wires":[{"id":"54e15801.d11ee8","port":1}]},{"x":758,"y":612,"wires":[{"id":"54e15801.d11ee8","port":2}]},{"x":758,"y":657,"wires":[{"id":"54e15801.d11ee8","port":3}]},{"x":758,"y":702,"wires":[{"id":"54e15801.d11ee8","port":4}]},{"x":758,"y":747,"wires":[{"id":"54e15801.d11ee8","port":5}]},{"x":758,"y":792,"wires":[{"id":"54e15801.d11ee8","port":6}]},{"x":758,"y":909,"wires":[{"id":"31e08d55.b38372","port":0}]}],"env":[],"color":"#DDAA99","outputLabels":["Up 1x","Up 2x","Up 3x","Up 4x","Up 5x","Up held","Up released","Down 1x","Down 2x","Down 3x","Down 4x","Down 5x","Down held","Down released","Config tap"]},{"id":"fe008dc7.1d271","type":"switch","z":"3985bb90.d67e54","name":"Scene ID","property":"payload.event.property_key_name","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"num"},{"t":"eq","v":"002","vt":"num"},{"t":"eq","v":"003","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":231,"y":360,"wires":[["54e15801.d11ee8"],["6592ff44.c9c2d"],["31e08d55.b38372"]]},{"id":"6592ff44.c9c2d","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (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"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":558,"y":270,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Up 1x","Up 2x","Up 3x","Up 4x","Up 5x","Up hold",null]},{"id":"31e08d55.b38372","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (Config)","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":560,"y":909,"wires":[[]],"outputLabels":["Single Config Tap"]},{"id":"54e15801.d11ee8","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (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"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":550,"y":639,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Down 1x","Down 2x","Down 3x","Down 4x","Down 5x","Down held",""]},{"id":"15848ee1.f54db1","type":"comment","z":"3985bb90.d67e54","name":"Edit to raw values. 3-6-21","info":"","x":156,"y":81,"wires":[]},{"id":"54326eea.b4b64","type":"comment","z":"3985bb90.d67e54","name":"Added up released and down released 3-21-21","info":"","x":226,"y":45,"wires":[]},{"id":"68678973.ea1fd8","type":"tab","label":"Office","disabled":false,"info":""},{"id":"323b5838.832278","type":"server-events","z":"68678973.ea1fd8","name":"zwave_js_event","server":"ab3e2c53.e3491","event_type":"zwave_js_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":116,"y":315,"wires":[["c4268357.51564"]]},{"id":"c4268357.51564","type":"switch","z":"68678973.ea1fd8","name":"Office switch","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"67","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":341,"y":315,"wires":[["ef7a9ebe.f5da7"]]},{"id":"b5ddf76b.1b7488","type":"api-call-service","z":"68678973.ea1fd8","name":"ON: lamp","server":"ab3e2c53.e3491","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.office_lamp","data":"{\"brightness_pct\":99}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1033,"y":261,"wires":[[]]},{"id":"5cbff09a.a8894","type":"api-call-service","z":"68678973.ea1fd8","name":"OFF: lamp","server":"ab3e2c53.e3491","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.office_lamp","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1042,"y":360,"wires":[[]]},{"id":"ef7a9ebe.f5da7","type":"subflow:3985bb90.d67e54","z":"68678973.ea1fd8","name":"","x":624,"y":315,"wires":[[],["b5ddf76b.1b7488"],[],[],[],[],[],[],[],[],["5cbff09a.a8894"],[],[],[],[]]},{"id":"ab3e2c53.e3491","type":"server","name":"AvilaSmartHomeRpi","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

1 Like

Thanks! @nappyjim. Would you be able to/interested in creating a second one for the LZW36 control? I’m kinda wondering how we can separate out those, but I’m sure I can get a switch node in front of it that will split them off.

I might find some time myself if not.

By the way they made a breaking change to split scenes from notifications, the new event to trigger on is:

zwave_js_value_notification

Just an FYI as I just noticed and got it working, my colors and notifications are working beautifully using integers for color and the new bulk set parameter service for notifications!

Back at 100% function!!!

2 Likes

are you saying what used to be zwave_js_event is now zwave_js_value_notification?

Is this on 2021.4.0?

Correct!

Edit: on everything you said

Ok, ill upgrade tonight and test. and put new version at top of thread

There’s also one more scene you could add in if you wanted. Firmware 1.49 added in the double tap config button scene, it’s mapped under:

payload.event.property_key_name = 003
payload.event.value_raw = 3

Just wanted to pass that along :slight_smile:

Heres updated subflow with 2x config tap added.

[{"id":"3985bb90.d67e54","type":"subflow","name":"Inovelli scenes ZwaveJS","info":"","category":"","in":[{"x":65,"y":360,"wires":[{"id":"fe008dc7.1d271"}]}],"out":[{"x":749,"y":180,"wires":[{"id":"6592ff44.c9c2d","port":0}]},{"x":749,"y":225,"wires":[{"id":"6592ff44.c9c2d","port":1}]},{"x":749,"y":270,"wires":[{"id":"6592ff44.c9c2d","port":2}]},{"x":749,"y":315,"wires":[{"id":"6592ff44.c9c2d","port":3}]},{"x":749,"y":360,"wires":[{"id":"6592ff44.c9c2d","port":4}]},{"x":749,"y":405,"wires":[{"id":"6592ff44.c9c2d","port":5}]},{"x":749,"y":450,"wires":[{"id":"6592ff44.c9c2d","port":6}]},{"x":758,"y":522,"wires":[{"id":"54e15801.d11ee8","port":0}]},{"x":758,"y":567,"wires":[{"id":"54e15801.d11ee8","port":1}]},{"x":758,"y":612,"wires":[{"id":"54e15801.d11ee8","port":2}]},{"x":758,"y":657,"wires":[{"id":"54e15801.d11ee8","port":3}]},{"x":758,"y":702,"wires":[{"id":"54e15801.d11ee8","port":4}]},{"x":758,"y":747,"wires":[{"id":"54e15801.d11ee8","port":5}]},{"x":758,"y":792,"wires":[{"id":"54e15801.d11ee8","port":6}]},{"x":749,"y":882,"wires":[{"id":"31e08d55.b38372","port":0}]},{"x":749,"y":936,"wires":[{"id":"31e08d55.b38372","port":1}]}],"env":[],"color":"#DDAA99","outputLabels":["Up 1x","Up 2x","Up 3x","Up 4x","Up 5x","Up held","Up released","Down 1x","Down 2x","Down 3x","Down 4x","Down 5x","Down held","Down released","Config tap 1x","Config tap 2x"]},{"id":"fe008dc7.1d271","type":"switch","z":"3985bb90.d67e54","name":"Scene ID","property":"payload.event.property_key_name","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"num"},{"t":"eq","v":"002","vt":"num"},{"t":"eq","v":"003","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":231,"y":360,"wires":[["54e15801.d11ee8"],["6592ff44.c9c2d"],["31e08d55.b38372"]]},{"id":"6592ff44.c9c2d","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (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"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":558,"y":270,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Up 1x","Up 2x","Up 3x","Up 4x","Up 5x","Up hold",null]},{"id":"31e08d55.b38372","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (Config)","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":560,"y":909,"wires":[[],[]],"outputLabels":["Single Config Tap",null]},{"id":"54e15801.d11ee8","type":"switch","z":"3985bb90.d67e54","name":"Scene Value (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"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":550,"y":639,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Down 1x","Down 2x","Down 3x","Down 4x","Down 5x","Down held",""]},{"id":"15848ee1.f54db1","type":"comment","z":"3985bb90.d67e54","name":"Edit to raw values. 3-6-21","info":"","x":156,"y":81,"wires":[]},{"id":"54326eea.b4b64","type":"comment","z":"3985bb90.d67e54","name":"Added up released and down released 3-21-21","info":"","x":226,"y":45,"wires":[]},{"id":"33b55a97.ca0466","type":"comment","z":"3985bb90.d67e54","name":"Add in config tap 2x 4-9-21","info":"","x":166,"y":117,"wires":[]}]
3 Likes

@nappyjim just wanted to say thank you and to the original author. This saved me quite a bit of time!

I’m on 2021.4.6 and on the event node I had to change zwave_js_event to zwave_js_value_notification . Otherwise it worked flawlessly!

yeah unfortunately I cant edit the original post to mention the new event name. Also, reply #9 has a slightly newer subflow with a config button 2x added. You must be on certain firmware for this to work, not sure what it is though.