Alternative to LED node

I've been using the dashboard LED node for several of my flows but it lacks one feature... flashing. Does anyone know of a alternative node with the same features as the LED node but with the option of flashing?

I have written a subflow that allows you to flash the LED node....
If you want, I can share it with you.

Not too difficult to use.

Here's a simple flow to show you it working.

[{"id":"1bc21d7f6ceb5285","type":"subflow","name":"Blinker","info":"2021 12 7  \nA subflow to send pulsing messages at a given interval to make something *flash*.\n\nConfigurable by setting `environment` variables in the node's settings.\n\n\n# **Output toggle node to send alternating messages at a specified frequency.**\n# \n\n## 3 things need to be set to configure this subflow\n1 - `delay`:  milliseconds between toggles (override with msg.delay)\n\n2 - `msg1`:   text message for state 1  \n\n3 - `msg2`:   text message for state 2 \n\n`msg.topic` is output and alternates between `msg1` and `msg2` to indicate which message is being sent.\n\n## Optional:\n`offmsg` - sent when it is reset.\n\nMay be handy to make sure things are *off*.\n\n## Input message\nTo start send `msg` (anything)\n\nTo stop, send `msg.reset`","category":"","in":[{"x":60,"y":180,"wires":[{"id":"3a95f6976aee6fd0"}]}],"out":[{"x":930,"y":170,"wires":[{"id":"a655faf0bc379507","port":0},{"id":"f3b2b2634e2662cd","port":0}]},{"x":930,"y":220,"wires":[{"id":"f3b2b2634e2662cd","port":1}]}],"env":[{"name":"delay","type":"num","value":""},{"name":"msg1","type":"str","value":""},{"name":"msg2","type":"str","value":""},{"name":"offmsg","type":"str","value":""}],"meta":{"module":"Toggler","version":"0.1.1","desc":"Toggles output between `msg1` and `msg2` set in node config"},"color":"#A6BBCF","icon":"node-red-contrib-bool-gate/switch.png","status":{"x":930,"y":270,"wires":[{"id":"502c279ae9a6f385","port":0}]}},{"id":"c53ebcc9e62a7552","type":"trigger","z":"1bc21d7f6ceb5285","name":"resend every x","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-1","extend":false,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":400,"y":180,"wires":[["f3b2b2634e2662cd"]]},{"id":"f3b2b2634e2662cd","type":"function","z":"1bc21d7f6ceb5285","name":"2022 02 26 *","func":"delete msg.delay;\nconst msgnull = null;\nconst msgS = {};\nlet c = context.get(\"counter\") ||0;\ncontext.set(\"counter\",((c + 1) % 2));\n\nif (c == 0) {\n    //  0\n    msg.payload = env.get(\"msg1\");\n    msg.topic = \"msg1\";\n    //\n    msgS.payload =c;\n    return[msg,msgnull,msgS];\n    //\n} else if (c == 1) {\n    //  1\n    msg.payload = env.get(\"msg2\");\n    msg.topic = \"msg2\";\n    //\n    msgS.payload =c;\n    return[msgnull,msg,msgS];\n    //\n};\n\n//msgS.payload = c;\n//return [msg,msgS];\n","outputs":3,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":180,"wires":[[],[],["502c279ae9a6f385"]],"outputLabels":["msgA","msgB","which message"],"info":"This has 2 outputs to allow message modification straight out of subflowl\n`msg.stop` is sent to only the first output"},{"id":"c183245c1a6a7fac","type":"switch","z":"1bc21d7f6ceb5285","name":"is reset?","property":"reset","propertyType":"msg","rules":[{"t":"nnull"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":270,"wires":[["a9be61803cd67654","6e3a0cdb44f6a994"]]},{"id":"a9be61803cd67654","type":"switch","z":"1bc21d7f6ceb5285","name":"off msg?","property":"offmsg","propertyType":"env","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":580,"y":230,"wires":[["a655faf0bc379507"]]},{"id":"a655faf0bc379507","type":"change","z":"1bc21d7f6ceb5285","name":"set off message","rules":[{"t":"set","p":"payload","pt":"msg","to":"offmsg","tot":"env"},{"t":"delete","p":"reset","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":230,"wires":[[]]},{"id":"502c279ae9a6f385","type":"function","z":"1bc21d7f6ceb5285","name":"status","func":"const c = msg.payload;\n\nif (c == 0) {\n    msg.payload = ({text: \"msg1\"});\n} else if (c == 1) {\n    msg.payload = ({text: \"msg2\"});\n} else {\n    msg.payload = ({text:\"\"});\n};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":270,"wires":[[]]},{"id":"6e3a0cdb44f6a994","type":"change","z":"1bc21d7f6ceb5285","name":"reset","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":270,"wires":[["502c279ae9a6f385"]]},{"id":"3a95f6976aee6fd0","type":"function","z":"1bc21d7f6ceb5285","name":"set msg.delay","func":"msg.delay = msg.delay || env.get(\"delay\") || 1000;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":200,"y":180,"wires":[["c53ebcc9e62a7552","c183245c1a6a7fac"]]},{"id":"46775f3b70d92045","type":"subflow:1bc21d7f6ceb5285","z":"d188b95f33e5f7e4","name":"","env":[{"name":"delay","value":"600","type":"num"},{"name":"msg1","value":"red","type":"str"},{"name":"msg2","value":"green","type":"str"},{"name":"offmsg","value":"grey","type":"str"}],"x":620,"y":2200,"wires":[["56da8649ad287965"],["56da8649ad287965"]]},{"id":"17b8eb2b0e1f6208","type":"inject","z":"d188b95f33e5f7e4","name":"Stop","props":[{"p":"reset","v":"reset","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":480,"y":2180,"wires":[["46775f3b70d92045"]]},{"id":"ab8e4abc22812746","type":"inject","z":"d188b95f33e5f7e4","name":"Start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":480,"y":2220,"wires":[["46775f3b70d92045"]]},{"id":"56da8649ad287965","type":"ui_led","z":"d188b95f33e5f7e4","order":36,"group":"b6e331a5.2f4008","width":0,"height":0,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"red","valueType":"str"},{"color":"#008000","value":"green","valueType":"str"},{"color":"#808080","value":"grey","valueType":"str"}],"allowColorForValueInMessage":true,"shape":"circle","showGlow":true,"name":"","x":790,"y":2190,"wires":[]},{"id":"b6e331a5.2f4008","type":"ui_group","name":"Colour names","tab":"b306f79f.9a0768","order":4,"disp":true,"width":"12","collapse":false},{"id":"b306f79f.9a0768","type":"ui_tab","name":"Colour Names","icon":"dashboard","order":6,"disabled":false,"hidden":false}]

Thanks... I'll give this a try.

Sorry for the poor doc's. I am not good at them.

But the flow should get you going.

I just loaded and tested it... seems pretty straight forward.

1 Like

Thanks.

Nice to know I sometimes write handy stuff. :wink:
I think I wrote it for the exact same reason you mentioned.

There is a quirk of the two outputs. Not sure why I did it that way, but at the time it seemed better.

Something to do with if you wanted a pulsing output - which: yes, you can get from the trigger node but while I was doing this, I thought I would offer a similar thing - I think.

I do have a quick question... if I want to pass the values of msg1, msg2 and offmsg via a function node. Is it via msg1.payload or 3 individual msg values?

I'm not sure what you mean.

You change the msg1, msg2 and offmsg payloads by double clicking on the subflow node and changing them there.

I've successfully done that... the feature I need and am asking how to do, is if I place a Function node in front of the Blinker node. How can I set the values of msg1, msg2 and offmsg in the Blinker node via the Function node. I'm trying to test how to dynamically change the color values

Ah. Ok.

You could but it is a bit of a cheat way.
I didn't design it to do this, but.....

How good are you with understanding context in a function node?

You will need 2 x function nodes on each output of blinker.
Set it to send a very basic set of messages.
A B and OFF - to say.

Then you have your "new" messages you want to be sent in inject nodes.
Hang on I'll knock a flow up for you.
(the gremlins are out of their boxes. It may take some time)

Here's the code:

[{"id":"1bc21d7f6ceb5285","type":"subflow","name":"Blinker","info":"2021 12 7  \nA subflow to send pulsing messages at a given interval to make something *flash*.\n\nConfigurable by setting `environment` variables in the node's settings.\n\n\n# **Output toggle node to send alternating messages at a specified frequency.**\n# \n\n## 3 things need to be set to configure this subflow\n1 - `delay`:  milliseconds between toggles (override with msg.delay)\n\n2 - `msg1`:   text message for state 1  \n\n3 - `msg2`:   text message for state 2 \n\n`msg.topic` is output and alternates between `msg1` and `msg2` to indicate which message is being sent.\n\n## Optional:\n`offmsg` - sent when it is reset.\n\nMay be handy to make sure things are *off*.\n\n## Input message\nTo start send `msg` (anything)\n\nTo stop, send `msg.reset`","category":"","in":[{"x":60,"y":180,"wires":[{"id":"3a95f6976aee6fd0"}]}],"out":[{"x":930,"y":170,"wires":[{"id":"a655faf0bc379507","port":0},{"id":"f3b2b2634e2662cd","port":0}]},{"x":930,"y":220,"wires":[{"id":"f3b2b2634e2662cd","port":1}]}],"env":[{"name":"delay","type":"num","value":""},{"name":"msg1","type":"str","value":""},{"name":"msg2","type":"str","value":""},{"name":"offmsg","type":"str","value":""}],"meta":{"module":"Toggler","version":"0.1.1","desc":"Toggles output between `msg1` and `msg2` set in node config"},"color":"#A6BBCF","icon":"node-red-contrib-bool-gate/switch.png","status":{"x":930,"y":270,"wires":[{"id":"502c279ae9a6f385","port":0}]}},{"id":"c53ebcc9e62a7552","type":"trigger","z":"1bc21d7f6ceb5285","name":"resend every x","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-1","extend":false,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":400,"y":180,"wires":[["f3b2b2634e2662cd"]]},{"id":"f3b2b2634e2662cd","type":"function","z":"1bc21d7f6ceb5285","name":"2022 02 26 *","func":"delete msg.delay;\nconst msgnull = null;\nconst msgS = {};\nlet c = context.get(\"counter\") ||0;\ncontext.set(\"counter\",((c + 1) % 2));\n\nif (c == 0) {\n    //  0\n    msg.payload = env.get(\"msg1\");\n    msg.topic = \"msg1\";\n    //\n    msgS.payload =c;\n    return[msg,msgnull,msgS];\n    //\n} else if (c == 1) {\n    //  1\n    msg.payload = env.get(\"msg2\");\n    msg.topic = \"msg2\";\n    //\n    msgS.payload =c;\n    return[msgnull,msg,msgS];\n    //\n};\n\n//msgS.payload = c;\n//return [msg,msgS];\n","outputs":3,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":180,"wires":[[],[],["502c279ae9a6f385"]],"outputLabels":["msgA","msgB","which message"],"info":"This has 2 outputs to allow message modification straight out of subflowl\n`msg.stop` is sent to only the first output"},{"id":"c183245c1a6a7fac","type":"switch","z":"1bc21d7f6ceb5285","name":"is reset?","property":"reset","propertyType":"msg","rules":[{"t":"nnull"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":270,"wires":[["a9be61803cd67654","6e3a0cdb44f6a994"]]},{"id":"a9be61803cd67654","type":"switch","z":"1bc21d7f6ceb5285","name":"off msg?","property":"offmsg","propertyType":"env","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":580,"y":230,"wires":[["a655faf0bc379507"]]},{"id":"a655faf0bc379507","type":"change","z":"1bc21d7f6ceb5285","name":"set off message","rules":[{"t":"set","p":"payload","pt":"msg","to":"offmsg","tot":"env"},{"t":"delete","p":"reset","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":230,"wires":[[]]},{"id":"502c279ae9a6f385","type":"function","z":"1bc21d7f6ceb5285","name":"status","func":"const c = msg.payload;\n\nif (c == 0) {\n    msg.payload = ({text: \"msg1\"});\n} else if (c == 1) {\n    msg.payload = ({text: \"msg2\"});\n} else {\n    msg.payload = ({text:\"\"});\n};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":270,"wires":[[]]},{"id":"6e3a0cdb44f6a994","type":"change","z":"1bc21d7f6ceb5285","name":"reset","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":270,"wires":[["502c279ae9a6f385"]]},{"id":"3a95f6976aee6fd0","type":"function","z":"1bc21d7f6ceb5285","name":"set msg.delay","func":"msg.delay = msg.delay || env.get(\"delay\") || 1000;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":200,"y":180,"wires":[["c53ebcc9e62a7552","c183245c1a6a7fac"]]},{"id":"f8ef6ba35cd69bc7","type":"function","z":"d188b95f33e5f7e4","name":"A","func":"if (msg.topic == \"NEW\")\n{\n    //\n    context.set(\"A\",msg.payload);\n}\nmsg.payload = context.get(\"A\") || msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":3280,"y":3760,"wires":[["56df9530e2b1219e"]]},{"id":"8ea816062ac42e20","type":"subflow:1bc21d7f6ceb5285","z":"d188b95f33e5f7e4","name":"","env":[{"name":"delay","value":"800","type":"num"},{"name":"msg1","value":"A","type":"str"},{"name":"msg2","value":"B","type":"str"},{"name":"offmsg","value":"OFF","type":"str"}],"x":3140,"y":3790,"wires":[["f8ef6ba35cd69bc7"],["3d63093ae4838065"]]},{"id":"54e2e030014f9d76","type":"inject","z":"d188b95f33e5f7e4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"NEW","payload":"Boo","payloadType":"str","x":3130,"y":3670,"wires":[["f8ef6ba35cd69bc7"]]},{"id":"236e897564dabefd","type":"inject","z":"d188b95f33e5f7e4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"NEW","payload":"FOO","payloadType":"str","x":3130,"y":3630,"wires":[["f8ef6ba35cd69bc7"]]},{"id":"2c94dfb03305741e","type":"inject","z":"d188b95f33e5f7e4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"NEW","payload":"A","payloadType":"str","x":3120,"y":3590,"wires":[["f8ef6ba35cd69bc7"]]},{"id":"56df9530e2b1219e","type":"debug","z":"d188b95f33e5f7e4","name":"OUTPUT","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":3430,"y":3790,"wires":[]},{"id":"4fc7d4c95852a5b5","type":"inject","z":"d188b95f33e5f7e4","name":"Stop","props":[{"p":"reset","v":"reset","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":3000,"y":3770,"wires":[["8ea816062ac42e20"]]},{"id":"d231c0d2619eb2a2","type":"inject","z":"d188b95f33e5f7e4","name":"Go","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":3000,"y":3810,"wires":[["8ea816062ac42e20"]]},{"id":"3d63093ae4838065","type":"function","z":"d188b95f33e5f7e4","name":"B","func":"if (msg.topic == \"NEW\")\n{\n    //\n    context.set(\"B\",msg.payload);\n}\nmsg.payload = context.get(\"B\") || msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":3280,"y":3810,"wires":[["56df9530e2b1219e"]]}]

Start the cycle.
You will see the A and B coming out.

Inject either FOO or Boo and you see how the message changes.
If you want to put it back to normal, inject the A.

I only did it for the A output to show you.

I hope you get the idea.

Any luck with that new flow allowing you to change the message?

Edit: Perhaps this is basically the same as @Trying_to_learn's method. He likes subflows though and I don't so I have not downloaded that version.

You can flash a dashboard LED like this
Untitled 3

[{"id":"91211563d82bfe8c","type":"ui_led","z":"ebe721b4236762ee","order":2,"group":"a2a6c7f2.1f0b5","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"on","valueType":"str"},{"color":"#c0c0c0","value":"off","valueType":"str"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":470,"y":140,"wires":[]},{"id":"58b4d028ec14b3b1","type":"ui_button","z":"ebe721b4236762ee","name":"","group":"a2a6c7f2.1f0b5","order":2,"width":"2","height":"1","passthru":false,"label":"Go","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"go","payloadType":"str","topic":"topic","topicType":"msg","x":110,"y":60,"wires":[["f45f56c0d527f401"]]},{"id":"8d70aa95ef56bc2e","type":"ui_button","z":"ebe721b4236762ee","name":"","group":"a2a6c7f2.1f0b5","order":2,"width":"2","height":"1","passthru":false,"label":"Stop","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Stop","payloadType":"str","topic":"topic","topicType":"msg","x":110,"y":100,"wires":[["f45f56c0d527f401"]]},{"id":"15ad62b011de4848","type":"group","z":"ebe721b4236762ee","name":"Blink","style":{"label":true},"nodes":["f45f56c0d527f401","4a6b263fa8aa5389"],"x":194,"y":39,"w":212,"h":142},{"id":"f45f56c0d527f401","type":"trigger","z":"ebe721b4236762ee","g":"15ad62b011de4848","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-1","extend":false,"overrideDelay":false,"units":"s","reset":"Stop","bytopic":"all","topic":"topic","outputs":1,"x":300,"y":80,"wires":[["4a6b263fa8aa5389"]]},{"id":"4a6b263fa8aa5389","type":"trigger","z":"ebe721b4236762ee","g":"15ad62b011de4848","name":"250ms blink","op1":"on","op2":"off","op1type":"str","op2type":"str","duration":"500","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":310,"y":140,"wires":[["91211563d82bfe8c"]]},{"id":"a2a6c7f2.1f0b5","type":"ui_group","name":"Default","tab":"d3e8c5a7.3d3a68","order":1,"disp":true,"width":"6","collapse":false},{"id":"d3e8c5a7.3d3a68","type":"ui_tab","name":"Home","icon":"dashboard","order":1}]

@Trying_to_learn
Thanks for the sample but it wasn't quite what I was trying to accomplish. Here is my specific objective:

I will have msg.payload value coming into a Function node. The status will be "open", "close", "opening" or "closing". My objective is to have Blinker turn off (grey) when status is "closed", red when "open" and flashing red/yellow when either "opening" or "closing". So I was attempting to place a Function node ahead of Blinker and then via code send msg1, msg2 or offmsg values to Blinker.

@jbudd
Thanks for the example... I'm wasn't familiar with those nodes but will do some testing using your example.

Curious though, what's the resistance to subflows (asking because I'm not knowledgeable with the pro/con of using them)?

slightly modified @jbudd s flow to get what you want, I hope.

[{"id":"91211563d82bfe8c","type":"ui_led","z":"75b84afc99214ed3","order":1,"group":"a2a6c7f2.1f0b5","width":1,"height":1,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"red","valueType":"str"},{"color":"#c0c0c0","value":"silver","valueType":"str"},{"color":"#fff700","value":"yellow","valueType":"str"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":830,"y":1620,"wires":[]},{"id":"58b4d028ec14b3b1","type":"ui_button","z":"75b84afc99214ed3","name":"","group":"a2a6c7f2.1f0b5","order":3,"width":2,"height":1,"passthru":false,"label":"Open","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"open","payloadType":"str","topic":"topic","topicType":"msg","x":230,"y":1580,"wires":[["665b0acaa9b0e8f1","60a104da52bba0b6"]]},{"id":"8d70aa95ef56bc2e","type":"ui_button","z":"75b84afc99214ed3","name":"","group":"a2a6c7f2.1f0b5","order":4,"width":2,"height":1,"passthru":false,"label":"Close","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"close","payloadType":"str","topic":"topic","topicType":"msg","x":230,"y":1620,"wires":[["665b0acaa9b0e8f1","25b46585e474851e"]]},{"id":"41b09b6cd69e73c7","type":"ui_button","z":"75b84afc99214ed3","name":"","group":"a2a6c7f2.1f0b5","order":5,"width":2,"height":1,"passthru":false,"label":"Opening","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"opening","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":1660,"wires":[["9724a84249393e66"]]},{"id":"665b0acaa9b0e8f1","type":"change","z":"75b84afc99214ed3","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1660,"wires":[["9724a84249393e66"]]},{"id":"6d98347ca67bfb7b","type":"ui_button","z":"75b84afc99214ed3","name":"","group":"a2a6c7f2.1f0b5","order":6,"width":2,"height":1,"passthru":false,"label":"Closing","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"closing","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":1700,"wires":[["9724a84249393e66"]]},{"id":"60a104da52bba0b6","type":"change","z":"75b84afc99214ed3","name":"Red-Open","rules":[{"t":"set","p":"payload","pt":"msg","to":"red","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1580,"wires":[["ac7d1f8324788f3b","91211563d82bfe8c"]]},{"id":"25b46585e474851e","type":"change","z":"75b84afc99214ed3","name":"grey-Close","rules":[{"t":"set","p":"payload","pt":"msg","to":"silver","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1620,"wires":[["ac7d1f8324788f3b","91211563d82bfe8c"]]},{"id":"ac7d1f8324788f3b","type":"delay","z":"75b84afc99214ed3","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":650,"y":1540,"wires":[["91211563d82bfe8c"]]},{"id":"96f33dee7e966d74","type":"comment","z":"75b84afc99214ed3","name":"to avoid blinker stopping at red/yellow and not silver","info":"","x":920,"y":1540,"wires":[]},{"id":"bd56834c7647b15f","type":"group","z":"75b84afc99214ed3","name":"Blink","style":{"label":true},"nodes":["9724a84249393e66","e5969d7e18e9cd12"],"x":394,"y":1739,"w":212,"h":142},{"id":"9724a84249393e66","type":"trigger","z":"75b84afc99214ed3","g":"bd56834c7647b15f","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-1","extend":false,"overrideDelay":false,"units":"s","reset":"Stop","bytopic":"all","topic":"topic","outputs":1,"x":500,"y":1780,"wires":[["e5969d7e18e9cd12"]]},{"id":"e5969d7e18e9cd12","type":"trigger","z":"75b84afc99214ed3","g":"bd56834c7647b15f","name":"250ms blink","op1":"yellow","op2":"red","op1type":"str","op2type":"str","duration":"500","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":510,"y":1840,"wires":[["91211563d82bfe8c"]]},{"id":"a2a6c7f2.1f0b5","type":"ui_group","name":"Default","tab":"d3e8c5a7.3d3a68","order":1,"disp":true,"width":4,"collapse":false},{"id":"d3e8c5a7.3d3a68","type":"ui_tab","name":"Home","icon":"dashboard","order":1}]

led_flash

2 Likes

@smaanjunath2... that's it, thank you!!!

2 Likes

glad could help. Most of the solution is given by @Trying_to_learn and @jbudd .
I have just edited the flow after checking you wanted red/yellow blinking. my original solution had grey/yellow blinking.

@Trying_to_learn @jbudd ... my apologizes, thank you for your assistance as well.

@smanjunath211 ... not hung up on the colors, I can change those... I was missing the Change node to turn off the flashing.

1 Like