hello.
Can someone help me to implement a password prompt after clicking on submit? I try to integrate this security layer, that only a person who knows the code (for exmaple "1234" can submit a change.
I have this so far:
[
{
"id": "dba2f963f07b8a2c",
"type": "debug",
"z": "191728c3ee9255a0",
"name": "debug 283",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 210,
"y": 1360,
"wires": []
},
{
"id": "56c39bc7d775cee5",
"type": "change",
"z": "191728c3ee9255a0",
"name": "",
"rules": [
{
"t": "move",
"p": "topic",
"pt": "msg",
"to": "topic[0]",
"tot": "msg"
},
{
"t": "set",
"p": "topic[1]",
"pt": "msg",
"to": "payload",
"tot": "msg",
"dc": true
},
{
"t": "set",
"p": "background",
"pt": "msg",
"to": "red",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 570,
"y": 1460,
"wires": [
[
"a37d74b2650693ab"
]
]
},
{
"id": "a37d74b2650693ab",
"type": "ui_button",
"z": "191728c3ee9255a0",
"name": "submit remote",
"group": "83fd112e3229a323",
"order": 2,
"width": 2,
"height": 1,
"passthru": false,
"label": "Submit",
"tooltip": "",
"color": "",
"bgcolor": "{{background}}",
"className": "",
"icon": "",
"payload": "submit",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 560,
"y": 1400,
"wires": [
[
"bd2fe2f48650c624",
"11c59793e217158b"
]
]
},
{
"id": "0185a74a24c023e4",
"type": "rbe",
"z": "191728c3ee9255a0",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 790,
"y": 1580,
"wires": [
[
"a37d74b2650693ab",
"4a9148d898273d95"
]
]
},
{
"id": "bd2fe2f48650c624",
"type": "change",
"z": "191728c3ee9255a0",
"name": "",
"rules": [
{
"t": "move",
"p": "topic[1]",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "topic[0]",
"tot": "msg"
},
{
"t": "set",
"p": "background",
"pt": "msg",
"to": "transparent",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 830,
"y": 1480,
"wires": [
[
"0185a74a24c023e4"
]
]
},
{
"id": "4a9148d898273d95",
"type": "function",
"z": "191728c3ee9255a0",
"name": "Create Message",
"func": "msg.payload = \"You selected \" + msg.payload\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 990,
"y": 1540,
"wires": [
[
"8c8840be4326444f"
]
]
},
{
"id": "8c8840be4326444f",
"type": "debug",
"z": "191728c3ee9255a0",
"name": "debug 285",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1190,
"y": 1520,
"wires": []
},
{
"id": "cf7b206144781618",
"type": "ui_dropdown",
"z": "191728c3ee9255a0",
"name": "",
"label": "OPERATINGMODE1:",
"tooltip": "Change operating mode",
"place": "",
"group": "83fd112e3229a323",
"order": 1,
"width": 4,
"height": 1,
"passthru": true,
"multiple": false,
"options": [
{
"label": "Manual",
"value": 0,
"type": "num"
},
{
"label": "Pulse",
"value": 1,
"type": "num"
},
{
"label": "Analog",
"value": 2,
"type": "num"
},
{
"label": "Timer",
"value": 3,
"type": "num"
},
{
"label": "Batch",
"value": 4,
"type": "num"
}
],
"payload": "",
"topic": "[]",
"topicType": "str",
"className": "",
"x": 120,
"y": 1460,
"wires": [
[
"dba2f963f07b8a2c",
"8a3a6723ef7e91a3"
]
]
},
{
"id": "8a3a6723ef7e91a3",
"type": "change",
"z": "191728c3ee9255a0",
"name": "",
"rules": [
{
"t": "set",
"p": "code",
"pt": "global",
"to": "1234",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 350,
"y": 1460,
"wires": [
[
"56c39bc7d775cee5"
]
]
},
{
"id": "11c59793e217158b",
"type": "debug",
"z": "191728c3ee9255a0",
"name": "debug 286",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 1380,
"wires": []
},
{
"id": "83fd112e3229a323",
"type": "ui_group",
"name": "CONTROL",
"tab": "4ad3c40739cbf998",
"order": 1,
"disp": true,
"width": "10",
"collapse": false,
"className": ""
},
{
"id": "4ad3c40739cbf998",
"type": "ui_tab",
"name": "PUMP A",
"icon": "dashboard",
"order": 3,
"disabled": false,
"hidden": false
}
]