Knowing your aversion to Function nodes there is always node-red-contrib-buffer-parser
- it includes a "buffer maker" node.
[
{
"id": "e9afa1b55fbb814c",
"type": "buffer-maker",
"z": "4cad319b1add5007",
"name": "",
"specification": "spec",
"specificationType": "ui",
"items": [
{
"name": "item1",
"type": "string",
"length": -1,
"dataType": "msg",
"data": "payload"
}
],
"swap1": "",
"swap2": "",
"swap3": "",
"swap1Type": "swap",
"swap2Type": "swap",
"swap3Type": "swap",
"msgProperty": "payload",
"msgPropertyType": "str",
"x": 1894,
"y": 480,
"wires": [
[
"1f2c64d1ec10e525"
]
]
},
{
"id": "1dc4a8bae838a5b1",
"type": "inject",
"z": "4cad319b1add5007",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "hello",
"payloadType": "str",
"x": 1730,
"y": 464,
"wires": [
[
"e9afa1b55fbb814c"
]
]
},
{
"id": "bc217a8f04132d68",
"type": "inject",
"z": "4cad319b1add5007",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "bye",
"payloadType": "str",
"x": 1730,
"y": 496,
"wires": [
[
"e9afa1b55fbb814c"
]
]
},
{
"id": "1f2c64d1ec10e525",
"type": "debug",
"z": "4cad319b1add5007",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 2074,
"y": 480,
"wires": []
}
]
However, if you want to avoid a contrib node, let me know & I will share the 1 line of JS