Unexpected Behavior of Text Input node

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
    }
]

The issue is msg.complete, which when received will flush the join object setting count to 0.

Try using a switch node and checking msg.topic = RunRXN, and setting join count to 4.
e.g.

[{"id":"d1c15947d39db351","type":"ui_text_input","z":"452103ea51141731","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":360,"y":4460,"wires":[["75492e28b3761de4"]]},{"id":"75492e28b3761de4","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload*60","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":4480,"wires":[["9be632fa7e831562"]]},{"id":"9be632fa7e831562","type":"join","z":"452103ea51141731","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"4","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":750,"y":4520,"wires":[["35553a80a14c452a"]]},{"id":"2ebca4e45bc14e6b","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"RunRXN","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":4740,"wires":[["9be632fa7e831562"]]},{"id":"5c5cc86ec7d0ff40","type":"ui_text_input","z":"452103ea51141731","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":340,"y":4520,"wires":[["9be632fa7e831562"]]},{"id":"e0f54cca83555e84","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"RunRXN","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":4680,"wires":[["9be632fa7e831562"]]},{"id":"437a9776691cb73e","type":"ui_text_input","z":"452103ea51141731","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":300,"y":4600,"wires":[["9be632fa7e831562"]]},{"id":"35553a80a14c452a","type":"switch","z":"452103ea51141731","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"RunRXN","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":890,"y":4540,"wires":[["1eb2c9f7dbd4625d"]]},{"id":"1201e3fd05e927e8","type":"ui_button","z":"452103ea51141731","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":340,"y":4740,"wires":[["2ebca4e45bc14e6b"]]},{"id":"5d1be830ed4533fc","type":"ui_button","z":"452103ea51141731","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":340,"y":4680,"wires":[["e0f54cca83555e84"]]},{"id":"1eb2c9f7dbd4625d","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"topic","tot":"flow","dc":true}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":4600,"wires":[["cdca836272b4f859"]]},{"id":"cdca836272b4f859","type":"debug","z":"452103ea51141731","name":"debug 40","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1140,"y":4620,"wires":[]},{"id":"c74668ad7f883df9","type":"ui_dropdown","z":"452103ea51141731","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":340,"y":4400,"wires":[["1cb9dec4914ed7ce"]]},{"id":"1cb9dec4914ed7ce","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"topic","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":4400,"wires":[["fc5e5c0627c003f0"]]},{"id":"fc5e5c0627c003f0","type":"debug","z":"452103ea51141731","name":"debug 39","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":600,"y":4440,"wires":[]},{"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}]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.