Skip to content

Instantly share code, notes, and snippets.

@IT-Berater
Created March 17, 2021 11:54
Show Gist options
  • Save IT-Berater/06995bee81fb3c07350a3870f0773319 to your computer and use it in GitHub Desktop.
Save IT-Berater/06995bee81fb3c07350a3870f0773319 to your computer and use it in GitHub Desktop.
QR-Code view in Flow and Dashboard
[
{
"id": "15f97750.9f15d1",
"type": "inject",
"z": "fa6c893a.ae8d8",
"name": "Meine echte Bitcoin Adresse",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "bitcoin:1NSaQXyTHGanGvQHgPkoSDtbBY2LFySnyc",
"payloadType": "str",
"x": 240,
"y": 160,
"wires": [
[
"432536df.024b4"
]
]
},
{
"id": "ed289c05.b34a7",
"type": "comment",
"z": "fa6c893a.ae8d8",
"name": "(c) 2021 Thomas Wenzlaff www.wenzlaff.info",
"info": "",
"x": 810,
"y": 60,
"wires": []
},
{
"id": "987d0461.3a3738",
"type": "comment",
"z": "fa6c893a.ae8d8",
"name": "Create simple QR-Code from Bitcoin Address or other text",
"info": "",
"x": 310,
"y": 60,
"wires": []
},
{
"id": "c36f4049.b9248",
"type": "cryptoqrcode",
"z": "fa6c893a.ae8d8",
"name": "",
"filename": "/data/wenzlaff-address-qr-code.png",
"prefix": "",
"x": 570,
"y": 160,
"wires": [
[]
]
},
{
"id": "ca1faa5b.5d7e38",
"type": "image viewer",
"z": "fa6c893a.ae8d8",
"name": "Anzeigen",
"width": "160",
"data": "payload",
"dataType": "msg",
"x": 900,
"y": 280,
"wires": [
[]
]
},
{
"id": "38e5e7e1.a5be58",
"type": "jimp-image",
"z": "fa6c893a.ae8d8",
"name": "QR-Code",
"data": "payload",
"dataType": "msg",
"ret": "img",
"parameter1": "",
"parameter1Type": "msg",
"parameter2": "",
"parameter2Type": "msg",
"parameter3": "",
"parameter3Type": "msg",
"parameter4": "",
"parameter4Type": "msg",
"parameter5": "",
"parameter5Type": "msg",
"parameter6": "",
"parameter6Type": "msg",
"parameter7": "",
"parameter7Type": "msg",
"parameter8": "",
"parameter8Type": "msg",
"sendProperty": "payload",
"sendPropertyType": "msg",
"parameterCount": 0,
"jimpFunction": "none",
"selectedJimpFunction": {
"name": "none",
"fn": "none",
"description": "Just loads the image.",
"parameters": []
},
"x": 740,
"y": 280,
"wires": [
[
"ca1faa5b.5d7e38"
]
]
},
{
"id": "672bd969.3ff0d8",
"type": "function",
"z": "fa6c893a.ae8d8",
"name": "Set Payload",
"func": "msg.payload = \"http://PI-ADRESSE-Eintragen:1880/wenzlaff-address-qr-code.png\"\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 550,
"y": 280,
"wires": [
[
"38e5e7e1.a5be58"
]
]
},
{
"id": "1d73b5de.0c1082",
"type": "comment",
"z": "fa6c893a.ae8d8",
"name": "In den paylod kommt der Inhalt des QR-Codes",
"info": "",
"x": 280,
"y": 120,
"wires": []
},
{
"id": "9c186f66.5f672",
"type": "ui_template",
"z": "fa6c893a.ae8d8",
"group": "133f148a.00b863",
"name": "QR-Code",
"order": 0,
"width": "9",
"height": "9",
"format": "\n<img width=\"300\" height=\"300\" src=\"{{msg.qrcode}}\" alt=\"QR-Code nicht gefunden.\" />\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 740,
"y": 220,
"wires": [
[
"659b5615.61388"
]
]
},
{
"id": "659b5615.61388",
"type": "debug",
"z": "fa6c893a.ae8d8",
"name": "Info",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 890,
"y": 220,
"wires": []
},
{
"id": "e0d18c4.8e93d7",
"type": "comment",
"z": "fa6c893a.ae8d8",
"name": "Anpassung in der settings.js nötig",
"info": "In der settings.js\n\ndas Verzeichnis für Static öffnen\n\nhttpStatic: '/data/',\n\nsetzen. \n\nRestart. \n\nZugriff dann über \n\nhttp://pi:1880/wenzlaff-address-qr-code.png",
"x": 240,
"y": 520,
"wires": []
},
{
"id": "9bf09b2a.189ce8",
"type": "function",
"z": "fa6c893a.ae8d8",
"name": "Set Payload",
"func": "// damit der Browser das Bild neu lädt, \n// und nicht aus dem cash holt mit Date getTime das neuladen erzwingen\nmsg.qrcode = \"http://pi-vier:1880/wenzlaff-address-qr-code.png?\" + new Date().getTime();\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 550,
"y": 220,
"wires": [
[
"9c186f66.5f672"
]
]
},
{
"id": "432536df.024b4",
"type": "ui_text_input",
"z": "fa6c893a.ae8d8",
"name": "",
"label": "Inhalt",
"tooltip": "Der Text der hier eingebeben wird, wird automatisch zum QR-Code",
"group": "133f148a.00b863",
"order": 1,
"width": "9",
"height": "1",
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "topic",
"topicType": "msg",
"x": 310,
"y": 240,
"wires": [
[
"672bd969.3ff0d8",
"9bf09b2a.189ce8",
"c36f4049.b9248"
]
]
},
{
"id": "30ce2267.ec683e",
"type": "comment",
"z": "fa6c893a.ae8d8",
"name": "By my a coffee: bitcoin:1NSaQXyTHGanGvQHgPkoSDtbBY2LFySnyc",
"info": "",
"x": 750,
"y": 520,
"wires": []
},
{
"id": "133f148a.00b863",
"type": "ui_group",
"name": "QR-Code",
"tab": "d59e6cd1.036bd",
"order": 1,
"disp": true,
"width": "9",
"collapse": false
},
{
"id": "d59e6cd1.036bd",
"type": "ui_tab",
"name": "QR-Code",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment