replaysMike / Binner

Open source parts inventory system for makers, electronics hobby, and professional engineers
https://binner.io
GNU General Public License v3.0
248 stars 37 forks source link

[Bug]: Custom Label QR not displayed #259

Closed MatthaeusLeiner closed 3 months ago

MatthaeusLeiner commented 4 months ago

Binner version

v2.6.1

Operating System

Windows 10 x64

Describe the bug and the steps to reproduce it

I tried using the label editor and replace the 2D Matrix code with a QR-Code but it still displays the Matrix. I tried restarting Binner Service but there is no difference. I tried to edit the "Parts Label Small".

Would you like to attach your appsetings.json configuration?

No response

Screenshots or Videos (Optional, but they help!)

image

Are you able to contribute a PR? (No is ok!)

No, because I do not know how

replaysMike commented 3 months ago

taking a look at this now, will include a fix in next deployment.

replaysMike commented 3 months ago

ok so I've looked into this, and here's what I found. That is indeed a QR code, it's storing a lot of data so it probably looks a little more dense than what you're used to seeing and it's cropping the corners slightly. It would scan from some iPhone apps, but not all - for example the iPhone camera itself will only recognize QR codes that contain an HTTP link.

When scanning via an app such as "Scandit" (iOS), or my NT-1228BL hand scanner it does scan the data as:

[)>␞06␝NCC-1701-G␝1PNCC-1701-G-TI4473␝K␝THIS PART IS AN PLACEHOLDER FOR AN ACTUAL PART FOR PRINT TESTING PURPOSES.␝18␝1␝DIP8␝Q500␝VANCOUVER␝BIN 11␝21␝M\r\r␄\r

image

But I wasn't able to scan from other apps such as Barcode Data Decoder (iOS) so I think some improvements might need to be made.

I do notice that it cuts the margins a bit, and I don't remember if this was to get it to fit (but still scan) on such a small label. I'm going to try some experiments such as reducing the amount of data being encoded, and possibly an option to encode links to your Binner inventory page.

replaysMike commented 3 months ago

ah nice, there's already support for QRCode links, you just have to set the QRCode Text/Barcode value to something like: https://localhost:8090/inventory/{partNumber} to have it open your inventory page, then an iPhone will open that URL when detected/scanned. Note that if you're scanning it from a device, you'll need to provide the IP Address or DNS name where your Binner service is hosted and not localhost.

I'll add some help text for this, and schedule some UI updates to allow building of the embedded data using checkboxes or something.

Going to close this ticket for now, but if you need more help or find something isn't working for you feel free to reopen it.