Generate QR code from a form

Hello everyone, we need the data generated in the form "Datos_ingreso" , to be able to encode them in a QR code. Could you help me please?

[image]


[{"id":"bb8219b1.f98808","type":"tab","label":"Ingreso","disabled":false,"info":""},{"id":"2a2a6aeb.3232b6","type":"change","z":"bb8219b1.f98808","name":"Intercambio_Var","rules":[{"t":"set","p":"msg","pt":"flow","to":"payload","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.RFID","pt":"msg","to":"msg","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":320,"wires":[["fe1054be.5f36f8"]]},{"id":"fe1054be.5f36f8","type":"ui_form","z":"bb8219b1.f98808","name":"Datos_Ingreso","label":"Ingreso de datos Cafrilosa","group":"eccfb0b5.c7841","order":3,"width":"6","height":"15","options":[{"label":"Ingrese nombre de proveedor","value":"proveedor","type":"text","required":true,"rows":null},{"label":"Identificación Interna (Cafrilosa)","value":"interna","type":"text","required":true,"rows":null},{"label":"Identificación externa (Agrocalidad)","value":"Externa","type":"text","required":true,"rows":null},{"label":"Identificación RFID","value":"RFID","type":"text","required":true,"rows":null},{"label":"Fecha de ingreso","value":"Fecha","type":"text","required":true,"rows":null},{"label":"Hora de ingreso","value":"Hora","type":"text","required":false,"rows":null}],"formValue":{"proveedor":"","interna":"","Externa":"","RFID":"","Fecha":"","Hora":""},"payload":"","submit":"Enviar","cancel":"Cancelar","topic":"qrcodeinput","topicType":"msg","splitLayout":false,"x":700,"y":240,"wires":[["a575ea5402202d9a"]]},{"id":"e1ec0a2c.0a1628","type":"change","z":"bb8219b1.f98808","name":"Intercambio_Var","rules":[{"t":"set","p":"msg","pt":"flow","to":"payload","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.Fecha","pt":"msg","to":"msg","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":120,"wires":[["fe1054be.5f36f8"]]},{"id":"e386b1a4.731a1","type":"serial in","z":"bb8219b1.f98808","name":"Lector_RFID1","serial":"90c2675d85028173","x":90,"y":240,"wires":[["6950ddf1.eed6a4","f17597bf.b49ec8","7bd5f3aa.cf6bcc"]]},{"id":"ecb7e52a.57ccc8","type":"change","z":"bb8219b1.f98808","name":"Intercambio_Var","rules":[{"t":"set","p":"msg","pt":"flow","to":"payload","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.Hora","pt":"msg","to":"msg","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":220,"wires":[["fe1054be.5f36f8"]]},{"id":"7bd5f3aa.cf6bcc","type":"function","z":"bb8219b1.f98808","name":"","func":"var ident=msg.payload.replace(\"\\n\",\"\");\nvar ident2=ident.replace(\"\\r\",\"\");\nmsg.payload=ident2;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":220,"y":300,"wires":[["2a2a6aeb.3232b6"]]},{"id":"6950ddf1.eed6a4","type":"moment","z":"bb8219b1.f98808","name":"Fecha","topic":"Fecha","input":"","inputType":"date","inTz":"America/Guayaquil","adjAmount":"0","adjType":"hours","adjDir":"add","format":"YYYY-MM-DD","locale":"es-EC","output":"payload","outputType":"msg","outTz":"America/Guayaquil","x":310,"y":140,"wires":[["e1ec0a2c.0a1628"]]},{"id":"f17597bf.b49ec8","type":"moment","z":"bb8219b1.f98808","name":"Hora","topic":"Hora","input":"","inputType":"date","inTz":"America/Guayaquil","adjAmount":"0","adjType":"hours","adjDir":"add","format":" HH:mm:ss","locale":"es-EC","output":"payload","outputType":"msg","outTz":"America/Guayaquil","x":310,"y":220,"wires":[["ecb7e52a.57ccc8"]]},{"id":"8f433ee6572f1d9c","type":"ui_template","z":"bb8219b1.f98808","group":"eccfb0b5.c7841","name":"","order":1,"width":0,"height":0,"format":"<img src={{msg.payload}}>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":920,"y":260,"wires":[[]]},{"id":"a575ea5402202d9a","type":"qrcode-generator","z":"bb8219b1.f98808","name":"","qrtype":"text2qr","text2qrText":"","ssid":"","hiddenssid":false,"wifitype":"","phonenum":"","smsphonenum":"","smstext":"","mailto":"","mailsubject":"","mailbody":"","latitude":"","longitude":"","colorlight":"#ffffff","colordark":"#000000","printstatus":false,"x":750,"y":380,"wires":[["8f433ee6572f1d9c"]]},{"id":"eccfb0b5.c7841","type":"ui_group","name":"QR CODE","tab":"4cdb26b2.8e1da8","order":1,"disp":false,"width":"6","collapse":false},{"id":"90c2675d85028173","type":"serial-port","serialport":"COM8","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"4cdb26b2.8e1da8","type":"ui_tab","name":"Ingreso","icon":"dashboard","disabled":false,"hidden":false}]

Notice that under your qrcode-gen node it says Error: see details in debug win?

Add a debug node to the output of the ui-form node (Datos_Ingreso) to see what is being sent into the qrcode-gen node. Then click on the qrcode-gen node and look at the help tab (in the sidebar and looks like a book) for the node.

  • What is it looking for as input?
  • Are you sending the data in the way the node needs it?

You might want to add the node 'node-red-contrib-image-output` to the flow so you can see the generated image in the editor.