@mickym
Habe ich zu spät gesehen. Dein Flow funktioniert perfekt, ich habe nur einen Change nach dem MQTT gesetzt, da dieser einen hierarchischen DP erzeugt (..virocal/zuluft)
Nun funktioniert es perfekt. Vielen Dank. Jetzt habe ich das System der Variablen verstanden. Ich muss mir trotzdem das Konzept hinter env(basePath) anschauen.
Hier mein/unser Ergebnis:

[
{
"id": "ae673cf6cd8433a0",
"type": "subflow",
"name": "Datum in Topic",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "2e1ea06b2e94bf1a"
}
]
}
],
"out": [
{
"x": 820,
"y": 80,
"wires": [
{
"id": "fc37f5f9d2b0297b",
"port": 0
}
]
}
],
"env": [
{
"name": "basePath",
"type": "str",
"value": "Test1.Test2"
}
],
"meta": {},
"color": "#DDAA99"
},
{
"id": "2e1ea06b2e94bf1a",
"type": "change",
"z": "ae673cf6cd8433a0",
"name": "",
"rules": [
{
"t": "set",
"p": "datum",
"pt": "msg",
"to": "$moment().locale('de').format('YYYY.MMMM')",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 230,
"y": 80,
"wires": [
[
"0e8de9437c3c420a"
]
]
},
{
"id": "0e8de9437c3c420a",
"type": "change",
"z": "ae673cf6cd8433a0",
"name": "März zu Maerz",
"rules": [
{
"t": "change",
"p": "datum",
"pt": "msg",
"from": "März",
"fromt": "str",
"to": "Maerz",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 80,
"wires": [
[
"fc37f5f9d2b0297b"
]
]
},
{
"id": "fc37f5f9d2b0297b",
"type": "change",
"z": "ae673cf6cd8433a0",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "\"0_userdata.0.\" & $env(\"basePath\") & \".\" & datum & \".\" & topic",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 660,
"y": 80,
"wires": [
[]
]
},
{
"id": "71de45f27137890c",
"type": "tab",
"label": "Datum",
"disabled": false,
"info": "",
"env": []
},
{
"id": "f0dd9b6950d71727",
"type": "ioBroker out",
"z": "71de45f27137890c",
"name": "",
"topic": "",
"ack": "true",
"autoCreate": "true",
"stateName": "zuluft-neu",
"role": "state",
"payloadType": "",
"readonly": "",
"stateUnit": "°C",
"stateMin": "",
"stateMax": "",
"x": 720,
"y": 80,
"wires": []
},
{
"id": "7e0364b0b8f9043e",
"type": "mqtt in",
"z": "71de45f27137890c",
"name": "Vitovent ZuluftTemp",
"topic": "vitocal/ZuluftTemp",
"qos": "0",
"datatype": "auto-detect",
"broker": "bf311140.13d2b8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 110,
"y": 80,
"wires": [
[
"90912a5dffeb17cc"
]
]
},
{
"id": "e4826cebe9af4d64",
"type": "debug",
"z": "71de45f27137890c",
"name": "payload und topic",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 510,
"y": 20,
"wires": []
},
{
"id": "5267d5edc8abe331",
"type": "subflow:ae673cf6cd8433a0",
"z": "71de45f27137890c",
"name": "Datum in Topic",
"env": [
{
"name": "basePath",
"value": "Test1.Test5",
"type": "str"
}
],
"x": 520,
"y": 80,
"wires": [
[
"e4826cebe9af4d64",
"f0dd9b6950d71727"
]
]
},
{
"id": "90912a5dffeb17cc",
"type": "change",
"z": "71de45f27137890c",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Zuluft-Temp",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 320,
"y": 80,
"wires": [
[
"5267d5edc8abe331",
"527e1cef1285c117"
]
]
},
{
"id": "527e1cef1285c117",
"type": "debug",
"z": "71de45f27137890c",
"name": "payload und topic",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 270,
"y": 20,
"wires": []
},
{
"id": "bf311140.13d2b8",
"type": "mqtt-broker",
"name": "Mosquito-Server",
"broker": "192.168.178.10",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"compatmode": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]