New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show end device QR code #1407
Comments
I do see value in an approach where the backend generates QR codes. That way we can also make them available through our APIs, maybe even rendered into svg/png/pdf. We wouldn't have to re-implement QR rendering in every client (in case we'd ever want iOS/Android/... clients) and can just use the rendered images directly. |
Sure, but in V3 there's no "the backend", especially when concerning fields are spread across multiple components. We could:
|
I'm fine with generating the QR code on the frontend as well but I agree with @htdvisser that a backend approach would be more versatile. |
It's already in progress, see here; https://github.com/TheThingsNetwork/lorawan-stack/pull/1413/files#diff-9cb528d150f69af9e93f350e10df9c7fR86 |
Adding help wanted for new hire to pick this up |
I think we need some input from @kschiffer for UX as it seems that the server side is ready and can generate qr codes for end devices. |
Let's pick this up in a next version. References:
With the current API support, it should be really straightforward. The image is generated in PNG format in the desired size and only needs to be shown somewhere. @kschiffer for ideas on where to put the image. BTW it would be really nice to be able to save the image as well. |
Summary
Show end device QR code in Console
Why do we need this?
For testing, validation and saving to file
What is already there? What do you see now?
CLI support in progress, see #1392;
What is missing? What do you want to see?
Be able to see and save QR codes in the Console
There are multiple types of QR codes that the user needs to be able to choose.
How do you propose to implement this?
I'd suggest generating the QR code in the browser, using for example qrcode.react
The question is mostly where the contents come from. We probably have a "claim QR code" that needs the
claim_authentication_code
that's stored in JS, but we could have other QR codes as well that need other components.We have a few options;
pkg/webui
, so that it knows which fields it needs and how everything is formatted. This is essentially how the CLI works too, as it importspkg/qrcode
EndDeviceRegistry
andJsEndDeviceRegistry
with rpcs to list formats and generate QR code values. This allows the Console to discover QR codes and avoids implementing QR codes in Javascript (although it's not rocket science)Can you do this yourself and submit a Pull Request?
@htdvisser what do you think?
Can review
The text was updated successfully, but these errors were encountered: