[TIP] Home Assistant + Node-Red Scene Manager

Yeah update 0.8.0 broke this once the partial parameters were added in. 0.8.1 renamed the parameter again as well. I got it working by using 4 service call nodes separated out by a 1ms delay. Not a pretty solution, but it does appear to work during my minimal testing. Trying to add this solution to my old now useless subflow calculator to get it working again haha.

This example sets a white fast blink for 10 seconds. You just need to replace the entity ID of my under deck light with a switch of yours. This also only works on dimmers:

[{"id":"e64af187.58b55","type":"api-call-service","z":"f1e1b905.e9a56","name":"Set ZWaveJS Notification","server":"497693ef.d5e6bc","version":1,"debugenabled":false,"service_domain":"zwave_js","service":"set_config_parameter","entityId":"","data":"{\t   \"entity_id\":\"light.under_deck_light_level\",\t   \"parameter\":16,\t   \"bitmask\":\"0xff\",\t   \"value\":255\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":700,"wires":[["9870947b.a672e8"]]},{"id":"755f40bc.97dd9","type":"inject","z":"f1e1b905.e9a56","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":820,"y":800,"wires":[["e64af187.58b55"]]},{"id":"4cbc6d81.917f44","type":"api-call-service","z":"f1e1b905.e9a56","name":"Set ZWaveJS Notification","server":"497693ef.d5e6bc","version":1,"debugenabled":false,"service_domain":"zwave_js","service":"set_config_parameter","entityId":"","data":"{\t   \"entity_id\":\"light.under_deck_light_level\",\t   \"parameter\":16,\t   \"bitmask\":\"0xff00\",\t   \"value\":10\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":760,"wires":[["76bc7122.7409e"]]},{"id":"99b10da0.44429","type":"api-call-service","z":"f1e1b905.e9a56","name":"Set ZWaveJS Notification","server":"497693ef.d5e6bc","version":1,"debugenabled":false,"service_domain":"zwave_js","service":"set_config_parameter","entityId":"","data":"{\t   \"entity_id\":\"light.under_deck_light_level\",\t   \"parameter\":16,\t   \"bitmask\":\"0xff0000\",\t   \"value\":10\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":820,"wires":[["bc0686a5.d82278"]]},{"id":"4940a5.66b3ff5c","type":"api-call-service","z":"f1e1b905.e9a56","name":"Set ZWaveJS Notification","server":"497693ef.d5e6bc","version":1,"debugenabled":false,"service_domain":"zwave_js","service":"set_config_parameter","entityId":"","data":"{\t   \"entity_id\":\"light.under_deck_light_level\",\t   \"parameter\":16,\t   \"bitmask\":\"0x7f000000\",\t   \"value\":3\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":880,"wires":[[]]},{"id":"9870947b.a672e8","type":"delay","z":"f1e1b905.e9a56","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1290,"y":700,"wires":[["4cbc6d81.917f44"]]},{"id":"76bc7122.7409e","type":"delay","z":"f1e1b905.e9a56","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1290,"y":760,"wires":[["99b10da0.44429"]]},{"id":"bc0686a5.d82278","type":"delay","z":"f1e1b905.e9a56","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1290,"y":820,"wires":[["4940a5.66b3ff5c"]]},{"id":"497693ef.d5e6bc","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Hoping an easier solution will be possible at some point, I don’t like having to use 7 nodes to do something that previously only took 1


1 Like

Ick. I just went through and manually updated my switches with lingering notification LEDs (fortunately it wasn’t many) in ZwaveJS to MQTT. Here’s hoping the target stops moving soon so the parameters can be set with a method that doesn’t break between updates.

1 Like

Looks like a new service zwave_js.bulk_set_partial_config_parameters is coming in 2021.4 and can be used for this functionality (passing integer and it sets all partials beneath it).

1 Like

Thank god, glad I didn’t move forward with the way I pasted above! This is exciting, would allow full functionality of everything once again.

1 Like

I have the notification LEDs working reasonably well, but now the subflow posted at the top of this thread isn’t working for me. It worked as recently as last week, but I’ve since updated to ZwaveJS 0.11.0.

They changed the action to look for as of last update. You just need to update the events: all node to look for “zwave_js_value_notification”. Here’s my flow below if you’d like it; just need to double click the subflow and add your node ID number:

[{"id":"fa7b6715.ed0f08","type":"subflow","name":"Inovelli Scenes ZwaveJS","info":"","category":"","in":[],"out":[{"x":1260,"y":100,"wires":[{"id":"77414276.6ad26c","port":0}]},{"x":1260,"y":140,"wires":[{"id":"77414276.6ad26c","port":1}]},{"x":1260,"y":180,"wires":[{"id":"77414276.6ad26c","port":2}]},{"x":1260,"y":220,"wires":[{"id":"77414276.6ad26c","port":3}]},{"x":1260,"y":260,"wires":[{"id":"77414276.6ad26c","port":4}]},{"x":1260,"y":300,"wires":[{"id":"77414276.6ad26c","port":5}]},{"x":1260,"y":340,"wires":[{"id":"77414276.6ad26c","port":6}]},{"x":1260,"y":380,"wires":[{"id":"4d74571c.af8a98","port":0}]},{"x":1260,"y":420,"wires":[{"id":"4d74571c.af8a98","port":1}]},{"x":1260,"y":460,"wires":[{"id":"4d74571c.af8a98","port":2}]},{"x":1260,"y":500,"wires":[{"id":"4d74571c.af8a98","port":3}]},{"x":1260,"y":540,"wires":[{"id":"4d74571c.af8a98","port":4}]},{"x":1260,"y":580,"wires":[{"id":"4d74571c.af8a98","port":5}]},{"x":1260,"y":620,"wires":[{"id":"4d74571c.af8a98","port":6}]},{"x":1260,"y":660,"wires":[{"id":"d1146dd6.71b6f","port":0}]},{"x":1260,"y":700,"wires":[{"id":"d1146dd6.71b6f","port":1}]}],"env":[{"name":"node_id","type":"num","value":""}],"color":"#0066cc","outputLabels":["Single Tap Down","Double Tap Down","Triple Tap Down","Quad Tap Down","5 Tap Down","Long Press Down","Release Press Down","Single Tap Up","Double Tap Up","Triple Tap Up","Quad Tap Up","5 Tap Up","Long Press Up","Release Press Up","Single Config Tap","Double Config Tap (fw 1.49+ only)","debug"]},{"id":"b7cb0a4a.aac368","type":"switch","z":"fa7b6715.ed0f08","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":840,"y":400,"wires":[["77414276.6ad26c"],["4d74571c.af8a98"],["d1146dd6.71b6f"]]},{"id":"77414276.6ad26c","type":"switch","z":"fa7b6715.ed0f08","name":"Scene Value ID","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":1060,"y":320,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Single Tap Down","Double Tap Down","Triple Tap Down","Quad Tap Down","5 Tap Down","Long Press Down","Release Press Down"]},{"id":"4d74571c.af8a98","type":"switch","z":"fa7b6715.ed0f08","name":"Scene Value ID","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":1060,"y":440,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Single Tap Up","Double Tap Up","Triple Tap Up","Quad Tap Up","5 Tap Up","Long Press Up","Release Press Up"]},{"id":"d1146dd6.71b6f","type":"switch","z":"fa7b6715.ed0f08","name":"Scene Value ID","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1060,"y":520,"wires":[[],[]],"outputLabels":["Single Config Tap","Double Config Tap (fw 1.49+ only)"]},{"id":"3180cbbd.8a6e54","type":"server-events","z":"fa7b6715.ed0f08","name":"Z Wave Scenes","server":"497693ef.d5e6bc","event_type":"zwave_js_value_notification","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":280,"y":400,"wires":[["c480a17f.b8c31"]]},{"id":"4abef697.e70328","type":"switch","z":"fa7b6715.ed0f08","name":"Check Node","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"jsonata_exp","v":"msg.payload.event.node_id = msg.node","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":1,"x":670,"y":400,"wires":[["b7cb0a4a.aac368"]]},{"id":"c480a17f.b8c31","type":"change","z":"fa7b6715.ed0f08","name":"Set msg.node","rules":[{"t":"set","p":"node","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"node","pt":"msg","to":"node_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":400,"wires":[["4abef697.e70328"]]},{"id":"497693ef.d5e6bc","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"96acb8e.dd43e48","type":"subflow:fa7b6715.ed0f08","z":"f1e1b905.e9a56","name":"","env":[],"x":1120,"y":900,"wires":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]}]

That works, thanks. My OCD hates that the “tap down” outputs are on top, and the “tap up” outputs are on bottom, though
 :laughing: I had to fix it.

Fair enough! I flipped the order if you’d prefer it this way :slight_smile:

[{"id":"9b33cdaf.7820d","type":"subflow","name":"Inovelli Scenes ZwaveJS","info":"","category":"","in":[],"out":[{"x":1240,"y":100,"wires":[{"id":"a26b84b3.127128","port":0}]},{"x":1240,"y":140,"wires":[{"id":"a26b84b3.127128","port":1}]},{"x":1240,"y":180,"wires":[{"id":"a26b84b3.127128","port":2}]},{"x":1240,"y":220,"wires":[{"id":"a26b84b3.127128","port":3}]},{"x":1240,"y":260,"wires":[{"id":"a26b84b3.127128","port":4}]},{"x":1240,"y":300,"wires":[{"id":"a26b84b3.127128","port":5}]},{"x":1240,"y":340,"wires":[{"id":"a26b84b3.127128","port":6}]},{"x":1240,"y":380,"wires":[{"id":"c82752c0.3bf69","port":0}]},{"x":1240,"y":420,"wires":[{"id":"c82752c0.3bf69","port":1}]},{"x":1240,"y":460,"wires":[{"id":"c82752c0.3bf69","port":2}]},{"x":1240,"y":500,"wires":[{"id":"c82752c0.3bf69","port":3}]},{"x":1240,"y":540,"wires":[{"id":"c82752c0.3bf69","port":4}]},{"x":1240,"y":580,"wires":[{"id":"c82752c0.3bf69","port":5}]},{"x":1240,"y":620,"wires":[{"id":"c82752c0.3bf69","port":6}]},{"x":1240,"y":660,"wires":[{"id":"40a1ec56.997c64","port":0}]},{"x":1240,"y":700,"wires":[{"id":"40a1ec56.997c64","port":1}]}],"env":[{"name":"node_id","type":"num","value":""}],"color":"#0066cc","outputLabels":["Single Tap Up","Double Tap Up","Triple Tap Up","Quad Tap Up","5 Tap Up","Long Press Up","Release Press Up","Single Tap Down","Double Tap Down","Triple Tap Down","Quad Tap Down","5 Tap Down","Long Press Down","Release Press Down","Single Config Tap","Double Config Tap (fw 1.49+ only)"]},{"id":"3316c581.6f49fa","type":"switch","z":"9b33cdaf.7820d","name":"Scene ID","property":"payload.event.property_key_name","propertyType":"msg","rules":[{"t":"eq","v":"002","vt":"str"},{"t":"eq","v":"001","vt":"str"},{"t":"eq","v":"003","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":820,"y":380,"wires":[["a26b84b3.127128"],["c82752c0.3bf69"],["40a1ec56.997c64"]]},{"id":"c82752c0.3bf69","type":"switch","z":"9b33cdaf.7820d","name":"Scene Value ID","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":1040,"y":420,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Single Tap Down","Double Tap Down","Triple Tap Down","Quad Tap Down","5 Tap Down","Long Press Down","Release Press Down"]},{"id":"a26b84b3.127128","type":"switch","z":"9b33cdaf.7820d","name":"Scene Value ID","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":1040,"y":300,"wires":[[],[],[],[],[],[],[]],"outputLabels":["Single Tap Up","Double Tap Up","Triple Tap Up","Quad Tap Up","5 Tap Up","Long Press Up","Release Press Up"]},{"id":"40a1ec56.997c64","type":"switch","z":"9b33cdaf.7820d","name":"Scene Value ID","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1040,"y":500,"wires":[[],[]],"outputLabels":["Single Config Tap","Double Config Tap (fw 1.49+ only)"]},{"id":"1f4b61fb.e3a56e","type":"server-events","z":"9b33cdaf.7820d","name":"Z Wave Scenes","server":"497693ef.d5e6bc","event_type":"zwave_js_value_notification","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":260,"y":380,"wires":[["8b42f3a3.66dfd"]]},{"id":"4570ae35.eea82","type":"switch","z":"9b33cdaf.7820d","name":"Check Node","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"jsonata_exp","v":"msg.payload.event.node_id = msg.node","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":1,"x":650,"y":380,"wires":[["3316c581.6f49fa"]]},{"id":"8b42f3a3.66dfd","type":"change","z":"9b33cdaf.7820d","name":"Set msg.node","rules":[{"t":"set","p":"node","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"node","pt":"msg","to":"node_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":380,"wires":[["4570ae35.eea82"]]},{"id":"497693ef.d5e6bc","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"49fd0eba.9859c","type":"subflow:9b33cdaf.7820d","z":"f1e1b905.e9a56","name":"","env":[{"name":"node_id","value":"2","type":"num"}],"x":860,"y":1000,"wires":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]}]
1 Like

Thanks, already got it done in my flows. Great work, I like that the template includes the events-all node, the switch node, and the change nodes
 it cleans up my flows nicely.

1 Like

Sorry about this but I am really new to Node Red and I am not following where I need to make changes to your fkow above. The Node Id for my on/off switch is 2. Also, where do I set what I want to trigger with the scene? Is that the outputs I see off of the Scene Value ID nodes?

No worries! Just import my subflow and double click it. On the right will be an option which reads node_id, just type in 2 and hit save. That will filter out the notification events from specifically node 2 going forward. Then just attach service calls to any of the other 16 outputs. If you hover your mouse over the dots, it’ll tell you which scene it’s monitoring for. It could be single tap up as one example, so simply attach a service call which turns lights on to that output so going forward, single tap up once turns on the lights you want.

Awesome
 I literally just had my first ever scene work. Thanks for all the help


3 Likes

Thanks for sharing your subflow. I just upgraded to zwave js and it helped transition my switches over. I also like the idea of passing in the node id to the subflow, a clean approach that I never considered.

I modified your subflow to also take in another parameter for entity id such as the name of the light. Then within the subflow, I have the logic needed to turn on, turn off, double tap to full brightness, dim whatever light name was passed in. This way I can fully control my hue lights through scenes and reuse the same logic in other rooms. All I need to do is pass the node id and the light entity name I want it to control.

2 Likes

I updated @harmfulmushroom last flow to work with the new zwavejs

@Eric_Inovelli how’s the wiki coming? Maybe we can make a list of subflows people develop?

[{"id":"8411e384.fb1f9","type":"subflow","name":"Inovelli Scenes","info":"","category":"","in":[{"x":120,"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":"eee43bc5.cec848","port":0}]},{"x":680,"y":280,"wires":[{"id":"eee43bc5.cec848","port":1}]},{"x":680,"y":320,"wires":[{"id":"eee43bc5.cec848","port":2}]},{"x":680,"y":360,"wires":[{"id":"eee43bc5.cec848","port":3}]},{"x":680,"y":400,"wires":[{"id":"eee43bc5.cec848","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.label","propertyType":"msg","rules":[{"t":"eq","v":"Scene 001","vt":"str"},{"t":"eq","v":"Scene 002","vt":"str"},{"t":"eq","v":"Scene 003","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":220,"y":220,"wires":[["eee43bc5.cec848"],["3faf3597.ea43ba"],["7247d146.a727a"]]},{"id":"eee43bc5.cec848","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":["Double Tap Down","Triple Tap Down","Quad Tap Down","5 Tap Down",""]},{"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","","",null]},{"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":460,"y":320,"wires":[[]],"outputLabels":["Single Config Tap"]}]

1 Like

High value thread right here, thanks and h/t to all. I’ve deployed around 15 Red switches (mix of 30s and 31s) around the house - after a few months of behavioral analysis, I’ve determined my test subjects (family) have some deeply ingrained ‘switch habits’ and a distinct lack of tolerance for change:

  • 95%+ of switch interaction is on/off 1x tap
  • Config taps and dimming actions are just starting - later/slower than I expected.
  • Multi-taps adopted by 1 user (me)
  • Confusion grew in-line with the number of deployed switches (my fault - “look what I can do” turned into a mess of various / spotty switch behaviors)

So, I’ve adapted the excellent subflows from @harmfulmushroom, @nappyjim and a few others with the following loose ‘standards’ intended to a) deliver a more familiar experience for my stodgy users, and b) keep the dev team (me) focused on utility first, creative exuberance second:

  • Model traditional switch behavior - up=on, down=off
  • Maintain consistency - 1x = expected lights, 2x = area/room, config = switches etc.
  • Target ‘intuitively obvious’ behavior - ‘i wonder what this will do’ is, evidently, more frustrating than interesting to everyone but this admin (even though random color loops on config press are sweet - adoption first, easter eggs second for my users)

The resulting Red Dimmer subflow:

[{"id":"9c21f3d8.28304","type":"subflow","name":"pal-Toggled","info":"","category":"nodePallette","in":[{"x":60,"y":100,"wires":[{"id":"8e0e0b85.f2ee28"}]}],"out":[{"x":740,"y":80,"wires":[{"id":"9f9a2966.460d68","port":0}]},{"x":740,"y":120,"wires":[{"id":"7d408f07.c37f7","port":0}]}],"env":[],"meta":{},"color":"#f59c3d","outputLabels":["On","Off"]},{"id":"8e0e0b85.f2ee28","type":"counter","z":"9c21f3d8.28304","name":"","init":"0","step":"1","lower":"","upper":"","mode":"increment","outputs":1,"x":200,"y":100,"wires":[["7742abfc.1bf6c4"]]},{"id":"9f9a2966.460d68","type":"change","z":"9c21f3d8.28304","name":"on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"},{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":80,"wires":[[]]},{"id":"7d408f07.c37f7","type":"change","z":"9c21f3d8.28304","name":"off","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"},{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":120,"wires":[[]]},{"id":"5a48baf5.097f64","type":"num-if","z":"9c21f3d8.28304","name":"even","condition":"even","checkvalue":"2","x":490,"y":80,"wires":[["9f9a2966.460d68"]]},{"id":"e9876370.21223","type":"num-if","z":"9c21f3d8.28304","name":"odd","condition":"odd","checkvalue":"1","x":490,"y":120,"wires":[["7d408f07.c37f7"]]},{"id":"7742abfc.1bf6c4","type":"change","z":"9c21f3d8.28304","name":"clean","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"move","p":"count","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":100,"wires":[["5a48baf5.097f64","e9876370.21223"]]},{"id":"262c8575.6a270a","type":"subflow","name":"Dimmer Loop","info":"","category":"home_assistant","in":[{"x":80,"y":100,"wires":[{"id":"46386579.fbb7cc"}]}],"out":[{"x":900,"y":80,"wires":[{"id":"864d8f96.b5b9f","port":0}]}],"env":[],"meta":{},"color":"#f26f6f"},{"id":"794d0f18.444d1","type":"looptimer","z":"262c8575.6a270a","duration":".15","units":"Second","maxloops":"20","maxtimeout":"10","maxtimeoutunits":"Second","name":"Dimmer Loop","x":420,"y":80,"wires":[["e162b9ba.124e18"],[]]},{"id":"e162b9ba.124e18","type":"function","z":"262c8575.6a270a","name":"Dim Up/Down","func":"newmsg={}\nvar updown = msg.payload.event.property_key;\nif(updown == \"002\"){\n    dim = 10;\n} else { dim = -10;}\nnewmsg.payload={dim}\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":80,"wires":[["864d8f96.b5b9f"]]},{"id":"864d8f96.b5b9f","type":"change","z":"262c8575.6a270a","name":"On","rules":[{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"},{"t":"move","p":"payload.dim","pt":"msg","to":"data.brightness_step_pct","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":80,"wires":[[]]},{"id":"46386579.fbb7cc","type":"switch","z":"262c8575.6a270a","name":"","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":230,"y":100,"wires":[["794d0f18.444d1"],["ddec65a1.9f3b58"]]},{"id":"ddec65a1.9f3b58","type":"change","z":"262c8575.6a270a","name":"Stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":120,"wires":[["794d0f18.444d1"]]},{"id":"803845de.f9a508","type":"subflow","name":"RedDim","info":"","category":"home_assistant","in":[{"x":480,"y":440,"wires":[{"id":"158f3c7c.c7f064"}]}],"out":[{"x":1340,"y":220,"wires":[{"id":"1a88b769.0c60d9","port":0},{"id":"ee9ef01a.965a","port":0}]},{"x":1340,"y":280,"wires":[{"id":"7603cdab.552af4","port":0},{"id":"dcefe019.7a3b5","port":0}]},{"x":1340,"y":340,"wires":[{"id":"f4ac0d9e.b9a13","port":0},{"id":"250e8b80.a32af4","port":0}]},{"x":1340,"y":400,"wires":[{"id":"1bb6666.f3ee59a","port":0},{"id":"6ce14d1d.305da4","port":0}]},{"x":1340,"y":460,"wires":[{"id":"518e8d30.5ecf44","port":0},{"id":"3db90f2e.b4c6d","port":0}]},{"x":1340,"y":520,"wires":[{"id":"93d06aa4.cb2908","port":0},{"id":"2d9d0edc.7706f2","port":0}]},{"x":1340,"y":580,"wires":[{"id":"78f123bd.840eec","port":0},{"id":"78f123bd.840eec","port":1}]}],"env":[],"meta":{},"color":"#d94545","outputLabels":["On/Off 1x","On/Off 2x","On/Off 3x","On/Off 4x","On/Off  5x","Dim Up/Down","Config Press"]},{"id":"158f3c7c.c7f064","type":"switch","z":"803845de.f9a508","name":"Scene ID","property":"payload.event.property_key_name","propertyType":"msg","rules":[{"t":"eq","v":"002","vt":"num"},{"t":"eq","v":"001","vt":"num"},{"t":"eq","v":"003","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":600,"y":440,"wires":[["3bdb9b5d.9d74a4"],["bccb6520.572d68"],["17191473.842fcc"]]},{"id":"3bdb9b5d.9d74a4","type":"switch","z":"803845de.f9a508","name":"UpPress","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":860,"y":240,"wires":[["1a88b769.0c60d9"],["7603cdab.552af4"],["f4ac0d9e.b9a13"],["1bb6666.f3ee59a"],["518e8d30.5ecf44"],["2d9d0edc.7706f2"],["2d9d0edc.7706f2"]],"outputLabels":["Up 1x","Up 2x","Up 3x","Up 4x","Up 5x","Up hold","Up release"]},{"id":"17191473.842fcc","type":"switch","z":"803845de.f9a508","name":"Config","property":"payload.event.value_raw","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":870,"y":660,"wires":[["78f123bd.840eec"]],"outputLabels":["Single Config Tap"]},{"id":"bccb6520.572d68","type":"switch","z":"803845de.f9a508","name":"DownPress","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":850,"y":500,"wires":[["ee9ef01a.965a"],["dcefe019.7a3b5"],["250e8b80.a32af4"],["6ce14d1d.305da4"],["3db90f2e.b4c6d"],["93d06aa4.cb2908"],["93d06aa4.cb2908"]],"outputLabels":["Down 1x","Down 2x","Down 3x","Down 4x","Down 5x","Down held","Down release"]},{"id":"93d06aa4.cb2908","type":"subflow:262c8575.6a270a","z":"803845de.f9a508","name":"","env":[],"x":1080,"y":600,"wires":[[]]},{"id":"2d9d0edc.7706f2","type":"subflow:262c8575.6a270a","z":"803845de.f9a508","name":"","env":[],"x":1080,"y":340,"wires":[[]]},{"id":"1a88b769.0c60d9","type":"change","z":"803845de.f9a508","name":"On","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":140,"wires":[[]]},{"id":"ee9ef01a.965a","type":"change","z":"803845de.f9a508","name":"Off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":400,"wires":[[]]},{"id":"7603cdab.552af4","type":"change","z":"803845de.f9a508","name":"On","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":180,"wires":[[]]},{"id":"f4ac0d9e.b9a13","type":"change","z":"803845de.f9a508","name":"On","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":220,"wires":[[]]},{"id":"1bb6666.f3ee59a","type":"change","z":"803845de.f9a508","name":"On","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":260,"wires":[[]]},{"id":"518e8d30.5ecf44","type":"change","z":"803845de.f9a508","name":"On","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":300,"wires":[[]]},{"id":"dcefe019.7a3b5","type":"change","z":"803845de.f9a508","name":"Off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":440,"wires":[[]]},{"id":"250e8b80.a32af4","type":"change","z":"803845de.f9a508","name":"Off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":480,"wires":[[]]},{"id":"6ce14d1d.305da4","type":"change","z":"803845de.f9a508","name":"Off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":520,"wires":[[]]},{"id":"3db90f2e.b4c6d","type":"change","z":"803845de.f9a508","name":"Off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":560,"wires":[[]]},{"id":"78f123bd.840eec","type":"subflow:9c21f3d8.28304","z":"803845de.f9a508","name":"Toggler","env":[],"x":1100,"y":660,"wires":[[],[]]}]

This approach requires at least a {{payload.service}} variable in the Call Service node and no additional data (i.e. color, brightness, etc.) or the turn_off call will barf in some cases (switches). So I modeled primary scenes for each room in Node Red and pass {{payload.domain /service /entityid}} and data to the Call Service node as appropriate. I still have an occasional on/off (OOF) switch outside of the Inovelli subflows for non-binary use-cases (e.g. on = ‘set cover to 6%’ but off = close cover), but they’re the exception:
image

This took some up-front lift to templatize, join, and branch within the scene subflows, but a lot of that was modeling entities and establishing a common subflow palette (pal):

[{"id":"530a946a.c1a54c","type":"subflow","name":"pal-Data","info":"","category":"nodePallette","in":[{"x":540,"y":160,"wires":[{"id":"23b85a23.471646"}]}],"out":[{"x":1180,"y":160,"wires":[{"id":"99d8dfe0.936fc","port":0}]}],"env":[],"meta":{},"color":"#f59c3d"},{"id":"99d8dfe0.936fc","type":"api-call-service","z":"530a946a.c1a54c","name":"BadHass","server":"","version":1,"debugenabled":false,"service_domain":"{{payload.domain}}","service":"{{payload.service}}","entityId":"{{payload.entityid}}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1000,"y":160,"wires":[[]]},{"id":"6754d793.ce5b38","type":"function","z":"530a946a.c1a54c","name":"noData","func":"newmsg={}\nnewmsg.payload={\n    domain:msg.domain,\n    service:msg.service,\n    entityid:msg.entityid,\n}\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":180,"wires":[["99d8dfe0.936fc"]]},{"id":"a36f1abc.236c08","type":"function","z":"530a946a.c1a54c","name":"data","func":"newmsg={}\nnewmsg.payload={\n    domain:msg.domain,\n    service:msg.service,\n    entityid:msg.entityid,\n    data:{\n        \"brightness\":msg.data.brightness,\n        \"color_name\":msg.data.color_name,\n        \"kelvin\":msg.data.kelvin,\n        \"transition\":msg.data.transition,\n        \"brightness_pct\": msg.data.brightness_pct,\n        \"brightness_step_pct\": msg.data.brightness_step_pct,\n        \"profile\": msg.data.profile,\n        \"flash\": msg.data.flash,\n        \"effect\": msg.data.effect,\n        \"temperature\":msg.data.temperature,\n        \"position\":msg.data.position\n    }\n}\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":140,"wires":[["99d8dfe0.936fc"]]},{"id":"23b85a23.471646","type":"switch","z":"530a946a.c1a54c","name":"dataSwitch","property":"data","propertyType":"msg","rules":[{"t":"nempty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":160,"wires":[["a36f1abc.236c08"],["6754d793.ce5b38"]]},{"id":"304c693c.e92b36","type":"subflow","name":"pal-OOFState","info":"","category":"nodePallette","in":[{"x":200,"y":140,"wires":[{"id":"9501df06.5b7da"}]}],"out":[{"x":620,"y":100,"wires":[{"id":"5ed54fd6.2684e","port":1}]},{"x":620,"y":180,"wires":[{"id":"32901bf3.574db4","port":0}]}],"env":[],"meta":{},"color":"#f59c3d","outputLabels":["On","Off"]},{"id":"5ed54fd6.2684e","type":"api-current-state","z":"304c693c.e92b36","name":"state","server":"","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"{{entityid}}","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":470,"y":120,"wires":[[],[]]},{"id":"9501df06.5b7da","type":"switch","z":"304c693c.e92b36","name":"OOF","property":"service","propertyType":"msg","rules":[{"t":"eq","v":"turn_on","vt":"str"},{"t":"eq","v":"turn_off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":310,"y":140,"wires":[["5ed54fd6.2684e"],["32901bf3.574db4"]]},{"id":"32901bf3.574db4","type":"api-current-state","z":"304c693c.e92b36","name":"state","server":"","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"{{entityid}}","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":470,"y":160,"wires":[[],[]]},{"id":"a99b75c0.4cc7b8","type":"subflow","name":"pal-Join","info":"","category":"nodePallette","in":[{"x":680,"y":280,"wires":[{"id":"26419813.5a7268"}]}],"out":[{"x":900,"y":280,"wires":[{"id":"26419813.5a7268","port":0}]}],"env":[],"meta":{},"color":"#f59c3d"},{"id":"26419813.5a7268","type":"join","z":"a99b75c0.4cc7b8","name":"","mode":"custom","build":"string","property":"entityid","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"0.25","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":790,"y":280,"wires":[[]]},{"id":"4db14326.81f06c","type":"subflow","name":"pal-OnOff","info":"","category":"nodePallette","in":[{"x":680,"y":380,"wires":[{"id":"5baa26cd.e88198"}]}],"out":[{"x":1260,"y":340,"wires":[{"id":"f6684654.1b7d58","port":0},{"id":"5baa26cd.e88198","port":0}]},{"x":1260,"y":400,"wires":[{"id":"f2093d3b.70028","port":0},{"id":"5baa26cd.e88198","port":1}]}],"env":[],"meta":{},"color":"#f59c3d"},{"id":"3727d155.810bde","type":"switch","z":"4db14326.81f06c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":970,"y":460,"wires":[["f6684654.1b7d58"],["f6684654.1b7d58"],["f2093d3b.70028"],["f2093d3b.70028"]]},{"id":"f6684654.1b7d58","type":"change","z":"4db14326.81f06c","name":"On","rules":[{"t":"set","p":"service","pt":"msg","to":"turn_on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":420,"wires":[[]]},{"id":"f2093d3b.70028","type":"change","z":"4db14326.81f06c","name":"Off","rules":[{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":500,"wires":[[]]},{"id":"5baa26cd.e88198","type":"switch","z":"4db14326.81f06c","name":"","property":"service","propertyType":"msg","rules":[{"t":"eq","v":"turn_on","vt":"str"},{"t":"eq","v":"turn_off","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":810,"y":380,"wires":[[],[],["3727d155.810bde"]]},{"id":"2ad5208e.c6d02","type":"subflow","name":"SCN-KUCabs","info":"","category":"nodescenes","in":[{"x":140,"y":400,"wires":[{"id":"9d5933e9.c3f92"}]}],"out":[{"x":1360,"y":400,"wires":[{"id":"9cf8d7f5.b1b2d8","port":0},{"id":"4f69e92e.523658","port":0}]}],"env":[],"meta":{},"color":"#3ecf65"},{"id":"6aff0513.92f85c","type":"change","z":"2ad5208e.c6d02","name":"KitchCab1","rules":[{"t":"set","p":"entityid","pt":"msg","to":"switch.kitchen_cabinet_1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":280,"wires":[["cf017b66.708318"]]},{"id":"594352ee.ba8e2c","type":"change","z":"2ad5208e.c6d02","name":"KitchCab3","rules":[{"t":"set","p":"entityid","pt":"msg","to":"switch.kitchen_cabinet_3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":320,"wires":[["cf017b66.708318"]]},{"id":"35e7486.246d7b8","type":"change","z":"2ad5208e.c6d02","name":"TeaCab1","rules":[{"t":"set","p":"entityid","pt":"msg","to":"switch.tea_cabinet_1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":360,"wires":[["cf017b66.708318"]]},{"id":"6b697ef8.9a942","type":"change","z":"2ad5208e.c6d02","name":"Switch","rules":[{"t":"set","p":"domain","pt":"msg","to":"switch","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":340,"wires":[["6aff0513.92f85c","594352ee.ba8e2c","35e7486.246d7b8"]]},{"id":"9d5933e9.c3f92","type":"subflow:4db14326.81f06c","z":"2ad5208e.c6d02","name":"","x":260,"y":400,"wires":[["6b697ef8.9a942","b7137715.d64408"],["6b697ef8.9a942","b7137715.d64408"]]},{"id":"27cf0989.9545c6","type":"subflow:a99b75c0.4cc7b8","z":"2ad5208e.c6d02","name":"","env":[],"x":1020,"y":320,"wires":[["4f69e92e.523658"]]},{"id":"1435ff19.c8a901","type":"change","z":"2ad5208e.c6d02","name":"TeaCab2","rules":[{"t":"set","p":"entityid","pt":"msg","to":"switch.tea_cabinet_2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":420,"wires":[["40a3ec82.e32b64"]]},{"id":"75262b94.7bc1c4","type":"change","z":"2ad5208e.c6d02","name":"Kitchen2","rules":[{"t":"set","p":"entityid","pt":"msg","to":"light.kitchen_2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":460,"wires":[["40a3ec82.e32b64"]]},{"id":"b28ef26e.9130c","type":"change","z":"2ad5208e.c6d02","name":"Kitchen4","rules":[{"t":"set","p":"entityid","pt":"msg","to":"light.kitchen_4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":500,"wires":[["40a3ec82.e32b64"]]},{"id":"b7137715.d64408","type":"change","z":"2ad5208e.c6d02","name":"Off","rules":[{"t":"set","p":"service","pt":"msg","to":"turn_off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":460,"wires":[["6da000af.ff12d"]]},{"id":"40a3ec82.e32b64","type":"subflow:a99b75c0.4cc7b8","z":"2ad5208e.c6d02","name":"","x":1020,"y":460,"wires":[["9cf8d7f5.b1b2d8"]]},{"id":"6da000af.ff12d","type":"change","z":"2ad5208e.c6d02","name":"Switch","rules":[{"t":"set","p":"domain","pt":"msg","to":"switch","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":460,"wires":[["1435ff19.c8a901","75262b94.7bc1c4","b28ef26e.9130c"]]},{"id":"cf017b66.708318","type":"subflow:304c693c.e92b36","z":"2ad5208e.c6d02","name":"","x":850,"y":320,"wires":[["27cf0989.9545c6"],["27cf0989.9545c6"]]},{"id":"fab6c649.77c6b8","type":"comment","z":"2ad5208e.c6d02","name":"SCN-KUCabs","info":"","x":280,"y":340,"wires":[]},{"id":"4f69e92e.523658","type":"subflow:530a946a.c1a54c","z":"2ad5208e.c6d02","name":"","x":1200,"y":320,"wires":[[]]},{"id":"9cf8d7f5.b1b2d8","type":"subflow:530a946a.c1a54c","z":"2ad5208e.c6d02","name":"","x":1200,"y":460,"wires":[[]]}]

This approach also makes it easy to repurpose each scene in NR without worrying about the input (turn_on, on, true are branched in pal-OnOff), so you can attach them to Inovelli, schedules, presence flows, NR HASS Switch entities, etc. Acknowledged, you could do the same by calling HASS scripts or scenes/automations, but I prefer Node Red’s functionality and visual object-oriented approach for automation and scene management. That said, the Websocket API is still foreign territory to me, and surely there’s a more efficient way to set/pass variables to HASS. Mushroom’s pass-nodeID solution looks interesting - need to understand it better to see if it can clean up my sprawling Inovelli Switch flow!

2 Likes

Looks like we now have the ability to multicast our parameters to end devices, which is super exciting for both notifications and parameter changes.

I am not as well versed in this, so I’d like to understand the following:

  1. What command class should I be using?
  2. I assume no endpoint for switches/dimmers, 1 for fan/light light and 2 for fan/light fan?
  3. Is property the same a parameter?
  4. Does value need formatting for Inovelli as a string or number or is it by parameter?

@jtronicus have you tested out this feature yet?
@BuilderTroy @harmfulmushroom I’d love to see something in Node Red as a test flow if you have this integrated.

Do we know who the ha-inovelli-manager dev is to try and get this integrated into his suite as a new node?

Edit: @EricM_Inovelli might have the best authority to speak on such items. Exciting development on the HA side!

The Command Class to use depends on what you are trying to change.

Command Class Command Class Name Use
38 Multilevel Switch On, Off, and Brightness on Dimmer or fan
37 Binary Switch On and Off on Switch
112 Configuration Config parameters

For the Dimmer or Switch, no endpoint (endpoint 0 might work too). For the light/fan, it depends on what you are trying to do. For light/fan speed settings, use endpoint 1 for the light, and endpoint 2 for the fan. For config values, either use no endpoint, or endpoint 0.

For config parameters, yes, I believe it should be the parameter #. However, for things light on/off/brightness, it will be something like “targetValue”

For parameters, you should be able to pass as a number (I dont know if passing the list value as a string will work)

I played around with it for a couple minutes, but not long enough to get anything to actually work.

This already exists in node-red (Its in the “Call Service” node)

image

3 Likes

Thanks! Was aware on call service but the ha Inovelli manager nodes do a lot of the translation and Inovelli math, was hoping we could pass that along.

Or maybe I take the output and change it to this service and then specify multiple entities.

Will try and report back, fun weekend ahead!

1 Like

This post has been playing in the back of my mind since you posted it @kreene1987 and thanks for the initial info @jtronicus.

I haven’t done anything with it because I am lamenting rewriting my set parameter subflow again for the fourth time (HA Zwave, openZwave, and now zwavejs) but I do have a lot of routines that call notifications to all switches in the house.

Does anyone know if this is more efficient than just calling ZWAVE_JS.SET_CONFIG_PARAMETER with a list of entityIds? I don’t know if, under the covers, set_config_parameter uses multicast to deliver the payloads in a single call or loops through and calls each switch individually. I would suspect it’s the latter because when I do it on 25+ switches they don’t all actuate at the exact same time. In that case, this would be better.

I will have to play around with this when I get some free time. Thanks for the heads up!

1 Like

Well, I could not help myself and implemented this into my calls last night. So far, with limited testing, it seems to be working pretty well! I have 20+ inovelli switches and the notifications get to them pretty much at the same time. Works really well with the pulse notification. For the fast blink notification, you can see where the timing is just a little bit different but I think that is the connection time delta between each switch and hub.

Here is my subflow for setting inovelli parameters:

[{"id":"37a3d696.66d9ca","type":"subflow","name":"zwaveJs Set Parameter","info":"entity_id: A entity ID to update or a list of entity ids\n\nparamater: The parameter number to update\n\nvalue: The value to update to\n\n**Note - Only works for Inovelli right now**","category":"zwave JS","in":[{"x":60,"y":80,"wires":[{"id":"cab081c3.d8dc6"},{"id":"4d71eb57a7ff3d60"}]}],"out":[{"x":420,"y":320,"wires":[{"id":"1f125191.64d9ce","port":0},{"id":"e0b5d6b70fe73c6d","port":0}]}],"env":[{"name":"entity_id","type":"num","value":""},{"name":"parameter","type":"num","value":""},{"name":"value","type":"num","value":""},{"name":"bulkset","type":"bool","value":"false"}],"meta":{},"color":"#3FADB5","icon":"node-red/feed.svg","status":{"x":320,"y":400,"wires":[{"id":"73980a91.d6e174","port":0}]}},{"id":"73980a91.d6e174","type":"status","z":"37a3d696.66d9ca","name":"","scope":null,"x":180,"y":400,"wires":[[]]},{"id":"1f125191.64d9ce","type":"api-call-service","z":"37a3d696.66d9ca","name":"Send Notification","server":"d95f14bd.dd8408","version":3,"debugenabled":false,"service_domain":"zwave_js","service":"set_config_parameter","entityId":"","data":"{\t   \"entity_id\": msg.payload.entity_id,\t   \"parameter\": msg.payload.parameter,\t   \"value\": msg.payload.value\t    }","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":210,"y":340,"wires":[[]],"info":"Requires 2 parameters:\n\nnode_id: <int> the zwave node to send the notification to\n\nvalue: <int> The notification to set"},{"id":"cab081c3.d8dc6","type":"switch","z":"37a3d696.66d9ca","name":"Check Entity Id","property":"payload.entity_id","propertyType":"msg","rules":[{"t":"nempty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":200,"y":80,"wires":[["d4b3854d.ed6318"],["b8e236da.c83698"]]},{"id":"b8e236da.c83698","type":"change","z":"37a3d696.66d9ca","name":"Set Entity Id From Env","rules":[{"t":"set","p":"payload.entity_id","pt":"msg","to":"entity_id","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":140,"wires":[["d4b3854d.ed6318"]]},{"id":"d4b3854d.ed6318","type":"switch","z":"37a3d696.66d9ca","name":"Check Parameter","property":"payload.parameter","propertyType":"msg","rules":[{"t":"istype","v":"number","vt":"number"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":80,"wires":[["a1963883.d6a488"],["3499d0b2.5c10a"]]},{"id":"3499d0b2.5c10a","type":"change","z":"37a3d696.66d9ca","name":"Set Parameter From Env","rules":[{"t":"set","p":"payload.parameter","pt":"msg","to":"parameter","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":140,"wires":[["a1963883.d6a488"]]},{"id":"a1963883.d6a488","type":"switch","z":"37a3d696.66d9ca","name":"Check Value","property":"payload.value","propertyType":"msg","rules":[{"t":"istype","v":"string","vt":"string"},{"t":"istype","v":"number","vt":"number"},{"t":"eq","v":"","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":770,"y":80,"wires":[["440f6b9d.fb9ec4"],["440f6b9d.fb9ec4"],["d60dca86.2ec268"]]},{"id":"d60dca86.2ec268","type":"change","z":"37a3d696.66d9ca","name":"Set Parameter From Env","rules":[{"t":"set","p":"payload.value","pt":"msg","to":"value","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":140,"wires":[["440f6b9d.fb9ec4"]]},{"id":"440f6b9d.fb9ec4","type":"switch","z":"37a3d696.66d9ca","name":"Check bulkset call required","property":"bulkset","propertyType":"env","rules":[{"t":"true"},{"t":"false"}],"checkall":"false","repair":false,"outputs":2,"x":1080,"y":100,"wires":[["e3a578c68106d2f6","e0b5d6b70fe73c6d"],["1f125191.64d9ce"]]},{"id":"e011d69b.f36668","type":"api-call-service","z":"37a3d696.66d9ca","name":"Send bulkset Notification","server":"d95f14bd.dd8408","version":3,"debugenabled":false,"service_domain":"zwave_js","service":"bulk_set_partial_config_parameters","entityId":"","data":"{\t   \"entity_id\": msg.payload.entity_id,\t   \"parameter\": msg.payload.parameter,\t   \"value\": msg.payload.value\t    }","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":230,"y":520,"wires":[[]],"info":"Requires 2 parameters:\n\nnode_id: <int> the zwave node to send the notification to\n\nvalue: <int> The notification to set"},{"id":"e3a578c68106d2f6","type":"debug","z":"37a3d696.66d9ca","d":true,"name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1290,"y":240,"wires":[]},{"id":"4d71eb57a7ff3d60","type":"debug","z":"37a3d696.66d9ca","d":true,"name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":180,"y":220,"wires":[]},{"id":"e0b5d6b70fe73c6d","type":"api-call-service","z":"37a3d696.66d9ca","name":"Send Multicast Notification","server":"db33d3d6.a05ce","version":3,"debugenabled":false,"service_domain":"zwave_js","service":"multicast_set_value","entityId":"","data":"{\t   \"entity_id\": msg.payload.entity_id,\t   \"command_class\": \"112\",\t   \"property\": msg.payload.parameter,\t   \"value\": msg.payload.value\t   }\t\t/*    \t   \"broadcast\": \"true\"\t\"entity_id\": msg.payload.entity_id, \t*/\t","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":240,"y":300,"wires":[[]]},{"id":"4b42e03dac3a6a21","type":"comment","z":"37a3d696.66d9ca","name":"The old bulkset multiparameter call - Replaced with multicast","info":"","x":340,"y":480,"wires":[]},{"id":"d95f14bd.dd8408","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"db33d3d6.a05ce","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

This link is also a good resource for how use use it: Link

3 Likes