Flows Disappeared

Also, look inside the .backup file. Does it contain flow JSON?

The next thing to check is what flow file Node-RED is actually trying to use - it logs the full path to its flow file when it starts up.

OK Nick , i have made a backup of the all the files in Documents,

and yes i can see 2 backup files here :

1 .flows_psanode_cred.json.backup
Content :

{"$":"605420f02504dcXXXXXXXXXXXXXXXXXXXXF/BM0fBa"}

2 .flows_psanode.json.backup
content :

[{"id":"78e9f8ee.a220c8","type":"tab","label":"Door Node -001 Main","disabled":false,"info":""},{"id":"d1b06d58.066cb","type":"tab","label":"PSA003- Read QR ","disabled":false,"info":""},{"id":"3e4e4f2e.f0cdc","type":"tab","label":"User -Generate QR","disabled":false,"info":""},{"id":"bd04fea6.38515","type":"tab","label":"USER Get Acces to QRG","disabled":false,"info":""},{"id":"c4674a8e.970dc8","type":"tab","label":"Flow 1","disabled":true,"info":""},{"id":"b92c4a74.6bdbe8","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"3bcada86.16d976","type":"mqtt-broker","z":"","name":"PSA Server 1 ","broker":"10.11.12.101","port":"1883","clientid":"psa001","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"8f23e8e1.8cea78","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#a51212","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#b70b0b","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#a51212","edited":true},"page-titlebar-backgroundColor":{"value":"#a51212","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#e61d1d","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#a51212","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"PROTEGO - SACS- PSA003","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"cb304cff.e7194","type":"ui_group","z":"","name":"PSA001 - D1 Data ","tab":"d258a52c.c3ed68","order":1,"disp":true,"width":"8","collapse":false},{"id":"d258a52c.c3ed68","type":"ui_tab","z":"","name":"PROTEGO SACS - PSA001 - D1","icon":"dashboard","disabled":false,"hidden":false},{"id":"788ba2c4.4e037c","type":"oled-config","z":"","name":"OLED","width":"128","height":"32","address":"0"},{"id":"9d77a46f.ac7638","type":"ui_tab","z":"","name":"User - Generate QR Code ","icon":"dashboard","order":2,"disabled":false,"hidden":false},{"id":"9720ece6.22103","type":"ui_tab","z":"","name":"Door Display ","icon":"dashboard","order":3,"disabled":false,"hidden":false},{"id":"a666df58.bcbed","type":"ui_group","z":"","name":"PSA001 - D1 Message Board ","tab":"9720ece6.22103","order":1,"disp":true,"width":"6","collapse":false},{"id":"93fa7745.e4be68","type":"ui_group","z":"","name":"USER - QR Code Generator ","tab":"9d77a46f.ac7638","order":1,"disp":true,"width":9,"collapse":false},{"id":"9af38f5f.4387c","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"713fc2f0.fb3ccc","type":"ui_group","z":"","name":"CAM Result ","tab":"82f496d2.ee6868","order":1,"disp":true,"width":10,"collapse":false},{"id":"82f496d2.ee6868","type":"ui_tab","z":"","name":"TEST CAM","icon":"dashboard","disabled":false,"hidden":false},{"id":"ec25d63f.f1d1d8","type":"ui_group","z":"","name":"PSA-VPN / Pass: Psa@123! - Please Scan QR to get access to PSA-QR GEN-SYST ","tab":"bede77a0.5f21b8","order":2,"disp":true,"width":15,"collapse":false},{"id":"bede77a0.5f21b8","type":"ui_tab","z":"","name":"IP ACCESS ","icon":"dashboard","disabled":false,"hidden":false},{"id":"1b564e94.403661","type":"ui_group","z":"","name":"Default","tab":"a0a6180a.bc41d8","order":1,"disp":true,"width":"6","collapse":true},{"id":"a0a6180a.bc41d8","type":"ui_tab","z":"","name":"Home","icon":"dashboard"},{"id":"68202fa8.3829a","type":"ui_tab","z":"","name":"PSA001 - QR Reader","icon":"dashboard","order":7,"disabled":false,"hidden":false},{"id":"d9803c22.335f6","type":"ui_group","z":"","name":"QR Results ","tab":"68202fa8.3829a","order":1,"disp":true,"width":30,"collapse":false},{"id":"237c5f26.94ac2","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":2,"width":4,"height":1},{"id":"d4ceb25c.9089a","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":4,"width":3,"height":1},{"id":"19bc9ddd.0259f2","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":5,"width":4,"height":1},{"id":"db28322c.d9cdf","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":6,"width":3,"height":1},{"id":"bf7db93.ba32548","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":7,"width":4,"height":1},{"id":"ef0ea07f.b334b","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":8,"width":3,"height":1},{"id":"2b6703a0.10ad5c","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":9,"width":4,"height":1},{"id":"adffd9e.6198828","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":10,"width":3,"height":1},{"id":"3f53d03e.9729f","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":11,"width":4,"height":1},{"id":"fd059591.164058","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":12,"width":3,"height":1},{"id":"d95c6436.3b24a8","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":13,"width":4,"height":1},{"id":"36ba2226.90c90e","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":14,"width":3,"height":1},{"id":"1cd54fe7.4a26c","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":15,"width":4,"height":1},{"id":"1251257.93b02db","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":16,"width":3,"height":1},{"id":"d9d6f788.737288","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":17,"width":4,"height":1},{"id":"776fbd5f.c0f9d4","type":"ui_spacer","name":"spacer","group":"ec25d63f.f1d1d8","order":18,"width":3,"height":1},{"id":"731d9fbb.d5e6b","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":2,"width":1,"height":1},{"id":"da4415bc.9226d8","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":3,"width":1,"height":1},{"id":"bf078c2c.fd9dd","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":4,"width":1,"height":1},{"id":"1668bae7.3fbb35","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":5,"width":1,"height":1},{"id":"87e2e85d.933158","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":6,"width":1,"height":1},{"id":"22378b68.58eae4","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":7,"width":1,"height":1},{"id":"7fb3adb5.4d8524","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":9,"width":1,"height":1},{"id":"e004b37b.21723","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":10,"width":1,"height":1},{"id":"3e78eb44.60fbe4","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":11,"width":1,"height":1},{"id":"40ed293d.e14f38","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":12,"width":1,"height":1},{"id":"dd883546.5e0888","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":13,"width":1,"height":1},{"id":"47093db5.91d554","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":14,"width":1,"height":1},{"id":"57375cbe.d45454","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":15,"width":1,"height":1},{"id":"c079caf1.f09068","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":16,"width":1,"height":1},{"id":"abc95279.6355f","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":17,"width":9,"height":1},{"id":"eed2130a.d6aad","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":19,"width":1,"height":1},{"id":"c62d6106.a5d82","type":"ui_spacer","name":"spacer","group":"93fa7745.e4be68","order":20,"width":1,"height":1},{"id":"124f6676.4db0fa","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":1,"width":11,"height":1},{"id":"bf6612d6.49991","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":3,"width":11,"height":1},{"id":"5bff19ee.5078c8","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":4,"width":11,"height":1},{"id":"c4d94640.bba4f8","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":6,"width":11,"height":1},{"id":"74993fd8.09c67","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":7,"width":11,"height":1},{"id":"bdc13c1b.447a2","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":8,"width":11,"height":1},{"id":"7c55616a.9db6e","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":9,"width":11,"height":1},{"id":"4d3c631a.03810c","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":10,"width":11,"height":1},{"id":"b7937b0e.3d3038","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":11,"width":11,"height":1},{"id":"91546ed8.64c3","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":12,"width":11,"height":1},{"id":"ffe0653.6203898","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":13,"width":11,"height":1},{"id":"c46798b5.d71728","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":14,"width":11,"height":1},{"id":"58ceb127.55c5c","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":15,"width":11,"height":1},{"id":"fd84f0c2.5da93","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":16,"width":11,"height":1},{"id":"52208fef.83189","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":17,"width":11,"height":1},{"id":"a7db0811.5666e8","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":18,"width":11,"height":1},{"id":"90d26aca.c25d58","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":19,"width":11,"height":1},{"id":"ef59ddb0.b1efb","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":20,"width":11,"height":1},{"id":"ef81e120.25516","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":21,"width":6,"height":1},{"id":"2f34fc60.aa4c34","type":"ui_spacer","name":"spacer","group":"d9803c22.335f6","order":23,"width":6,"height":1},{"id":"dbfb8036.c1feb","type":"random","z":"78e9f8ee.a220c8","name":"psa001/otp","low":"1","high":"10000","inte":"true","property":"payload","x":810,"y":160,"wires":[["ff31d1f8.6c5a8","e224b1ce.161ac","68f4bb37.cfe444","74047003.b01cc"]]},{"id":"2cd245b1.0db4ca","type":"exec","z":"3e4e4f2e.f0cdc","command":"qr","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Generate QR","x":860,"y":220,"wires":[["36ce5645.0dd9da","f3756e20.baa9a"],[],[]]},{"id":"c1004e6c.92e09","type":"template","z":"3e4e4f2e.f0cdc","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<img src=\"data:image/png;base64,{{{payload}}}\">","output":"str","x":1300,"y":320,"wires":[["d5ec4670.a68a98"]]},{"id":"d5ec4670.a68a98","type":"ui_template","z":"3e4e4f2e.f0cdc","group":"93fa7745.e4be68","name":"","order":8,"width":8,"height":8,"format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1520,"y":320,"wires":[[]]},{"id":"36ce5645.0dd9da","type":"base64","z":"3e4e4f2e.f0cdc","name":"","action":"str","property":"payload","x":1080,"y":320,"wires":[["c1004e6c.92e09"]]},{"id":"f3756e20.baa9a","type":"image","z":"3e4e4f2e.f0cdc","name":"","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":1080,"y":40,"wires":[]},{"id":"1fab4db5.008312","type":"ui_form","z":"3e4e4f2e.f0cdc","name":"User UI Input ","label":"User UI Input","group":"93fa7745.e4be68","order":1,"width":8,"height":6,"options":[{"label":"User Name ","value":"Name","type":"text","required":true,"rows":null},{"label":"User Surname ","value":"Surname","type":"text","required":true,"rows":null},{"label":"User PIN","value":"PIN","type":"number","required":true,"rows":null},{"label":"Door OTP","value":"OTP","type":"number","required":true,"rows":null}],"formValue":{"Name":"","Surname":"","PIN":"","OTP":""},"payload":"","submit":"Generate QR Code ","cancel":"Next User QR","topic":"psa003/d1/user_input","x":150,"y":220,"wires":[["3550feb3.b1d3d2"]]},{"id":"1caf5be1.c56cd4","type":"trigger","z":"78e9f8ee.a220c8","op1":"1","op2":"3","op1type":"str","op2type":"str","duration":"20","extend":false,"units":"s","reset":"5","bytopic":"all","name":"Trigger OTP","x":430,"y":160,"wires":[[]]},{"id":"ff31d1f8.6c5a8","type":"ui_text","z":"78e9f8ee.a220c8","group":"cb304cff.e7194","order":1,"width":0,"height":0,"name":"DOOR OTP","label":"DOOR OTP","format":"{{msg.payload}}","layout":"row-spread","x":1150,"y":160,"wires":[]},{"id":"114c1ff8.c0c54","type":"ui_text","z":"78e9f8ee.a220c8","group":"a666df58.bcbed","order":1,"width":6,"height":6,"name":"DOOR OTP","label":"DOOR OTP","format":"{{msg.payload}}","layout":"row-spread","x":1470,"y":280,"wires":[]},{"id":"e224b1ce.161ac","type":"delay","z":"78e9f8ee.a220c8","name":"Delay OTP to Display","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1180,"y":280,"wires":[["114c1ff8.c0c54"]]},{"id":"68f4bb37.cfe444","type":"ui_text","z":"78e9f8ee.a220c8","group":"a666df58.bcbed","order":2,"width":0,"height":0,"name":"Acces Granted count ","label":"Acces Granted count ","format":"{{msg.payload}}","layout":"row-spread","x":1180,"y":220,"wires":[]},{"id":"796a09e7.fb22c8","type":"inject","z":"c4674a8e.970dc8","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":370,"y":320,"wires":[["d1199181.3d3d7"]]},{"id":"d1199181.3d3d7","type":"exec","z":"c4674a8e.970dc8","command":"raspistill","addpay":false,"append":"-w 320 -h 240 -o -","useSpawn":"false","timer":"","oldrc":false,"name":"","x":540,"y":320,"wires":[["92a8943.a95fc68","dd5a91b1.c4904","c1478d3.590627"],[],[]]},{"id":"92a8943.a95fc68","type":"base64","z":"c4674a8e.970dc8","name":"","action":"str","property":"payload","x":700,"y":320,"wires":[["7d2afd4a.b5e824"]]},{"id":"7d2afd4a.b5e824","type":"template","z":"c4674a8e.970dc8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<img width=\"620px\" height=\"540px\" src=\"data:image/jpg;base64,{{{payload}}}\">","output":"str","x":880,"y":320,"wires":[["b5b58ff.aad277"]]},{"id":"b5b58ff.aad277","type":"ui_template","z":"c4674a8e.970dc8","group":"713fc2f0.fb3ccc","name":"Display image ","order":1,"width":"10","height":"8","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1080,"y":320,"wires":[["b87c5695.a71818"]]},{"id":"d0d3c94d.73dbb8","type":"rpi-gpio in","z":"78e9f8ee.a220c8","name":"Flame Detected ","pin":"32","intype":"down","debounce":"25","read":true,"x":120,"y":160,"wires":[[]]},{"id":"8ccb94ae.fa0638","type":"rpi-gpio in","z":"78e9f8ee.a220c8","name":"Motion Detected ","pin":"36","intype":"down","debounce":"25","read":true,"x":120,"y":260,"wires":[[]]},{"id":"525aca41.5ffa54","type":"debug","z":"c4674a8e.970dc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1370,"y":80,"wires":[]},{"id":"b736ca37.910008","type":"NetworkIntf","z":"bd04fea6.38515","name":"Get Network IP","x":180,"y":200,"wires":[["4cf22153.efb55"]]},{"id":"4cf22153.efb55","type":"change","z":"bd04fea6.38515","name":"customise","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.networkInterfaces.*.address[$contains($, /10.11./)]","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"\"http://10.11.12.102:1880/psanode\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":200,"wires":[["6c57bf2f.b9fbb"]]},{"id":"6c57bf2f.b9fbb","type":"exec","z":"bd04fea6.38515","command":"qr","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Generate QR","x":660,"y":200,"wires":[["157b5615.13d50a","73384ea7.c848d"],[],[]]},{"id":"73384ea7.c848d","type":"image","z":"bd04fea6.38515","name":"","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":920,"y":80,"wires":[]},{"id":"157b5615.13d50a","type":"base64","z":"bd04fea6.38515","name":"","action":"str","property":"payload","x":900,"y":320,"wires":[["652f8c07.741f94"]]},{"id":"652f8c07.741f94","type":"template","z":"bd04fea6.38515","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<img src=\"data:image/png;base64,{{{payload}}}\">","output":"str","x":1100,"y":320,"wires":[["4a831476.65698c"]]},{"id":"4a831476.65698c","type":"ui_template","z":"bd04fea6.38515","group":"ec25d63f.f1d1d8","name":"Get acces to Door Node IP","order":3,"width":8,"height":8,"format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1400,"y":320,"wires":[[]]},{"id":"a3bbd118.8b018","type":"inject","z":"bd04fea6.38515","name":"trigger","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":80,"wires":[["b736ca37.910008"]]},{"id":"4f25d54c.eba34c","type":"digest","z":"3e4e4f2e.f0cdc","name":"","algorithm":"SHA256","x":590,"y":220,"wires":[["2cd245b1.0db4ca","bdf630a3.128f2"]]},{"id":"bdf630a3.128f2","type":"ui_text","z":"3e4e4f2e.f0cdc","group":"93fa7745.e4be68","order":18,"width":8,"height":2,"name":"SHA25 Access Key ","label":"SHA25 Access Key ","format":"{{msg.payload}}","layout":"col-center","x":850,"y":320,"wires":[]},{"id":"b87c5695.a71818","type":"image","z":"c4674a8e.970dc8","name":"","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":1300,"y":320,"wires":[]},{"id":"dd5a91b1.c4904","type":"image","z":"c4674a8e.970dc8","name":"","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":820,"y":120,"wires":[]},{"id":"c1478d3.590627","type":"qrdecode","z":"c4674a8e.970dc8","name":"","x":800,"y":80,"wires":[["3ddcc3d4.64350c"]]},{"id":"e0535378.48b1e","type":"exec","z":"d1b06d58.066cb","command":"raspistill","addpay":false,"append":"-w 320 -h 240 -o -","useSpawn":"false","timer":"","oldrc":false,"name":"","x":380,"y":420,"wires":[["c385f2e7.47775","26bfbeba.008b12","36ed2c85.fc86e4"],[],[]]},{"id":"c385f2e7.47775","type":"base64","z":"d1b06d58.066cb","name":"","action":"str","property":"payload","x":540,"y":420,"wires":[["a1df2304.71476"]]},{"id":"a1df2304.71476","type":"template","z":"d1b06d58.066cb","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<img width=\"620px\" height=\"540px\" src=\"data:image/jpg;base64,{{{payload}}}\">","output":"str","x":720,"y":420,"wires":[["7967c5bb.1a914c"]]},{"id":"7967c5bb.1a914c","type":"ui_template","z":"d1b06d58.066cb","group":"d9803c22.335f6","name":"Display image ","order":5,"width":8,"height":8,"format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":920,"y":420,"wires":[["52cb1207.44cc2c"]]},{"id":"28e734d5.4509fc","type":"debug","z":"d1b06d58.066cb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":930,"y":80,"wires":[]},{"id":"52cb1207.44cc2c","type":"image","z":"d1b06d58.066cb","name":"","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":1140,"y":420,"wires":[]},{"id":"26bfbeba.008b12","type":"image","z":"d1b06d58.066cb","name":"","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":620,"y":180,"wires":[]},{"id":"36ed2c85.fc86e4","type":"qrdecode","z":"d1b06d58.066cb","name":"","x":600,"y":140,"wires":[["28e734d5.4509fc","3fafcd5d.47d392"]]},{"id":"783d26d1.673c68","type":"ui_button","z":"d1b06d58.066cb","name":"SCAN QR","group":"d9803c22.335f6","order":2,"width":8,"height":1,"passthru":false,"label":"SCAN QR","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"num","topic":"psa001/d1/qr","x":150,"y":420,"wires":[["e0535378.48b1e"]]},{"id":"ac3087c6.152538","type":"ui_text","z":"d1b06d58.066cb","group":"d9803c22.335f6","order":22,"width":18,"height":1,"name":"QR Decoded ","label":"QR Decoded ","format":"{{msg.payload}}","layout":"col-center","x":1290,"y":80,"wires":[]},{"id":"3ddcc3d4.64350c","type":"change","z":"c4674a8e.970dc8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.object.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1080,"y":80,"wires":[["525aca41.5ffa54"]]},{"id":"3fafcd5d.47d392","type":"change","z":"d1b06d58.066cb","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":140,"wires":[["ac3087c6.152538","8e481118.e7f53","f75b3c8d.8214f"]]},{"id":"8e481118.e7f53","type":"debug","z":"d1b06d58.066cb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1290,"y":120,"wires":[]},{"id":"f75b3c8d.8214f","type":"mqtt out","z":"d1b06d58.066cb","name":"PSA001 QR Value ","topic":"psa001/d1/qrvalue","qos":"","retain":"","broker":"3bcada86.16d976","x":1310,"y":160,"wires":[]},{"id":"7023f8e0.0409e8","type":"switch","z":"78e9f8ee.a220c8","name":"Active 1","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":620,"y":160,"wires":[["dbfb8036.c1feb"]]},{"id":"74047003.b01cc","type":"link out","z":"78e9f8ee.a220c8","name":"","links":["959761b.f4a01a"],"x":1115,"y":360,"wires":[]},{"id":"9727d9e2.92e4b8","type":"rpi-gpio in","z":"d1b06d58.066cb","name":"Scan ","pin":"22","intype":"up","debounce":"25","read":false,"x":130,"y":320,"wires":[["f512ca02.2cacd8"]]},{"id":"f512ca02.2cacd8","type":"debug","z":"d1b06d58.066cb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":350,"y":320,"wires":[]},{"id":"3550feb3.b1d3d2","type":"function","z":"3e4e4f2e.f0cdc","name":"compute a key from id+name+surname+pin","func":"var pl = msg.payload[\"psa001/d1/user_input \"];\n\nvar key = pl.user_emp_id + pl.Name + pl.Surname + pl.PIN;//generate the key\nmsg.user =  msg.payload[\"psa001/d1/user_input \"];\nmsg.payload = key;\n\nreturn msg;\n//\n//\n//\n//\n//var pl = msg.payload;\n\n//var key = pl.user_emp_id + pl.Name + pl.Surname + pl.PIN;//generate the key\n//msg.user =  msg.payload;\n//msg.payload = key;\n\n//return msg;\n\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":140,"wires":[["4f25d54c.eba34c"]]},{"id":"b9eb11ee.c3e03","type":"mqtt in","z":"78e9f8ee.a220c8","name":"Response from server ","topic":"server_response ","qos":"2","datatype":"auto","broker":"3bcada86.16d976","x":160,"y":440,"wires":[[]]}]

3 .flows_psanode.json.backup ( this one was about 2 hours ago )
content :

{"$":"605420f02504dc67ac9bc96539de6b0btMz2nZY2N4qHWPbV8AiRF/BM0fBa"}

EDIT BY PAUL (MODERATOR)
.flows_cred.json.backup edited for security reasons

Number 2 was from a few days ago and very incomplete, 20% of what is missing

how do i check this Nick?

Hi Nick ,

this is the errors after reboot and node-red-restart :

Starting as a systemd service.
Missing ENV var CONFIG_PATH
Starting as a systemd service.
Missing ENV var CONFIG_PATH
Starting as a systemd service.
Missing ENV var CONFIG_PATH
Starting as a systemd service.
Missing ENV var CONFIG_PATH

here is the log file , its seems just before the crach :

===================
12 Jul 10:08:10 - [info] Node-RED version: v1.0.6
12 Jul 10:08:10 - [info] Node.js  version: v10.19.0
12 Jul 10:08:10 - [info] Linux 4.19.118+ arm LE
12 Jul 10:08:29 - [info] Loading palette nodes
Missing ENV var CONFIG_PATH
12 Jul 10:09:19 - [info] Dashboard version 2.22.1 started at /psanode
12 Jul 10:09:21 - [info] Settings file  : /home/pi/.node-red/settings.js
12 Jul 10:09:21 - [info] Context store  : 'default' [module=memory]
12 Jul 10:09:21 - [info] User directory : /home/pi/.node-red
12 Jul 10:09:21 - [warn] Projects disabled : editorTheme.projects.enabled=false
12 Jul 10:09:21 - [info] Flows file     : /home/pi/.node-red/flows_psanode.json
12 Jul 10:09:22 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
12 Jul 10:09:23 - [info] Starting flows
12 Jul 10:09:23 - [info] Started flows
12 Jul 10:09:24 - [info] Server now running at http://10.11.12.102:1880/

Even now after the reboot all the flows are still missing , i have tried to load some of the backups but with no luck, old data from a few dayas ago.

any idea or advice will be highly appreciated

@Peter I've edited your post above. For security reasons, never post your credential hash in a public forum.
It's a bit like hanging your front door key on the outside of your home!

I'd like to think that the node-RED community are a trustworthy lot, but it's always better to be safe than sorry :wink:

oh,sharp ...sorry Paul , i am rookey

Peter. Do you have another node-red or another pi+spare SD card you can set-up?

Try importing the flow files you backed up into another node-red

I wouldn't ordinarily start with this but given your time constraint, it might get you up and running.

Just keep a safe backup on a separate storage - you should be able to recover most of your work.

Ok - now you have a safe copy of your files... you can try

  1. try starting the existing one in safe mode node-red --safe flows_psanode.json - If that works - then try to recall what you had done just previously and undo it :slight_smile:
  2. if not - then (assuming you didn't overwrite by deploying over it) then rename the .flows_psanode.json.backup file to flows_psanode.json and again try starting that in safe mode... (or copy one of the existing backups back here and retry)
  3. What is requiring that CONFIG_PATH setting ? if you know what it should be then try export CONFIG_PATH=whatever_you_think_it_should_be && node-red --safe - or maybe try setting it to /tmp if not sure just in order to get it started...
1 Like

Hi Guys,

Sorry for this delayed response, power blackout ( again). finally, I can continue to see if I can fix this ridiculous situation...

@Steve-Mcl, Steve, No unfortunately not: I have 3 devices here part of the project. A door node -Zero PI ( the bad apple), a Server - PI 4 8GB, and A bastion - PI 4 4 GB, all connected wirelessly over LoRaWAN and was working perfect and the whole solution and all code/project was completed this morning @ promptly 6:00. The door node, the responsibility to read and send the data to the server is the bad apple ( Pi Zero - Door node) so the short answer is No, I don't have a spare device to test and a bit scared to remove anything now from the working server or base station nodes.

@dceejay, Hallo, sorry for the delayed response and thank you for the advice. I will try your advice and respond in a few mints after suggested advice implementation ... I will be back in 5 min

again, thank you for everyone's advice and help, let's see if we can fix this or get the flows back soon ( that will be great ) ..

Hey @dceejay, this was the response for option 1 :

pi@psanode:~/.node-red $ node-red --safe flows_psanode.json
12 Jul 17:29:04 - [info]

Welcome to Node-RED
===================

12 Jul 17:29:04 - [info] Node-RED version: v1.0.6
12 Jul 17:29:04 - [info] Node.js  version: v10.19.0
12 Jul 17:29:04 - [info] Linux 4.19.118+ arm LE
12 Jul 17:29:23 - [info] Loading palette nodes
Missing ENV var CONFIG_PATH
12 Jul 17:30:11 - [info] Dashboard version 2.22.1 started at /psanode
12 Jul 17:30:14 - [info] Settings file  : /home/pi/.node-red/settings.js
12 Jul 17:30:14 - [info] Context store  : 'default' [module=memory]
12 Jul 17:30:14 - [info] User directory : /home/pi/.node-red
12 Jul 17:30:14 - [warn] Projects disabled : editorTheme.projects.enabled=false
12 Jul 17:30:14 - [info] Flows file     : /home/pi/.node-red/flows_psanode.json
12 Jul 17:30:14 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

12 Jul 17:30:15 - [info] *****************************************************************
12 Jul 17:30:15 - [info] Flows stopped in safe mode. Deploy to start.
12 Jul 17:30:15 - [info] *****************************************************************
12 Jul 17:30:15 - [error] Unable to listen on http://10.11.12.102:1880/
12 Jul 17:30:15 - [error] Error: port in use
pi@psanode:~/.node-red $

any suggestions on what to do next, I am going to see if what in the settings file is wrong or missing at CONFIG_PATH. i will see if I can find the line in settings ...

12 Jul 17:30:15 - [error] Error: port in use

node-red is already running, stop it first.

@bakman2, hallo and thank you , let me do that quick ....

HI @bakman2,

the response after stoped ....

Stop Node-RED

Use   node-red-start   to start Node-RED again

pi@psanode:~ $  cd /home/pi/.node-red                                           pi@psanode:~/.node-red $  node-red --safe flows_psanode.json                    12 Jul 17:42:29 - [info]

Welcome to Node-RED
===================

12 Jul 17:42:29 - [info] Node-RED version: v1.0.6
12 Jul 17:42:29 - [info] Node.js  version: v10.19.0
12 Jul 17:42:29 - [info] Linux 4.19.118+ arm LE
12 Jul 17:42:47 - [info] Loading palette nodes
Missing ENV var CONFIG_PATH
12 Jul 17:43:32 - [info] Dashboard version 2.22.1 started at /psanode
12 Jul 17:43:34 - [info] Settings file  : /home/pi/.node-red/settings.js
12 Jul 17:43:34 - [info] Context store  : 'default' [module=memory]
12 Jul 17:43:34 - [info] User directory : /home/pi/.node-red
12 Jul 17:43:34 - [warn] Projects disabled : editorTheme.projects.enabled=false
12 Jul 17:43:34 - [info] Flows file     : /home/pi/.node-red/flows_psanode.json
12 Jul 17:43:35 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

12 Jul 17:43:35 - [info] *****************************************************************
12 Jul 17:43:35 - [info] Flows stopped in safe mode. Deploy to start.
12 Jul 17:43:35 - [info] *****************************************************************
12 Jul 17:43:36 - [info] Server now running at http://10.11.12.102:1880/

When I lost my flows file, the backup was there, about 5 minutes older, so I did not lose much. But it was a case where NR crashed, and my active flows file disappeared. But I did not lose any other files in .node-red. Not sure my experience is applicable to this scenario. But to those that know the NR code, I defer of course. Just wanted to remind you of my scenario, if in some way it might be applicable. I was on a raspberry Pi as well, btw.

HI @Nodi.Rubrum, thanks for your replay , unfortunately when my RPI crassed at 7:00 this morning , i have tried to many recoveries of older backups by importing the flows and deployed. i think that what rewrited any posibilities of recovery, i hope i am wrong and some one can came a long and say ...just do this and that and all is good again but I am almost sure i will need to sit and remember what all i have created and start over from a backup a few days older .

Post your flow files here. I'll check them for you.

Thanks @Steve-Mcl, Steve . i decided to build everything from scratch as my memory is least still fresh and have little time to get this done .

I would be awesome if you could help me later with when I am passing the payload from the QR reader to the server. can remember how to , it would just be fantastic to know there is someone on standby if i dont succeed ( Syntex logic issues )

I am building like a machine now as we speak and can do this !! super motivated . I just would need some assistance if i struggle ...

Steve , you are a hero in my book!! hopefully i can be as good as you one day

now the OLED display dont want to work any more , regardless