This Node-RED module integrates the Dynamsoft Barcode Reader SDK, enabling barcode reading capabilities within your Node-RED flows.
-
Install Node.js
-
Install Node-RED
npm install -g --unsafe-perm node-red node-red
When you run
node-red
for the first time, a folder named.node-red
will be created in your home directory:- Windows:
%userprofile%\.node-red
- Linux:
~/.node-red
If the default port
1880
is occupied, modify it in.node-red/settings.js
to use a different port, such as18800
. - Windows:
-
Download the project and install the Node-RED Barcode module into your
.node-red
folder:cd %userprofile%\.node-red # Windows cd ~/.node-red # Linux npm install <path-to-node-red-barcode-module>
-
Launch Node-RED:
node-red
-
In the Node-RED web editor, add the following nodes:
- Inject Node
- File Node
- Barcode Node
- Debug Node
Configure the
File Node
to specify the path of the file you wish to read. The file can be an image (PNG, JPG, BMP, GIF, TIFF, PDF) or a file containing a base64 string. To display results in the console, enable the system console option in theDebug Node
. -
Click on the Barcode Node to set your license key and customize the barcode parameter template:
Note: If the parameter template is left empty, the default settings will be applied.
-
Execute the Node-RED flow to see the barcode results displayed in the console: