[
    {
        "id": "0a9b7eeced6500ae",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 400,
        "wires": [
            [
                "aebebf69977e3a13"
            ]
        ]
    },
    {
        "id": "66ec973acf21ac5e",
        "type": "debug",
        "z": "fe69091f756eb86b",
        "name": "M31 Write",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 790,
        "y": 460,
        "wires": []
    },
    {
        "id": "aebebf69977e3a13",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Write All On",
        "func": "msg.payload = {\n    value: Array(16).fill(true),  // Alle 16 auf true\n    fc: 15,\n    unitid: 1,\n    address: 0,\n    quantity: 16\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 400,
        "wires": [
            [
                "0a13b8819b839c14"
            ]
        ]
    },
    {
        "id": "d5eefb607e11fafb",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Write All Off",
        "func": "msg.payload = {\n    value: Array(16).fill(false),  // Alle 16 auf true\n    fc: 15,\n    unitid: 1,\n    address: 0,\n    quantity: 16\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 440,
        "wires": [
            [
                "0a13b8819b839c14"
            ]
        ]
    },
    {
        "id": "885623030d8b6e9e",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 440,
        "wires": [
            [
                "d5eefb607e11fafb"
            ]
        ]
    },
    {
        "id": "ba5398da2ae7c1cd",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Write 4 On",
        "func": "msg.payload = {\n    value: true,\n    fc: 5,\n    unitid: 1,\n    address: 4,\n    quantity: 1\n};\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 480,
        "wires": [
            [
                "0a13b8819b839c14"
            ]
        ]
    },
    {
        "id": "33883944f0a66f8b",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 480,
        "wires": [
            [
                "ba5398da2ae7c1cd"
            ]
        ]
    },
    {
        "id": "0a13b8819b839c14",
        "type": "modbus-flex-write",
        "z": "fe69091f756eb86b",
        "name": "IO001 Write",
        "showStatusActivities": false,
        "showErrors": false,
        "showWarnings": true,
        "server": "9683b8a712c74023",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "delayOnStart": false,
        "startDelayTime": "",
        "x": 550,
        "y": 460,
        "wires": [
            [
                "66ec973acf21ac5e"
            ],
            []
        ]
    },
    {
        "id": "515eb32bc344a643",
        "type": "modbus-flex-getter",
        "z": "fe69091f756eb86b",
        "name": "IO001 Read",
        "showStatusActivities": true,
        "showErrors": true,
        "showWarnings": true,
        "logIOActivities": false,
        "server": "9683b8a712c74023",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": true,
        "keepMsgProperties": true,
        "delayOnStart": false,
        "enableDeformedMessages": false,
        "startDelayTime": "",
        "x": 550,
        "y": 680,
        "wires": [
            [
                "133e5d911c338160"
            ],
            []
        ]
    },
    {
        "id": "133e5d911c338160",
        "type": "debug",
        "z": "fe69091f756eb86b",
        "name": "M31 Read",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 790,
        "y": 680,
        "wires": []
    },
    {
        "id": "850680c95dd75abf",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Read all DO",
        "func": "msg.payload = {\n    fc: 1,           // Read Coils\n    unitid: 1,\n    address: 0,\n    quantity: 16\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 660,
        "wires": [
            [
                "515eb32bc344a643"
            ]
        ]
    },
    {
        "id": "829e3be735fc70e2",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 660,
        "wires": [
            [
                "850680c95dd75abf"
            ]
        ]
    },
    {
        "id": "e7a21ffeda9a8ece",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Read all DI",
        "func": "msg.payload = {\n    fc: 2,           // Read Discrete Inputs\n    unitid: 1,\n    address: 0,\n    quantity: 16\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 740,
        "wires": [
            [
                "515eb32bc344a643"
            ]
        ]
    },
    {
        "id": "0f346fd2026220cc",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 740,
        "wires": [
            [
                "e7a21ffeda9a8ece"
            ]
        ]
    },
    {
        "id": "edffe0146122205e",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Read 1 DI",
        "func": "// Eingang 5 lesen (Address 4, weil 0-indexed)\nmsg.payload = {\n    fc: 2,           // Read Discrete Inputs\n    unitid: 1,\n    address: 4,      // Eingang 5\n    quantity: 1\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 340,
        "y": 700,
        "wires": [
            [
                "515eb32bc344a643"
            ]
        ]
    },
    {
        "id": "203f84144eb2347e",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Read 1 DO",
        "func": "// Ausgang 5 lesen (Address 4, weil 0-indexed)\nmsg.payload = {\n    fc: 1,           // Read Coils\n    unitid: 1,\n    address: 4,      // Ausgang 5\n    quantity: 1\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 620,
        "wires": [
            [
                "515eb32bc344a643"
            ]
        ]
    },
    {
        "id": "c9491068713109c8",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 620,
        "wires": [
            [
                "203f84144eb2347e"
            ]
        ]
    },
    {
        "id": "6356d97207ea9dd4",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 700,
        "wires": [
            [
                "edffe0146122205e"
            ]
        ]
    },
    {
        "id": "7e771b5b2a8b37e4",
        "type": "function",
        "z": "fe69091f756eb86b",
        "name": "Write 4 Off",
        "func": "msg.payload = {\n    value: true,\n    fc: 5,\n    unitid: 1,\n    address: 4,\n    quantity: 1\n};\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 520,
        "wires": [
            [
                "0a13b8819b839c14"
            ]
        ]
    },
    {
        "id": "f9b8133b8dd764d0",
        "type": "inject",
        "z": "fe69091f756eb86b",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 130,
        "y": 520,
        "wires": [
            [
                "7e771b5b2a8b37e4"
            ]
        ]
    },
    {
        "id": "bc5a701f62a3a7f5",
        "type": "comment",
        "z": "fe69091f756eb86b",
        "name": "Write",
        "info": "",
        "x": 130,
        "y": 360,
        "wires": []
    },
    {
        "id": "ecd8dd3754729f6a",
        "type": "comment",
        "z": "fe69091f756eb86b",
        "name": "Read",
        "info": "",
        "x": 130,
        "y": 580,
        "wires": []
    },
    {
        "id": "9683b8a712c74023",
        "type": "modbus-client",
        "name": "IO-001",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": true,
        "queueLogEnabled": false,
        "failureLogEnabled": true,
        "tcpHost": "192.168.178.7",
        "tcpPort": 502,
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": 9600,
        "serialDatabits": 8,
        "serialStopbits": 1,
        "serialParity": "none",
        "serialConnectionDelay": 100,
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": 1,
        "commandDelay": 1,
        "clientTimeout": 1000,
        "reconnectOnTimeout": true,
        "reconnectTimeout": 2000,
        "parallelUnitIdsAllowed": true,
        "showErrors": true,
        "showWarnings": true,
        "showLogs": true
    }
]