How to prevent scanner reader from reading the same qr code twice

I have a scanner that reads qr codes for delivery packages, the problem is that I can’t do the for each, it reads ten, twenty times the same qr code, what I need is that it reads only once, each try to scan again it returns the message already scanned.

I created a block but it didn’t work very well

block I created more does not work

You can store into tinydb each value of the scanned qr. Every time it is scanned, compare with the list stored in tinydb, if it is different, do what you need to do and add this new value in the scan list.
If it’s already on the list, do nothing…

Welcone ! @Fabio_Alves

Did You try ? :point_up:

You try all your post with solution ???
Please give me a few minutes and you will see that what I say is true !!!

Good Morning. You didn’t understand what I asked: I asked if he ( @Fabio_Alves) had tried to make that tip.

For those who are starting this site it has helped me a lot of a Mexican

yes, being able to make it read the qrs and not allow it to read repeatedly, the problem now it breaks the list, for example, I will scan ten packages if on the 9th I repeat beep it leaves the screen, does not save the variables and does not allow reading again, it’s not clearing the variables, I know it’s a little confusing.

What I’m going to try to do now is put a button on the screen like the example below, I think it will get better.


I am studying ways to create this extension, and I found this maybe I can build the barcode scanner in java the way I want it.

1 Like

After scan check if result exists in TinyDB.tags.
If it is not in tag list then store result as tag (not as value).

I will publish a new extension today, it will help you!
stay tuned!

1 Like

The extension is here :grin:

1 Like

I look forward to