Hi,
I've posted on here previously about trying to create something akin to an HMI using Node-Red. I've got a setup that is "working" currently. I have some user parameters that I want to set, and then send onwards to a device via MQTT.
The problem I'm having is that the behavior of the text input node is not what I would expect. I have 3 text input nodes designed to take numbers as input, and pass them on to MQTT once the user presses a RXN Start button. This all works as expected. The issue arises when the user stops the reaction, or tries to modify a parameter. When this happens, only the modified value is sent instead of the currently populated fields of the other text inputs. This is very confusing from a user perspective since you would expect it to send the current value of each field.
Is there an accepted solution to this problem?
Node Dump
[
{
"id": "9be632fa7e831562",
"type": "join",
"z": "9dce67289d992230",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 570,
"y": 240,
"wires": [
[
"1eb2c9f7dbd4625d"
]
]
},
{
"id": "1201e3fd05e927e8",
"type": "ui_button",
"z": "9dce67289d992230",
"name": "",
"group": "e56d5e4907696563",
"order": 1,
"width": 0,
"height": 0,
"passthru": false,
"label": "Start RXN",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "true",
"payloadType": "bool",
"topic": "RunRXN",
"topicType": "str",
"x": 160,
"y": 460,
"wires": [
[
"2ebca4e45bc14e6b"
]
]
},
{
"id": "2ebca4e45bc14e6b",
"type": "change",
"z": "9dce67289d992230",
"name": "",
"rules": [
{
"t": "set",
"p": "complete",
"pt": "msg",
"to": "true",
"tot": "bool"
},
{
"t": "set",
"p": "RunRXN",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 380,
"y": 460,
"wires": [
[
"9be632fa7e831562"
]
]
},
{
"id": "c74668ad7f883df9",
"type": "ui_dropdown",
"z": "9dce67289d992230",
"name": "",
"label": "",
"tooltip": "",
"place": "Select option",
"group": "e56d5e4907696563",
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"multiple": false,
"options": [
{
"label": "Lab 4109 - Control",
"value": "lab4109/control",
"type": "str"
},
{
"label": "Lab 4111 - Control",
"value": "lab4111/control",
"type": "str"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 160,
"y": 120,
"wires": [
[
"1cb9dec4914ed7ce"
]
]
},
{
"id": "5c5cc86ec7d0ff40",
"type": "ui_text_input",
"z": "9dce67289d992230",
"name": "",
"label": "Set Point",
"tooltip": "",
"group": "e56d5e4907696563",
"order": 3,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": "300",
"topic": "setpoint",
"sendOnBlur": true,
"className": "",
"topicType": "str",
"x": 160,
"y": 240,
"wires": [
[
"9be632fa7e831562"
]
]
},
{
"id": "d1c15947d39db351",
"type": "ui_text_input",
"z": "9dce67289d992230",
"name": "",
"label": "Soak Time (min)",
"tooltip": "",
"group": "e56d5e4907696563",
"order": 4,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": "300",
"topic": "SoakTime",
"sendOnBlur": true,
"className": "",
"topicType": "str",
"x": 180,
"y": 180,
"wires": [
[
"75492e28b3761de4"
]
]
},
{
"id": "1cb9dec4914ed7ce",
"type": "change",
"z": "9dce67289d992230",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "topic",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 120,
"wires": [
[
"fc5e5c0627c003f0"
]
]
},
{
"id": "fc5e5c0627c003f0",
"type": "debug",
"z": "9dce67289d992230",
"name": "debug 39",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 700,
"y": 120,
"wires": []
},
{
"id": "1eb2c9f7dbd4625d",
"type": "change",
"z": "9dce67289d992230",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "topic",
"tot": "flow",
"dc": true
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 740,
"y": 240,
"wires": [
[
"cdca836272b4f859",
"921fc6654c81d7ec"
]
]
},
{
"id": "cdca836272b4f859",
"type": "debug",
"z": "9dce67289d992230",
"name": "debug 40",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 960,
"y": 340,
"wires": []
},
{
"id": "5d1be830ed4533fc",
"type": "ui_button",
"z": "9dce67289d992230",
"name": "",
"group": "e56d5e4907696563",
"order": 13,
"width": 0,
"height": 0,
"passthru": false,
"label": "Stop RXN",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "false",
"payloadType": "bool",
"topic": "RunRXN",
"topicType": "str",
"x": 160,
"y": 400,
"wires": [
[
"e0f54cca83555e84"
]
]
},
{
"id": "e0f54cca83555e84",
"type": "change",
"z": "9dce67289d992230",
"name": "",
"rules": [
{
"t": "set",
"p": "complete",
"pt": "msg",
"to": "true",
"tot": "bool"
},
{
"t": "set",
"p": "RunRXN",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 380,
"y": 400,
"wires": [
[
"9be632fa7e831562"
]
]
},
{
"id": "75492e28b3761de4",
"type": "change",
"z": "9dce67289d992230",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload*60",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 400,
"y": 200,
"wires": [
[
"9be632fa7e831562"
]
]
},
{
"id": "437a9776691cb73e",
"type": "ui_text_input",
"z": "9dce67289d992230",
"name": "",
"label": "Injection Temperature",
"tooltip": "",
"group": "e56d5e4907696563",
"order": 11,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": "300",
"topic": "InjectTemp",
"sendOnBlur": true,
"className": "",
"topicType": "str",
"x": 120,
"y": 320,
"wires": [
[
"9be632fa7e831562"
]
]
},
{
"id": "e56d5e4907696563",
"type": "ui_group",
"name": "Control",
"tab": "dfc99f1973056be7",
"order": 2,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "dfc99f1973056be7",
"type": "ui_tab",
"name": "Testing",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]