Flash LED strips on trigger MQTT

I have a setup in my boat where I use Node Red to control a set of Shelly RGBW2s over MQTT. It works flawlessly, and I have a nice working dashboard. Now I am looking for a ways to make the lights flash on alarm. I have this setup now https://photos.app.goo.gl/wrCLrP6g5ZpBdxtA6 as a trial. What it does is to light up a led strip on my boat when the wind increases beyond a certain threshold and shut down as the wind drops. The trigger could be any sensor I can imagine.
What I'd like to do is to flicker or strobe the light for a pre defined period of time, then return to previous state. Any ideas on what kind of node to use for such a project?

the trigger node can be set to repeatedly send a message. Another trigger node could be used to start and reset it.

So two trigger nodes in line before the set msg payload nodes? each with two connections to the switch node? One to trigger the action and one to halt it?

Actually 3 :slight_smile: maybe like this

[{"id":"80f96dd.bc1d49","type":"inject","z":"c593e272.16862","name":"start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":100,"y":280,"wires":[["bc48a383.7221c"]]},{"id":"bc48a383.7221c","type":"trigger","z":"c593e272.16862","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"10","extend":false,"units":"s","reset":"0","bytopic":"all","topic":"topic","outputs":1,"x":290,"y":280,"wires":[["ecb0f17c.3107c"]]},{"id":"ecb0f17c.3107c","type":"trigger","z":"c593e272.16862","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-1","extend":false,"units":"s","reset":"0","bytopic":"all","topic":"topic","outputs":1,"x":380,"y":340,"wires":[["621c220b.f4d83c"]]},{"id":"621c220b.f4d83c","type":"trigger","z":"c593e272.16862","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"0.5","extend":false,"units":"s","reset":"0","bytopic":"all","topic":"topic","outputs":1,"x":430,"y":400,"wires":[["f117b6c2.282448"]]},{"id":"f117b6c2.282448","type":"debug","z":"c593e272.16862","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":460,"wires":[]},{"id":"e1d73822.0d8878","type":"inject","z":"c593e272.16862","name":"stop","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":110,"y":340,"wires":[["bc48a383.7221c","ecb0f17c.3107c"]]}]

Thanks! Will try it out. :smiley:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.