[ { "id": "cdd1e6277c05e13f", "type": "tab", "label": "XIO input/relay example", "disabled": false, "info": "" }, { "id": "45434d21d9929d3c", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "1", "payloadType": "num", "x": 130, "y": 140, "wires": [ [ "51a79ecba823b9f9" ] ] }, { "id": "ebd42c2f4e0596a5", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "0", "payloadType": "num", "x": 130, "y": 180, "wires": [ [ "51a79ecba823b9f9" ] ] }, { "id": "003f7be62655f6cc", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "1", "payloadType": "num", "x": 130, "y": 260, "wires": [ [ "6e516659558f81df" ] ] }, { "id": "58950a1c4c7542cd", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "0", "payloadType": "num", "x": 130, "y": 300, "wires": [ [ "6e516659558f81df" ] ] }, { "id": "528adfa1862bf252", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "1", "payloadType": "num", "x": 130, "y": 380, "wires": [ [ "42d5c55c4937d3ba" ] ] }, { "id": "44620e03a274421f", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "0", "payloadType": "num", "x": 130, "y": 420, "wires": [ [ "42d5c55c4937d3ba" ] ] }, { "id": "0ec75528d0ccc213", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "1", "payloadType": "num", "x": 130, "y": 500, "wires": [ [ "add5f439126f54be" ] ] }, { "id": "3105437ccc95c259", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "0", "payloadType": "num", "x": 130, "y": 540, "wires": [ [ "add5f439126f54be" ] ] }, { "id": "a8aa983e42e7b857", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "1", "payloadType": "num", "x": 130, "y": 620, "wires": [ [ "e3c949cb8d89faad" ] ] }, { "id": "9865de3eb4808c26", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "0", "payloadType": "num", "x": 130, "y": 660, "wires": [ [ "e3c949cb8d89faad" ] ] }, { "id": "655d28e1e140ec47", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "1", "payloadType": "num", "x": 130, "y": 740, "wires": [ [ "68ace789c0dfa4c7" ] ] }, { "id": "a35ef62009b82b70", "type": "inject", "z": "cdd1e6277c05e13f", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "0", "payloadType": "num", "x": 130, "y": 780, "wires": [ [ "68ace789c0dfa4c7" ] ] }, { "id": "3b3b5ff016236b34", "type": "debug", "z": "cdd1e6277c05e13f", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 730, "y": 460, "wires": [] }, { "id": "990600dcf3d04a7c", "type": "comment", "z": "cdd1e6277c05e13f", "name": "Switch relays on/off", "info": "", "x": 150, "y": 60, "wires": [] }, { "id": "35bd840d3ce88224", "type": "comment", "z": "cdd1e6277c05e13f", "name": "Read digital inputs", "info": "", "x": 550, "y": 60, "wires": [] }, { "id": "e14920989e7d34cc", "type": "tcp in", "z": "cdd1e6277c05e13f", "name": "", "server": "server", "host": "", "port": "9998", "datamode": "stream", "datatype": "utf8", "newline": "\\n", "topic": "", "base64": false, "x": 960, "y": 200, "wires": [ [ "4177589fa469858f" ] ] }, { "id": "4177589fa469858f", "type": "switch", "z": "cdd1e6277c05e13f", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "cont", "v": "REL1", "vt": "str" }, { "t": "cont", "v": "REL2", "vt": "str" }, { "t": "cont", "v": "", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 3, "x": 1130, "y": 200, "wires": [ [ "d5730ced05b76e90" ], [ "eeed5e6c9ab9f417" ], [] ] }, { "id": "d5730ced05b76e90", "type": "function", "z": "cdd1e6277c05e13f", "name": "", "func": "if(msg.payload.includes(\"ON\")){\n msg.payload = 1;\n}else{\n msg.payload = 0;\n}\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 1280, "y": 160, "wires": [ [ "3a28279568c13179" ] ] }, { "id": "eeed5e6c9ab9f417", "type": "function", "z": "cdd1e6277c05e13f", "name": "", "func": "if(msg.payload.includes(\"OFF\")){\n msg.payload = 1;\n}else{\n msg.payload = 0;\n}\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 1277, "y": 220, "wires": [ [ "b4b8b61a9e9d07fe" ] ] }, { "id": "a181a40964b50a68", "type": "comment", "z": "cdd1e6277c05e13f", "name": "TCP server functionality implementation", "info": "", "x": 1050, "y": 60, "wires": [] }, { "id": "462adf9368ea9a1c", "type": "rpi-gpio in", "z": "cdd1e6277c05e13f", "name": "", "pin": "6", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 510, "y": 160, "wires": [ [ "3b3b5ff016236b34" ] ] }, { "id": "741213acb1d8528c", "type": "rpi-gpio in", "z": "cdd1e6277c05e13f", "name": "", "pin": "13", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 510, "y": 280, "wires": [ [ "3b3b5ff016236b34" ] ] }, { "id": "d2a03bf6876640a4", "type": "rpi-gpio in", "z": "cdd1e6277c05e13f", "name": "", "pin": "19", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 510, "y": 400, "wires": [ [ "3b3b5ff016236b34" ] ] }, { "id": "9e9793bf423c2b24", "type": "rpi-gpio in", "z": "cdd1e6277c05e13f", "name": "", "pin": "26", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 510, "y": 520, "wires": [ [ "3b3b5ff016236b34" ] ] }, { "id": "f0b30a58e4f5e65d", "type": "rpi-gpio in", "z": "cdd1e6277c05e13f", "name": "", "pin": "21", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 510, "y": 640, "wires": [ [ "3b3b5ff016236b34" ] ] }, { "id": "c3b63c7ae4a84393", "type": "rpi-gpio in", "z": "cdd1e6277c05e13f", "name": "", "pin": "20", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 510, "y": 760, "wires": [ [ "3b3b5ff016236b34" ] ] }, { "id": "51a79ecba823b9f9", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "24", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 280, "y": 160, "wires": [] }, { "id": "6e516659558f81df", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "25", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 280, "y": 280, "wires": [] }, { "id": "42d5c55c4937d3ba", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "8", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 280, "y": 400, "wires": [] }, { "id": "add5f439126f54be", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "7", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 280, "y": 520, "wires": [] }, { "id": "e3c949cb8d89faad", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "12", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 280, "y": 640, "wires": [] }, { "id": "68ace789c0dfa4c7", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "16", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 280, "y": 760, "wires": [] }, { "id": "3a28279568c13179", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "24", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 1480, "y": 160, "wires": [] }, { "id": "b4b8b61a9e9d07fe", "type": "rpi-gpio out", "z": "cdd1e6277c05e13f", "name": "", "pin": "25", "set": false, "level": "0", "freq": "", "out": "out", "bcm": true, "x": 1480, "y": 220, "wires": [] } ]