npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-datamatrix-restore

v1.1.1

Published

Reads QR and Data Matrix codes from noisy DPM photos and returns the scanned text

Downloads

255

Readme

node-red-contrib-datamatrix-restore

Node-RED node Code restore. It crops a noisy QR or Data Matrix photo (including industrial DPM), reads the code, and returns the scanned text.

The same node runs on Windows, Linux, and ARM. Install dependencies on the machine that runs Node-RED. Do not copy node_modules between operating systems.

Requirements

  • Node.js 18 or later
  • Node-RED 3.0 or later
  • Internet only during npm install (so sharp can download the native binary for that OS/CPU)

Install

Palette Manager (after the node is in the Node-RED library)

  1. Menu → Manage paletteInstall
  2. Search for datamatrix-restore or Code restore
  3. Install node-red-contrib-datamatrix-restore
  4. Restart Node-RED if the editor asks you to

npm (recommended)

In your Node-RED user directory:

cd ~/.node-red
npm install node-red-contrib-datamatrix-restore

Windows:

cd %USERPROFILE%\.node-red
npm install node-red-contrib-datamatrix-restore

Restart Node-RED. The node appears in the palette as Code restore.

From GitHub

cd ~/.node-red
npm install rivasrayos/node-red-contrib-datamatrix-restore

From a local clone

git clone https://github.com/rivasrayos/node-red-contrib-datamatrix-restore.git
cd ~/.node-red
npm install /path/to/node-red-contrib-datamatrix-restore

Docker / offline devices

If the Node-RED host has no outbound internet, npm install on that device will fail.

On a PC with internet, install native modules for the target OS, then copy the package (including node_modules) into the Node-RED user directory.

Example for Alpine Linux ARM64:

npm install --omit=dev --cpu=arm64 --os=linux --libc=musl

Copy the folder into node_modules/node-red-contrib-datamatrix-restore inside the Node-RED user directory and restart Node-RED.

zxing-wasm is loaded from the local .wasm file. The node does not download WASM at runtime.

Flow

image URL or Buffer → Code restore → debug

A separate crop node is not required. Send the image in msg.payload and { x, y, width, height } in msg.crop.

Input

| Property | Type | Description | | --- | --- | --- | | msg.payload | string or Buffer | Image URL or image Buffer (configurable) | | msg.crop.x | number | Crop left | | msg.crop.y | number | Crop top | | msg.crop.width | number | Crop width | | msg.crop.height | number | Crop height |

Output

| Property | Type | Description | | --- | --- | --- | | msg.payload | string | Scanned text | | msg.format | string | QR or DataMatrix | | msg.image | Buffer | Clean 200×200 PNG | | msg.original | Buffer | Cropped photo |

If the code cannot be read, the node reports an error and does not send a message.

License

MIT