Hi,
I'm reading Modbus array [5 items] and I need to add -in the first position- the 6th item (timestamp) to log them in a csv file.
I don't know how to insert the timestamp,
any help is appreciated.
here I created an array to simulate the Modbus input
[{"id":"bdca0aac.97159","type":"file","z":"f971f785.8dc938","name":"file","filename":"log.csv","appendNewline":false,"createDir":false,"overwriteFile":"false","encoding":"none","x":610,"y":60,"wires":[[]]},{"id":"2aa05887.c98908","type":"csv","z":"f971f785.8dc938","name":"","sep":";","hdrin":true,"hdrout":"once","multi":"mult","ret":"\\n","temp":"Date,Temp,Cap,REG3,REG4","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":410,"y":60,"wires":[["bdca0aac.97159"]]},{"id":"1ae9aac4.938ea5","type":"inject","z":"f971f785.8dc938","name":"Array 5","props":[{"p":"payload"},{"p":"topic","v":"[\"Temp\",\"Cap\",\"REG3\",\"REG4\",\"REG5\"]","vt":"jsonata"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[2973,68,6208,56,45556]","payloadType":"jsonata","x":200,"y":60,"wires":[["2aa05887.c98908","c5f26fc7.8e8128","baeed3b9.eac98","3e0554e0.46cc8c"]]}]