Thank you.
I did look at an ‘example’ flow that stored example data to a file.
SAVE to file
RESTORE from file.
THis works.
However, the data /file is lost once the Raspberry Pi is re-powered.
What I am seeking is for the data to be stored in non-volatile memory so the data is recovered after power cycling.
THe sample flow referenced is here:
[{“id”:“21659e97.4c6f92”,“type”:“ui_button”,“z”:“6a1ea64e.004278”,“name”:"",“group”:“11c99bf.8379964”,“order”:2,“width”:“2”,“height”:“1”,“passthru”:false,“label”:“Inject”,“color”:"",“bgcolor”:"",“icon”:"",“payload”:"",“payloadType”:“str”,“topic”:"",“x”:370,“y”:180,“wires”:[[“e4f211c1.bd8b2”]]},{“id”:“20d44cd4.b8dd34”,“type”:“ui_button”,“z”:“6a1ea64e.004278”,“name”:"",“group”:“11c99bf.8379964”,“order”:4,“width”:“2”,“height”:“1”,“label”:“restore”,“color”:"",“bgcolor”:"",“icon”:"",“payload”:"",“payloadType”:“str”,“topic”:"",“x”:370,“y”:480,“wires”:[[“266496d9.4d8b5a”]]},{“id”:“e4f211c1.bd8b2”,“type”:“random”,“z”:“6a1ea64e.004278”,“name”:"",“low”:“0”,“high”:“10”,“inte”:“true”,“x”:520,“y”:180,“wires”:[[“c200a003.17cd3”]]},{“id”:“c200a003.17cd3”,“type”:“ui_chart”,“z”:“6a1ea64e.004278”,“name”:"",“group”:“11c99bf.8379964”,“order”:1,“width”:0,“height”:0,“label”:“chart”,“chartType”:“line”,“legend”:“false”,“xformat”:“HH:mm:ss”,“interpolate”:“bezier”,“nodata”:"",“ymin”:"",“ymax”:"",“removeOlder”:“15”,“removeOlderPoints”:“100”,“removeOlderUnit”:“60”,“cutout”:0,“x”:670,“y”:180,“wires”:[[“38d76785.2f7f78”],[]]},{“id”:“ac834461.3265a8”,“type”:“file”,“z”:“6a1ea64e.004278”,“name”:"",“filename”:"/tmp/chart.log",“appendNewline”:true,“createDir”:false,“overwriteFile”:“true”,“x”:820,“y”:340,“wires”:[]},{“id”:“266496d9.4d8b5a”,“type”:“file in”,“z”:“6a1ea64e.004278”,“name”:"",“filename”:"/tmp/chart.log",“format”:“utf8”,“sendError”:true,“x”:520,“y”:480,“wires”:[[“d35e5595.a7f9e8”]]},{“id”:“38d76785.2f7f78”,“type”:“json”,“z”:“6a1ea64e.004278”,“name”:"",“property”:“payload”,“action”:"",“pretty”:false,“x”:810,“y”:180,“wires”:[[“27a29310.f3cf8c”]]},{“id”:“d35e5595.a7f9e8”,“type”:“json”,“z”:“6a1ea64e.004278”,“name”:"",“property”:“payload”,“action”:"",“pretty”:false,“x”:670,“y”:480,“wires”:[[“c200a003.17cd3”]]},{“id”:“27a29310.f3cf8c”,“type”:“function”,“z”:“6a1ea64e.004278”,“name”:"",“func”:“if (msg.topic === “save”) {\n msg.payload = context.last;\n return msg;\n}\nelse {\n context.last = msg.payload;\n}\nreturn null;”,“outputs”:1,“noerr”:0,“x”:550,“y”:340,“wires”:[[“ac834461.3265a8”]]},{“id”:“be7b76c5.eacf58”,“type”:“ui_button”,“z”:“6a1ea64e.004278”,“name”:"",“group”:“11c99bf.8379964”,“order”:3,“width”:“2”,“height”:“1”,“label”:“save”,“color”:"",“bgcolor”:"",“icon”:"",“payload”:"",“payloadType”:“str”,“topic”:“save”,“x”:370,“y”:340,“wires”:[[“27a29310.f3cf8c”]]},{“id”:“11c99bf.8379964”,“type”:“ui_group”,“z”:"",“name”:“Gauge”,“tab”:“52c8e093.d2037”,“order”:2,“disp”:true,“width”:“6”},{“id”:“52c8e093.d2037”,“type”:“ui_tab”,“z”:"",“name”:“Restore”,“icon”:“dashboard”}]