This is the confusing part, I used to be able to open the file, but since running an update on my pi, it seems I can't!
here are the flows: this is the one that wont open -
[{"id":"cd4a564c.a0337","type":"tab","label":"pennal data record","disabled":false,"info":""},{"id":"891aa09b.ae1158","type":"mqtt in","z":"cd4a564c.a0337","name":"pennal","topic":"#","qos":"2","datatype":"json","broker":"eec8d6a7.9e07f8","nl":false,"rap":true,"rh":0,"x":70,"y":240,"wires":[["5f19cb45.2b2904","31d99252.2ad976"]]},{"id":"5f19cb45.2b2904","type":"function","z":"cd4a564c.a0337","name":"","func":"\n//var rssi_b\n//var rssi_o\n//\n//\n//if (msg.payload.uplink_message.rx_metadata[0].gateway_ids == \"pennal-blue-gw\") {\n//rssi_b= msg.payload.uplink_message.rx_metadata[0].rssi;\n//rssi_o = msg.payload.uplink_message.rx_metadata[1].rssi;\n//} else {\n//rssi_b= msg.payload.uplink_message.rx_metadata[1].rssi;\n//rssi_o = msg.payload.uplink_message.rx_metadata[0].rssi;\n//}\n//payload= {\"time\":payload.received_at,\"devid\":msg.payload.end_device_ids.device_id,\"rainmm\":msg.payload.uplink_message.decoded_payload.rainmm,\"battery\":payload.uplink_message.decoded_payload.voltage,\"Rssi_b\":rssi_b,\"Rssi_o\":rssi_o};\n\npayload={\"time\":msg.payload.received_at,\"devid\":msg.payload.end_device_ids.device_id,\"rainmm\":msg.payload.uplink_message.decoded_payload.rainmm,\"battery\":msg.payload.uplink_message.decoded_payload.voltage};\nmsg.payload=JSON.stringify(payload);\nmsg.payload=payload;\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":240,"wires":[["68ec8ce1.e1e8cc","9ff563d2.3fb45"]]},{"id":"68ec8ce1.e1e8cc","type":"csv","z":"cd4a564c.a0337","name":"csv ouit","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"time, devid, rainmm, battery","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":500,"y":240,"wires":[["a6ee07c5.d985b"]]},{"id":"a6ee07c5.d985b","type":"file","z":"cd4a564c.a0337","name":"","filename":"/home/pi/V3_data/data.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":730,"y":240,"wires":[[]]},{"id":"9ff563d2.3fb45","type":"debug","z":"cd4a564c.a0337","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":360,"wires":[]},{"id":"31d99252.2ad976","type":"debug","z":"cd4a564c.a0337","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":220,"y":340,"wires":[]},{"id":"eec8d6a7.9e07f8","type":"mqtt-broker","name":"matts api","broker":"eu1.cloud.thethings.network","port":"8883","tls":"b3f07811.bb1148","clientid":"","usetls":true,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"b3f07811.bb1148","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":true}]
whereas this one will open the written file:
[{"id":"83d19a9a.f2f1e8","type":"tab","label":"weather station 2","disabled":false,"info":""},{"id":"d398b224.5d6c","type":"mqtt in","z":"83d19a9a.f2f1e8","name":"","topic":"data","qos":"1","datatype":"auto","broker":"f0a694ef.dc29c8","nl":false,"rap":true,"rh":0,"x":210,"y":260,"wires":[["a6e89aa5.d2d45","6c71def3.a9dcc"]]},{"id":"a6e89aa5.d2d45","type":"gate","z":"83d19a9a.f2f1e8","name":"gate demo","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"x":470,"y":260,"wires":[["d8fb6d9b.e645a8","ef190b7e.fddf98"]]},{"id":"8fe5ea82.c9dd9","type":"inject","z":"83d19a9a.f2f1e8","name":"open","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":0.1,"topic":"control","payload":"open","payloadType":"str","x":230,"y":220,"wires":[["a6e89aa5.d2d45"]]},{"id":"d82c3dd.81f8d4","type":"inject","z":"83d19a9a.f2f1e8","name":"close","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":"15","topic":"control","payload":"close","payloadType":"str","x":230,"y":300,"wires":[["a6e89aa5.d2d45"]]},{"id":"d8fb6d9b.e645a8","type":"debug","z":"83d19a9a.f2f1e8","name":"output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":360,"wires":[]},{"id":"ef190b7e.fddf98","type":"file","z":"83d19a9a.f2f1e8","name":"","filename":"/home/pi/V3_data/ws2_5min.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":730,"y":260,"wires":[[]]},{"id":"6c71def3.a9dcc","type":"debug","z":"83d19a9a.f2f1e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":420,"y":140,"wires":[]},{"id":"f0a694ef.dc29c8","type":"mqtt-broker","name":"","broker":"f0874374ae47402d8841ebf07b2d36d6.s1.eu.hivemq.cloud","port":"8883","tls":"b3f07811.bb1148","clientid":"","usetls":true,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"b3f07811.bb1148","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":true}]
i find it odd that it won't open on the pi, but the fille can be read on the windows machine!