Hi Mark,
I have looked through here but doesnt seem to making sense to me. I have this flow:
[{"id":"5671e78a.726fc8","type":"debug","z":"5cbdd29a.d91a2c","name":"1","active":true,"console":"false","complete":"true","x":550,"y":80,"wires":[]},{"id":"193c38.de4d4bc8","type":"cpu","z":"5cbdd29a.d91a2c","name":"cpu","x":430,"y":240,"wires":[["30968d79.d4bdf2","5513c8ac.772c28","fc88c01d.67eff","e5e8b3eb.6eb85","7ecac864.d0f1a8"]]},{"id":"fc88c01d.67eff","type":"function","z":"5cbdd29a.d91a2c","name":"avgcpu","func":"var msg = msg.payload;\nvar a = msg;\n\nreturn a;","outputs":"1","noerr":0,"x":500,"y":160,"wires":[["5671e78a.726fc8"]]},{"id":"2b1515a8.c04622","type":"inject","z":"5cbdd29a.d91a2c","name":"cpu cmd","topic":"piData","payload":"","payloadType":"date","repeat":"108000","crontab":"","once":true,"x":340,"y":320,"wires":[["193c38.de4d4bc8"]]}]
The function now outputs the payload for each core, but all as separate messages. I can't seem to specifically select a single core payload.
Debug shows:
22/07/2017, 21:25:121msg : number12
22/07/2017, 21:25:121msg : number8
22/07/2017, 21:25:121msg : number8
22/07/2017, 21:25:121msg : number8
I have a strong feeling its something simple but for life of me i cant get it.