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
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
Something like this
[{"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}]
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
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