28.12.2019, 08:34
It's easier to use an API. I just tested with the script below and it works. Check the website for the API options. Source: http://goqr.me/api/
Add the script below to your controller and fill the data with your ASCII string.
Next step is to add an image object to your visualization with the remote url: /scada/resources/img/qr-code.png and a refresh interval of 10 seconds for example.
Now each time you run the script an png image with the qr code will be added to the folder /scada/resources/img and dueto the refresh it will be visible within 10 seconds.
SCRIPT:
--Source: http://goqr.me/api/
require('ssl.https')
data = 'https://knxgroothandel.nl' --QR code data
qr = ssl.https.request('https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=' .. data)
io.writefile("/www/scada/resources/img/qr-code.png", qr)
Add the script below to your controller and fill the data with your ASCII string.
Next step is to add an image object to your visualization with the remote url: /scada/resources/img/qr-code.png and a refresh interval of 10 seconds for example.
Now each time you run the script an png image with the qr code will be added to the folder /scada/resources/img and dueto the refresh it will be visible within 10 seconds.
SCRIPT:
--Source: http://goqr.me/api/
require('ssl.https')
data = 'https://knxgroothandel.nl' --QR code data
qr = ssl.https.request('https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=' .. data)
io.writefile("/www/scada/resources/img/qr-code.png", qr)