Hello,
i'm begginer on node-red , i do many thing using forum & tutorial, however some thing like this seem not so friendly for dummies...
My goal is get the status & value of some nodes in the flow and save them in a CSV file, i'm trying now with just one to start.
I will save values & status on global variables, but i'm in difficult to get it and save .
Take a look on "change node" named generate single payload, where i'm wrong ?
Json content :
{"phone": global.get("phone_number")}
thank for any suggestion
[{"id":"e9546682.b39898","type":"csv","z":"985a6a5573abba9f","name":"","sep":",","hdrin":false,"hdrout":"none","multi":"one","ret":"\\n","temp":"a,b","skip":"0","strings":false,"include_empty_strings":true,"include_null_values":true,"x":670,"y":260,"wires":[["3b580ccc8de65992"]]},{"id":"3b580ccc8de65992","type":"file","z":"985a6a5573abba9f","name":"config file","filename":"config/config.csv","filenameType":"str","appendNewline":false,"createDir":true,"overwriteFile":"true","encoding":"none","x":840,"y":260,"wires":[["4b39ba893e1d4001"]]},{"id":"e12283a855930fa6","type":"ui_button","z":"985a6a5573abba9f","name":"Save cfg","group":"4f5948e028bd912a","order":2,"width":0,"height":0,"passthru":false,"label":"Salva configurazione","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"dummy","payloadType":"str","topic":"topic","topicType":"msg","x":120,"y":260,"wires":[["5200f14e01daa8ad"]]},{"id":"da7ab0d5cc9369b5","type":"ui_switch","z":"985a6a5573abba9f","name":"","label":"Abilitazione allarme 1","tooltip":"","group":"4f5948e028bd912a","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"className":"","x":160,"y":140,"wires":[[]]},{"id":"63d09d2e8feb5cc9","type":"function","z":"985a6a5573abba9f","name":"store to phone_number","func":"global.set(\"phone_number\",msg)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":80,"wires":[[]]},{"id":"d4ab8b989e7d00c9","type":"ui_text_input","z":"985a6a5573abba9f","name":"","label":"","tooltip":"","group":"4f5948e028bd912a","order":3,"width":0,"height":0,"passthru":false,"mode":"text","delay":300,"topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":120,"y":80,"wires":[["63d09d2e8feb5cc9"]]},{"id":"df87a7e2bc0a0eaf","type":"inject","z":"985a6a5573abba9f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":340,"wires":[["5200f14e01daa8ad"]]},{"id":"5200f14e01daa8ad","type":"change","z":"985a6a5573abba9f","name":"Generate single payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"phone\": global.get(\"phone_number\")}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":260,"wires":[["e9546682.b39898"]]},{"id":"4b39ba893e1d4001","type":"debug","z":"985a6a5573abba9f","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1000,"y":260,"wires":[]},{"id":"4f5948e028bd912a","type":"ui_group","z":"985a6a5573abba9f","name":"gestione configurazioni","tab":"19578a1bc2ab85e0","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"19578a1bc2ab85e0","type":"ui_tab","name":"Configurazione","icon":"dashboard","order":5,"disabled":false,"hidden":false}]