# LED Blink on receiving any payload

**URL:** <https://discourse.nodered.org/t/led-blink-on-receiving-any-payload/20321>\
**Category:** Dashboard\
**Created:** [14 January 2020 15:53 UTC](https://discourse.nodered.org/t/led-blink-on-receiving-any-payload/20321 "2020-01-14T15:53:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![acestu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/acestu/32/90408_2.png) [@acestu](https://discourse.nodered.org/u/acestu)\
**Post date:** [14 January 2020 15:53 UTC](https://discourse.nodered.org/t/led-blink-on-receiving-any-payload/20321/1 "2020-01-14T15:53:20Z")

</div>

Hi,  
I was wondering if someone could help me add an LED on the dashboard that would blink when it receives any payload which is connected to a MQTT in node ?

Thanks In Advance  
Stuart

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [14 January 2020 16:17 UTC](https://discourse.nodered.org/t/led-blink-on-receiving-any-payload/20321/2 "2020-01-14T16:17:09Z")

</div>

Something like this

```auto
[{"id":"9036912b.2cc94","type":"mqtt in","z":"2374d205.85743e","name":"","topic":"tele/#","qos":"2","datatype":"json","broker":"5759f0ee.160bb","x":160,"y":340,"wires":[["d4148083.07318"]]},{"id":"c3654bf0.dd1d48","type":"ui_template","z":"2374d205.85743e","group":"d6060f19.2b834","name":"","order":0,"width":"1","height":"1","format":"<style>\n.led {\n float: right;\n padding: 3px;\n width: 10px;\n height: 10px;\n margin: 5px 5px 5px 5px;\n border-radius: 50%;\n \n}\n</style>\n\n<div><span class=\"led\" style=\"background-color: {{msg.payload}}; box-shadow: black 0 -1px 1px 0px, inset black 0 -1px 4px, {{msg.payload}} 0 3px 15px;\"></span></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":510,"y":340,"wires":[[]]},{"id":"d4148083.07318","type":"trigger","z":"2374d205.85743e","op1":"green","op2":"gray","op1type":"str","op2type":"str","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":330,"y":340,"wires":[["c3654bf0.dd1d48"]]},{"id":"5759f0ee.160bb","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.111","port":"1883","tls":"","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"d6060f19.2b834","type":"ui_group","z":"","name":"STAATUS","tab":"93443fe0.36117","disp":true,"width":"20","collapse":false},{"id":"93443fe0.36117","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![acestu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/acestu/32/90408_2.png) [@acestu](https://discourse.nodered.org/u/acestu)\
**Post date:** [15 January 2020 15:50 UTC](https://discourse.nodered.org/t/led-blink-on-receiving-any-payload/20321/3 "2020-01-15T15:50:06Z")

</div>

Hi HotNipi,

Thanks I will give it a try, heres me thinking it would be a case of putting "If Payload" or something similar

cheers  
Stuart

---

<div class="post-metadata">

**Author:** ![acestu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/acestu/32/90408_2.png) [@acestu](https://discourse.nodered.org/u/acestu)\
**Post date:** [16 January 2020 14:13 UTC](https://discourse.nodered.org/t/led-blink-on-receiving-any-payload/20321/4 "2020-01-16T14:13:23Z")

</div>

Hi hotNipi,

Thanks for the solution it works great, I can also plug a stock LED node into the trigger but it doesn't look as good as yours with the shadow.

Cheers  
Stuart
