Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "3cac3927.abaf16",
- "type": "inject",
- "z": "127fd315.6c04dd",
- "name": "",
- "topic": "",
- "payload": "OPEN",
- "payloadType": "str",
- "repeat": "",
- "crontab": "",
- "once": false,
- "x": 165.5,
- "y": 176,
- "wires": [
- [
- "4d2ba3b8.29ec84",
- "72652330.3a11ac",
- "6da9c580.db005c"
- ]
- ]
- },
- {
- "id": "25fb8c64.060d0c",
- "type": "inject",
- "z": "127fd315.6c04dd",
- "name": "",
- "topic": "",
- "payload": "CLOSED",
- "payloadType": "str",
- "repeat": "",
- "crontab": "",
- "once": false,
- "x": 158,
- "y": 208,
- "wires": [
- [
- "4d2ba3b8.29ec84",
- "72652330.3a11ac",
- "6da9c580.db005c"
- ]
- ]
- },
- {
- "id": "bda906de.dfdf78",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "Item Door",
- "info": "This block displays a Door item from openHAB with the status OPEN/CLOSED",
- "x": 154.5,
- "y": 145,
- "wires": []
- },
- {
- "id": "6d8cfd0d.a20944",
- "type": "inject",
- "z": "127fd315.6c04dd",
- "name": "",
- "topic": "",
- "payload": "ON",
- "payloadType": "str",
- "repeat": "",
- "crontab": "",
- "once": false,
- "x": 170,
- "y": 409,
- "wires": [
- [
- "c7d3f01.b3cba1",
- "5fd52631.fe9be8",
- "b69b8cef.4fec58"
- ]
- ]
- },
- {
- "id": "3a25038.87822fc",
- "type": "inject",
- "z": "127fd315.6c04dd",
- "name": "",
- "topic": "",
- "payload": "OFF",
- "payloadType": "str",
- "repeat": "",
- "crontab": "",
- "once": false,
- "x": 171.5,
- "y": 441,
- "wires": [
- [
- "c7d3f01.b3cba1",
- "5fd52631.fe9be8",
- "b69b8cef.4fec58"
- ]
- ]
- },
- {
- "id": "cf9b9b63.27f8e",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "Item Movement Detection",
- "info": "This block displays a movment detection from openHAB\nwith the states ON/OFF",
- "x": 115,
- "y": 378,
- "wires": []
- },
- {
- "id": "78014ba9.80a13c",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "Logic Gate Info",
- "info": "I used this \"Addon\"\nhttps://flows.nodered.org/node/node-red-contrib-bool-gate",
- "x": 667.5,
- "y": 612,
- "wires": []
- },
- {
- "id": "4a8849d1.f8a308",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "openHAB INFO",
- "info": "so far as I have noticed, openHAB items do not\npublish a topic so we need to \"inject a topic ourself\"\n",
- "x": 666.5,
- "y": 580,
- "wires": []
- },
- {
- "id": "a9865891.288bd",
- "type": "change",
- "z": "127fd315.6c04dd",
- "name": "topic=mov",
- "rules": [
- {
- "t": "set",
- "p": "topic",
- "pt": "msg",
- "to": "mov",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 555,
- "y": 443,
- "wires": [
- [
- "e36cea52.be3638",
- "f21e0fc0.db63e8",
- "efbc1126.53ca4"
- ]
- ]
- },
- {
- "id": "cbc9801c.5635e8",
- "type": "change",
- "z": "127fd315.6c04dd",
- "name": "topic=door",
- "rules": [
- {
- "t": "set",
- "p": "topic",
- "pt": "msg",
- "to": "door",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 590,
- "y": 202,
- "wires": [
- [
- "2cda8f2f.a5bb98",
- "a5c3cc89.843c78",
- "f2afec2d.eb6ca"
- ]
- ]
- },
- {
- "id": "4d2ba3b8.29ec84",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "false",
- "x": 348.5,
- "y": 97,
- "wires": []
- },
- {
- "id": "72652330.3a11ac",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "topic",
- "x": 338,
- "y": 130,
- "wires": []
- },
- {
- "id": "2cda8f2f.a5bb98",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "false",
- "x": 850,
- "y": 112,
- "wires": []
- },
- {
- "id": "a5c3cc89.843c78",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "topic",
- "x": 839.5,
- "y": 145,
- "wires": []
- },
- {
- "id": "6da9c580.db005c",
- "type": "delay",
- "z": "127fd315.6c04dd",
- "name": "",
- "pauseType": "delay",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "x": 401.5,
- "y": 204,
- "wires": [
- [
- "cbc9801c.5635e8"
- ]
- ]
- },
- {
- "id": "b69b8cef.4fec58",
- "type": "delay",
- "z": "127fd315.6c04dd",
- "name": "",
- "pauseType": "delay",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "x": 389,
- "y": 443,
- "wires": [
- [
- "a9865891.288bd"
- ]
- ]
- },
- {
- "id": "c7d3f01.b3cba1",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "false",
- "x": 355,
- "y": 337,
- "wires": []
- },
- {
- "id": "5fd52631.fe9be8",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "topic",
- "x": 344.5,
- "y": 370,
- "wires": []
- },
- {
- "id": "f2afec2d.eb6ca",
- "type": "delay",
- "z": "127fd315.6c04dd",
- "name": "",
- "pauseType": "delay",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "x": 832,
- "y": 217,
- "wires": [
- [
- "f431570a.0bd32",
- "3d7e8aef.ff113e"
- ]
- ]
- },
- {
- "id": "efbc1126.53ca4",
- "type": "delay",
- "z": "127fd315.6c04dd",
- "name": "",
- "pauseType": "delay",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "x": 802,
- "y": 449,
- "wires": [
- [
- "f431570a.0bd32",
- "3d7e8aef.ff113e"
- ]
- ]
- },
- {
- "id": "f431570a.0bd32",
- "type": "and-gate",
- "z": "127fd315.6c04dd",
- "name": "",
- "rules": [
- {
- "t": "eq",
- "v": "OPEN",
- "vt": "str",
- "propertyType": "msg",
- "property": "payload",
- "topic": "door"
- },
- {
- "t": "eq",
- "v": "ON",
- "vt": "str",
- "propertyType": "msg",
- "property": "payload",
- "topic": "mov"
- }
- ],
- "outputTopic": "resultTopic",
- "gateType": "and",
- "emitOnlyIfTrue": true,
- "x": 1046.5,
- "y": 322,
- "wires": [
- [
- "80597c64.31837",
- "be7ce667.592698"
- ]
- ]
- },
- {
- "id": "e36cea52.be3638",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "false",
- "x": 724,
- "y": 351,
- "wires": []
- },
- {
- "id": "f21e0fc0.db63e8",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "topic",
- "x": 716.5,
- "y": 384,
- "wires": []
- },
- {
- "id": "80597c64.31837",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "false",
- "x": 1241,
- "y": 289,
- "wires": []
- },
- {
- "id": "be7ce667.592698",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "topic",
- "x": 1231.5,
- "y": 321,
- "wires": []
- },
- {
- "id": "f1219097.361278",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "Information!",
- "info": "This Flow aims to ask for 2 States of 2 Items and\ncheck for both results OPEN/ON to forward to the\nnext stepp.",
- "x": 656,
- "y": 547,
- "wires": []
- },
- {
- "id": "fc18ecd4.206ed",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "inject topic door",
- "info": "",
- "x": 600.5,
- "y": 232,
- "wires": []
- },
- {
- "id": "127ea454.adb43c",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "inject topic mov",
- "info": "",
- "x": 565,
- "y": 475,
- "wires": []
- },
- {
- "id": "3d7e8aef.ff113e",
- "type": "or-gate",
- "z": "127fd315.6c04dd",
- "name": "",
- "rules": [
- {
- "t": "eq",
- "v": "OPEN",
- "vt": "str",
- "propertyType": "msg",
- "property": "payload",
- "topic": "door"
- },
- {
- "t": "eq",
- "v": "ON",
- "vt": "str",
- "propertyType": "msg",
- "property": "payload",
- "topic": "mov"
- }
- ],
- "outputTopic": "",
- "gateType": "or",
- "emitOnlyIfTrue": true,
- "x": 1040.5,
- "y": 441,
- "wires": [
- [
- "df869ae4.3bf64",
- "2ac08dd8.fb5fe2"
- ]
- ]
- },
- {
- "id": "c06f6f07.95d598",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "INFO",
- "info": "This gate will only forward if the \"Door\" is OPEN\nand the Movement Detection is \"ON\"\n\n\"True Restriction\" meens only forward the payload\nif the gates is **green** TRUE",
- "x": 1037.5,
- "y": 290,
- "wires": []
- },
- {
- "id": "a0bf7769.6bf8c",
- "type": "comment",
- "z": "127fd315.6c04dd",
- "name": "INFO",
- "info": "This gate will forward if the \"door\" is OPEN **OR**\nthe movment detection is ON\n\n\"True Restriction\" meens only forward the payload\nif the gates is **green** TRUE",
- "x": 1032,
- "y": 409,
- "wires": []
- },
- {
- "id": "df869ae4.3bf64",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "false",
- "x": 1218,
- "y": 421,
- "wires": []
- },
- {
- "id": "2ac08dd8.fb5fe2",
- "type": "debug",
- "z": "127fd315.6c04dd",
- "name": "",
- "active": true,
- "console": "false",
- "complete": "topic",
- "x": 1207.5,
- "y": 454,
- "wires": []
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment