Success - Thank you all for the help on this and thanks AndyF for the last the final mile.
Just if anyone is interested this is what I've created, I appreciate it is what @bryzi nodes already do, but here it is all the same.
[{"id":"4167d048.8c39d8","type":"http request","z":"5b9bb1a9.d41be8","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":470,"y":1520,"wires":[["53729e87.354d78"]]},{"id":"53729e87.354d78","type":"debug","z":"5b9bb1a9.d41be8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":1560,"wires":[]},{"id":"b656f4d9.6153b8","type":"function","z":"5b9bb1a9.d41be8","name":"Brightness","func":"//msg.headers = {\"X-Auth-Token\":global.get(\"authtoken\")};\nmsg.payload = {\"mode\":\"enabled\",\"type\": \"A\",\"value\": msg.payload};\nmsg.url= \"http://10.1.1.115/xled/v1/led/out/brightness\"\nreturn msg;\n\n\n//flow.set(\"authtoken\",msg.payload.authentication_token);\n//flow.set(\"authchalrsp\",msg.payload[\"challenge-response\"]);","outputs":1,"noerr":0,"initialize":"","finalize":"","x":290,"y":1500,"wires":[["ad51bc9f.7f2c8"]]},{"id":"5bb6c869.12c728","type":"http request","z":"5b9bb1a9.d41be8","name":"GetToken","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://10.1.1.115/xled/v1/login","tls":"","persist":false,"proxy":"","authType":"","x":240,"y":1380,"wires":[["ec214898.695e28","f369655b.a23338"]]},{"id":"ec214898.695e28","type":"debug","z":"5b9bb1a9.d41be8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":410,"y":1340,"wires":[]},{"id":"5f7b365.bad90c8","type":"function","z":"5b9bb1a9.d41be8","name":"Get token","func":"if (msg.payload === false){return}\nmsg.payload = {\n//msg.headers = {\n'challenge':'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8=',\n//'authentication_token':'5jPe+ONhwUY=',\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":240,"y":1340,"wires":[["5bb6c869.12c728"]]},{"id":"6f9aeb0d.292d44","type":"inject","z":"5b9bb1a9.d41be8","name":"1 hour","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":1300,"wires":[["8f241eda.4edda"]]},{"id":"dc7507c5.71fd78","type":"http request","z":"5b9bb1a9.d41be8","name":"Verify","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://10.1.1.115/xled/v1/verify","tls":"","persist":false,"proxy":"","authType":"","x":670,"y":1380,"wires":[["4b49608e.4b2b2"]]},{"id":"4b49608e.4b2b2","type":"debug","z":"5b9bb1a9.d41be8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":1340,"wires":[]},{"id":"3b20a5e0.ea932a","type":"function","z":"5b9bb1a9.d41be8","name":"SetGlobalVar","func":"global.set(\"authtoken\",msg.payload.authentication_token);\nglobal.set(\"authchalrsp\",msg.payload[\"challenge-response\"]);\n\nmsg.headers = {\"X-Auth-Token\":global.get(\"authtoken\")};\nmsg.payload = {\"challenge-response\":global.get(\"authchalrsp\")};\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":1380,"wires":[["dc7507c5.71fd78"]]},{"id":"f369655b.a23338","type":"json","z":"5b9bb1a9.d41be8","name":"","property":"payload","action":"","pretty":false,"x":390,"y":1380,"wires":[["3b20a5e0.ea932a"]]},{"id":"eda93b11.1254e8","type":"inject","z":"5b9bb1a9.d41be8","name":"10","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":130,"y":1480,"wires":[["b656f4d9.6153b8"]]},{"id":"2beee86e.4f9d18","type":"inject","z":"5b9bb1a9.d41be8","name":"100","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"100","payloadType":"num","x":130,"y":1520,"wires":[["b656f4d9.6153b8"]]},{"id":"8f241eda.4edda","type":"ping","z":"5b9bb1a9.d41be8","mode":"triggered","name":"","host":"10.1.1.115","timer":"20","inputs":1,"x":240,"y":1300,"wires":[["5f7b365.bad90c8","84e8124a.5f1dd"]]},{"id":"84e8124a.5f1dd","type":"debug","z":"5b9bb1a9.d41be8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":1300,"wires":[]},{"id":"ad51bc9f.7f2c8","type":"function","z":"5b9bb1a9.d41be8","name":"SetHeaders","func":"msg.headers = {\"X-Auth-Token\":global.get(\"authtoken\")};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":1480,"wires":[["4167d048.8c39d8"]]}]