I have been running around in circles for the last couple of hours with a flow I am/was trying to get working.
This is the cut down version.
It is a mess, because I slapped it together to show something I don't get.
Walk through:
4 buttons.
Top two set the "mode" (mood if you will) of things.
Either good (normal), or bad (error).
The text
node below that indicates this quite clearly.
The two buttons below......
ACK - works.
ACK F - doesn't.
Originally I had "ACK-F" and was pressing the button (until the cow's come home) and nothing was happening.
Only when I added a topic to the button (as in with ACK) did it work.
WHY?
WHY is it there are no "complaints" from any node about missing such and such or what ever if they are needed.
Rather it just . . . . fails.
I say fail, but I can't really think of a better word.
I am going to be picked to death about this I am sure to do with the function
node I'm sure.
If there is a problem with missing parts of a message I would have thought that the node would complain about it.
[{"id":"3a7fe578.97b572","type":"ui_button","z":"aa48e352.9ad2f8","name":"All good/normal","group":"7fe920c6.daab38","order":1,"width":"0","height":"0","passthru":false,"label":"All good/normal","tooltip":"","color":"","bgcolor":"","icon":"fa-check-square-o fa-2x","payload":"false","payloadType":"bool","topic":"undervoltage","x":350,"y":1670,"wires":[["acaab0ce.aaa4e"]]},{"id":"acaab0ce.aaa4e","type":"fan","z":"aa48e352.9ad2f8","x":590,"y":1710,"wires":[["e02cf657.010ca","623bc8c6.fb3ba8"]]},{"id":"e02cf657.010ca","type":"function","z":"aa48e352.9ad2f8","name":"","func":"//node.warn(msg.topic);\nif (msg.payload == false)\n{\n //\n msg = {payload: '<font color=\\\"lime\\\" ><i class=\"fa fa-thumbs-o-up fa-2x\" style=\"font-size:8px;\"></i></font>',topic: msg.topic};\n node.status({fill:\"green\",shape:\"dot\",text:\"Good\"});\n //\n} else\n{\n //\n msg = {payload: '<font color =\\\"red\\\"><i class=\"fa fa-thumbs-o-down fa-2x\" style=\"font-size:8px;\"></i></font>',topic: msg.topic};\n node.status({fill:\"red\",shape:\"dot\",text:\"Bad\"});\n //\n}\nreturn msg;","outputs":1,"noerr":0,"x":720,"y":1710,"wires":[["276d56dd.693ab2","45223f3d.94312"]]},{"id":"623bc8c6.fb3ba8","type":"debug","z":"aa48e352.9ad2f8","name":"A","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":720,"y":1670,"wires":[]},{"id":"3741ea70.77930e","type":"inject","z":"aa48e352.9ad2f8","name":"TEST","topic":"test topic","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":1770,"wires":[["acaab0ce.aaa4e"]]},{"id":"e8cec37b.05b91","type":"ui_button","z":"aa48e352.9ad2f8","name":"","group":"7fe920c6.daab38","order":3,"width":"0","height":"0","passthru":false,"label":"ACK","tooltip":"","color":"","bgcolor":"","icon":"fa-check-square-o fa-2x","payload":"false","payloadType":"bool","topic":"status ACK","x":380,"y":1770,"wires":[["acaab0ce.aaa4e"]]},{"id":"57ec47d0.2f3fc","type":"ui_button","z":"aa48e352.9ad2f8","name":"","group":"7fe920c6.daab38","order":4,"width":"0","height":"0","passthru":false,"label":"ACK F","tooltip":"","color":"","bgcolor":"","icon":"fa-check-square-o fa-2x","payload":"false","payloadType":"bool","topic":"","x":380,"y":1810,"wires":[["acaab0ce.aaa4e"]]},{"id":"73e2cf63.8cd238","type":"ui_button","z":"aa48e352.9ad2f8","name":"All good/normal","group":"7fe920c6.daab38","order":1,"width":"0","height":"0","passthru":false,"label":"Error","tooltip":"","color":"","bgcolor":"","icon":"fa-check-square-o fa-2x","payload":"true","payloadType":"bool","topic":"undervoltage","x":350,"y":1710,"wires":[["acaab0ce.aaa4e"]]},{"id":"276d56dd.693ab2","type":"ui_text","z":"aa48e352.9ad2f8","group":"7fe920c6.daab38","order":2,"width":0,"height":0,"name":"Under voltage","label":"{{msg.topic}}","format":"{{msg.payload}}","layout":"row-spread","x":920,"y":1710,"wires":[]},{"id":"45223f3d.94312","type":"debug","z":"aa48e352.9ad2f8","name":"B","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":890,"y":1670,"wires":[]},{"id":"7fe920c6.daab38","type":"ui_group","name":"Group 3","tab":"50f4e688.7d4b7","order":3,"disp":true,"width":6},{"id":"50f4e688.7d4b7","type":"ui_tab","z":"","name":"Machine health","icon":"fa-heartbeat","order":4,"disabled":false,"hidden":false}]