@Colin
Here's the code for the section of the flow.
[{"id":"a703dc55.9112e","type":"subflow","name":"Detect online","info":"","in":[{"x":260,"y":100,"wires":[{"id":"c43e8062.fcccd"},{"id":"19c1055b.534ddb"},{"id":"3b9748cc.9d37d8"}]}],"out":[{"x":1440,"y":140,"wires":[{"id":"c4aca534.c6b218","port":0},{"id":"f55f171a.d79838","port":0}]}]},{"id":"41a8cf72.9d81e","type":"delay","z":"a703dc55.9112e","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":870,"y":160,"wires":[["9ad7a565.51bf18"]]},{"id":"f55f171a.d79838","type":"inject","z":"a703dc55.9112e","name":"Startup","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":true,"x":930,"y":260,"wires":[["9ad7a565.51bf18"]]},{"id":"19c1055b.534ddb","type":"change","z":"a703dc55.9112e","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":160,"wires":[["41a8cf72.9d81e"]]},{"id":"ec9f7a00.159c98","type":"delay","z":"a703dc55.9112e","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":660,"y":200,"wires":[["41a8cf72.9d81e"]]},{"id":"c43e8062.fcccd","type":"change","z":"a703dc55.9112e","name":"Online","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":110,"wires":[["ff391aea.68c608"]]},{"id":"9ad7a565.51bf18","type":"change","z":"a703dc55.9112e","name":"Offline","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":160,"wires":[["ff391aea.68c608"]]},{"id":"c4aca534.c6b218","type":"rbe","z":"a703dc55.9112e","name":"","func":"rbe","gap":"","start":"","inout":"out","x":1300,"y":140,"wires":[[]]},{"id":"3b9748cc.9d37d8","type":"change","z":"a703dc55.9112e","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"timeout","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":200,"wires":[["ec9f7a00.159c98"]]},{"id":"b19de89d.9b57f8","type":"comment","z":"a703dc55.9112e","name":"Each incoming message will retrigger a new timeout (msg.timeout [ms]) before being reported offline","info":"","x":590,"y":40,"wires":[]},{"id":"ff391aea.68c608","type":"change","z":"a703dc55.9112e","name":"Offline","rules":[{"t":"set","p":"topic","pt":"msg","to":"isonline","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":140,"wires":[["c4aca534.c6b218"]]},{"id":"8ed7b581.57e978","type":"mqtt in","z":"de212f36.d340b","name":"","topic":"stat/GridController/#","qos":"1","datatype":"auto","broker":"97bbbbb4.7644a8","x":690,"y":500,"wires":[["bef9519e.7092f"]]},{"id":"bef9519e.7092f","type":"subflow:a703dc55.9112e","z":"de212f36.d340b","name":"","env":[],"x":810,"y":540,"wires":[["a6f5392e.1094d8","e5e93740.caa458"]]},{"id":"a6f5392e.1094d8","type":"ui_switch","z":"de212f36.d340b","name":"","label":"{{msg.topic}}","tooltip":"","group":"619958a1.f70658","order":1,"width":"0","height":"0","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"check_circle","oncolor":"green","offvalue":"false","offvalueType":"bool","officon":"error_outline","offcolor":"red","x":1010,"y":460,"wires":[[]]},{"id":"e5e93740.caa458","type":"switch","z":"de212f36.d340b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"false"}],"checkall":"true","repair":true,"outputs":1,"x":990,"y":560,"wires":[["a807cfb5.e4719","4028ebb8.e15c34"]]},{"id":"a807cfb5.e4719","type":"debug","z":"de212f36.d340b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1210,"y":440,"wires":[]},{"id":"58824858.6b8228","type":"debug","z":"de212f36.d340b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1310,"y":540,"wires":[]},{"id":"4028ebb8.e15c34","type":"function","z":"de212f36.d340b","name":"","func":"node.warn(msg._topic);\nmsg.payload = (msg._topic.split(\"/\"))[1];\nreturn msg;","outputs":1,"noerr":0,"x":1150,"y":560,"wires":[["58824858.6b8228"]]},{"id":"97bbbbb4.7644a8","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"619958a1.f70658","type":"ui_group","z":"","name":"Status","tab":"83c3bfd.350b84","disp":true,"width":"6","collapse":false},{"id":"83c3bfd.350b84","type":"ui_tab","z":"","name":"Status","icon":"dashboard","order":4,"disabled":false,"hidden":false}]