hm i got the delay working as you said but now i think that this is not what i need.
im new to node-red and obviously i dont know where my problem actually is..
i rebuild my flow as a test where injection nodes replace the pv-measurements function which is connected to the two switches..
CODE:
[
{
"id": "eb386b679fa0c7d1",
"type": "tab",
"label": "Flow 5",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e5fe2cf44070a6f9",
"type": "switch",
"z": "eb386b679fa0c7d1",
"name": "Einspeise-Schwelle Überschritten",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gte",
"v": "1250",
"vt": "num"
},
{
"t": "lt",
"v": "1250",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 340,
"y": 180,
"wires": [
[
"94773eb50994da1f"
],
[
"baa13c7457b59439"
]
]
},
{
"id": "d166d98b1d38f0d3",
"type": "inject",
"z": "eb386b679fa0c7d1",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "40",
"payloadType": "num",
"x": 90,
"y": 200,
"wires": [
[
"e5fe2cf44070a6f9"
]
]
},
{
"id": "26e9d0c2a6dd38f2",
"type": "inject",
"z": "eb386b679fa0c7d1",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1260",
"payloadType": "num",
"x": 90,
"y": 160,
"wires": [
[
"e5fe2cf44070a6f9"
]
]
},
{
"id": "94773eb50994da1f",
"type": "change",
"z": "eb386b679fa0c7d1",
"name": "Über Schwelle = true",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 700,
"y": 160,
"wires": [
[
"0747a1ab7cfaa406"
]
]
},
{
"id": "baa13c7457b59439",
"type": "change",
"z": "eb386b679fa0c7d1",
"name": "Unter Schwelle = false",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 700,
"y": 200,
"wires": [
[
"0747a1ab7cfaa406"
]
]
},
{
"id": "0747a1ab7cfaa406",
"type": "trigger",
"z": "eb386b679fa0c7d1",
"name": "Schwelle für mehr als 5s überschritten",
"op1": "",
"op2": "PIN_Einschalten",
"op1type": "nul",
"op2type": "str",
"duration": "5",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "false",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 990,
"y": 180,
"wires": [
[
"c310147e3fa07e51"
]
]
},
{
"id": "da781fc5827c82f2",
"type": "switch",
"z": "eb386b679fa0c7d1",
"name": "Bezug Überschritten",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "0",
"vt": "num"
},
{
"t": "lte",
"v": "0",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 300,
"y": 380,
"wires": [
[
"cd417d34b84206e4"
],
[
"c59fac69ffecb6f2"
]
]
},
{
"id": "4c6a9a123608fae9",
"type": "inject",
"z": "eb386b679fa0c7d1",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 90,
"y": 400,
"wires": [
[
"da781fc5827c82f2"
]
]
},
{
"id": "a718e45a2b173860",
"type": "inject",
"z": "eb386b679fa0c7d1",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "10",
"payloadType": "num",
"x": 90,
"y": 360,
"wires": [
[
"da781fc5827c82f2"
]
]
},
{
"id": "cd417d34b84206e4",
"type": "change",
"z": "eb386b679fa0c7d1",
"name": "Über Schwelle = true",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 360,
"wires": [
[
"515c04ac0168a86f"
]
]
},
{
"id": "c59fac69ffecb6f2",
"type": "change",
"z": "eb386b679fa0c7d1",
"name": "Unter Schwelle = false",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 400,
"wires": [
[
"515c04ac0168a86f"
]
]
},
{
"id": "515c04ac0168a86f",
"type": "trigger",
"z": "eb386b679fa0c7d1",
"name": "Schwelle für mehr als 3s überschritten",
"op1": "",
"op2": "PIN_Abschalten",
"op1type": "nul",
"op2type": "str",
"duration": "3",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "false",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 970,
"y": 380,
"wires": [
[
"a5466e47b8c28d9a"
]
]
},
{
"id": "a5466e47b8c28d9a",
"type": "debug",
"z": "eb386b679fa0c7d1",
"name": "AUS",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1510,
"y": 380,
"wires": []
},
{
"id": "729249d51e624ae1",
"type": "debug",
"z": "eb386b679fa0c7d1",
"name": "EIN",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1550,
"y": 200,
"wires": []
},
{
"id": "c310147e3fa07e51",
"type": "delay",
"z": "eb386b679fa0c7d1",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "30",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1330,
"y": 260,
"wires": [
[
"729249d51e624ae1"
]
]
}
]
When the upper debug is getting "fired", there should be a 30 seconds runoff where the lower one wont be able to get "fired"
the same thing do i need vice versa...
is maybe my approach not right?