# Barcode scanner trigger a flow

**URL:** <https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327>\
**Category:** General\
**Created:** [24 June 2022 13:03 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327 "2022-06-24T13:03:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgottie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tgottie](https://discourse.nodered.org/u/tgottie)\
**Post date:** [24 June 2022 13:03 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/1 "2022-06-24T13:03:52Z")

</div>

alright, so this is what i have got together so far, i am using a datalogic powerscan m8300 connected by usb using a raspberry pi4. what i would like to do is scan an item and start the flow like an inject node. i have tried serial-in node but i receive the errors below

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/9/a9f4bdc8474d288fb5a447962642dce5acb18a98.png)

and when i try pointing it to its usb path i get

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5a46acde8c872aea2139623e3e710995d1541362.png)

this scanner is considered keyboard style scanner, so when looking up the second warning i got information on its because this isnt a serialport item. but i cant seem to find any palettes that can pull information from a usb. i did have some luck with pi-gpio keyboard module, but if i scanned the letter e the output that i pulled from debug was a numeric and for some reason it was a different numeric each time so i was not able to utilize this properly. it would be incredibly ideal to pull the information typed by the scanner. and be able to make decisions based on what was scanned. even if it was just one letter. if i could consistently catch the letter e and make a decision when the letter e is caught but make a different decision when 8 is scanned, that would be perfect. but pi-gpio had no consistency.

if anyone has any ideas or input it is greatly needed

thank you to anyone that answers this and helps come up with some solutions.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [24 June 2022 13:07 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/2 "2022-06-24T13:07:05Z")

</div>

Usb keyboards and mouse are more often than not USB HID (Human Interface Device)

This may or may not work...

> **[node-red-contrib-usbhid](https://flows.nodered.org/node/node-red-contrib-usbhid)**
>
> A node-hid (USB HID device access library) wrapper for nodered

---

<div class="post-metadata">

**Author:** ![tgottie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tgottie](https://discourse.nodered.org/u/tgottie)\
**Post date:** [24 June 2022 13:25 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/3 "2022-06-24T13:25:57Z")

</div>

i have tried this palette module many times, this is the install err i receive

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4da338107291367bb8f37636dc88eaaed7f48958.png)

i am sure this is a hid device based on what i been able to pull. but can seem to find a hid palette that works.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [24 June 2022 13:29 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/4 "2022-06-24T13:29:26Z")

</div>

Did you install the pre-requisites?

Anyhow, i suspect the node wont work with newer nodejs

try the suggestions in the last comment of this gihub issue thread: [RBP4 unable to install the modul · Issue #9 · somebuddy87/node-red-contrib-usbhid · GitHub](https://github.com/somebuddy87/node-red-contrib-usbhid/issues/9#issuecomment-803461466)

---

<div class="post-metadata">

**Author:** ![tgottie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tgottie](https://discourse.nodered.org/u/tgottie)\
**Post date:** [24 June 2022 13:51 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/5 "2022-06-24T13:51:52Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/2/b272f00faeff3918051b1d78bc16206c85c1450f.jpeg)  
after installing the pre-reqs i still receive errors installing 😕 new errors though. scrolling above in the picture was 2 pages worth of these errors  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/6/1652d1a4fc3841a0d528231118a62306547e4fff.jpeg)

---

<div class="post-metadata">

**Author:** ![tgottie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tgottie](https://discourse.nodered.org/u/tgottie)\
**Post date:** [24 June 2022 14:39 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/6 "2022-06-24T14:39:33Z")

</div>

i found the issue with the scanner, in the online manual there is a section that allows your to change the scanning behavior from USB-IBM-Hand Held to USB-COM which makes it behave as a serial device. i am able to pull tags with the scanner now!! 😃

[https://www.sensorcentre.com/uploads/manuals/PD8330%20&%20PM8300%20Full.pdf](https://www.sensorcentre.com/uploads/manuals/PD8330%20&%20PM8300%20Full.pdf) if anyone else is having this issue using a datalogic its on page 38-39.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [24 June 2022 14:46 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/7 "2022-06-24T14:46:54Z")

</div>

> [@tgottie](#):
>
> i found the issue with the scanner, in the online manual there is a section that allows your to change the scanning behavior from USB-IBM-Hand Held to USB-COM

This was gonna be my first suggestion but your OP said...

> [@tgottie](#):
>
> this scanner is considered keyboard style scanner

Oh well - glad it is sorted.

---

<div class="post-metadata">

**Author:** ![tgottie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tgottie](https://discourse.nodered.org/u/tgottie)\
**Post date:** [24 June 2022 18:09 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/8 "2022-06-24T18:09:00Z")

</div>

yeah, i had looked through the physical manual and that information wasnt in there. after looking at the online manual i had seen that capability. thank you very much for the help though 🙂

---

<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:** [8 July 2022 18:09 UTC](https://discourse.nodered.org/t/barcode-scanner-trigger-a-flow/64327/9 "2022-07-08T18:09:59Z")

</div>

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