[
{
"id": "e96d40e5c03c8e73",
"type": "tab",
"label": "Wasser Aquarium",
"disabled": false,
"info": "",
"env": []
},
{
"id": "a33e443616fc222a",
"type": "junction",
"z": "e96d40e5c03c8e73",
"x": 490,
"y": 640,
"wires": [
[
"60d53c22716069e9",
"d068ec15abcaade1"
]
]
},
{
"id": "386107c00f1d7619",
"type": "junction",
"z": "e96d40e5c03c8e73",
"x": 490,
"y": 760,
"wires": [
[
"8ef2203079f36296",
"29b1c7a13367c06a"
]
]
},
{
"id": "eaa54aa4d4524f13",
"type": "ioBroker get",
"z": "e96d40e5c03c8e73",
"name": "jahr",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr",
"attrname": "jahr",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 410,
"y": 520,
"wires": [
[
"4d1b142f05cab694"
]
]
},
{
"id": "4d1b142f05cab694",
"type": "ioBroker get",
"z": "e96d40e5c03c8e73",
"name": "gesamt",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasser_Gesamt",
"attrname": "gesamt",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 540,
"y": 520,
"wires": [
[
"5fd63c6641e9671f"
]
]
},
{
"id": "ab094d747fb4d4a2",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Ausgabe Rechnung",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1100,
"y": 780,
"wires": []
},
{
"id": "54048569a59a81bb",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "rechnung",
"rules": [
{
"t": "set",
"p": "durchfluss",
"pt": "msg",
"to": "$round(durchfluss / 2.207,2)",
"tot": "jsonata"
},
{
"t": "set",
"p": "jahr",
"pt": "msg",
"to": "$round(durchfluss / 1000 + jahr,2)",
"tot": "jsonata"
},
{
"t": "set",
"p": "gesamt",
"pt": "msg",
"to": "$round(durchfluss / 1000 + gesamt,2)",
"tot": "jsonata"
},
{
"t": "set",
"p": "tag",
"pt": "msg",
"to": "$round(durchfluss + tag,2)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 840,
"y": 520,
"wires": [
[
"c0b45921777999b9",
"39aa9bd9d6bd2aba",
"1ff4be2b8a9ab574",
"0299ee6b90129254",
"ab094d747fb4d4a2"
]
]
},
{
"id": "9ee03dcc9a9f622a",
"type": "ioBroker get",
"z": "e96d40e5c03c8e73",
"name": "count",
"topic": "sonoff.0.Aqua_Float.SENSOR.COUNTER.C1",
"attrname": "durchfluss",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 170,
"y": 520,
"wires": [
[
"229c64f2f419668b"
]
]
},
{
"id": "b24e06dbb8e9ac50",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "durchfl.",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1290,
"y": 580,
"wires": [],
"icon": "node-red-contrib-calc/calculator.png"
},
{
"id": "c6281d6865cd92d2",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "tag",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1280,
"y": 460,
"wires": [],
"icon": "node-red-contrib-calc/calculator.png"
},
{
"id": "afcca7e9867b3ebb",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "jahr",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1280,
"y": 520,
"wires": [],
"icon": "node-red-contrib-calc/calculator.png"
},
{
"id": "be2423fc891d456a",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "gesamt",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasser_Gesamt",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1290,
"y": 640,
"wires": [],
"icon": "node-red-contrib-calc/calculator.png"
},
{
"id": "229c64f2f419668b",
"type": "ioBroker get",
"z": "e96d40e5c03c8e73",
"name": "tag",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag",
"attrname": "tag",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 290,
"y": 520,
"wires": [
[
"eaa54aa4d4524f13"
]
]
},
{
"id": "39aa9bd9d6bd2aba",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "durchfluss",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 580,
"wires": [
[
"b24e06dbb8e9ac50"
]
]
},
{
"id": "1ff4be2b8a9ab574",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "tag",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1110,
"y": 460,
"wires": [
[
"c6281d6865cd92d2"
]
]
},
{
"id": "0299ee6b90129254",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "jahr",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1110,
"y": 520,
"wires": [
[
"afcca7e9867b3ebb"
]
]
},
{
"id": "c0b45921777999b9",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "gesamt",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 640,
"wires": [
[
"be2423fc891d456a"
]
]
},
{
"id": "9e57e652668d85fa",
"type": "ioBroker in",
"z": "e96d40e5c03c8e73",
"name": "Aquarium Schwimmer",
"attrname": "payload",
"topic": "sonoff.0.Aqua_Float.POWER1",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"outFormat": "MQTT",
"x": 100,
"y": 220,
"wires": [
[
"f1c7fb20f85acbee",
"c0dfdd7212b9892f",
"472ee6a39b3d21f3",
"6eab2c58acf1cbd5",
"d272c6eba743cc72"
]
]
},
{
"id": "e47c6d731c3e73c6",
"type": "http request",
"z": "e96d40e5c03c8e73",
"name": "Senden",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://192.168.0.71/cm?user=user&password=password&cmnd=counter1%200",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 980,
"y": 40,
"wires": [
[
"eb76397a7e0ab011"
]
]
},
{
"id": "a4e19115fa06a55b",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "Aqua Counter Reset",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 620,
"y": 40,
"wires": [
[
"6ed396444b677b10"
]
]
},
{
"id": "eb76397a7e0ab011",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Ausgabe Reset",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1140,
"y": 40,
"wires": []
},
{
"id": "d272c6eba743cc72",
"type": "delay",
"z": "e96d40e5c03c8e73",
"name": "warte 1sek",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 430,
"y": 40,
"wires": [
[
"a4e19115fa06a55b"
]
]
},
{
"id": "d068ec15abcaade1",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Jahr Reset",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 590,
"y": 620,
"wires": []
},
{
"id": "60d53c22716069e9",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "Jahr",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Jahr",
"ack": "true",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 570,
"y": 660,
"wires": []
},
{
"id": "c414e941c9432637",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "Jahr Reset",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 640,
"wires": [
[
"a33e443616fc222a"
]
]
},
{
"id": "ddd069f4381994d0",
"type": "inject",
"z": "e96d40e5c03c8e73",
"name": "Counter Reset Manuell",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 180,
"y": 40,
"wires": [
[
"d272c6eba743cc72"
]
]
},
{
"id": "5fd63c6641e9671f",
"type": "delay",
"z": "e96d40e5c03c8e73",
"name": "warte 5sek",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 690,
"y": 520,
"wires": [
[
"54048569a59a81bb"
]
]
},
{
"id": "6ed396444b677b10",
"type": "delay",
"z": "e96d40e5c03c8e73",
"name": "warte 6sek",
"pauseType": "delay",
"timeout": "6",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 810,
"y": 40,
"wires": [
[
"e47c6d731c3e73c6"
]
]
},
{
"id": "f4fba734f82a61ca",
"type": "cronplus",
"z": "e96d40e5c03c8e73",
"name": "Aqua Jahr Reset",
"outputField": "payload",
"timeZone": "",
"storeName": "",
"commandResponseMsgOutput": "output1",
"defaultLocation": "",
"defaultLocationType": "default",
"outputs": 1,
"options": [
{
"name": "Zeitplan",
"topic": "Counter Aqua Reset",
"payloadType": "default",
"payload": "",
"expressionType": "cron",
"expression": "0 0 0 31 12 ? *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 190,
"y": 640,
"wires": [
[
"c414e941c9432637"
]
]
},
{
"id": "53715765e5ba3798",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Counter lesen",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1160,
"y": 260,
"wires": []
},
{
"id": "49a24c8dbf3069a7",
"type": "delay",
"z": "e96d40e5c03c8e73",
"name": "warte 1s",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 940,
"y": 260,
"wires": [
[
"53715765e5ba3798",
"bda78f206532ead4"
]
]
},
{
"id": "bda78f206532ead4",
"type": "link out",
"z": "e96d40e5c03c8e73",
"name": "link out 2",
"mode": "link",
"links": [
"7303186ce79854c1"
],
"x": 1075,
"y": 360,
"wires": []
},
{
"id": "7303186ce79854c1",
"type": "link in",
"z": "e96d40e5c03c8e73",
"name": "link in 2",
"links": [
"bda78f206532ead4"
],
"x": 75,
"y": 520,
"wires": [
[
"9ee03dcc9a9f622a"
]
]
},
{
"id": "7c892b7636e3d9d8",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "durchfl.",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasser_Counter",
"ack": "true",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 640,
"y": 280,
"wires": []
},
{
"id": "f1c7fb20f85acbee",
"type": "delay",
"z": "e96d40e5c03c8e73",
"name": "warte 4s",
"pauseType": "delay",
"timeout": "4",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 340,
"y": 280,
"wires": [
[
"3879868e12e9ddb2"
]
]
},
{
"id": "3879868e12e9ddb2",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "durchfl.Reset",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 280,
"wires": [
[
"7c892b7636e3d9d8"
]
]
},
{
"id": "29b1c7a13367c06a",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Tag Reset",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 580,
"y": 740,
"wires": []
},
{
"id": "8ef2203079f36296",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "tag",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasserzähler_Tag",
"ack": "true",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 570,
"y": 780,
"wires": []
},
{
"id": "fcf7480806fc8018",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "Tag Reset",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 380,
"y": 760,
"wires": [
[
"386107c00f1d7619"
]
]
},
{
"id": "d5126388d3b02e0c",
"type": "cronplus",
"z": "e96d40e5c03c8e73",
"name": "Aqua Tag Reset",
"outputField": "payload",
"timeZone": "",
"storeName": "",
"commandResponseMsgOutput": "output1",
"defaultLocation": "",
"defaultLocationType": "default",
"outputs": 1,
"options": [
{
"name": "Zeitplan",
"topic": "Counter Aqua Reset",
"payloadType": "default",
"payload": "",
"expressionType": "cron",
"expression": "0 0 0 * * ? *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 180,
"y": 760,
"wires": [
[
"fcf7480806fc8018"
]
]
},
{
"id": "c0dfdd7212b9892f",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Aquarium Schwimmer",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 360,
"y": 340,
"wires": []
},
{
"id": "6eab2c58acf1cbd5",
"type": "function",
"z": "e96d40e5c03c8e73",
"name": "true->Start-false->Reset Trigger",
"func": "let news = msg.payload;\n\nif(news == true){\n msg.payload = true;\n return msg;\n}\nif(news == false){\n msg.reset = true;\n return msg;\n}\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 160,
"wires": [
[
"bef576295b23f014"
]
]
},
{
"id": "a93e73afeac53427",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Magnetschalter ein",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1170,
"y": 120,
"wires": []
},
{
"id": "b221e87bcb4925b3",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "Magnetventil",
"topic": "sonoff.0.GordonX-Home-Kaffeemaschine.POWER2",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1150,
"y": 160,
"wires": []
},
{
"id": "ad3b00386df37a23",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "true -> false",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "true",
"fromt": "bool",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 200,
"wires": [
[
"b221e87bcb4925b3",
"e3a33291c8476a30"
]
]
},
{
"id": "e3a33291c8476a30",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Magnetschalter aus",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1170,
"y": 220,
"wires": []
},
{
"id": "472ee6a39b3d21f3",
"type": "function",
"z": "e96d40e5c03c8e73",
"name": "false->Start-true->Reset Trigger",
"func": "let news = msg.payload;\n\nif(news == false){\n msg.payload = true;\n return msg;\n}\nif(news == true){\n msg.reset = true;\n return msg;\n}\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 220,
"wires": [
[
"c581b3043d9c3910"
]
]
},
{
"id": "c581b3043d9c3910",
"type": "trigger",
"z": "e96d40e5c03c8e73",
"name": "Trigger nach 2sek stabli false",
"op1": "",
"op2": "true",
"op1type": "nul",
"op2type": "bool",
"duration": "2",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 2,
"x": 680,
"y": 220,
"wires": [
[],
[
"ad3b00386df37a23",
"49a24c8dbf3069a7"
]
]
},
{
"id": "bef576295b23f014",
"type": "trigger",
"z": "e96d40e5c03c8e73",
"name": "Triggger nach 2sek stabil true",
"op1": "",
"op2": "true",
"op1type": "nul",
"op2type": "bool",
"duration": "2",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 2,
"x": 690,
"y": 160,
"wires": [
[],
[
"b221e87bcb4925b3",
"a93e73afeac53427"
]
]
}
]