This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

qr code generator
#1
Hello,

Can someone help me integrate QR generator in SCADA


I receive ASCII string code from RS485 to address 5/1/1

I need to display QRcode image in SCADA

http://davidshimjs.github.io/qrcodejs/


Tnx.
Reply
#2
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)
Reply
#3
Constantly writing data to SD card is bad for it's longevity. Pure client side solution is better but more complicated to implement.
Reply
#4
Hi,

Extract this to user folder inside the "apps" ftp location:
.zip   qr.zip (Size: 10.14 KB / Downloads: 17)


Add a frame to your visu with this URL: /user/qr/qr.lp

When the object 5/1/1 has no value a QR to the host location is generated.

BR,

Erwin
Reply
#5
Hi,
Everything works except Right-click to save

Tnx
Reply
#6
Hi,

That must have something to do with your client as it works perfect in my controller..

   

BR,

Erwin
Reply
#7
In /scada-vis on iphone/android i can't Sad
Reply
#8
Hi,

It also works on iOS, i don't have Android to test..
   
Add to Photo's -> in Dutch "Voeg toe aan Foto's"

BR,

Erwin
Reply


Forum Jump: