There you go:
[{"id":"5bf65851.e04498","type":"subflow","name":"STD SIGNAL","info":"","category":"","in":[{"x":60,"y":120,"wires":[{"id":"af889efb.c609c"}]}],"out":[{"x":500,"y":120,"wires":[{"id":"af889efb.c609c","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"af889efb.c609c","type":"function","z":"5bf65851.e04498","name":"CHANGE","func":"//initialise\nGreen = \"Dimgray\";\nGstyle = \"normal\";\nYellow = \"Dimgray\";\nYstyle = \"normal\";\nRed = \"Dimgray\";\nRstyle = \"normal\";\n\n\nif (msg.payload.opmode === 0){\n Red = \"Red\";\n}\n\nif (msg.payload.opmode == 1){\n Green = \"LimeGreen\";\n Gstyle = \"greenblink\";\n Yellow = \"Yellow\";\n Ystyle = \"blink\";\n}\n\nif (msg.payload.opmode == 2){\n Green = \"LimeGreen\";\n}\n\nif (msg.payload.opmode == 3){\n Yellow = \"Yellow\";\n}\n\nif (msg.payload.error){\n Red = \"Red\";\n Rstyle = \"normal\";\n}\n\nif (((msg.payload.homing)||(msg.payload.cyclestop)||(msg.payload.warning)) && (msg.payload.opmode != 3)){\n Yellow = \"Yellow\";\n Ystyle = \"blink\";\n}\n\nmsg.payload = {GreenLamp: Green, Greenstyle: Gstyle, YellowLamp: Yellow, Yellowstyle: Ystyle, RedLamp: Red, Redstyle: Rstyle};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":200,"y":120,"wires":[[]]},{"id":"277df45a.56f8ec","type":"inject","z":"d2b458d6.63e2d8","name":"CYCLE STOP","props":[{"p":"payload.cyclestop","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":350,"y":300,"wires":[["4c830bc5.c65464"]]},{"id":"9c0abbcb.2b9818","type":"inject","z":"d2b458d6.63e2d8","name":"HOMING","props":[{"p":"payload.homing","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":360,"y":380,"wires":[["4c830bc5.c65464"]]},{"id":"dc0b4b5f.3aeef8","type":"inject","z":"d2b458d6.63e2d8","name":"AUTO","props":[{"p":"payload.homing","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":370,"y":420,"wires":[["4c830bc5.c65464"]]},{"id":"bc8061f5.85691","type":"ui_slider","z":"d2b458d6.63e2d8","name":"OPERATION MODE","label":"Operation Mode","tooltip":"","group":"70d7c4e.0c5f13c","order":5,"width":"8","height":"1","passthru":false,"outs":"end","topic":"","min":0,"max":"4","step":1,"x":320,"y":540,"wires":[["69306ba8.bd5084"]]},{"id":"4c830bc5.c65464","type":"join","z":"d2b458d6.63e2d8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":790,"y":420,"wires":[["c699ed33.d358d"]]},{"id":"97abcbec.768f38","type":"inject","z":"d2b458d6.63e2d8","name":"CYCLE START","props":[{"p":"payload.cyclestop","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":340,"wires":[["4c830bc5.c65464"]]},{"id":"4f4e2a8a.43d774","type":"inject","z":"d2b458d6.63e2d8","name":"ERROR","props":[{"p":"payload.error","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":370,"y":460,"wires":[["4c830bc5.c65464"]]},{"id":"b76817c9.fe2428","type":"inject","z":"d2b458d6.63e2d8","name":"RESET","props":[{"p":"payload.error","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":370,"y":500,"wires":[["4c830bc5.c65464"]]},{"id":"69306ba8.bd5084","type":"function","z":"d2b458d6.63e2d8","name":"CHANGE OUTPUT","func":"var operation_mode = msg.payload;\n\nmsg.payload = {opmode: operation_mode};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":540,"wires":[["4c830bc5.c65464"]]},{"id":"c699ed33.d358d","type":"subflow:5bf65851.e04498","z":"d2b458d6.63e2d8","name":"","env":[],"x":930,"y":420,"wires":[["46862581.d9d61c","88efa024.eb445","dc53d105.2d233"]]},{"id":"46862581.d9d61c","type":"ui_text","z":"d2b458d6.63e2d8","group":"70d7c4e.0c5f13c","order":1,"width":"6","height":"1","name":"GREEN","label":"MACHINE STATUS","format":"<font color={{msg.payload.GreenLamp}}><a class={{msg.payload.Greenstyle}}><i class=\"fa fa-2x fa-circle\"></i></a></font>","layout":"row-spread","x":1360,"y":380,"wires":[]},{"id":"dc53d105.2d233","type":"ui_text","z":"d2b458d6.63e2d8","group":"70d7c4e.0c5f13c","order":3,"width":"1","height":"1","name":"RED","label":"","format":"<font color={{msg.payload.RedLamp}}><a class={{msg.payload.Redstyle}}><i class=\"fa fa-2x fa-circle\"></i></a></font>","layout":"row-left","x":1350,"y":460,"wires":[]},{"id":"88efa024.eb445","type":"ui_text","z":"d2b458d6.63e2d8","group":"70d7c4e.0c5f13c","order":2,"width":"1","height":"1","name":"YELLOW","label":"","format":"<font color={{msg.payload.YellowLamp}}><a class={{msg.payload.Yellowstyle}}><i class=\"fa fa-2x fa-circle\"></i></a></font>","layout":"row-center","x":1360,"y":420,"wires":[]},{"id":"70d7c4e.0c5f13c","type":"ui_group","z":"","name":"LIGHTS TEST","tab":"1434dbba.fdea74","order":1,"disp":true,"width":"8","collapse":true},{"id":"1434dbba.fdea74","type":"ui_tab","z":"d2b458d6.63e2d8","name":"TESTS","icon":"dashboard","order":7,"disabled":false,"hidden":false}]
Not sure if it's correct, I started with node-red two weeks ago, and I'm already thinking if I can manage all the automation in the factory with this. I already got almost all the data tracking, so it's going well.