This what i have, i want it to send a pulse when the input is under 21, and then wait until the input is above 24 before sending another pulse, where each trigger prevents the itself from happening again until the other one gets triggered. It is for a battery shutoff, so when the battery goes under 21volts it sends a pulse that turns off the power and when the battery is above 24 again it will send a pulse to turn the power back on.
[
{
"id": "f0326ee0294ff5c1",
"type": "rpi-gpio out",
"z": "f672d0ac69fd5b97",
"name": "Relay output",
"pin": "4",
"set": true,
"level": "0",
"freq": "",
"out": "out",
"bcm": true,
"x": 490,
"y": 660,
"wires": []
},
{
"id": "9ff92398d9234754",
"type": "switch",
"z": "f672d0ac69fd5b97",
"name": "21-off, 24-on",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "lt",
"v": "21",
"vt": "num"
},
{
"t": "gt",
"v": "24",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 130,
"y": 660,
"wires": [
[
"6b613274f98aac45"
],
[
"55e1e1d4d98c78ac"
]
]
},
{
"id": "6b613274f98aac45",
"type": "trigger",
"z": "f672d0ac69fd5b97",
"name": "",
"op1": "1",
"op2": "0",
"op1type": "num",
"op2type": "str",
"duration": "1",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 320,
"y": 640,
"wires": [
[
"f0326ee0294ff5c1"
]
]
},
{
"id": "55e1e1d4d98c78ac",
"type": "trigger",
"z": "f672d0ac69fd5b97",
"name": "",
"op1": "1",
"op2": "0",
"op1type": "num",
"op2type": "str",
"duration": "1",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 320,
"y": 680,
"wires": [
[
"f0326ee0294ff5c1"
]
]
}
]