Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "c618d565.fd2b08",
- "type": "subflow",
- "name": "schodiste-podminky",
- "info": "",
- "category": "",
- "in": [
- {
- "x": 40,
- "y": 180,
- "wires": [
- {
- "id": "c308197b.4d6f58"
- }
- ]
- }
- ],
- "out": [
- {
- "x": 1580,
- "y": 180,
- "wires": [
- {
- "id": "a150a1e0.b9056",
- "port": 0
- }
- ]
- }
- ],
- "env": [],
- "color": "#FFF0F0",
- "inputLabels": [
- "MQTT vstup"
- ],
- "outputLabels": [
- "MQTT výstup"
- ],
- "icon": "font-awesome/fa-arrows-alt"
- },
- {
- "id": "c308197b.4d6f58",
- "type": "json",
- "z": "c618d565.fd2b08",
- "name": "",
- "x": 130,
- "y": 180,
- "wires": [
- [
- "88c062fb.3486d"
- ]
- ]
- },
- {
- "id": "88c062fb.3486d",
- "type": "contrib-json",
- "z": "c618d565.fd2b08",
- "engine": "JSONPath",
- "command": "jq",
- "expr": "$..occupancy",
- "complete": "property",
- "prop": "payload",
- "name": "Get state",
- "x": 260,
- "y": 180,
- "wires": [
- [
- "8a396542.26d8f8"
- ]
- ]
- },
- {
- "id": "a2219bd4.316988",
- "type": "switch",
- "z": "c618d565.fd2b08",
- "name": "pokud je pohyb",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "true"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 560,
- "y": 180,
- "wires": [
- [
- "c403647a.ff0458"
- ]
- ]
- },
- {
- "id": "8a396542.26d8f8",
- "type": "splitter",
- "z": "c618d565.fd2b08",
- "name": "Split array",
- "property": "payload",
- "x": 400,
- "y": 180,
- "wires": [
- [
- "a2219bd4.316988"
- ]
- ]
- },
- {
- "id": "c403647a.ff0458",
- "type": "switch",
- "z": "c618d565.fd2b08",
- "name": "dolni / horni cidlo",
- "property": "topic",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "XIAOMI_move_1",
- "vt": "str"
- },
- {
- "t": "cont",
- "v": "XIAOMI_move_3",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 2,
- "x": 770,
- "y": 180,
- "wires": [
- [
- "62492982.c78678"
- ],
- [
- "c9768c30.339e"
- ]
- ]
- },
- {
- "id": "9e34635f.a43dc",
- "type": "change",
- "z": "c618d565.fd2b08",
- "name": "denní svit",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "{\"smer\":1,\"rychlost\":90,\"cas\":61000,\"intenzita\":130,\"schody\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1180,
- "y": 100,
- "wires": [
- [
- "a150a1e0.b9056"
- ]
- ]
- },
- {
- "id": "83a4fb2a.e5b368",
- "type": "change",
- "z": "c618d565.fd2b08",
- "name": "noční svit",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "{\"smer\":1,\"rychlost\":90,\"cas\":61000,\"intenzita\":20,\"schody\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1180,
- "y": 140,
- "wires": [
- [
- "a150a1e0.b9056"
- ]
- ]
- },
- {
- "id": "39ce5762.013e28",
- "type": "change",
- "z": "c618d565.fd2b08",
- "name": "denní svit",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "{\"smer\":2,\"rychlost\":90,\"cas\":61000,\"intenzita\":130,\"schody\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1180,
- "y": 220,
- "wires": [
- [
- "a150a1e0.b9056"
- ]
- ]
- },
- {
- "id": "9a93c8bb.158518",
- "type": "change",
- "z": "c618d565.fd2b08",
- "name": "noční svit",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "{\"smer\":2,\"rychlost\":90,\"cas\":61000,\"intenzita\":20,\"schody\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1180,
- "y": 260,
- "wires": [
- [
- "a150a1e0.b9056"
- ]
- ]
- },
- {
- "id": "62492982.c78678",
- "type": "switch",
- "z": "c618d565.fd2b08",
- "name": "den / noc",
- "property": "den",
- "propertyType": "global",
- "rules": [
- {
- "t": "eq",
- "v": "1",
- "vt": "num"
- },
- {
- "t": "eq",
- "v": "0",
- "vt": "num"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 2,
- "x": 1000,
- "y": 120,
- "wires": [
- [
- "9e34635f.a43dc"
- ],
- [
- "83a4fb2a.e5b368"
- ]
- ]
- },
- {
- "id": "c9768c30.339e",
- "type": "switch",
- "z": "c618d565.fd2b08",
- "name": "den / noc",
- "property": "den",
- "propertyType": "global",
- "rules": [
- {
- "t": "eq",
- "v": "1",
- "vt": "num"
- },
- {
- "t": "eq",
- "v": "0",
- "vt": "num"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 2,
- "x": 1000,
- "y": 240,
- "wires": [
- [
- "39ce5762.013e28"
- ],
- [
- "9a93c8bb.158518"
- ]
- ]
- },
- {
- "id": "a150a1e0.b9056",
- "type": "delay",
- "z": "c618d565.fd2b08",
- "name": "",
- "pauseType": "rate",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "59",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": true,
- "x": 1400,
- "y": 180,
- "wires": [
- []
- ]
- },
- {
- "id": "81ca12dd.6e4a7",
- "type": "mqtt in",
- "z": "80a49586.f821d8",
- "name": "",
- "topic": "zigbee2mqtt/XIAOMI_move_1",
- "qos": "2",
- "datatype": "auto",
- "broker": "19d9cca8.4620f3",
- "x": 140,
- "y": 140,
- "wires": [
- [
- "1e244a5a.ccaef6"
- ]
- ]
- },
- {
- "id": "7e5f7d5f.d91024",
- "type": "mqtt out",
- "z": "80a49586.f821d8",
- "name": "",
- "topic": "domek/schodiste/set/",
- "qos": "",
- "retain": "",
- "broker": "8203a7e.9939f58",
- "x": 740,
- "y": 200,
- "wires": []
- },
- {
- "id": "67df1b5.4d068e4",
- "type": "comment",
- "z": "80a49586.f821d8",
- "name": "spodni cidlo",
- "info": "",
- "x": 90,
- "y": 100,
- "wires": []
- },
- {
- "id": "b159738c.04939",
- "type": "comment",
- "z": "80a49586.f821d8",
- "name": "horni cidlo",
- "info": "",
- "x": 80,
- "y": 200,
- "wires": []
- },
- {
- "id": "1e244a5a.ccaef6",
- "type": "subflow:c618d565.fd2b08",
- "z": "80a49586.f821d8",
- "name": "",
- "env": [],
- "x": 460,
- "y": 200,
- "wires": [
- [
- "7e5f7d5f.d91024"
- ]
- ]
- },
- {
- "id": "af88f0da.4183d",
- "type": "mqtt in",
- "z": "80a49586.f821d8",
- "name": "",
- "topic": "zigbee2mqtt/XIAOMI_move_3",
- "qos": "2",
- "datatype": "auto",
- "broker": "19d9cca8.4620f3",
- "x": 140,
- "y": 240,
- "wires": [
- [
- "1e244a5a.ccaef6"
- ]
- ]
- },
- {
- "id": "19d9cca8.4620f3",
- "type": "mqtt-broker",
- "name": "",
- "broker": "172.16.0.200",
- "port": "1883",
- "tls": "f66ba3dc.9a5d7",
- "clientid": "",
- "usetls": false,
- "compatmode": true,
- "keepalive": "15",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "closeTopic": "",
- "closePayload": "",
- "willTopic": "",
- "willQos": "0",
- "willPayload": ""
- },
- {
- "id": "8203a7e.9939f58",
- "type": "mqtt-broker",
- "broker": "0.0.0.0",
- "port": "1883",
- "clientid": "",
- "usetls": false,
- "compatmode": true,
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "willTopic": "",
- "willQos": "0",
- "willPayload": ""
- },
- {
- "id": "f66ba3dc.9a5d7",
- "type": "tls-config",
- "name": "",
- "cert": "",
- "key": "",
- "ca": "",
- "certname": "m2mqtt_srv.crt",
- "keyname": "m2mqtt_srv.key",
- "caname": "m2mqtt_ca.crt",
- "servername": "",
- "verifyservercert": false
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement