This node allows to take picture from standard USB webcam connected to a Raspberry.
It uses the fswebcam package.
Install the fswebcam package on the Raspberry
From your node-red directory:
npm install node-red-contrib-rpi-imagecapture
or
in the Node-red, Manage palette, Install node-red-contrib-rpi-imagecapture
The fswebcam configuration needs to be defined into a file stored in the Raspberry.
The available options can be found using the fswebcam -help command.
For example :
device /dev/video0
resolution 640X480
set brightness=70%
set contrast=70%
no-banner
jpeg 95
skip 10
set "Focus, Auto"=False
set "Focus (absolute)"=7
rotate 180
The path to the configuration file needs to be defined into the node properties.
The picture is captured when a msg arrived into the node.
The captured picture is stored in a Buffer object in msg.payload.capturedImg.
MIT License