Hello people, I have a control that counts my water, processes it and then writes the values into data points and then resets the counter on the esp via http. Then the daily data point at zero o'clock is also set to zero and once a year the year counter is set to zero. My problem now is that everything works except that when the float is false again, the esp counter reset command is not sent and the values are not written to the data points. what could be the reason?!
The Control Unit is an ESP8266 flashed with tasmota.
The Water Flow Senor is an Pulse Counter.
My Node-Red run on an Raspi Pi 4 there is Iobroker with node-red installed.
The reset command to reset counter sends by MQTT this is ok.
bute the ground function is not running.
Since the true time from the float is always very short, the control would have to wait perhaps 10 seconds until all true/false have been completed and the water level in the tank is zero and then the counter value from the data point water_counter should be processed and the values into the data points be entered and then the http reset will be sent. The solenoid valve must be active for a maximum of 10 seconds otherwise the tank will overflow.
[
{
"id": "e96d40e5c03c8e73",
"type": "tab",
"label": "Wasser Aquarium",
"disabled": false,
"info": "",
"env": []
},
{
"id": "45a6e580b60ac2db",
"type": "junction",
"z": "e96d40e5c03c8e73",
"x": 800,
"y": 530,
"wires": [
[
"eaeec2f4b2ca281f",
"aa28b192152fbef2"
]
]
},
{
"id": "e55b14fd0d28d156",
"type": "junction",
"z": "e96d40e5c03c8e73",
"x": 820,
"y": 630,
"wires": [
[
"72a5c2949b417e99",
"14caa704f34116a9"
]
]
},
{
"id": "8c50dad878f1363c",
"type": "junction",
"z": "e96d40e5c03c8e73",
"x": 610,
"y": 470,
"wires": [
[
"071f99aa6aae94c4"
]
]
},
{
"id": "7014354310596b03",
"type": "junction",
"z": "e96d40e5c03c8e73",
"x": 200,
"y": 190,
"wires": [
[
"01ada18cbb3de587"
]
]
},
{
"id": "8fbb9f181c70628a",
"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": 660,
"y": 130,
"wires": [
[
"fea33a2388b19fea"
]
]
},
{
"id": "fea33a2388b19fea",
"type": "ioBroker get",
"z": "e96d40e5c03c8e73",
"name": "gesamt",
"topic": "0_userdata.0.Aqua_Control.0.Wasser.Wasser_Gesamt",
"attrname": "gesamt",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 790,
"y": 130,
"wires": [
[
"9a39688816db1eb6"
]
]
},
{
"id": "071f99aa6aae94c4",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Ausgabe Objekt",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 950,
"y": 470,
"wires": []
},
{
"id": "1a1876d6fd414b64",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "durchfluss",
"pt": "msg",
"to": "$round(durchfluss * 5.182,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": 440,
"y": 340,
"wires": [
[
"44ef0e4042c6ce50",
"d608be45b53e2d65",
"1c4049c837709955",
"eeea6be93ef84e68",
"8c50dad878f1363c"
]
]
},
{
"id": "0fdf123af6451d89",
"type": "ioBroker get",
"z": "e96d40e5c03c8e73",
"name": "durchfluss",
"topic": "sonoff.0.Aqua_Float.SENSOR.COUNTER.C1",
"attrname": "durchfluss",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 400,
"y": 130,
"wires": [
[
"d202759fc6e6dce3"
]
]
},
{
"id": "d71bb0083fe22676",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "durchfluss",
"topic": "sonoff.0.Aqua_Float.SENSOR.COUNTER.C1",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 940,
"y": 310,
"wires": []
},
{
"id": "b2f8630fc2e72c50",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "tag",
"topic": "0_userdata.0.Test_Wasser.Test_Wasser_Tag",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 920,
"y": 360,
"wires": []
},
{
"id": "3d07bf7fb1e614bd",
"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": 920,
"y": 410,
"wires": []
},
{
"id": "c87cb1a919d6871f",
"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": 930,
"y": 260,
"wires": []
},
{
"id": "d202759fc6e6dce3",
"type": "ioBroker get",
"z": "e96d40e5c03c8e73",
"name": "tag",
"topic": "0_userdata.0.Test_Wasser.Test_Wasser_Tag",
"attrname": "tag",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 540,
"y": 130,
"wires": [
[
"8fbb9f181c70628a"
]
]
},
{
"id": "d608be45b53e2d65",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "durchfluss",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 310,
"wires": [
[
"d71bb0083fe22676"
]
]
},
{
"id": "1c4049c837709955",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "tag",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 360,
"wires": [
[
"b2f8630fc2e72c50"
]
]
},
{
"id": "eeea6be93ef84e68",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "jahr",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 410,
"wires": [
[
"3d07bf7fb1e614bd"
]
]
},
{
"id": "44ef0e4042c6ce50",
"type": "change",
"z": "e96d40e5c03c8e73",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "gesamt",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 260,
"wires": [
[
"c87cb1a919d6871f"
]
]
},
{
"id": "9a39688816db1eb6",
"type": "link out",
"z": "e96d40e5c03c8e73",
"name": "link out 1",
"mode": "link",
"links": [
"0fa0de1398efaa3b"
],
"x": 885,
"y": 130,
"wires": [],
"icon": "node-red-contrib-calc/calculator.png"
},
{
"id": "0fa0de1398efaa3b",
"type": "link in",
"z": "e96d40e5c03c8e73",
"name": "link in 1",
"links": [
"9a39688816db1eb6"
],
"x": 315,
"y": 340,
"wires": [
[
"1a1876d6fd414b64"
]
],
"icon": "node-red-contrib-calc/calculator.png"
},
{
"id": "01ada18cbb3de587",
"type": "ioBroker out",
"z": "e96d40e5c03c8e73",
"name": "Magnetventil",
"topic": "sonoff.0.Aqua_Control.POWER1",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 400,
"y": 190,
"wires": []
},
{
"id": "76f52673b56e07fc",
"type": "ioBroker in",
"z": "e96d40e5c03c8e73",
"name": "Schwimmer",
"attrname": "payload",
"topic": "sonoff.0.Aqua_Float.POWER1",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "true",
"outFormat": "MQTT",
"x": 80,
"y": 130,
"wires": [
[
"7014354310596b03",
"62ed674bc6e01184"
]
]
},
{
"id": "62ed674bc6e01184",
"type": "switch",
"z": "e96d40e5c03c8e73",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 250,
"y": 130,
"wires": [
[
"0fdf123af6451d89",
"70154cd4.de1444"
]
]
},
{
"id": "b0a30850739bc81a",
"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": 110,
"y": 530,
"wires": [
[
"a940876997af3dcb"
]
]
},
{
"id": "aa28b192152fbef2",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Tag Reset",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 510,
"wires": []
},
{
"id": "eaeec2f4b2ca281f",
"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": 920,
"y": 550,
"wires": []
},
{
"id": "b36aa30.3a7276",
"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": 620,
"y": 40,
"wires": [
[
"1ef9987c.956c78"
]
]
},
{
"id": "70154cd4.de1444",
"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": 440,
"y": 40,
"wires": [
[
"b36aa30.3a7276"
]
]
},
{
"id": "1ef9987c.956c78",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Ausgabe Reset",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 40,
"wires": []
},
{
"id": "1e4f358a474147d7",
"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": 120,
"y": 630,
"wires": [
[
"4d69e63349514e4c"
]
]
},
{
"id": "14caa704f34116a9",
"type": "debug",
"z": "e96d40e5c03c8e73",
"name": "Jahr Reset",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 610,
"wires": []
},
{
"id": "72a5c2949b417e99",
"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": 920,
"y": 650,
"wires": []
},
{
"id": "a940876997af3dcb",
"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": 280,
"y": 530,
"wires": [
[
"45a6e580b60ac2db"
]
]
},
{
"id": "4d69e63349514e4c",
"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": 320,
"y": 630,
"wires": [
[
"e55b14fd0d28d156"
]
]
},
{
"id": "fac4c1272808e6f3",
"type": "inject",
"z": "e96d40e5c03c8e73",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 210,
"y": 40,
"wires": [
[
"70154cd4.de1444"
]
]
}
]