[
    {
        "id": "8882be66.6b943",
        "type": "http request",
        "z": "f8d14bca.fb7948",
        "name": "NAS Login",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "http://<IP_ADRESA_NAS>:5000/webapi/auth.cgi?api=SYNO.API.Auth&method=login&version=3&account=<NAS_USER>&passwd=<NAS_PASSWD>=SurveillanceStation&format=sid",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 550,
        "y": 2660,
        "wires": [
            [
                "20c68c14.850424"
            ]
        ]
    },
    {
        "id": "20c68c14.850424",
        "type": "function",
        "z": "f8d14bca.fb7948",
        "name": "HomeMode OFF",
        "func": "msg.url = \"http://<IP_ADRESA_NAS>:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=Switch&on=false&_sid=\"+msg.payload.data.sid;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 730,
        "y": 2660,
        "wires": [
            [
                "5ac9a17.1b1de6"
            ]
        ]
    },
    {
        "id": "5ac9a17.1b1de6",
        "type": "http request",
        "z": "f8d14bca.fb7948",
        "name": "",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 910,
        "y": 2660,
        "wires": [
            []
        ]
    },
    {
        "id": "616dd92b.1b9df8",
        "type": "comment",
        "z": "f8d14bca.fb7948",
        "name": "SurveillanceStation",
        "info": "",
        "x": 110,
        "y": 2560,
        "wires": []
    },
    {
        "id": "1c1dc3bf.21b85c",
        "type": "http request",
        "z": "f8d14bca.fb7948",
        "name": "NAS Login",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "http://<IP_ADRESA_NAS>:5000/webapi/auth.cgi?api=SYNO.API.Auth&method=login&version=3&account=<NAS_USER>&passwd=<NAS_PASSWD>=SurveillanceStation&format=sid",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 550,
        "y": 2600,
        "wires": [
            [
                "9c042c0a.0e5f"
            ]
        ]
    },
    {
        "id": "9c042c0a.0e5f",
        "type": "function",
        "z": "f8d14bca.fb7948",
        "name": "HomeMode ON",
        "func": "msg.url = \"http://<IP_ADRESA_NAS>:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=Switch&on=true&_sid=\"+msg.payload.data.sid;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 720,
        "y": 2600,
        "wires": [
            [
                "416b1783.a40518"
            ]
        ]
    },
    {
        "id": "416b1783.a40518",
        "type": "http request",
        "z": "f8d14bca.fb7948",
        "name": "",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 910,
        "y": 2600,
        "wires": [
            []
        ]
    },
    {
        "id": "c0717362.b3747",
        "type": "http request",
        "z": "f8d14bca.fb7948",
        "name": "NAS Login",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "http://<IP_ADRESA_NAS>:5000/webapi/auth.cgi?api=SYNO.API.Auth&method=login&version=3&account=<NAS_USER>&passwd=<NAS_PASSWD>=SurveillanceStation&format=sid",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 390,
        "y": 2740,
        "wires": [
            [
                "f62a2f32.bb78d"
            ]
        ]
    },
    {
        "id": "f62a2f32.bb78d",
        "type": "function",
        "z": "f8d14bca.fb7948",
        "name": "HomeMode Info",
        "func": "msg.url = \"http://<IP_ADRESA_NAS>:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=GetInfo&_sid=\"+msg.payload.data.sid;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 560,
        "y": 2740,
        "wires": [
            [
                "c0fa31ed.81f32"
            ]
        ]
    },
    {
        "id": "c0fa31ed.81f32",
        "type": "http request",
        "z": "f8d14bca.fb7948",
        "name": "",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 750,
        "y": 2740,
        "wires": [
            [
                "7591ce46.37078"
            ]
        ]
    },
    {
        "id": "effcb346.a3f3a",
        "type": "loxone-control-in",
        "z": "f8d14bca.fb7948",
        "name": "Kamerovy system",
        "miniserver": "89f87a35.499678",
        "control": "17c24890-016f-f0b4-ffffb3e6353e3355",
        "state": "17c24890-016f-f0b1-ffff41e60ebfe4ba",
        "x": 170,
        "y": 2640,
        "wires": [
            [
                "cbb68c64.49741"
            ]
        ]
    },
    {
        "id": "86a30561.5f5eb8",
        "type": "inject",
        "z": "f8d14bca.fb7948",
        "name": "each 2 minutes",
        "props": [],
        "repeat": "120",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "x": 190,
        "y": 2740,
        "wires": [
            [
                "c0717362.b3747"
            ]
        ]
    },
    {
        "id": "cbb68c64.49741",
        "type": "switch",
        "z": "f8d14bca.fb7948",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 360,
        "y": 2640,
        "wires": [
            [
                "1c1dc3bf.21b85c"
            ],
            [
                "8882be66.6b943"
            ]
        ]
    },
    {
        "id": "e6ccc842.f06888",
        "type": "loxone-control-out",
        "z": "f8d14bca.fb7948",
        "name": "Kamerovy system",
        "miniserver": "89f87a35.499678",
        "control": "17c24890-016f-f0b4-ffffb3e6353e3355",
        "x": 1290,
        "y": 2740,
        "wires": []
    },
    {
        "id": "7591ce46.37078",
        "type": "switch",
        "z": "f8d14bca.fb7948",
        "name": "",
        "property": "payload.data.on",
        "propertyType": "msg",
        "rules": [
            {
                "t": "false"
            },
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 910,
        "y": 2740,
        "wires": [
            [
                "6dd10b5f.8a9f54"
            ],
            [
                "d201da2.f5fc728"
            ]
        ]
    },
    {
        "id": "6dd10b5f.8a9f54",
        "type": "change",
        "z": "f8d14bca.fb7948",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "on",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1080,
        "y": 2720,
        "wires": [
            [
                "e6ccc842.f06888"
            ]
        ]
    },
    {
        "id": "d201da2.f5fc728",
        "type": "change",
        "z": "f8d14bca.fb7948",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "off",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1080,
        "y": 2760,
        "wires": [
            [
                "e6ccc842.f06888"
            ]
        ]
    },
    {
        "id": "89f87a35.499678",
        "type": "loxone-miniserver",
        "z": "",
        "host": "<IP_ADRESA_MINISERVERU>",
        "port": "80",
        "enctype": "0",
        "active": true,
        "keepalive": "30000"
    }
]