Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "1025a6c72c0a9634",
- "type": "inject",
- "z": "bb65f54748035373",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "Trigger",
- "payload": "0",
- "payloadType": "num",
- "x": 140,
- "y": 120,
- "wires": [
- [
- "853d668cfa474099"
- ]
- ]
- },
- {
- "id": "9e446b51dbd95614",
- "type": "inject",
- "z": "bb65f54748035373",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "Trigger",
- "payload": "1",
- "payloadType": "num",
- "x": 140,
- "y": 160,
- "wires": [
- [
- "853d668cfa474099"
- ]
- ]
- },
- {
- "id": "415ca8e6501be4f0",
- "type": "inject",
- "z": "bb65f54748035373",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "MotA_forward",
- "payload": "0",
- "payloadType": "num",
- "x": 160,
- "y": 220,
- "wires": [
- [
- "853d668cfa474099"
- ]
- ]
- },
- {
- "id": "a9b25f996cd26753",
- "type": "inject",
- "z": "bb65f54748035373",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "MotA_forward",
- "payload": "1",
- "payloadType": "num",
- "x": 160,
- "y": 260,
- "wires": [
- [
- "853d668cfa474099"
- ]
- ]
- },
- {
- "id": "853d668cfa474099",
- "type": "join",
- "z": "bb65f54748035373",
- "name": "join 2 topics",
- "mode": "custom",
- "build": "object",
- "property": "payload",
- "propertyType": "msg",
- "key": "topic",
- "joiner": "\\n",
- "joinerType": "str",
- "accumulate": true,
- "timeout": "",
- "count": "2",
- "reduceRight": false,
- "reduceExp": "",
- "reduceInit": "",
- "reduceInitType": "",
- "reduceFixup": "",
- "x": 400,
- "y": 180,
- "wires": [
- [
- "16f12f3d1b04c7c1",
- "303722339fe484f4"
- ]
- ]
- },
- {
- "id": "16f12f3d1b04c7c1",
- "type": "debug",
- "z": "bb65f54748035373",
- "name": "debug 1",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 600,
- "y": 240,
- "wires": []
- },
- {
- "id": "303722339fe484f4",
- "type": "function",
- "z": "bb65f54748035373",
- "name": "function 5",
- "func": "let on = 0;\n\nif (msg.payload.Trigger === 1 && msg.payload.MotA_forward === 1)\n{\n on = 1;\n}\n\n\nlet msg1 = {payload : on};\nlet msg2 = {payload : 0};\n\nreturn [[msg1],[msg2]];",
- "outputs": 2,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 600,
- "y": 180,
- "wires": [
- [
- "0bd5b7acec175e62"
- ],
- [
- "ae32c4e99bc7b601"
- ]
- ]
- },
- {
- "id": "0bd5b7acec175e62",
- "type": "debug",
- "z": "bb65f54748035373",
- "name": "debug 2",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 800,
- "y": 160,
- "wires": []
- },
- {
- "id": "ae32c4e99bc7b601",
- "type": "debug",
- "z": "bb65f54748035373",
- "name": "debug 3",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 800,
- "y": 200,
- "wires": []
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment