glenndehaan / unifi-voucher-site

UniFi Voucher Site is a web-based platform for generating and managing UniFi network guest vouchers
MIT License
47 stars 9 forks source link

Idea - adding a QR code with SSID and Password to pdf/email #39

Closed ldelberg closed 1 month ago

ldelberg commented 1 month ago

Hi! I've just set it up in my homelab. Great work and nice design. I was wondering if it would possible to add a qr-code to the voucher to connect to the wifi in a pleasant way. Pleas keep up with your good work and thanks for all!

glenndehaan commented 1 month ago

Hi @ldelberg,

Thank you for the nice words and great to hear you like it. Fun fact this was already in my head to implement at some point.

Currently i'm on vacation but once i'm back I will start the implementation.

Kind regards, Glenn de Haan

ldelberg commented 1 month ago

Hi Glenn,

that sounds great. I can't wait to see how you implement it. Have a great vacation!

glenndehaan commented 1 month ago

Hi @ldelberg,

I have just released version 3.6.0. After updating to this new release you now have the option to set the UNIFI_SSID environment variable. This enables the connect content as well as the 'Scan to Connect' QR code. Some examples can be found here:

https://github.com/glenndehaan/unifi-voucher-site#example-pdf https://github.com/glenndehaan/unifi-voucher-site#example-print https://github.com/glenndehaan/unifi-voucher-site#example-email

Kind regards, Glenn de Haan

ldelberg commented 1 month ago

Hi @glenndehaan , this ist awesome. Thanks for your fast action on this. Looks really good. What do you think about another environment variable UNIFI_SSID_PASSWORD to use with the SSID for the QR code. We use a password protected Hotspot and use the the vouchers after that :) Hope you had a great vacation and thanks for the fast implementation. Best regards, Lars

glenndehaan commented 1 month ago

Hi @ldelberg,

Thanks I had a great couple of days.

Yeah I think that would be possible for me to implement. It didn't occur to me that this was now possible. In early versions of the Hotspot feature within UniFi (Talking about the v4/v5 days) you always where forced to select the Open type when enabling the Hotspot on a network. But it seems indeed that this has been changed.

One thing I do want to bring up: In terms of implementation this won't be an issue, however in regards to the fallback I think it would then also be wise to display the Password in the same way I now also list the SSID for people who can't/don't know how to use the QR code. What do you think?

Kind regards, Glenn de Haan

ldelberg commented 1 month ago

Hi @glenndehaan, you are right. The best way is it to print the password as fallback in the same way like the SSID. I think something like: Connect to SSID UNIFI_SSID with password UNIFI_SSID_PASSWORD or scan the following qr-code. Thanks for your time an effort for this project. Best regards, Lars

glenndehaan commented 1 month ago

Hi @ldelberg,

I have just released version 3.7.0 this contains the UNIFI_SSID_PASSWORD implementation. Hope this helps with your setup. Below an example how this looks like within an email (The QR now also contains the password if set):

afbeelding

Kind regards, Glenn de Haan

ldelberg commented 1 month ago

Awesome @glenndehaan! Thank you for adding this enhancement so fast - looks good and works great. Best regards, Lars