Hier ist das Script zum Aktivieren der WW Einmalladung,
abgelegt in ioB Scripts unter common → Heizung → heating_dhw_oneTimeCharge_activate
setState('viessmannapi.0.123456.0.features.heating.dhw.oneTimeCharge.commands.activate.setValue','true')
und zum Deaktivieren (common → Heizung → heating_dhw_oneTimeCharge_deactivate)
setState('viessmannapi.0.123456.0.features.heating.dhw.oneTimeCharge.commands.deactivate.setValue','true')
Und hier ist der Node Red Flow:
[
{
"id": "98ef4cf5.1a8f38",
"type": "tab",
"label": "WW Einmal-Ladung",
"disabled": false,
"info": ""
},
{
"id": "b040757b.411cc8",
"type": "ioBroker in",
"z": "98ef4cf5.1a8f38",
"name": "Bad | Taster Spiegel.ButtonState",
"topic": "homee.0.TwoButtonRemote-162.ButtonState-862",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "true",
"x": 150,
"y": 140,
"wires": [
[
"79dc92cb.710e24"
]
]
},
{
"id": "86d115e0.24f11",
"type": "trigger",
"z": "98ef4cf5.1a8f38",
"name": "",
"op1": "true",
"op2": "false",
"op1type": "bool",
"op2type": "bool",
"duration": "2",
"extend": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 650,
"y": 260,
"wires": [
[
"ece39c92.787cc8"
]
]
},
{
"id": "196309df.38782e",
"type": "ioBroker in",
"z": "98ef4cf5.1a8f38",
"name": "WW Temperatur IST",
"topic": "viessmannapi.0.123456.0.features.heating.dhw.sensors.temperature.hotWaterStorage.properties.value.value",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "true",
"x": 110,
"y": 200,
"wires": [
[
"889259cb.eec9c"
]
]
},
{
"id": "82f94369.fd9fc",
"type": "ioBroker in",
"z": "98ef4cf5.1a8f38",
"name": "WW Zirkulations-Pumpe",
"topic": "viessmannapi.0.123456.0.features.heating.dhw.pumps.circulation.properties.status.value",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "true",
"x": 130,
"y": 280,
"wires": [
[
"6b1a584b.f03688"
]
]
},
{
"id": "79dc92cb.710e24",
"type": "function",
"z": "98ef4cf5.1a8f38",
"name": "",
"func": "var circulation = flow.get(\"circulation\");\nvar hotWaterStorage = flow.get(\"hotWaterStorage\");\n\nif (msg.payload === \"1\" && hotWaterStorage >= 47.0 && circulation ===\"on\"){\n return [{payload:(\"Dein Warmwasser ist bereits warm.\")},null];}\nelse if (msg.payload === \"1\" && hotWaterStorage < 47.0 || circulation ===\"off\"){\n return [null,msg];}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 420,
"y": 140,
"wires": [
[
"4fee0204.132e04"
],
[
"30ac84df.e65664",
"db08420b.f96",
"db63097e.628898"
]
]
},
{
"id": "4fee0204.132e04",
"type": "ioBroker out",
"z": "98ef4cf5.1a8f38",
"name": "speak \"WW ist bereits warm\" auf Echo Dot Bad",
"topic": "alexa2.0.Echo-Devices.G0xxXX0xx5xxxXxx.Commands.speak",
"ack": "false",
"autoCreate": "false",
"x": 940,
"y": 140,
"wires": []
},
{
"id": "2da41389.ba21b4",
"type": "ioBroker in",
"z": "98ef4cf5.1a8f38",
"name": "heating.dhw.oneTimeCharge.active",
"topic": "viessmannapi.0.123456.0.features.heating.dhw.oneTimeCharge.properties.active.value",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "true",
"x": 160,
"y": 360,
"wires": [
[
"911a988b.925b68"
]
]
},
{
"id": "dbabcbdb.95fe58",
"type": "ioBroker out",
"z": "98ef4cf5.1a8f38",
"name": "trigger heating_dhw_oneTimeCharge_deactivate",
"topic": "javascript.0.scriptEnabled.common.Heizung.heating_dhw_oneTimeCharge_deactivate",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 950,
"y": 360,
"wires": []
},
{
"id": "f1c64f6d.c05168",
"type": "function",
"z": "98ef4cf5.1a8f38",
"name": "",
"func": "var oTCactive = flow.get(\"oTCactive\");\n\nif (msg.payload === \"1\" && oTCactive === \"true\"){\n return msg;}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 440,
"y": 360,
"wires": [
[
"8f0001dd.ad1578",
"c52a2844.b45818"
]
]
},
{
"id": "e752a478.75298",
"type": "ioBroker out",
"z": "98ef4cf5.1a8f38",
"name": "speak \"WW wird jetzt aufgeheizt\" auf Echo Dot Bad",
"topic": "alexa2.0.Echo-Devices.G0xxXX0xx5xxxXxx.Commands.speak",
"ack": "false",
"autoCreate": "false",
"x": 950,
"y": 200,
"wires": []
},
{
"id": "30ac84df.e65664",
"type": "delay",
"z": "98ef4cf5.1a8f38",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"outputs": 1,
"x": 440,
"y": 320,
"wires": [
[
"f1c64f6d.c05168"
]
]
},
{
"id": "8f0001dd.ad1578",
"type": "trigger",
"z": "98ef4cf5.1a8f38",
"name": "",
"op1": "true",
"op2": "false",
"op1type": "bool",
"op2type": "bool",
"duration": "2",
"extend": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 650,
"y": 360,
"wires": [
[
"dbabcbdb.95fe58"
]
]
},
{
"id": "ece39c92.787cc8",
"type": "ioBroker out",
"z": "98ef4cf5.1a8f38",
"name": "trigger heating_dhw_oneTimeCharge_activate",
"topic": "javascript.0.scriptEnabled.common.Heizung.heating_dhw_oneTimeCharge_activate",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 940,
"y": 260,
"wires": []
},
{
"id": "db08420b.f96",
"type": "function",
"z": "98ef4cf5.1a8f38",
"name": "",
"func": "if (msg.payload === \"1\"){\n return [{payload:\"Dein Warmwasser wird jetzt aufgeheizt.\"}]}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 640,
"y": 200,
"wires": [
[
"e752a478.75298"
]
]
},
{
"id": "6b1a584b.f03688",
"type": "change",
"z": "98ef4cf5.1a8f38",
"name": "circulation",
"rules": [
{
"t": "set",
"p": "circulation",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 230,
"y": 320,
"wires": [
[]
]
},
{
"id": "889259cb.eec9c",
"type": "change",
"z": "98ef4cf5.1a8f38",
"name": "hotWater",
"rules": [
{
"t": "set",
"p": "hotWaterStorage",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 220,
"y": 240,
"wires": [
[]
]
},
{
"id": "911a988b.925b68",
"type": "change",
"z": "98ef4cf5.1a8f38",
"name": "oTCactive",
"rules": [
{
"t": "set",
"p": "oTCactive",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 230,
"y": 400,
"wires": [
[]
]
},
{
"id": "db63097e.628898",
"type": "function",
"z": "98ef4cf5.1a8f38",
"name": "",
"func": "if (msg.payload === \"1\"){\n return msg;}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 500,
"y": 260,
"wires": [
[
"86d115e0.24f11",
"5e8686fa.12d88"
]
]
},
{
"id": "5e8686fa.12d88",
"type": "change",
"z": "98ef4cf5.1a8f38",
"name": "already_active",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "str",
"to": "true",
"tot": "bool"
},
{
"t": "set",
"p": "already_active",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 660,
"y": 300,
"wires": [
[
"d063f1ea.709ef8"
]
]
},
{
"id": "c52a2844.b45818",
"type": "change",
"z": "98ef4cf5.1a8f38",
"name": "change 1=false",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "str",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 460,
"y": 400,
"wires": [
[
"5e8686fa.12d88"
]
]
},
{
"id": "d063f1ea.709ef8",
"type": "debug",
"z": "98ef4cf5.1a8f38",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 320,
"wires": []
}
]