@qrcode-ai-com/node-red-qrcode-barcode-scanner 0.1.1

Node-RED node that reads QR codes and barcodes in image buffers or files, locally, with the QR Code & Barcode Scanner engine

npm install @qrcode-ai-com/node-red-qrcode-barcode-scanner

QR Code & Barcode Scanner for Node-RED: the Node-RED logo, the node and its settings, and a QR code and a barcode being read

QR Code & Barcode Scanner · Node-RED node 0.1.1

Ask AI

ChatGPT Claude Gemini Grok Perplexity Copilot DeepSeek Meta AI Qwen

Choose an AI assistant to explain this destination using its public sources. Gemini opens gemini.google.com. Gemini, Copilot, DeepSeek, Meta AI and Qwen require pasting the prompt below; the other links include it in their URL. Sign-in or a manual paste may still be required. Check the answer against the documentation.

Copy the plain-text prompt

Use the code block's copy control, or select its complete text, then paste it into your assistant.

Help me understand QR Code & Barcode Scanner · Node-RED node 0.1.1 (integrations/node-red/README.md) for QR Code & Barcode Scanner, the open-source scanner. Source documentation; publication is not implied. Provided README context (verify against the sources): This Node-RED node reads the QR codes and barcodes in an image and sends the scanner report on, with the decoded texts ready to use. It takes image bytes or the path of an image file, runs the open-source scanner engine on the Node-RED host in a worker thread, and makes no network call. It is published on npm as @qrcode-ai-com/node-red-qrcode-barcode-scanner and installs by that name with npm. It is not in the Node-RED Flow Library. Read the public documentation below. Explain what this destination does, its documented installation or access steps, a minimal example if supported, prerequisites, limitations and license. Distinguish published packages from working source and preparation. Cite your sources; if a page is unavailable or a fact cannot be checked, say so. Do not invent installation commands, benchmark results or comparisons. Answer in my language. Public sources: https://github.com/qrcode-ai-com/qrcode-barcode-scanner-rust/blob/main/integrations/node-red/README.md https://qrcode-ai.com/en-US/qr-code-scanner https://qrcode-ai.com/en-US/barcode-scanner https://qrcode-ai.com/en-US/qr-code-scanner/integrations/node-red https://qrcode-ai.com/en-US/barcode-scanner/integrations/node-red https://qrcode-ai.com/en-US/qr-code-generator https://qrcode-ai.com/en-US/barcode-generator

This Node-RED node reads the QR codes and barcodes in an image and sends the scanner report on, with the decoded texts ready to use. It takes image bytes or the path of an image file, runs the open-source scanner engine on the Node-RED host in a worker thread, and makes no network call. It is published on npm as @qrcode-ai-com/node-red-qrcode-barcode-scanner and installs by that name with npm. It is not in the Node-RED Flow Library.

You can try the same engine in a browser first. The QR code scanner reads a QR code image, and the barcode scanner reads a barcode label. The QR code scanner guide for Node-RED and the barcode scanner guide for Node-RED explain this node for each kind of code. To call the engine from your own code instead, read the QR code scanner SDK guide and the barcode scanner SDK guide.

To make test images, use the QR code generator for a QR code and the barcode generator for a barcode. Keep the text you encoded next to the image, then compare it with msg.texts, leading zeroes included.

Before you install

The node needs Node-RED 5.0 or later, which needs Node.js 22.9 or later. The engine is WebAssembly, so the package needs no native build and no compiler, and it does not depend on the processor or the C library of the host.

Install

Install it from a shell in your Node-RED user directory, usually ~/.node-red, then restart Node-RED:

cd ~/.node-red
npm install @qrcode-ai-com/node-red-qrcode-barcode-scanner

The Install tab of Manage palette searches the Flow Library catalogue, which does not list this package. After the restart, the node appears in the parser category of the palette as qr & barcode scan.

To remove it, use Manage palette again, or run npm uninstall @qrcode-ai-com/node-red-qrcode-barcode-scanner in the same directory and restart.

Use

Wire the node after any node that puts an image in a message: file in with a single Buffer output, http request with a binary response, an MQTT input carrying image bytes, or an inject node with a file path.

  • Image is the message property that holds the image, msg.payload by default. It can hold a Buffer of PNG, JPEG, WebP or GIF bytes, or the path of an image file. A relative path starts from the Node-RED working directory, like the core file nodes.
  • Profile is frame by default, which decodes every code without scoring. fast and full also score how well a QR code scans.
  • Budget (ms) replaces the profile's time budget, from 0 to 60000. Leave it empty for the profile default. 0 removes the budget. It is not a hard timeout.

A message can override the settings with msg.profile and msg.budgetMs. The node keeps every other property of the message.

