Hi, thanks for your feedback.
First I installed [node-red-contrib-camerapi ] from Node-Red manage palette, updated and run
sudo apt-get install python-picamera python3-picamera (according to instructions on: node-red-contrib-camerapi (node) - Node-RED and there is where I am now.
Now, what do you mean by not using sudo?
How I go back and repair it from where I am now?
Just reinstalled the whole set:
Raspberry Pi, updated, Node-red, node-red-contrib-camerapi, updated again, sudo apt-get install python-picamera python3-picamera
Problem remains identical.
I must be missing something very simple, can't find a solution everywhere I looked.
A footnote on the instruction page I mention above says:
This node is tested on RASPBIAN (buster), Nodejs V12.x LTS and NPM 6.x on Node-Red 1.0.6
The script that installs Node-Red installed Nodejs v16.17.0
Installed NPM as well but no change.
So you can use sudo to run a command as the all powerfull "root" user
pi@MyPi:~ $ sudo whoami
Beginners occasionally think that they have to use sudo to run every command.
It is a really bad idea because your directories can get clogged up with files owned by root, whose presence can prevent normal operations.
On your newly installed Pi run these commands:
raspistill -o anothertest.jpg
ls -l anothertest.jpg
In Node-red, use an Exec node to execute raspistill -o yetanothertest.jpg
Use a debug node to show the returned message (the first output) and any error (the second output)
pi@picamera:~ $ ls -l
drwxr-xr-x 27 pi pi 4096 Oct 1 16:24 node_modules
-rw-r--r-- 1 pi pi 8338 Oct 1 16:24 package-lock.json
-rw-r--r-- 1 pi pi 2154070 Oct 1 16:11 testshot.jpg
-rw-r--r-- 1 pi pi 2251991 Oct 1 16:25 testshotNew.jpg
OK, it looks like the raspistill command doesn't give any useful success message - many Linux commands (deliberately) are silent if they succeed. So the empty output from the exec node isn't a sign of failure.
Probably the camerapi node actually calls raspistill, so it's blank output is not necessarily a bad sign either. But the node help does say this " msg.payload will give you the path and the filename including extension to the photo."
Has camerapi created an image file?
Just to double check, which Rasberry Pi OS have you installed ? As far as I know the picamera library (which the installed node seems to use) would not run on 64-bits. So far we know that your hardware os good and you can capture picture with raspstill, which is good.