Hi All .From a Still LOCKED DOWN South Africa.
i have a question. not sure if this is the right place to ask. i use node red for my Alarm monitoring. but i have a slight problem i cant wrap my head around.
- when i havesay a Burglary condition. and the alarm goues in to reset time. (still armed away) my rule sets the alarm status back to disarmed. but it is still armed. how do i have node red look if my alarms armed input on my raspberry pi is still armed and send the armed msg. instead of the disarmed.
here is my flows.
-
-
[
{
"id": "34244cb1.db726c",
"type": "tab",
"label": "Alarm_Status",
"disabled": false,
"info": ""
},
{
"id": "9fa153b5.8770b8",
"type": "mqtt out",
"z": "34244cb1.db726c",
"name": "",
"topic": "OpenHAB-DB/alarmstat/",
"qos": "",
"retain": "",
"broker": "d7d44fb3.3406d8",
"x": 1610,
"y": 320,
"wires": []
},
{
"id": "2eb0c44b.03f504",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Armed-Away",
"vt": "str"
},
{
"t": "eq",
"v": "Armed-Stay",
"vt": "str"
},
{
"t": "eq",
"v": "Burglary",
"vt": "str"
},
{
"t": "eq",
"v": "Panic-Duress",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
},
{
"t": "eq",
"v": "Siren Error",
"vt": "str"
},
{
"t": "eq",
"v": "Zone Tamper",
"vt": "str"
},
{
"t": "eq",
"v": "Wifi jam",
"vt": "str"
},
{
"t": "eq",
"v": "Detector Bat",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 9,
"x": 1030,
"y": 440,
"wires": [
[
"9fa153b5.8770b8",
"100b83e3.e34014"
],
[
"9fa153b5.8770b8",
"100b83e3.e34014"
],
[
"9fa153b5.8770b8",
"100b83e3.e34014",
"cf044360.17e51"
],
[
"9fa153b5.8770b8",
"100b83e3.e34014",
"cf044360.17e51"
],
[
"9b6094a7.9c9228",
"100b83e3.e34014"
],
[
"9fa153b5.8770b8",
"cf044360.17e51"
],
[
"9fa153b5.8770b8",
"cf044360.17e51"
],
[
"9fa153b5.8770b8",
"cf044360.17e51"
],
[
"9fa153b5.8770b8",
"cf044360.17e51"
]
]
},
{
"id": "ab6f54ce.5f3578",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 210.5,
"y": 92,
"wires": [
[
"e2ba3db1.d4d5f"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "e2ba3db1.d4d5f",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Armed-Away",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 233.5,
"y": 36,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "9b6094a7.9c9228",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Disarmed",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1400,
"y": 440,
"wires": [
[
"9fa153b5.8770b8"
]
]
},
{
"id": "cfe141b3.77af08",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Armed-Away",
"pin": "33",
"intype": "down",
"debounce": "25",
"read": false,
"x": 75,
"y": 92,
"wires": [
[
"ab6f54ce.5f3578"
]
]
},
{
"id": "dfacdce5.d50d6",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 215.5,
"y": 237,
"wires": [
[
"f86a1487.0d2358"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "f86a1487.0d2358",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Armed-Stay",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 207.5,
"y": 172,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "c8548dbd.331cb8",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Armed-Stay",
"pin": "31",
"intype": "down",
"debounce": "25",
"read": false,
"x": 75,
"y": 238,
"wires": [
[
"dfacdce5.d50d6"
]
]
},
{
"id": "1a05a6e1.75e2e1",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 328.5,
"y": 368,
"wires": [
[
"72eb3758.2b698"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "72eb3758.2b698",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Burglary",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 206.5,
"y": 306,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "48e3603f.68647",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Burglary",
"pin": "35",
"intype": "down",
"debounce": "25",
"read": false,
"x": 65,
"y": 369,
"wires": [
[
"48b0a0bb.a86cb8"
]
]
},
{
"id": "48b0a0bb.a86cb8",
"type": "trigger",
"z": "34244cb1.db726c",
"op1": "1",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "4",
"extend": true,
"units": "s",
"reset": "",
"bytopic": "all",
"name": "",
"x": 201.5,
"y": 368,
"wires": [
[
"1a05a6e1.75e2e1"
]
]
},
{
"id": "e064d73b.89b488",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 372.5,
"y": 473,
"wires": [
[
"7c7685c5.40235c"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "7c7685c5.40235c",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Panic-Duress",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 206.5,
"y": 411,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "8b24b2b.4e896d",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Panic-Duress",
"pin": "37",
"intype": "down",
"debounce": "25",
"read": false,
"x": 75,
"y": 474,
"wires": [
[
"a9d97f7f.da1608"
]
]
},
{
"id": "a9d97f7f.da1608",
"type": "trigger",
"z": "34244cb1.db726c",
"op1": "1",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "4",
"extend": true,
"units": "s",
"reset": "",
"bytopic": "all",
"name": "",
"x": 229.5,
"y": 475,
"wires": [
[
"e064d73b.89b488"
]
]
},
{
"id": "50481e36.8b22c8",
"type": "inject",
"z": "34244cb1.db726c",
"name": "",
"topic": "",
"payload": "1",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 90,
"y": 540,
"wires": [
[
"a9d97f7f.da1608"
]
]
},
{
"id": "100b83e3.e34014",
"type": "debug",
"z": "34244cb1.db726c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 1610,
"y": 180,
"wires": []
},
{
"id": "19021deb.288ee2",
"type": "inject",
"z": "34244cb1.db726c",
"name": "",
"topic": "",
"payload": "0",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 467,
"y": 32,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "abf2befa.1849b",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 230,
"y": 640,
"wires": [
[
"a3a33786.632fa8"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "a3a33786.632fa8",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Siren Error",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 222,
"y": 575,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "97ef033f.e52d8",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Siren Error",
"pin": "29",
"intype": "down",
"debounce": "25",
"read": false,
"x": 79.5,
"y": 641,
"wires": [
[
"abf2befa.1849b"
]
]
},
{
"id": "64b306c6.66d068",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 230,
"y": 760,
"wires": [
[
"7dcbb712.044c48"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "7dcbb712.044c48",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Zone Tamper",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 222,
"y": 695,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "e1aa1bf1.c3a2e8",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Zone Tamper",
"pin": "40",
"intype": "down",
"debounce": "25",
"read": false,
"x": 89.5,
"y": 761,
"wires": [
[
"64b306c6.66d068"
]
]
},
{
"id": "41ce7145.78061",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 230,
"y": 900,
"wires": [
[
"310c72e6.c49a6e"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "310c72e6.c49a6e",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Detector Bat",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 222,
"y": 835,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "a19d3fa3.1c6b9",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Detector Bat",
"pin": "38",
"intype": "down",
"debounce": "25",
"read": false,
"x": 89.5,
"y": 901,
"wires": [
[
"41ce7145.78061"
]
]
},
{
"id": "809b7c20.94568",
"type": "switch",
"z": "34244cb1.db726c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 230,
"y": 1020,
"wires": [
[
"f3e849a5.e84cb8"
],
[
"2eb0c44b.03f504"
]
]
},
{
"id": "f3e849a5.e84cb8",
"type": "change",
"z": "34244cb1.db726c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Wifi jam",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 222,
"y": 955,
"wires": [
[
"2eb0c44b.03f504"
]
]
},
{
"id": "3e0fa69b.bb458a",
"type": "rpi-gpio in",
"z": "34244cb1.db726c",
"name": "Wifi jam",
"pin": "36",
"intype": "down",
"debounce": "25",
"read": false,
"x": 69.5,
"y": 1021,
"wires": [
[
"809b7c20.94568"
]
]
},
{
"id": "cf044360.17e51",
"type": "mqtt out",
"z": "34244cb1.db726c",
"name": "",
"topic": "OpenHAB-DB/alarmSystem/",
"qos": "2",
"retain": "true",
"broker": "d7d44fb3.3406d8",
"x": 1710,
"y": 580,
"wires": []
},
{
"id": "d7d44fb3.3406d8",
"type": "mqtt-broker",
"z": "",
"name": "OpenHAB-MQTT",
"broker": "192.168.1.5",
"port": "1883",
"clientid": "OpenHAB-db",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": ""
}
]