Hi,
i want to sent this value "2c1426085000" via MQTT to a valve. This is basicly no problem. But the point ist this:
I need to join the value from different sources. Most of the sources are always the same and i can inject it anytime when i want it. Two of the digits are changing more often (in the example "14") and i need to insert it to the value.
So, the question ist: How can i join all this single values to one big value like this "2c1426085000"
Here are the code which i try. For testing, the source are inject nodes. In the final version, some of the sources are mqtt inputs and the rest are inject nodes which are infected in a period of time.
[
{
"id": "52fe3b78327ab63e",
"type": "tab",
"label": "Flow 3",
"disabled": false,
"info": "",
"env": []
},
{
"id": "99882603db7c3a7b",
"type": "inject",
"z": "52fe3b78327ab63e",
"name": "Temp via MQTT",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Temp",
"payload": "19",
"payloadType": "num",
"x": 160,
"y": 340,
"wires": [
[
"b5fdbe16236d4c02"
]
]
},
{
"id": "be2258171f9de346",
"type": "inject",
"z": "52fe3b78327ab63e",
"name": "Vorwahl Um-Temp",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "UMT",
"payload": "20",
"payloadType": "num",
"x": 170,
"y": 260,
"wires": [
[
"b5fdbe16236d4c02"
]
]
},
{
"id": "cf2dbf3357fd8a58",
"type": "inject",
"z": "52fe3b78327ab63e",
"name": "SSV",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "18",
"payloadType": "num",
"x": 150,
"y": 400,
"wires": [
[
"b5fdbe16236d4c02"
]
]
},
{
"id": "b5fdbe16236d4c02",
"type": "join",
"z": "52fe3b78327ab63e",
"name": "",
"mode": "auto",
"build": "merged",
"property": "payload",
"propertyType": "msg",
"key": "payload",
"joiner": "\\n",
"joinerType": "str",
"useparts": true,
"accumulate": false,
"timeout": "",
"count": "5",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 490,
"y": 340,
"wires": [
[
"ec5e3c3471d91c3b"
]
]
},
{
"id": "c30eb7349705e5da",
"type": "inject",
"z": "52fe3b78327ab63e",
"name": "RCI",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "5",
"payloadType": "num",
"x": 150,
"y": 460,
"wires": [
[
"b5fdbe16236d4c02"
]
]
},
{
"id": "355daf3cf526d89e",
"type": "inject",
"z": "52fe3b78327ab63e",
"name": "UM",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "2",
"payloadType": "num",
"x": 150,
"y": 520,
"wires": [
[
"b5fdbe16236d4c02"
]
]
},
{
"id": "ad43ad613ba89018",
"type": "inject",
"z": "52fe3b78327ab63e",
"name": "SM",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 150,
"y": 580,
"wires": [
[
"b5fdbe16236d4c02"
]
]
},
{
"id": "ec5e3c3471d91c3b",
"type": "debug",
"z": "52fe3b78327ab63e",
"name": "Value",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 690,
"y": 340,
"wires": []
},
{
"id": "6e4adf53c93ca4ba",
"type": "debug",
"z": "52fe3b78327ab63e",
"name": "Hex Wert",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 780,
"y": 120,
"wires": []
},
{
"id": "08f522263f7791ea",
"type": "base64",
"z": "52fe3b78327ab63e",
"name": "",
"action": "",
"property": "payload",
"x": 600,
"y": 120,
"wires": [
[
"6e4adf53c93ca4ba",
"154c7740175d3e40"
]
]
},
{
"id": "d2d922ae78d177fe",
"type": "buffer-parser",
"z": "52fe3b78327ab63e",
"name": "",
"data": "payload",
"dataType": "msg",
"specification": "spec",
"specificationType": "ui",
"items": [
{
"type": "int16be",
"name": "item1",
"offset": 0,
"length": 1,
"offsetbit": 0,
"scale": "1",
"mask": ""
}
],
"swap1": "swap16",
"swap2": "swap16",
"swap3": "",
"swap1Type": "swap",
"swap2Type": "swap",
"swap3Type": "swap",
"msgProperty": "payload",
"msgPropertyType": "str",
"resultType": "buffer",
"resultTypeType": "return",
"multipleResult": false,
"fanOutMultipleResult": false,
"setTopic": true,
"outputs": 1,
"x": 390,
"y": 120,
"wires": [
[
"08f522263f7791ea"
]
]
},
{
"id": "97e4064d250b3e64",
"type": "inject",
"z": "52fe3b78327ab63e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "raw",
"payload": "2c1426085000",
"payloadType": "str",
"x": 140,
"y": 120,
"wires": [
[
"d2d922ae78d177fe"
]
]
},
{
"id": "ecedac17f9d34fc5",
"type": "comment",
"z": "52fe3b78327ab63e",
"name": "Finished value; converted and sent via mqtt",
"info": "",
"x": 240,
"y": 60,
"wires": []
},
{
"id": "154c7740175d3e40",
"type": "mqtt out",
"z": "52fe3b78327ab63e",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"x": 790,
"y": 180,
"wires": []
},
{
"id": "854b049ceb91291a",
"type": "comment",
"z": "52fe3b78327ab63e",
"name": "Join all single values to one big value",
"info": "",
"x": 230,
"y": 200,
"wires": []
},
{
"id": "b3cf75f8de8dc8f2",
"type": "comment",
"z": "52fe3b78327ab63e",
"name": "Normaly MQTT Input",
"info": "",
"x": 170,
"y": 300,
"wires": []
}
]
Regards