To import a ready flow, open the menu, choose Import, then Examples, and select scan-image under this package. It scans an image path, sends the decoded texts or the empty result to two debug nodes, and catches scan errors with a catch node.

What it returns

The node sets three properties and sends the message on:

  • msg.payload is the complete scanner report, unchanged: detections, scores, hints, trace and versions.
  • msg.texts lists the decoded texts, one per code, in report order. For the image in the picture below, it is ["https://qrc-ai.com/76xMa", "STOCK-4827"].
  • msg.codes holds one object per code, with symbology (such as qr_code or code128), text, the exact bytes in base64 as raw, charset and the parsed payload.

An image without a code is a normal result: msg.texts is an empty array and the status reads no code. A corrupt file, an unknown format, a missing file or an input over the limits raises an error that a catch node receives, and the status shows its code, such as QRS-001 or QRSCAN_INPUT_LIMIT. The frame profile leaves msg.payload.score null, because it does not score.

Limits

Each image can have at most 8 MiB, 4096 pixels per side and 16 million pixels in all. The node never opens a decoded link: treat every decoded text as untrusted data before a later node acts on it. Scans run one after the other in one worker thread per Node-RED process, so the other flows keep running during a long scan.

Build and test from source

The node is nodes/scan.js with its editor file nodes/scan.html. Its scan core, nodes/scan-core.js, is generated from the shared core of the three JavaScript automation hosts; edit the source there and run node integrations/automation-js-core/sync.mjs.

cd integrations/node-red
npm ci
npm test
npm pack

The tests load the node into a Node-RED 5 runtime with node-red-node-test-helper. They scan the mixed fixture as a Buffer and as a file path in the three profiles, an empty image, a corrupt file, a missing file and wrong inputs, and run the packaged example flow with the core switch and catch nodes. They do not open the editor: install the package once in a real Node-RED before a release.

How it works

Scan inside your application, in Rust, Node.js, browser WASM or Python, in three steps: install and initialize, pass an image or a camera frame, read the result.

The node follows the same three steps. It installs the engine with the package, passes each image to it, and puts the report on the message.

The codes in one report

A QR code and Code 128 decoded from the same image, each outlined where the engine measured it

The picture is a recorded scan of one image that holds a QR code and a Code 128 barcode. Both codes come back in the same report, each with its format, its exact text and the place where the engine measured it.

What it reads

The code families the engine reads: QR codes, matrix and stacked codes such as Data Matrix, retail barcodes such as EAN-13, and other linear barcodes such as Code 128

  • QR: QR Code, Micro QR, rectangular Micro QR (rMQR)
  • Matrix and stacked: Data Matrix, Aztec, PDF417, MaxiCode
  • Retail: EAN-13, EAN-8, UPC-A, UPC-E
  • Other linear: Code 128, Code 39, Code 93, Codabar, ITF, GS1 DataBar, GS1 DataBar Expanded, Telepen

The engine's supported formats section states the known limits.

The same engine in other runtimes

One engine in the language you write: Rust on crates.io, Node.js and the browser on npm, Python on PyPI, Go, PHP, and the qrscan command line

The same engine also runs as an n8n community node and an Activepieces piece. The Rust, Node.js, browser and Python packages hold the engine, and every route is listed in the scanner repository.

Licensing

The node's own source is MIT, in LICENSE. The package installs the published engine, @qrcode-ai-com/qrcode-barcode-scanner-wasm 0.12.0, as a separate npm dependency. That engine is MIT too, and two of its reader parts keep their Apache-2.0 notice: the engine package ships LICENSE, LICENSE-APACHE-2.0 and THIRD-PARTY.md. The node copies no engine code into its own package. Version 0.1.0 of the node installs engine 0.11.0, which keeps its AGPL-3.0-or-later license. Read the engine's packaged license before you distribute a Node-RED installation that includes it.

Maintained by Thibaut Mélen & Nicolas Cella for QR Code AI, a product of SuperNovae Studio.

Source license

Project-authored scanner code and documentation in this checkout are available under the MIT License. You may use, modify and redistribute this source in open-source or proprietary applications, including commercial products, while preserving the copyright and permission notice. Thibaut Mélen & Nicolas Cella develop QR Code AI at SuperNovae Studio.

Retained third-party code, dependencies, artwork and test data keep their own licenses and notices. The licensing guide explains these component boundaries; the project license does not assign a license to an unrelated platform or service.

Published archives retain the license shipped with their version. A pinned engine, adapter or bundle may therefore have different terms from this working source. Read its packaged license and the license history before reuse. The source change does not replace an archive or publish a new version.

Node Info

Version: 0.1.1
Updated 4 days ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

470 in the last week

Nodes

  • qrcode-barcode-scanner

Keywords

  • node-red
  • qr-code
  • barcode
  • barcode-scanner
  • qr-code-scanner
  • scanner

Maintainers