Dosing my pump for a specific time and wait a specific time and dose again (loop)

Hello friends.

I try to create a routine where my pump will dose for a given time, then wait and start dosing again.
For this i created 3 fields. One field where i can ENABLE or DISABLE this routine and 3 input fields where i can enter a dosing time and an interval time (how long the pump should not dose). I get this free values from my mqtt server

I read much about how to complete my task but (as always) i stuck. I read that the trigger node may be the correct tool, this is what i have so far. I think my problem is that i cant create a loop:

[
    {
        "id": "be8463690b65c6df",
        "type": "mqtt in",
        "z": "d51b33bb70359ba8",
        "name": "",
        "topic": "CIM500/W_TimerManual",
        "qos": "2",
        "datatype": "json",
        "broker": "b6502b0e06f48d91",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 220,
        "y": 3020,
        "wires": [
            [
                "250387881f18addd"
            ]
        ]
    },
    {
        "id": "738b4671b374f614",
        "type": "mqtt in",
        "z": "d51b33bb70359ba8",
        "name": "",
        "topic": "CIM500/W_TM_DosTime",
        "qos": "2",
        "datatype": "json",
        "broker": "b6502b0e06f48d91",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 220,
        "y": 3060,
        "wires": [
            [
                "52926592a348fc92"
            ]
        ]
    },
    {
        "id": "8b6e23efd107d4e1",
        "type": "mqtt in",
        "z": "d51b33bb70359ba8",
        "name": "",
        "topic": "CIM500/W_TM_Interval",
        "qos": "2",
        "datatype": "json",
        "broker": "b6502b0e06f48d91",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 210,
        "y": 3100,
        "wires": [
            [
                "f183aa1d87cd6dc0"
            ]
        ]
    },
    {
        "id": "250387881f18addd",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "set_global_TimerManual",
        "func": "global.set(\"TimerManual\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 500,
        "y": 3020,
        "wires": [
            [
                "d52ae55726dcd6df"
            ]
        ]
    },
    {
        "id": "52926592a348fc92",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "set_global_DosTime",
        "func": "global.set(\"DosTime\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 480,
        "y": 3060,
        "wires": [
            [
                "d52ae55726dcd6df"
            ]
        ]
    },
    {
        "id": "f183aa1d87cd6dc0",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "set_global_Interval",
        "func": "global.set(\"Interval\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 480,
        "y": 3100,
        "wires": [
            [
                "d52ae55726dcd6df"
            ]
        ]
    },
    {
        "id": "d0e3b835a8ee77c9",
        "type": "modbus-flex-write",
        "z": "d51b33bb70359ba8",
        "name": "",
        "showStatusActivities": true,
        "showErrors": true,
        "server": "0e3ec676f3e39293",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 1880,
        "y": 2920,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "a44dc45abb4e4060",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "SHUT PUMP ON",
        "func": "return msg\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1030,
        "y": 2920,
        "wires": [
            [
                "73dcc0ae1a4e4757"
            ]
        ]
    },
    {
        "id": "686855ad599dd51a",
        "type": "switch",
        "z": "d51b33bb70359ba8",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            },
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 910,
        "y": 3060,
        "wires": [
            [
                "a44dc45abb4e4060"
            ],
            [
                "2f14c30c74426a0d"
            ]
        ]
    },
    {
        "id": "2f14c30c74426a0d",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "SGUT PUMP OFF",
        "func": "msg.payload = 1\n\n\nreturn msg\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1070,
        "y": 3180,
        "wires": [
            [
                "c0b87d11400db173"
            ]
        ]
    },
    {
        "id": "0d6f29dd2827266e",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "modbus_write_103",
        "func": "var fc = 6;\nvar sa = 103;\nvar addresses = 1;\nvar value = msg.payload;  // value calculated from buffer-parser\nmsg.slave_ip = \"10.240.6.39\";\n\nmsg.payload = { \"value\": value, 'fc': fc, 'unitid': 1, 'address': sa, 'quantity': addresses };\n\nreturn msg;",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1620,
        "y": 2920,
        "wires": [
            [
                "d0e3b835a8ee77c9"
            ],
            []
        ]
    },
    {
        "id": "c0b87d11400db173",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "modbus_write_103",
        "func": "var fc = 6;\nvar sa = 103;\nvar addresses = 1;\nvar value = msg.payload;  // value calculated from buffer-parser\nmsg.slave_ip = \"10.240.6.39\";\n\nmsg.payload = { \"value\": 1, 'fc': fc, 'unitid': 1, 'address': sa, 'quantity': addresses };\n\nreturn msg;",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1300,
        "y": 3180,
        "wires": [
            [
                "02db519a558c29f2"
            ],
            []
        ]
    },
    {
        "id": "02db519a558c29f2",
        "type": "modbus-flex-write",
        "z": "d51b33bb70359ba8",
        "name": "",
        "showStatusActivities": true,
        "showErrors": true,
        "server": "0e3ec676f3e39293",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 1540,
        "y": 3180,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "73dcc0ae1a4e4757",
        "type": "trigger",
        "z": "d51b33bb70359ba8",
        "name": "this should be the dosetime",
        "op1": "0",
        "op2": "1",
        "op1type": "str",
        "op2type": "str",
        "duration": "5",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1310,
        "y": 2920,
        "wires": [
            [
                "0d6f29dd2827266e",
                "5cb5d15b08c4485d",
                "647adcf5cc75da4c"
            ]
        ]
    },
    {
        "id": "d52ae55726dcd6df",
        "type": "function",
        "z": "d51b33bb70359ba8",
        "name": "",
        "func": "var ManualTimer = global.get(\"TimerManual\")\nmsg.payload = ManualTimer\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 740,
        "y": 3060,
        "wires": [
            [
                "686855ad599dd51a"
            ]
        ]
    },
    {
        "id": "a5dd8375ea185f5d",
        "type": "change",
        "z": "d51b33bb70359ba8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "reset",
                "pt": "msg",
                "to": "TRUE",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1240,
        "y": 3000,
        "wires": [
            [
                "73dcc0ae1a4e4757"
            ]
        ]
    },
    {
        "id": "647adcf5cc75da4c",
        "type": "switch",
        "z": "d51b33bb70359ba8",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1510,
        "y": 3060,
        "wires": [
            [],
            [
                "a5dd8375ea185f5d"
            ]
        ]
    },
    {
        "id": "5cb5d15b08c4485d",
        "type": "debug",
        "z": "d51b33bb70359ba8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1280,
        "y": 2820,
        "wires": []
    },
    {
        "id": "f14eca3072b75cf1",
        "type": "delay",
        "z": "d51b33bb70359ba8",
        "name": "Intervall (wait)",
        "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": 1720,
        "y": 3020,
        "wires": [
            []
        ]
    },
    {
        "id": "b6502b0e06f48d91",
        "type": "mqtt-broker",
        "name": "",
        "broker": "185.164.7.227",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    },
    {
        "id": "0e3ec676f3e39293",
        "type": "modbus-client",
        "name": "CIM500",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "tcpHost": "10.240.6.39",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": "1",
        "commandDelay": "1",
        "clientTimeout": "1000",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": true
    }
]

