I am using these nodes to do some image processing on a locally hosted 567 KB file (see sample attached jpeg)
This flow works on a RPi Zero. It takes about 30 seconds for the output to appear in the debug node, and another 30-45 seconds for the image to appear in the Viewer node:
[{"id":"7b5298742b600106","type":"file in","z":"7ab8211d86815752","name":"","filename":"/home/rpi0c/test1.jpg","filenameType":"str","format":"","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":340,"y":620,"wires":[["2f63038ac579084d","09aee8b775bb98b8"]]},{"id":"a75dd86ce191280d","type":"inject","z":"7ab8211d86815752","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":620,"wires":[["7b5298742b600106"]]},{"id":"2f63038ac579084d","type":"debug","z":"7ab8211d86815752","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":740,"wires":[]},{"id":"09aee8b775bb98b8","type":"image viewer","z":"7ab8211d86815752","name":"","width":160,"data":"payload","dataType":"msg","active":true,"x":610,"y":540,"wires":[[]]}]
However, adding more complexity like this causes Node-RED to crash (or at least that is what I believe is happening):
[{"id":"7b5298742b600106","type":"file in","z":"7ab8211d86815752","name":"","filename":"/home/rpi0c/test1.jpg","filenameType":"str","format":"","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":380,"y":320,"wires":[["2f63038ac579084d","6b9ff5cfae66000a"]]},{"id":"a75dd86ce191280d","type":"inject","z":"7ab8211d86815752","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":320,"wires":[["7b5298742b600106"]]},{"id":"2f63038ac579084d","type":"debug","z":"7ab8211d86815752","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":580,"y":500,"wires":[]},{"id":"6b9ff5cfae66000a","type":"jimp-image","z":"7ab8211d86815752","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":".7","parameter1Type":"num","parameter2":"","parameter2Type":"msg","parameter3":"","parameter3Type":"msg","parameter4":"","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":0,"jimpFunction":"greyscale","selectedJimpFunction":{"name":"greyscale","fn":"greyscale","description":"remove colour from the image","parameters":[]},"x":620,"y":320,"wires":[["df118e676152ee4f","750771f347d6065f"]]},{"id":"df118e676152ee4f","type":"image viewer","z":"7ab8211d86815752","name":"","width":160,"data":"payload","dataType":"msg","active":true,"x":670,"y":380,"wires":[[]]},{"id":"750771f347d6065f","type":"jimp-image","z":"7ab8211d86815752","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"","parameter1Type":"msg","parameter2":"","parameter2Type":"msg","parameter3":"","parameter3Type":"msg","parameter4":"","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":0,"jimpFunction":"invert","selectedJimpFunction":{"name":"invert","fn":"invert","description":"invert the image colours","parameters":[]},"x":790,"y":320,"wires":[["59ea95591285fe1a","12e432d2a2a5e34d"]]},{"id":"59ea95591285fe1a","type":"image viewer","z":"7ab8211d86815752","name":"","width":160,"data":"payload","dataType":"msg","active":true,"x":850,"y":380,"wires":[[]]},{"id":"12e432d2a2a5e34d","type":"file","z":"7ab8211d86815752","name":"","filename":"digits.png","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":960,"y":320,"wires":[["2fdea0775e5675af"]]},{"id":"2fdea0775e5675af","type":"debug","z":"7ab8211d86815752","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1120,"y":320,"wires":[]}]
Again, it takes about 30 seconds for the output to appear, but in this case after about 8 minutes, no images appear and this is what the log looks like:
Any ideas what could be causing this? Am I over reaching by using a RPi Zero for this? I only need to process the image (which changes regularly) about once per minute.