# Getting data from a barcode scanner into a Raspberry Pi (without using a dashboard)

**URL:** https://discourse.nodered.org/t/getting-data-from-a-barcode-scanner-into-a-raspberry-pi-without-using-a-dashboard/93512
**Category:** Industrial
**Created:** [27 November 2024 11:43 UTC](https://discourse.nodered.org/t/getting-data-from-a-barcode-scanner-into-a-raspberry-pi-without-using-a-dashboard/93512 "2024-11-27T11:43:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)
#### Post date: [27 November 2024 11:43 UTC](https://discourse.nodered.org/t/getting-data-from-a-barcode-scanner-into-a-raspberry-pi-without-using-a-dashboard/93512/1 "2024-11-27T11:43:09Z")

</div>

Looking for an alternative to outrageously expensive industrial-grade barcode scanners for tracking start/end batch times in some of the old production lines (you know, the ones controlled by analog relays and timers, without PLC), I decided to give a try to a few Raspberry Pis (model 3B) that IT had lying around in a corner.

The idea was to get a regular, inexpensive 1D barcode scanner to use with the work order sheets (they have a barcode printed along that I can scan to get the details of the order).

I'd 3D print a DIn rail mount for the PI, and the barcode readers would be installed next to the input and output ports of the production line. The idea is to have just a pair of LEDs (green for successful read, red for error) and the barcode reader connected to the Pi. No screen, no dashboard to speak of.

Now, I installed @gdziuba/node-red-usbhid (which was updated 11 months ago, as opposed to the node-red-contrib-usbhid which hasn't updated in years). The instructions for both seem to be identical.

I followed the instructions to the letter, but I get an error, [as I described in the nodes github issues](https://github.com/gdziuba/node-red-contrib-usbhid/issues/9#issuecomment-2503408205).  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/66ce968483d89fb95b48004d83ed7ee5df962c4b.png)  
now, this seems to be an issue with the permissions, but I added the standard user to an input group exactly as the instructions describe, and I haven't been able to get it working.

Any ideas to solve this, or any working alternative?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [27 November 2024 12:48 UTC](https://discourse.nodered.org/t/getting-data-from-a-barcode-scanner-into-a-raspberry-pi-without-using-a-dashboard/93512/2 "2024-11-27T12:48:07Z")

</div>

Did you also try the default node-red-node-pi-gpio nodes that have a pi-keyboard node that may provide key codes as if it was a keyboard ? Worth a try maybe.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [26 January 2025 12:48 UTC](https://discourse.nodered.org/t/getting-data-from-a-barcode-scanner-into-a-raspberry-pi-without-using-a-dashboard/93512/3 "2025-01-26T12:48:45Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
