GM861 Barcode/QR reader not sending data #18399
-
Hi there, I've purchased a GM861 barcode/QR scanner that I've hooked up on a Wemos D1 mini pro the following way:
Whenever I scan a barcode the ring on the GM861 turns green, meaning that it has read the barcode succesfully. Only thing is that that code doesn't show up in the console. I've used the "classic" Tasmota and Tasmota Sensors, but with my settings it doesn't show a code. I've looked at a post on Arduino.cc where someone wrote an .INO to publish the bar/QR-codes. How do I get Tasmota to show (and later on publish) the barcode, just like with a regular meterreading of a sensor? For those wondering: I was thinking of implementing this in my kitchen so I can read the barcodes of things we need to buy. Send the barcode to Home Assistant, create an automation that puts it in my shopping list. |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 17 replies
-
SerialTX/SerialRX will not work on GPIO ohters than the native ESP8266 UART GPIO 1 & 3 - but in that case you must disconnect USB from your Wemos and power with 5V through the headers. When having to deal with serial devices, it's more reliable to go for a ESP32 or ESP32-C3 which have more hardware UARTs. |
Beta Was this translation helpful? Give feedback.
-
I don't have an ESP32-board at hand (at the moment). I've tried setting up the SerialBridge but I couldn't get it to send the data. I've found the datasheet/manual and this would be the most interesting part I presume: Baudrate 9600 bps; No check; 8 bit data; 1 bit stopbits; No flowcontrol. I've set it all, but no data. |
Beta Was this translation helpful? Give feedback.
-
Hi Crispy78, If I understand your problem correctly, you get no scanned data transmitted from GM861's TXD output, right? I just gave some random tries and got at least something by following the steps below
After that I got something (6..7 digit numbers?) came out from the module. then I scanned the QR codes on <<1.1.1 Read Version Information>> and <<1.1.2 Read the Unique Device ID>>, both gave me seemingly correct (meaningful) strings shown on my terminal software. My set up is as follows:- GM861 - Serial/USB dongle - PC running teraterm, config'd 9600-8-N-1, no flow control Wireing:- As you may have already found out, the datasheet is horribly incomprehensible so I ended up with guessing game but at least i made a bit of headway so hopefully this also helps you. |
Beta Was this translation helpful? Give feedback.
-
Just to give you a quick update. I also scanned couple of QR codes printed on a paper and the module gave me the URLs burried in the codes seemingly correct. |
Beta Was this translation helpful? Give feedback.
-
I ordered one. Takes three weeks to arrive. I'll see if I can write a driver for it. |
Beta Was this translation helpful? Give feedback.
-
EUREKA!!! :-) I've used a Wemos D1 loaded with http://ota.tasmota.com/tasmota/tasmota.bin.gz. My console output is now:
|
Beta Was this translation helpful? Give feedback.
-
Good to know it worked on your side as well..! Thanks for updating me with your result :) |
Beta Was this translation helpful? Give feedback.
-
Any idea's how I can add the GM861 data as a sensor to my Tasmota device in Home Assistant? I was hoping it was as easy as "rule2 ON SerialReceived#Data DO Publish stat/%topic%/SENSOR {"Barcode":%value%} ENDON", I've been Googleling but I might have overlooked a thing or two or I'm thinking way to easy or way to difficult. It used to publish these in the logs: I've got it to publish these via MQTT (don't ask me how 😃) So I could build a Home Assistant MQTT sensor, it would be nicer if it displayed the data as a sensor on the device page of HA. |
Beta Was this translation helpful? Give feedback.
-
Try latest dev branch (v12.5.0.2) and enable GM861 driver with
|
Beta Was this translation helpful? Give feedback.
-
it Works also with GM 60 tested today. Only for Information. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the great work, with Tasmota and the GM861 driver. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I bought the GM60 like @spoeh-man , to create a barcode scanner connecting Grocy and HA [1] built by @ XDROLLOXD. Unfortunately, I see that the scanner recognizes barcodes, but does not transmit any to my ESP32 wroom (arduino serial monitor shows Moreover, I would like to test if it works correctly with Tasmota and a Wemos D1 (and my esp32). Can you confirm that I need GPIO 1 & 3 for the TX and RX cables @spoeh-man? I have to add that this is completely new territory for me. thanks! Ps. I also tried to run the example libraries posted on the GM60 github pages, without any success, but based on my interpretation of your discussion and the datasheet/manual, it can be that this is caused by having different baudrates? So I will check for this too. [1] https://github.com/XDROLLOXD/ESP32_Grocy_Barcode_Scanner |
Beta Was this translation helpful? Give feedback.
-
@barbudor , ok. All works well for me… the thing was that the barcode scanner needs a faiir amount of light to work… with hindsign I started to test the scanner in a dimmed room, then nothing worked and started to do a kind of russian roulette with the wires… Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Try latest dev branch (v12.5.0.2) and enable GM861 driver with
#define USE_GM861
.Gm861Reset 1
Gm861Zone<byte> <value>
likeGm861Zone0
.Gm861Dump
.