if you want to have a look to the flow :
[{"id":"c7028dcd.6942","type":"inject","z":"fe2c7bc6.bd49c8","name":"running","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":137.50000381469727,"y":677.5000095367432,"wires":[["582822a4.ef3ebc"]]},{"id":"1fc2aae9.453a75","type":"inject","z":"fe2c7bc6.bd49c8","name":"pre-stop","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":722.5000104904175,"wires":[["72a7918c.d5c84"]]},{"id":"582822a4.ef3ebc","type":"function","z":"fe2c7bc6.bd49c8","name":"run","func":"msg.payload = {event : 'running' } ; \nreturn msg;\n","outputs":1,"noerr":0,"x":277.50000381469727,"y":676.2500095367432,"wires":[["43c1c5e9.8a0f7c"]]},{"id":"72a7918c.d5c84","type":"function","z":"fe2c7bc6.bd49c8","name":"stop","func":"msg.payload = {event:'pre-stop'};\nreturn msg;\n","outputs":1,"noerr":0,"x":278.75000381469727,"y":725.0000104904175,"wires":[["43c1c5e9.8a0f7c"]]},{"id":"43c1c5e9.8a0f7c","type":"function","z":"fe2c7bc6.bd49c8","name":"adapt","func":"if(msg.payload.event === 'running') { \n var imgUrl = \"http://educainternet.es/documents/10718/download\";\n msg.payload = \"<img src='\"+imgUrl+\"'alt='Logo image not found' />\";\n return msg;\n } \nif(msg.payload.event === 'pre-stop') { \n\n var imgUrl = \"https://pngimage.net/wp-content/uploads/2018/06/power-off-png-2.png\";\n msg.payload = \"<img src='\"+imgUrl+\"'alt='Logo image not found' />\";\n return msg;\n } \n","outputs":1,"noerr":0,"x":415.5357131958008,"y":697.6786603927612,"wires":[["fe695cb8.45e81"]]},{"id":"fe695cb8.45e81","type":"ui_template","z":"fe2c7bc6.bd49c8","group":"72067beb.d28e74","name":"display","order":6,"width":"0","height":"0","format":"\n\n\n\n<div height=\"50\" style=\"height: 50px;\">\n<div ng-bind-html=\"msg.payload\" width=\"35\"><br/>\n</div>\n\n\n<!--\n<div ng-bind-html=\"msg.payload\"></div>\n\n<div height=\"50\" style=\"height: 50px;\">\n<img src=\"http://educainternet.es/documents/10718/download\" width=\"35\"><br/>\n</div>\n\nhttps://pngimage.net/wp-content/uploads/2018/06/power-on-png-1.png\nhttp://educainternet.es/documents/10718/download\nhttps://pngimage.net/wp-content/uploads/2018/06/power-off-png-5.png\nhttps://pngimage.net/wp-content/uploads/2018/06/power-on-png-6.png\nhttps://pngimage.net/wp-content/uploads/2018/06/power-off-png-2.png\nhttps://banner2.kisspng.com/20180404/euq/kisspng-computer-icons-electrical-switches-button-off-5ac452e9048ee7.9894894815228157210187.jpg\n\n\n<div height=\"50\" style=\"height: 50px;\" ng-click=\"send({payload:'Clicked'});\">\n<img src=\"http://educainternet.es/documents/10718/download\" width=\"35\"><br/>\n</div>\n\n<div height=\"50\" style=\"height: 50px;\">\n<img src=\"http://educainternet.es/documents/10718/download\" width=\"35\"><br/>\n</div>\n\n<div height=\"50\" style=\"height: 50px;\" ng-bind-html=\"msg.payload\" width=\"35\">\n</div>\n\n<div height=\"50\" style=\"height: 50px;\">\n<div ng-bind-html=\"msg.payload\" width=\"35\"><br/>\n</div>\n\n<div style=\"display: inline-block; width: 150px; height: 150px;\" ng-click=\"send({payload:'Clicked'});\">\n<img src=\"/Block_Gray.png\" width=\"140\"><br/>\n</div>\n\n\n\n-->\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":558.7500076293945,"y":698.7500104904175,"wires":[[]]},{"id":"72067beb.d28e74","type":"ui_group","z":"","name":"Resume","tab":"255f2630.e1c57a","order":2,"disp":true,"width":"12","collapse":true},{"id":"255f2630.e1c57a","type":"ui_tab","z":"","name":"wvc","icon":"flash_on","order":1}]