thank you

Hi Manuel,

you could use the scheduler nodes node-red-contrib-chronos (node) - Node-RED.

I have something similar in place and adapted it quickly:

[{"id":"37b252a8b9202cd3","type":"chronos-scheduler","z":"3a28fde7c29728bc","name":"","config":"5e581578.25c88c","schedule":[{"trigger":{"type":"time","value":"10:00","offset":0,"random":false},"output":{"type":"fullMsg","contentType":"jsonata","value":"{\t    \"delay\": $flow.DosTime,\t    \"interval\": {\"value\": $flow.DosTime + 60 * $flow.Interval,\t    \"unit\":\"seconds\"}\t}\t"}}],"multiPort":false,"nextEventPort":false,"disabled":false,"outputs":1,"x":1080,"y":780,"wires":[["3d4814a2fcc99b84","2a0a79f1379eb2cc"]]},{"id":"c4818940ffdcc48f","type":"inject","z":"3a28fde7c29728bc","name":"trigger in 10 sec","props":[{"p":"comment","v":"put time below in format hh:mm:ss","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"hh:mm:ss","payloadType":"str","x":180,"y":680,"wires":[["beb7aed4806fb968"]]},{"id":"fc57cdf37b75a007","type":"debug","z":"3a28fde7c29728bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1270,"y":940,"wires":[]},{"id":"f1b7f9fd97a22b14","type":"debug","z":"3a28fde7c29728bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":680,"wires":[]},{"id":"beb7aed4806fb968","type":"function","z":"3a28fde7c29728bc","name":"produce now() + 10sec (for testing)","func":"const offsetInMillis = 10 * 1000;\n\nconst rightnow = new Date();\nlet timer = rightnow.setTime(rightnow.getTime() + offsetInMillis);\nlet timer_txt = (new Date(timer).toString()).split(\" \")[4];\n\nmsg.payload = timer_txt;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":680,"wires":[["f1b7f9fd97a22b14","2e81980cb9294e86"]]},{"id":"69ba2bc596c1e9ce","type":"inject","z":"3a28fde7c29728bc","name":"set dose time","props":[{"p":"comment","v":"put time below in seconds","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"8","payloadType":"num","x":170,"y":820,"wires":[["c33e5309c328516a"]]},{"id":"c33e5309c328516a","type":"change","z":"3a28fde7c29728bc","name":"","rules":[{"t":"set","p":"DosTime","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":820,"wires":[[]]},{"id":"fe77dc3a1bf7073a","type":"function","z":"3a28fde7c29728bc","name":"send 1 and after DosTime send 0","func":"msg.payload = 1;\nsetTimeout(() => {\n    node.send({payload: 0});\n}, flow.get(\"DosTime\") * 1000);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1020,"y":940,"wires":[["fc57cdf37b75a007"]]},{"id":"645686f2ae6d6957","type":"inject","z":"3a28fde7c29728bc","name":"set interval","props":[{"p":"comment","v":"put time below in minutes","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":160,"y":780,"wires":[["a0cad88c3b8e71de"]]},{"id":"a0cad88c3b8e71de","type":"change","z":"3a28fde7c29728bc","name":"","rules":[{"t":"set","p":"Interval","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":780,"wires":[["c69e363b1ae8a4e3"]]},{"id":"50580de92c402419","type":"inject","z":"3a28fde7c29728bc","name":"settime","props":[{"p":"comment","v":"put time below in format hh:mm:ss","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"15:00:00","payloadType":"str","x":150,"y":740,"wires":[["b2161f1f9efca375"]]},{"id":"8a44592a246d5334","type":"debug","z":"3a28fde7c29728bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":890,"y":820,"wires":[]},{"id":"c69e363b1ae8a4e3","type":"function","z":"3a28fde7c29728bc","name":"repeater","func":"const repeaterInMilis = (flow.get(\"Interval\") ?? 1) * 60 * 1000;\n\nconst rightnow = new Date();\nconst intensec = rightnow.setTime(rightnow.getTime() + 10000);\n\nlet last = flow.get(\"lastTrigger\");\nif (last) {\n    last = new Date(last);\n    const newtimer = last.setTime(last.getTime() + repeaterInMilis);\n\n    const timer = Math.max(intensec, newtimer)\n\n    let timer_txt = (new Date(timer).toString()).split(\" \")[4];\n\n    msg.payload = timer_txt;\n    return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":780,"wires":[["8a44592a246d5334","798e3f3f4b838f32"]]},{"id":"798e3f3f4b838f32","type":"function","z":"3a28fde7c29728bc","name":"create Timer","func":"const schedule = [\n    {\n        \"type\": \"time\",\n        \"value\": msg.payload,\n        \"offset\": 0,\n        \"random\": false\n    }\n];\nmsg.payload = schedule;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":780,"wires":[["37b252a8b9202cd3"]]},{"id":"235f8cf877fa3e5e","type":"inject","z":"3a28fde7c29728bc","name":"stop repeating","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":170,"y":880,"wires":[["89bfef0b7065f440"]]},{"id":"86164c88aae4bab9","type":"change","z":"3a28fde7c29728bc","name":"","rules":[{"t":"set","p":"lastTrigger","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":940,"wires":[["fe77dc3a1bf7073a"]]},{"id":"ee685e4eaef86e48","type":"link in","z":"3a28fde7c29728bc","name":"link in 9","links":["2a0a79f1379eb2cc"],"x":615,"y":820,"wires":[["c69e363b1ae8a4e3"]]},{"id":"2a0a79f1379eb2cc","type":"link out","z":"3a28fde7c29728bc","name":"link out 12","mode":"link","links":["ee685e4eaef86e48"],"x":1275,"y":820,"wires":[]},{"id":"b2161f1f9efca375","type":"change","z":"3a28fde7c29728bc","name":"","rules":[{"t":"delete","p":"lastTrigger","pt":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":740,"wires":[["2e81980cb9294e86"]]},{"id":"2e81980cb9294e86","type":"junction","z":"3a28fde7c29728bc","x":780,"y":740,"wires":[["798e3f3f4b838f32"]]},{"id":"89bfef0b7065f440","type":"junction","z":"3a28fde7c29728bc","x":1000,"y":880,"wires":[["37b252a8b9202cd3"]]},{"id":"3d4814a2fcc99b84","type":"junction","z":"3a28fde7c29728bc","x":1260,"y":880,"wires":[["86164c88aae4bab9"]]},{"id":"5e581578.25c88c","type":"chronos-config","name":"Berlin","timezone":"","sunPositions":[{"angle":-4,"riseName":"blueHourDawn","setName":"blueHourDusk"},{"angle":-8,"riseName":"blueHourDawnBegin","setName":"blueHourDuskEnd"}]}]

Interval is in minutes, dose time in seconds; adapt if necessary.
Setting the interval without defining a start time does nothing, setting interval after the dosing is started, will adjust following intervals. If you shorten the interval and the next start time would be in the past, it runs in now+10sec.

Output produced (Interval = 1min, dose = 3sec):

thank you very much.

I tried your example, but it does not work. there is something missing in the scheduler node.
"invalid configuration".

even when i trigger the different inject-nodes.

best regards

Hi, just tried on a fresh node-red and it seems it is missing the lon,lat of the location.
Just try to enter something sensible.

output_config_chronos01

1 Like

thank you. this caused the issue=)!

1 Like

one question crossed my mind.
Why did you create the "settime" inejct node that sets a time at 15:00:00?

I modified the code a bit. i changed the interval to seconds and the input now is through numberfields.
What problem i face now is: Since your code checks if the shortened time was in the past and if so generates a new date + 10 seconds, it is impossible to have something like dosing time 1 second and interval second. any ideas?

[
    {
        "id": "15f8e11d80435880",
        "type": "chronos-scheduler",
        "z": "a485bbb8dbfee062",
        "name": "",
        "config": "5e581578.25c88c",
        "schedule": [
            {
                "trigger": {
                    "type": "time",
                    "value": "10:00",
                    "offset": 0,
                    "random": false
                },
                "output": {
                    "type": "fullMsg",
                    "contentType": "jsonata",
                    "value": "{\t    \"delay\": $flow.DosTime,\t    \"interval\": {\"value\": $flow.DosTime + 60 * $flow.Interval,\t    \"unit\":\"seconds\"}\t}\t"
                }
            }
        ],
        "multiPort": false,
        "nextEventPort": false,
        "disabled": false,
        "outputs": 1,
        "x": 1180,
        "y": 680,
        "wires": [
            [
                "59a36f7e911fd52b",
                "39761e66a60e9d93"
            ]
        ]
    },
    {
        "id": "eb77371cf93d2d93",
        "type": "debug",
        "z": "a485bbb8dbfee062",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1370,
        "y": 840,
        "wires": []
    },
    {
        "id": "52e86a24aa71fdaf",
        "type": "debug",
        "z": "a485bbb8dbfee062",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1050,
        "y": 600,
        "wires": []
    },
    {
        "id": "e081635a9d265a76",
        "type": "function",
        "z": "a485bbb8dbfee062",
        "name": "produce now() + 10sec (for testing)",
        "func": "const offsetInMillis = 10 * 1000;\n\nconst rightnow = new Date();\nlet timer = rightnow.setTime(rightnow.getTime() + offsetInMillis);\nlet timer_txt = (new Date(timer).toString()).split(\" \")[4];\n\nmsg.payload = timer_txt;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 580,
        "wires": [
            [
                "52e86a24aa71fdaf",
                "bf60156d74a7c81c"
            ]
        ]
    },
    {
        "id": "7851f9aaf47d4a0c",
        "type": "change",
        "z": "a485bbb8dbfee062",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "DosTime",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 470,
        "y": 740,
        "wires": [
            []
        ]
    },
    {
        "id": "5c9af936c25a524f",
        "type": "function",
        "z": "a485bbb8dbfee062",
        "name": "send 1 and after DosTime send 0",
        "func": "msg.payload = 1;\nsetTimeout(() => {\n    node.send({payload: 0});\n}, flow.get(\"DosTime\") * 1000);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1120,
        "y": 840,
        "wires": [
            [
                "eb77371cf93d2d93"
            ]
        ]
    },
    {
        "id": "c744d20e8a518089",
        "type": "change",
        "z": "a485bbb8dbfee062",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "Interval",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 470,
        "y": 680,
        "wires": [
            [
                "0d1ac2ef0324d1d5"
            ]
        ]
    },
    {
        "id": "28b0d0e63d82f0f0",
        "type": "debug",
        "z": "a485bbb8dbfee062",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 990,
        "y": 720,
        "wires": []
    },
    {
        "id": "0d1ac2ef0324d1d5",
        "type": "function",
        "z": "a485bbb8dbfee062",
        "name": "repeater",
        "func": "const repeaterInMilis = (flow.get(\"Interval\") ?? 1)  * 1000;\n\nconst rightnow = new Date();\nconst intensec = rightnow.setTime(rightnow.getTime()+10000);\n\nlet last = flow.get(\"lastTrigger\");\nif (last) {\n    last = new Date(last);\n    const newtimer = last.setTime(last.getTime() + repeaterInMilis);\n\n    const timer = Math.max(intensec, newtimer)\n\n    let timer_txt = (new Date(timer).toString()).split(\" \")[4];\n\n    msg.payload = timer_txt;\n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 820,
        "y": 680,
        "wires": [
            [
                "28b0d0e63d82f0f0",
                "9d6f78ec985fe2e4"
            ]
        ]
    },
    {
        "id": "9d6f78ec985fe2e4",
        "type": "function",
        "z": "a485bbb8dbfee062",
        "name": "create Timer",
        "func": "const schedule = [\n    {\n        \"type\": \"time\",\n        \"value\": msg.payload,\n        \"offset\": 0,\n        \"random\": false\n    }\n];\nmsg.payload = schedule;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 990,
        "y": 680,
        "wires": [
            [
                "15f8e11d80435880"
            ]
        ]
    },
    {
        "id": "51d3176196f52a92",
        "type": "change",
        "z": "a485bbb8dbfee062",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "lastTrigger",
                "pt": "flow",
                "to": "",
                "tot": "date"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 840,
        "y": 840,
        "wires": [
            [
                "5c9af936c25a524f"
            ]
        ]
    },
    {
        "id": "71150ce1037ae3df",
        "type": "link in",
        "z": "a485bbb8dbfee062",
        "name": "link in 9",
        "links": [
            "39761e66a60e9d93"
        ],
        "x": 715,
        "y": 720,
        "wires": [
            [
                "0d1ac2ef0324d1d5"
            ]
        ]
    },
    {
        "id": "39761e66a60e9d93",
        "type": "link out",
        "z": "a485bbb8dbfee062",
        "name": "link out 12",
        "mode": "link",
        "links": [
            "71150ce1037ae3df"
        ],
        "x": 1375,
        "y": 720,
        "wires": []
    },
    {
        "id": "0cb5a1153fd77ddb",
        "type": "change",
        "z": "a485bbb8dbfee062",
        "name": "",
        "rules": [
            {
                "t": "delete",
                "p": "lastTrigger",
                "pt": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 480,
        "y": 640,
        "wires": [
            [
                "bf60156d74a7c81c"
            ]
        ]
    },
    {
        "id": "bf60156d74a7c81c",
        "type": "junction",
        "z": "a485bbb8dbfee062",
        "x": 880,
        "y": 640,
        "wires": [
            [
                "9d6f78ec985fe2e4"
            ]
        ]
    },
    {
        "id": "b7a0218842c6b9b8",
        "type": "junction",
        "z": "a485bbb8dbfee062",
        "x": 1100,
        "y": 780,
        "wires": [
            [
                "15f8e11d80435880"
            ]
        ]
    },
    {
        "id": "59a36f7e911fd52b",
        "type": "junction",
        "z": "a485bbb8dbfee062",
        "x": 1360,
        "y": 780,
        "wires": [
            [
                "51d3176196f52a92"
            ]
        ]
    },
    {
        "id": "ee154cbe421d9f5c",
        "type": "switch",
        "z": "a485bbb8dbfee062",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            },
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 150,
        "y": 840,
        "wires": [
            [
                "e081635a9d265a76"
            ],
            [
                "b7a0218842c6b9b8"
            ]
        ]
    },
    {
        "id": "98cc78846150f429",
        "type": "inject",
        "z": "a485bbb8dbfee062",
        "name": "settime",
        "props": [
            {
                "p": "comment",
                "v": "put time below in format hh:mm:ss",
                "vt": "str"
            },
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "15:00:00",
        "payloadType": "str",
        "x": 250,
        "y": 600,
        "wires": [
            [
                "0cb5a1153fd77ddb"
            ]
        ]
    },
    {
        "id": "a9eec94708083b2a",
        "type": "ui_numeric",
        "z": "a485bbb8dbfee062",
        "name": "",
        "label": "TimerManual_Interval[s]:",
        "tooltip": "",
        "group": "fa7c1f04e5714b54",
        "order": 30,
        "width": 3,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": 1,
        "className": "",
        "x": 170,
        "y": 500,
        "wires": [
            [
                "cd03f0789fdef3a5",
                "0110d534452a4bbc"
            ]
        ]
    },
    {
        "id": "9fa6ee2e8c1128ae",
        "type": "ui_numeric",
        "z": "a485bbb8dbfee062",
        "name": "",
        "label": "TimerManual_DosTime[s]:",
        "tooltip": "",
        "group": "fa7c1f04e5714b54",
        "order": 27,
        "width": 3,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": "1",
        "className": "",
        "x": 170,
        "y": 400,
        "wires": [
            [
                "00dc0a5cdb63e874",
                "a6b8bbe7f52302c8"
            ]
        ]
    },
    {
        "id": "61bd57cae5e417f2",
        "type": "ui_dropdown",
        "z": "a485bbb8dbfee062",
        "name": "",
        "label": "TimerManual:",
        "tooltip": "Change operating mode",
        "place": "",
        "group": "fa7c1f04e5714b54",
        "order": 22,
        "width": 3,
        "height": 1,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "ENABLED",
                "value": true,
                "type": "bool"
            },
            {
                "label": "DISABLED",
                "value": false,
                "type": "bool"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 140,
        "y": 300,
        "wires": [
            [
                "e28fa5b08c199603",
                "f0c802ee9ef28c87",
                "ee154cbe421d9f5c"
            ]
        ]
    },
    {
        "id": "5e581578.25c88c",
        "type": "chronos-config",
        "name": "Berlin",
        "timezone": "",
        "sunPositions": [
            {
                "angle": -4,
                "riseName": "blueHourDawn",
                "setName": "blueHourDusk"
            },
            {
                "angle": -8,
                "riseName": "blueHourDawnBegin",
                "setName": "blueHourDuskEnd"
            }
        ]
    },
    {
        "id": "fa7c1f04e5714b54",
        "type": "ui_group",
        "name": "CONTROL",
        "tab": "a42d8adbe9caeb3d",
        "order": 1,
        "disp": true,
        "width": 16,
        "collapse": true,
        "className": ""
    },
    {
        "id": "a42d8adbe9caeb3d",
        "type": "ui_tab",
        "name": "Pumpe_01_Oberwaltersdorf",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

best regards

generally the 10sec are controlled via this line
const intensec = rightnow.setTime(rightnow.getTime()+10000);
in function node "repeater"
image.
You can reduce the 10000 in the end which are milliseconds.

However, I suspect that it will not work reliably under a certain value, because the scheduler will trigger the next day if the time you set is already up.

If you are going for such small intervals it's probably best to rethink the triggering.

What range of time intervals will you need?
What should be the behaviour if the interval is changed? e.g. a) trigger now, b) trigger now + interval, c) trigger last time + interval? What if c) this is in the past, trigger immediately?...
Something not really relevant if interval is much larger than dose time (like for minutes vs seconds), but if both is seconds, is the interval the trigger interval regardless of actual dosing or (which makes more sense since the pump can only be on or off) should the interval be the pause in between doses? Because otherwise if both is 1 sec pump would be on permanently.

What do you think?

thank you for the long reply.

A little background. I want to control my dosing pump. Since it can happen that the pump should pump a few seconds and then wait 10 seconds for example and pump again i wanted to create a routine where i have no limits for the interval (waiting) or dosing time. To be honest this is an extreme case but i cant exclude that it will happen.

What range of time intervals will you need?
What should be the behaviour if the interval is changed? e.g. a) trigger now, b) trigger now + interval, c) trigger last time + interval? What if c) this is in the past, trigger immediately?...
Something not really relevant if interval is much larger than dose time (like for minutes vs seconds), but if both is seconds, is the interval the trigger interval regardless of actual dosing or (which makes more sense since the pump can only be on or off) should the interval be the pause in between doses? Because otherwise if both is 1 sec pump would be on permanently.

I think the best case would be, if the interval is changed, that a time-window of 10 seconds is a good idea. Kinda like in your flow.

the interval should be the waiting time between the doses.

So i think the best solution would be that if an interval-change happens the whole process should be stoped and start again: : stop the pump, wait 10 seconds and start a new interval (waiting time) and THEN start the pump again.

Still fighting to implement the idea into code.

best regards

The simplified flow could be like this.

[{"id":"98115c8e8d097eee","type":"debug","z":"3a28fde7c29728bc","name":"trigger","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1310,"y":1420,"wires":[]},{"id":"10a159cc26eea36a","type":"inject","z":"3a28fde7c29728bc","name":"set dose time","props":[{"p":"comment","v":"put time below in seconds","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":110,"y":1460,"wires":[["28573236aae7e7f5"]]},{"id":"28573236aae7e7f5","type":"change","z":"3a28fde7c29728bc","name":"","rules":[{"t":"set","p":"DosTime","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":1460,"wires":[["6385fb73b3ac29d9"]]},{"id":"189b758abd44484f","type":"function","z":"3a28fde7c29728bc","name":"send 1 and after DosTime send 0","func":"msg.payload = 1;\nsetTimeout(() => {\n    node.send([{payload: 0}, {payload: 0}]);\n}, flow.get(\"DosTime\") * 1000);\nreturn [msg, null];","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":1420,"wires":[["98115c8e8d097eee"],["a16dce58bda842bb"]]},{"id":"9afdd25ddd82df9d","type":"inject","z":"3a28fde7c29728bc","name":"set interval","props":[{"p":"comment","v":"put time below in seconds","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":100,"y":1420,"wires":[["81b143d843b235b4"]]},{"id":"81b143d843b235b4","type":"change","z":"3a28fde7c29728bc","name":"","rules":[{"t":"set","p":"Interval","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":1420,"wires":[["6385fb73b3ac29d9"]]},{"id":"ca9b636c2d2825c4","type":"debug","z":"3a28fde7c29728bc","name":"interval","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1000,"y":1380,"wires":[]},{"id":"bd9bdb0d3208c91a","type":"function","z":"3a28fde7c29728bc","name":"create interval","func":"const repeaterInMillis = (flow.get(\"Interval\") ?? 1) * 1000;\n\nconst timeoutID = setTimeout(() => {\n    node.send({ payload: \"interval trigger\" });\n}, repeaterInMillis);\n\nflow.set(\"timeoutID\", timeoutID);\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1420,"wires":[["ca9b636c2d2825c4","189b758abd44484f"]]},{"id":"c1439bea4e9c814c","type":"inject","z":"3a28fde7c29728bc","name":"stop repeating","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":1520,"wires":[["953b85112b958f14"]]},{"id":"953b85112b958f14","type":"function","z":"3a28fde7c29728bc","name":"stop interval","func":"const timeoutID = flow.get(\"timeoutID\");\nif (typeof timeoutID != 'undefined') {\n    clearTimeout(timeoutID);\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":270,"y":1520,"wires":[["747833cd016a12a0"]]},{"id":"747833cd016a12a0","type":"change","z":"3a28fde7c29728bc","name":"","rules":[{"t":"delete","p":"timeoutID","pt":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":1520,"wires":[[]]},{"id":"ac1a0263bf2df603","type":"debug","z":"3a28fde7c29728bc","name":"restart","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":1380,"wires":[]},{"id":"11a124b7a57c87e0","type":"debug","z":"3a28fde7c29728bc","name":"restart","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":1380,"wires":[]},{"id":"6385fb73b3ac29d9","type":"function","z":"3a28fde7c29728bc","name":"stop interval","func":"const timeoutID = flow.get(\"timeoutID\");\nif (typeof timeoutID != 'undefined') {\n    clearTimeout(timeoutID);\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":1420,"wires":[["ac1a0263bf2df603","64eed6646f0fa519"]]},{"id":"64eed6646f0fa519","type":"function","z":"3a28fde7c29728bc","name":"initial delay","func":"const initialDelayInMillis = 10 * 1000;\n\nconst timeoutID = setTimeout(() => {\n    node.send(msg);\n}, initialDelayInMillis);\n\nflow.set(\"timeoutID\", timeoutID);\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":1420,"wires":[["bd9bdb0d3208c91a","11a124b7a57c87e0"]]},{"id":"a16dce58bda842bb","type":"junction","z":"3a28fde7c29728bc","x":960,"y":1500,"wires":[["bd9bdb0d3208c91a"]]}]

I think it is simpler and cleaner than the older ones.

1 Like

thank you for the reply and the idea.

Seems to be the flow i looked for and from what i see it works the way it should be. thank your for that.

I modified your example a bit. Since i will control my pump further dose some chemicals with it i try to elimante every possibilty that the pump runs, stops or do some wired stuff. For sure there will some more testing etc so elimante potential bugs.

Until now i cant found one. Maybe somebody sees more than i do:

[
    {
        "id": "9fb759062e9d8654",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "name": "",
        "topic": "CIM500/W_TimerManual",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 730,
        "y": 720,
        "wires": []
    },
    {
        "id": "43dd13fe7d7f50d8",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "name": "",
        "topic": "CIM500/W_TM_DosTime",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 730,
        "y": 760,
        "wires": []
    },
    {
        "id": "bb0a7e42521b939e",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "name": "",
        "topic": "CIM500/W_TM_Interval",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 730,
        "y": 800,
        "wires": []
    },
    {
        "id": "98115c8e8d097eee",
        "type": "debug",
        "z": "191728c3ee9255a0",
        "name": "trigger",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1610,
        "y": 920,
        "wires": []
    },
    {
        "id": "189b758abd44484f",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "send 1 and after DosTime send 0",
        "func": "msg.payload = 1;\nsetTimeout(() => {\n    node.send([{payload: 0}, {payload: 0}]);\n}, flow.get(\"DosTime\") * 1000);\nreturn [msg, null];",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1380,
        "y": 920,
        "wires": [
            [
                "98115c8e8d097eee",
                "e08e5a2aeb7f05f0"
            ],
            [
                "a16dce58bda842bb"
            ]
        ]
    },
    {
        "id": "ca9b636c2d2825c4",
        "type": "debug",
        "z": "191728c3ee9255a0",
        "name": "interval",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1220,
        "y": 840,
        "wires": []
    },
    {
        "id": "bd9bdb0d3208c91a",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "create interval",
        "func": "const repeaterInMillis = (flow.get(\"Interval\") ?? 1) * 1000;\n\nconst timeoutID = setTimeout(() => {\n    node.send({ payload: \"interval trigger\" });\n}, repeaterInMillis);\n\nflow.set(\"timeoutID\", timeoutID);\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1120,
        "y": 920,
        "wires": [
            [
                "ca9b636c2d2825c4",
                "189b758abd44484f"
            ]
        ]
    },
    {
        "id": "953b85112b958f14",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "stop interval",
        "func": "const timeoutID = flow.get(\"timeoutID\");\nif (typeof timeoutID != 'undefined') {\n    clearTimeout(timeoutID);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 690,
        "y": 1120,
        "wires": [
            [
                "747833cd016a12a0"
            ]
        ]
    },
    {
        "id": "747833cd016a12a0",
        "type": "change",
        "z": "191728c3ee9255a0",
        "name": "",
        "rules": [
            {
                "t": "delete",
                "p": "timeoutID",
                "pt": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 920,
        "y": 1120,
        "wires": [
            []
        ]
    },
    {
        "id": "ac1a0263bf2df603",
        "type": "debug",
        "z": "191728c3ee9255a0",
        "name": "restart",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 850,
        "y": 860,
        "wires": []
    },
    {
        "id": "11a124b7a57c87e0",
        "type": "debug",
        "z": "191728c3ee9255a0",
        "name": "restart",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1010,
        "y": 860,
        "wires": []
    },
    {
        "id": "6385fb73b3ac29d9",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "stop interval",
        "func": "const timeoutID = flow.get(\"timeoutID\");\nif (typeof timeoutID != 'undefined') {\n    clearTimeout(timeoutID);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 920,
        "wires": [
            [
                "ac1a0263bf2df603",
                "64eed6646f0fa519"
            ]
        ]
    },
    {
        "id": "64eed6646f0fa519",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "initial delay",
        "func": "const initialDelayInMillis = 10 * 1000;\n\nconst timeoutID = setTimeout(() => {\n    node.send(msg);\n}, initialDelayInMillis);\n\nflow.set(\"timeoutID\", timeoutID);\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 910,
        "y": 920,
        "wires": [
            [
                "bd9bdb0d3208c91a",
                "11a124b7a57c87e0"
            ]
        ]
    },
    {
        "id": "e23efde767c5bb51",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "name": "",
        "topic": "CIM500/W_StartStop",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 1460,
        "y": 680,
        "wires": []
    },
    {
        "id": "e08e5a2aeb7f05f0",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "change to true or false",
        "func": "var ps = msg.payload\n\nif(ps==0)\n{\n    msg.payload = true\n}\n\nelse if (ps==1)\n{\n    msg.payload = false\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1150,
        "y": 680,
        "wires": [
            [
                "e23efde767c5bb51"
            ]
        ]
    },
    {
        "id": "b73f1e0547dc9821",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "Stop pump",
        "func": "msg.payload = 1\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 690,
        "y": 1060,
        "wires": [
            [
                "e08e5a2aeb7f05f0"
            ]
        ]
    },
    {
        "id": "a16dce58bda842bb",
        "type": "junction",
        "z": "191728c3ee9255a0",
        "x": 1260,
        "y": 1020,
        "wires": [
            [
                "bd9bdb0d3208c91a"
            ]
        ]
    },
    {
        "id": "506e17594f578bf5",
        "type": "ui_dropdown",
        "z": "191728c3ee9255a0",
        "name": "",
        "label": "TimerManual:",
        "tooltip": "Change operating mode",
        "place": "",
        "group": "83fd112e3229a323",
        "order": 25,
        "width": 5,
        "height": 1,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "ENABLED",
                "value": true,
                "type": "bool"
            },
            {
                "label": "DISABLED",
                "value": false,
                "type": "bool"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 120,
        "y": 800,
        "wires": [
            [
                "9fb759062e9d8654",
                "54f655307285a701",
                "9875b8a1a4b7bbee"
            ]
        ]
    },
    {
        "id": "96e3227b0f9112d7",
        "type": "ui_numeric",
        "z": "191728c3ee9255a0",
        "name": "",
        "label": "TimerManual_DosTime[s]:",
        "tooltip": "",
        "group": "83fd112e3229a323",
        "order": 29,
        "width": 5,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": "1",
        "className": "",
        "x": 140,
        "y": 900,
        "wires": [
            [
                "43dd13fe7d7f50d8",
                "217a103e690b84e6"
            ]
        ]
    },
    {
        "id": "2a49f815f4e667f9",
        "type": "ui_numeric",
        "z": "191728c3ee9255a0",
        "name": "",
        "label": "TimerManual_Interval[s]:",
        "tooltip": "",
        "group": "83fd112e3229a323",
        "order": 27,
        "width": 5,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": 1,
        "className": "",
        "x": 130,
        "y": 1000,
        "wires": [
            [
                "bb0a7e42521b939e",
                "b6a07c11accf2e86"
            ]
        ]
    },
    {
        "id": "54f655307285a701",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "set_global_TimerManual",
        "func": "global.set(\"TimerManual\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 150,
        "y": 760,
        "wires": [
            []
        ]
    },
    {
        "id": "217a103e690b84e6",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "set_global_DosTime",
        "func": "global.set(\"DosTime\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 140,
        "y": 860,
        "wires": [
            [
                "28573236aae7e7f5"
            ]
        ]
    },
    {
        "id": "b6a07c11accf2e86",
        "type": "function",
        "z": "191728c3ee9255a0",
        "name": "set_global_Interval",
        "func": "global.set(\"Interval\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 110,
        "y": 960,
        "wires": [
            [
                "81b143d843b235b4"
            ]
        ]
    },
    {
        "id": "28573236aae7e7f5",
        "type": "change",
        "z": "191728c3ee9255a0",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "DosTime",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 350,
        "y": 860,
        "wires": [
            []
        ]
    },
    {
        "id": "81b143d843b235b4",
        "type": "change",
        "z": "191728c3ee9255a0",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "Interval",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 300,
        "y": 960,
        "wires": [
            []
        ]
    },
    {
        "id": "9875b8a1a4b7bbee",
        "type": "switch",
        "z": "191728c3ee9255a0",
        "name": "pump started/stoped",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            },
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 520,
        "y": 920,
        "wires": [
            [
                "6385fb73b3ac29d9"
            ],
            [
                "953b85112b958f14",
                "b73f1e0547dc9821"
            ]
        ]
    },
    {
        "id": "19069e7ba2811a2e",
        "type": "mqtt-broker",
        "name": "",
        "broker": "185.164.7.227",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "83fd112e3229a323",
        "type": "ui_group",
        "name": "CONTROL",
        "tab": "4ad3c40739cbf998",
        "order": 1,
        "disp": true,
        "width": 10,
        "collapse": false,
        "className": ""
    },
    {
        "id": "4ad3c40739cbf998",
        "type": "ui_tab",
        "name": "PUMP A",
        "icon": "dashboard",
        "order": 3,
        "disabled": false,
        "hidden": false
    }
]

best regards

edit: i found a """small"""" one. when i stop the pump, the pump keeps dosing. damn. Until now cant see why

its seems the error happens, when i turn off the pump when it is in dosing mode.

If memory serves right (am travelling and cannot check) it happens because the trigger to create the next interval is created only after the "0" signal sent by function node named "send 1 and after DosTime send 0". I suggest to add a flag that allows to set globally if the flow is active or stopped. Let's say you set flow.isActive = false in the function node "stop interval" following the "stop repeating" node; set flow.isActive = true in the function node "stop interval" following "set interval" and "set dose tome"; then finally check flow.isActive in at the beginning of the function node "create interval". That should solve this issue.

Thank you for the answer.

I tried to inlucde your suggestion into my (your) flow. Is it like you mean?

[
    {
        "id": "a7c2f24a0288a94f",
        "type": "group",
        "z": "191728c3ee9255a0",
        "style": {
            "stroke": "#999999",
            "stroke-opacity": "1",
            "fill": "none",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#a4a4a4"
        },
        "nodes": [
            "506e17594f578bf5",
            "96e3227b0f9112d7",
            "9fb759062e9d8654",
            "43dd13fe7d7f50d8",
            "bb0a7e42521b939e",
            "2a49f815f4e667f9",
            "54f655307285a701",
            "217a103e690b84e6",
            "b6a07c11accf2e86",
            "98115c8e8d097eee",
            "28573236aae7e7f5",
            "189b758abd44484f",
            "81b143d843b235b4",
            "bd9bdb0d3208c91a",
            "953b85112b958f14",
            "6385fb73b3ac29d9",
            "64eed6646f0fa519",
            "9875b8a1a4b7bbee",
            "e23efde767c5bb51",
            "e08e5a2aeb7f05f0",
            "b73f1e0547dc9821",
            "fff728345e0fd640",
            "a16dce58bda842bb",
            "959a26dd44c69c90",
            "cafee5da6758942a",
            "372b429e0988a0c7"
        ],
        "x": 74,
        "y": 759,
        "w": 1912,
        "h": 502
    },
    {
        "id": "506e17594f578bf5",
        "type": "ui_dropdown",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "label": "TimerManual:",
        "tooltip": "Change operating mode",
        "place": "",
        "group": "83fd112e3229a323",
        "order": 29,
        "width": 5,
        "height": 1,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "ENABLED",
                "value": true,
                "type": "bool"
            },
            {
                "label": "DISABLED",
                "value": false,
                "type": "bool"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 200,
        "y": 960,
        "wires": [
            [
                "9fb759062e9d8654",
                "54f655307285a701",
                "9875b8a1a4b7bbee"
            ]
        ]
    },
    {
        "id": "96e3227b0f9112d7",
        "type": "ui_numeric",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "label": "TimerManual_DosTime[s]:",
        "tooltip": "",
        "group": "83fd112e3229a323",
        "order": 33,
        "width": 5,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": "1",
        "className": "",
        "x": 220,
        "y": 1080,
        "wires": [
            [
                "43dd13fe7d7f50d8",
                "217a103e690b84e6"
            ]
        ]
    },
    {
        "id": "9fb759062e9d8654",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "topic": "CIM500/W_TimerManual",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 570,
        "y": 800,
        "wires": []
    },
    {
        "id": "43dd13fe7d7f50d8",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "topic": "CIM500/W_TM_DosTime",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 570,
        "y": 840,
        "wires": []
    },
    {
        "id": "bb0a7e42521b939e",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "topic": "CIM500/W_TM_Interval",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 570,
        "y": 880,
        "wires": []
    },
    {
        "id": "2a49f815f4e667f9",
        "type": "ui_numeric",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "label": "TimerManual_Interval[s]:",
        "tooltip": "",
        "group": "83fd112e3229a323",
        "order": 31,
        "width": 5,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": 1,
        "className": "",
        "x": 210,
        "y": 1180,
        "wires": [
            [
                "bb0a7e42521b939e",
                "b6a07c11accf2e86"
            ]
        ]
    },
    {
        "id": "54f655307285a701",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "set_global_TimerManual",
        "func": "global.set(\"TimerManual\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 230,
        "y": 920,
        "wires": [
            []
        ]
    },
    {
        "id": "217a103e690b84e6",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "set_global_DosTime",
        "func": "global.set(\"DosTime\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 200,
        "y": 1040,
        "wires": [
            [
                "28573236aae7e7f5"
            ]
        ]
    },
    {
        "id": "b6a07c11accf2e86",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "set_global_Interval",
        "func": "global.set(\"Interval\",msg.payload)\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 190,
        "y": 1140,
        "wires": [
            [
                "81b143d843b235b4"
            ]
        ]
    },
    {
        "id": "98115c8e8d097eee",
        "type": "debug",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "trigger",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1810,
        "y": 940,
        "wires": []
    },
    {
        "id": "28573236aae7e7f5",
        "type": "change",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "DosTime",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 410,
        "y": 1040,
        "wires": [
            []
        ]
    },
    {
        "id": "189b758abd44484f",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "send 1 and after DosTime send 0",
        "func": "msg.payload = 1;\nsetTimeout(() => {\n    node.send([{payload: 0}, {payload: 0}]);\n}, flow.get(\"DosTime\") * 1000);\nreturn [msg, null];",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1480,
        "y": 940,
        "wires": [
            [
                "98115c8e8d097eee",
                "e08e5a2aeb7f05f0"
            ],
            [
                "a16dce58bda842bb"
            ]
        ]
    },
    {
        "id": "81b143d843b235b4",
        "type": "change",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "Interval",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 380,
        "y": 1140,
        "wires": [
            []
        ]
    },
    {
        "id": "bd9bdb0d3208c91a",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "create interval",
        "func": "var isactive = flow.get(\"isActive\");\n\nconst repeaterInMillis = (flow.get(\"Interval\") ?? 1) * 1000;\n\nif (isactive == true)\n{\nconst timeoutID = setTimeout(() => {\n    node.send({ payload: \"interval trigger\" });\n}, repeaterInMillis);\n\nflow.set(\"timeoutID\", timeoutID);\n\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1200,
        "y": 940,
        "wires": [
            [
                "189b758abd44484f",
                "372b429e0988a0c7"
            ]
        ]
    },
    {
        "id": "953b85112b958f14",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "stop interval",
        "func": "const timeoutID = flow.get(\"timeoutID\");\nif (typeof timeoutID != 'undefined') {\n    clearTimeout(timeoutID);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 1200,
        "wires": [
            [
                "fff728345e0fd640",
                "959a26dd44c69c90"
            ]
        ]
    },
    {
        "id": "6385fb73b3ac29d9",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "stop interval",
        "func": "const timeoutID = flow.get(\"timeoutID\");\nif (typeof timeoutID != 'undefined') {\n    clearTimeout(timeoutID);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 810,
        "y": 940,
        "wires": [
            [
                "64eed6646f0fa519",
                "cafee5da6758942a"
            ]
        ]
    },
    {
        "id": "64eed6646f0fa519",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "initial delay",
        "func": "const initialDelayInMillis = 10 * 1000;\n\nconst timeoutID = setTimeout(() => {\n    node.send(msg);\n}, initialDelayInMillis);\n\nflow.set(\"timeoutID\", timeoutID);\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 990,
        "y": 940,
        "wires": [
            [
                "bd9bdb0d3208c91a"
            ]
        ]
    },
    {
        "id": "9875b8a1a4b7bbee",
        "type": "switch",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "pump started/stoped",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            },
            {
                "t": "false"
            },
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 600,
        "y": 960,
        "wires": [
            [
                "6385fb73b3ac29d9"
            ],
            [
                "953b85112b958f14"
            ],
            [
                "b73f1e0547dc9821"
            ]
        ]
    },
    {
        "id": "e23efde767c5bb51",
        "type": "mqtt out",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "topic": "CIM500/W_StartStop",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "19069e7ba2811a2e",
        "x": 1860,
        "y": 840,
        "wires": []
    },
    {
        "id": "e08e5a2aeb7f05f0",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "change to true or false",
        "func": "var ps = msg.payload\n\nif(ps==1)\n{\n    msg.payload = true\n}\n\nelse if (ps==0)\n{\n    msg.payload = false\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1570,
        "y": 840,
        "wires": [
            [
                "e23efde767c5bb51"
            ]
        ]
    },
    {
        "id": "b73f1e0547dc9821",
        "type": "function",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "Stop pump",
        "func": "msg.payload = false\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 1140,
        "wires": [
            [
                "e23efde767c5bb51"
            ]
        ]
    },
    {
        "id": "fff728345e0fd640",
        "type": "debug",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "debug 277",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 910,
        "y": 1220,
        "wires": []
    },
    {
        "id": "a16dce58bda842bb",
        "type": "junction",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "x": 1380,
        "y": 1040,
        "wires": [
            [
                "bd9bdb0d3208c91a"
            ]
        ]
    },
    {
        "id": "959a26dd44c69c90",
        "type": "change",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "isActive",
                "pt": "flow",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 930,
        "y": 1180,
        "wires": [
            []
        ]
    },
    {
        "id": "cafee5da6758942a",
        "type": "change",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "isActive",
                "pt": "flow",
                "to": "true",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 950,
        "y": 1020,
        "wires": [
            []
        ]
    },
    {
        "id": "372b429e0988a0c7",
        "type": "switch",
        "z": "191728c3ee9255a0",
        "g": "a7c2f24a0288a94f",
        "name": "switch flowisActive",
        "property": "isActive",
        "propertyType": "flow",
        "rules": [
            {
                "t": "true"
            },
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1110,
        "y": 840,
        "wires": [
            [
                "189b758abd44484f"
            ],
            []
        ]
    },
    {
        "id": "83fd112e3229a323",
        "type": "ui_group",
        "name": "CONTROL",
        "tab": "4ad3c40739cbf998",
        "order": 1,
        "disp": true,
        "width": "10",
        "collapse": false,
        "className": ""
    },
    {
        "id": "19069e7ba2811a2e",
        "type": "mqtt-broker",
        "name": "",
        "broker": "185.164.7.227",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "4ad3c40739cbf998",
        "type": "ui_tab",
        "name": "PUMP A",
        "icon": "dashboard",
        "order": 3,
        "disabled": false,
        "hidden": false
    }
]

It looks like it is working. I would be very thankfull if your maybe could review it?!
I found to odd behavior right now.

  1. When its starting or stopping the "trigger-debug) node gives every time 2 outputs. Like the message from "send 1 and after Dostime 0" send out the same message 2 time.

  2. when i now set "set_global_TimerManuel" to false when the pump is running (true), the pump stops and the loop is off. But when i now set "set_global_TimerManuel" to false, it is repeating one cycle and AFTER that is stops the loop.

I hope you now what i mean.

Thank your for your kind help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.