[
    {
        "id": "2c1da2e8cee2c047",
        "type": "tab",
        "label": "Home IOT",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "a55c097fe48c3be4",
        "type": "tab",
        "label": "Dashboard",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "bdcebe59fe8dbe4d",
        "type": "tab",
        "label": "MQTT 통신시험",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "83a5364e51c6f82c",
        "type": "tab",
        "label": "연습플로우",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "69c5d7d729244630",
        "type": "tab",
        "label": "플로우 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "f21124056980c42e",
        "type": "mqtt-broker",
        "name": "",
        "broker": "192.168.0.3",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "false",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closeRetain": "false",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willRetain": "false",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "ba995c473d26e48f",
        "type": "ui_group",
        "name": "Raspberry PI",
        "tab": "0aa6b70c678a81fa",
        "order": 1,
        "disp": true,
        "width": 18,
        "collapse": false,
        "className": ""
    },
    {
        "id": "491848bf2c454e11",
        "type": "ui_tab",
        "name": "시험용",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "501d4ec0f17c11ad",
        "type": "ui_base",
        "theme": {
            "name": "theme-dark",
            "lightTheme": {
                "default": "#0094CE",
                "baseColor": "#0094CE",
                "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
                "edited": true,
                "reset": false
            },
            "darkTheme": {
                "default": "#097479",
                "baseColor": "#38c804",
                "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
                "edited": true,
                "reset": false
            },
            "customTheme": {
                "name": "Untitled Theme 1",
                "default": "#4B7930",
                "baseColor": "#5ce203",
                "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
                "reset": false
            },
            "themeState": {
                "base-color": {
                    "default": "#097479",
                    "value": "#097479",
                    "edited": true
                },
                "page-titlebar-backgroundColor": {
                    "value": "#38c804",
                    "edited": false
                },
                "page-backgroundColor": {
                    "value": "#111111",
                    "edited": false
                },
                "page-sidebar-backgroundColor": {
                    "value": "#ffffff",
                    "edited": false
                },
                "group-textColor": {
                    "value": "#59fa1e",
                    "edited": false
                },
                "group-borderColor": {
                    "value": "#555555",
                    "edited": false
                },
                "group-backgroundColor": {
                    "value": "#333333",
                    "edited": false
                },
                "widget-textColor": {
                    "value": "#eeeeee",
                    "edited": false
                },
                "widget-backgroundColor": {
                    "value": "#38c804",
                    "edited": false
                },
                "widget-borderColor": {
                    "value": "#333333",
                    "edited": false
                },
                "base-font": {
                    "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
                }
            },
            "angularTheme": {
                "primary": "indigo",
                "accents": "blue",
                "warn": "red",
                "background": "grey",
                "palette": "light"
            }
        },
        "site": {
            "name": "Node-RED Dashboard",
            "hideToolbar": "false",
            "allowSwipe": "false",
            "lockMenu": "false",
            "allowTempTheme": "true",
            "dateFormat": "DD/MM/YYYY",
            "sizes": {
                "sx": 48,
                "sy": 48,
                "gx": 6,
                "gy": 6,
                "cx": 6,
                "cy": 6,
                "px": 0,
                "py": 0
            }
        }
    },
    {
        "id": "0aa6b70c678a81fa",
        "type": "ui_tab",
        "name": "E4DS node-RED HOME",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "06c1256582a05183",
        "type": "ui_group",
        "name": "BeagleBone Black",
        "tab": "0aa6b70c678a81fa",
        "order": 2,
        "disp": true,
        "width": "18",
        "collapse": false,
        "className": ""
    },
    {
        "id": "fec6ff2897a6dc4b",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 1,
        "width": 1,
        "height": 1
    },
    {
        "id": "55c1eb9b068d358b",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 3,
        "width": 12,
        "height": 1
    },
    {
        "id": "15f0373b909e2890",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 4,
        "width": 1,
        "height": 1
    },
    {
        "id": "ec68343eb412ba8b",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 7,
        "width": 1,
        "height": 1
    },
    {
        "id": "c075aa64337d239d",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 8,
        "width": 1,
        "height": 1
    },
    {
        "id": "9021783d6e1d10a1",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 9,
        "width": 1,
        "height": 1
    },
    {
        "id": "243d80b50222ee7e",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 10,
        "width": 1,
        "height": 1
    },
    {
        "id": "9def9e373145e91f",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 11,
        "width": 1,
        "height": 1
    },
    {
        "id": "9ec87daa1bcb9c93",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "ba995c473d26e48f",
        "order": 12,
        "width": 6,
        "height": 1
    },
    {
        "id": "1ad6b012c55ed881",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "06c1256582a05183",
        "order": 1,
        "width": 6,
        "height": 1
    },
    {
        "id": "68bc98d8894f6aa8",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "06c1256582a05183",
        "order": 4,
        "width": 6,
        "height": 1
    },
    {
        "id": "dca594357ad1d5f3",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "06c1256582a05183",
        "order": 5,
        "width": 6,
        "height": 1
    },
    {
        "id": "57903127e1ed2673",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "06c1256582a05183",
        "order": 7,
        "width": 6,
        "height": 1
    },
    {
        "id": "ef8c7c7d1fa6ad8e",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "06c1256582a05183",
        "order": 8,
        "width": 6,
        "height": 1
    },
    {
        "id": "f39c828906629594",
        "type": "ui_spacer",
        "z": "a55c097fe48c3be4",
        "name": "spacer",
        "group": "06c1256582a05183",
        "order": 10,
        "width": 6,
        "height": 1
    },
    {
        "id": "28d87018bfac2a11",
        "type": "mqtt out",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp LED",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 810,
        "y": 1060,
        "wires": []
    },
    {
        "id": "4bf8cd53bae9208c",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp LED 켜기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/rcv/led",
        "payload": "on",
        "payloadType": "str",
        "x": 260,
        "y": 980,
        "wires": [
            [
                "f810b5695c7d4323",
                "28d87018bfac2a11"
            ]
        ]
    },
    {
        "id": "ade88fa8fed38cca",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp LED 끄기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/rcv/led",
        "payload": "off",
        "payloadType": "str",
        "x": 260,
        "y": 1060,
        "wires": [
            [
                "f810b5695c7d4323",
                "28d87018bfac2a11"
            ]
        ]
    },
    {
        "id": "f810b5695c7d4323",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "debug 15",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 800,
        "y": 980,
        "wires": []
    },
    {
        "id": "81748a61d06db5d9",
        "type": "mqtt out",
        "z": "2c1da2e8cee2c047",
        "name": "BeagleBoneBlack",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 830,
        "y": 1420,
        "wires": []
    },
    {
        "id": "52c7027d0dd2ece3",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "BBB LED 켜기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "bbb/rcv/led",
        "payload": "on",
        "payloadType": "str",
        "x": 250,
        "y": 1340,
        "wires": [
            [
                "efcbc63f6ee7de1f",
                "81748a61d06db5d9"
            ]
        ]
    },
    {
        "id": "b74ca80879c16081",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "BBB LED 끄기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "bbb/rcv/led",
        "payload": "off",
        "payloadType": "str",
        "x": 250,
        "y": 1420,
        "wires": [
            [
                "efcbc63f6ee7de1f",
                "81748a61d06db5d9"
            ]
        ]
    },
    {
        "id": "efcbc63f6ee7de1f",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "debug 17",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 800,
        "y": 1340,
        "wires": []
    },
    {
        "id": "59cd24548504877b",
        "type": "mqtt in",
        "z": "2c1da2e8cee2c047",
        "name": "BBB motion",
        "topic": "bbb/rcv/motion",
        "qos": "0",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 250,
        "y": 1600,
        "wires": [
            [
                "3bb982bad6678b23",
                "bb44d4d153e58d77"
            ]
        ]
    },
    {
        "id": "3bb982bad6678b23",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "debug 18",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 800,
        "y": 1600,
        "wires": []
    },
    {
        "id": "6e3d98de21100c95",
        "type": "mqtt out",
        "z": "2c1da2e8cee2c047",
        "name": "",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 790,
        "y": 1700,
        "wires": []
    },
    {
        "id": "bb44d4d153e58d77",
        "type": "trigger",
        "z": "2c1da2e8cee2c047",
        "name": "",
        "op1": "",
        "op2": "off",
        "op1type": "nul",
        "op2type": "str",
        "duration": "7",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "off",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 560,
        "y": 1700,
        "wires": [
            [
                "6e3d98de21100c95"
            ]
        ]
    },
    {
        "id": "e46a3a42442dd4df",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "bbb/rcv/motion",
        "payload": "True",
        "payloadType": "str",
        "x": 270,
        "y": 1700,
        "wires": [
            [
                "bb44d4d153e58d77"
            ]
        ]
    },
    {
        "id": "d12b7ff5b3c98a1b",
        "type": "mqtt in",
        "z": "2c1da2e8cee2c047",
        "name": "BBB Ambient",
        "topic": "bbb/send/als",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 290,
        "y": 2020,
        "wires": [
            [
                "b57421bc99b0f843",
                "cbe48a52297ed0d7"
            ]
        ]
    },
    {
        "id": "b57421bc99b0f843",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "debug 19",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 640,
        "y": 2020,
        "wires": []
    },
    {
        "id": "cbe48a52297ed0d7",
        "type": "function",
        "z": "2c1da2e8cee2c047",
        "name": "ALS Light Check",
        "func": "var on_state = global.get(\"led_on_state\");\nvar als_light_level = msg.payload;\n\nif (als_light_level < 0.5)\n{\n    if(on_state == false)\n    {\n        msg.payload = \"on\";\n        on_state = true;\n        global.set(\"led_on_state\", true)\n        return msg;\n    }\n    else\n    {\n        return null;\n    }\n    \n}\nelse\n{\n     if(on_state == true)\n    {\n        msg.payload = \"off\";\n        on_state = false;\n         global.set(\"led_on_state\", false)\n        return msg;\n    }\n    else\n    {\n         return null;\n    }\n    \n}",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "// Code added here will be run once\n// whenever the node is started.\nvar on_state = false;",
        "finalize": "",
        "libs": [],
        "x": 540,
        "y": 2100,
        "wires": [
            [
                "5a4c82ddeebf0958",
                "06ef548d87768faf",
                "a0f0104f13f4e92c"
            ]
        ]
    },
    {
        "id": "5a4c82ddeebf0958",
        "type": "mqtt out",
        "z": "2c1da2e8cee2c047",
        "name": "ALS Light On",
        "topic": "bbb/rcv/als",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 720,
        "y": 2100,
        "wires": []
    },
    {
        "id": "06ef548d87768faf",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "debug 20",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 2180,
        "wires": []
    },
    {
        "id": "08ecae2fca590f86",
        "type": "mqtt in",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp Humi",
        "topic": "rasp/send/humi",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 220,
        "y": 740,
        "wires": [
            [
                "1af256952c95f95e",
                "2f76c1aa868c9347"
            ]
        ]
    },
    {
        "id": "a8b264a56ca50f67",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp(Temp : 28.3)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/send/temp",
        "payload": "28.3",
        "payloadType": "num",
        "x": 250,
        "y": 180,
        "wires": [
            [
                "62725dac66e3b4d8"
            ]
        ]
    },
    {
        "id": "dd105b789fb07c4c",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp(Temp : 27.5)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/send/temp",
        "payload": "27.5",
        "payloadType": "num",
        "x": 250,
        "y": 240,
        "wires": [
            [
                "62725dac66e3b4d8"
            ]
        ]
    },
    {
        "id": "4df8b6d00fbe4de1",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp(Temp : 25.5)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/send/temp",
        "payload": "",
        "payloadType": "num",
        "x": 250,
        "y": 300,
        "wires": [
            [
                "62725dac66e3b4d8"
            ]
        ]
    },
    {
        "id": "62725dac66e3b4d8",
        "type": "function",
        "z": "2c1da2e8cee2c047",
        "name": "Temp Check",
        "func": "var temp_motor_on_state = global.get(\"temp_motor_on_state\");\nvar temperature = msg.payload;\n\nif (temperature > 32.0)\n{\n    if(temp_motor_on_state == false)\n    {\n        msg.payload = \"on\";\n        temp_motor_on_state = true;\n        global.set(\"temp_motor_on_state\", true)\n        return msg;\n    }\n    else\n    {\n        return null;\n    }\n    \n}\nelse if(temperature < 28.0)\n{\n     if(temp_motor_on_state == true)\n    {\n        msg.payload = \"off\";\n        temp_motor_on_state = false;\n        global.set(\"temp_motor_on_state\", false)\n        return msg;\n    }\n    else\n    {\n         return null;\n    }\n    \n}\nelse\n{\n    return null;\n}\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "// Code added here will be run once\n// whenever the node is started.\nvar on_state = false;",
        "finalize": "",
        "libs": [],
        "x": 530,
        "y": 240,
        "wires": [
            [
                "d05fec4357f48d58",
                "98504900d8fce1ed",
                "9b2b4295391b2ba4"
            ]
        ]
    },
    {
        "id": "d05fec4357f48d58",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "Temperature Test",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 160,
        "wires": []
    },
    {
        "id": "54f7de6159ac10bf",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp(Humi : 80.3 %)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/send/humi",
        "payload": "80.3",
        "payloadType": "num",
        "x": 250,
        "y": 560,
        "wires": [
            [
                "1af256952c95f95e"
            ]
        ]
    },
    {
        "id": "dfcc3d414dbea22c",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp(Humi : 70.5 %)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/send/humi",
        "payload": "70.5",
        "payloadType": "num",
        "x": 250,
        "y": 620,
        "wires": [
            [
                "1af256952c95f95e"
            ]
        ]
    },
    {
        "id": "aa2cc3a5f23c8a03",
        "type": "inject",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp(Humi : 59.5)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/send/humi",
        "payload": "59.5",
        "payloadType": "num",
        "x": 250,
        "y": 680,
        "wires": [
            [
                "1af256952c95f95e"
            ]
        ]
    },
    {
        "id": "1af256952c95f95e",
        "type": "function",
        "z": "2c1da2e8cee2c047",
        "name": "Humi Check",
        "func": "var humi_motor_on_state = global.get(\"humi_motor_on_state\");\nvar humidity = msg.payload;\n\nif (humidity > 80.0)\n{\n    if(humi_motor_on_state == false)\n    {\n        msg.payload = \"on\";\n        humi_motor_on_state = true;\n        global.set(\"humi_motor_on_state\", true)\n        return msg;\n    }\n    else\n    {\n        return null;\n    }\n    \n}\nelse if(humidity < 60.0)\n{\n     if(humi_motor_on_state == true)\n    {\n        msg.payload = \"off\";\n        humi_motor_on_state = false;\n        global.set(\"humi_motor_on_state\", false)\n        return msg;\n    }\n    else\n    {\n         return null;\n    }\n    \n}\nelse\n{\n    return null;\n}\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "// Code added here will be run once\n// whenever the node is started.\nvar on_state = false;",
        "finalize": "",
        "libs": [],
        "x": 530,
        "y": 620,
        "wires": [
            [
                "c4b3c46f9a799c6c",
                "c09c0dc868432891"
            ]
        ]
    },
    {
        "id": "c4b3c46f9a799c6c",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "Humidity Test",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 800,
        "y": 560,
        "wires": []
    },
    {
        "id": "c09c0dc868432891",
        "type": "mqtt out",
        "z": "2c1da2e8cee2c047",
        "name": "Humi Motor on/off",
        "topic": "rasp/rcv/humimotor",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 810,
        "y": 620,
        "wires": []
    },
    {
        "id": "ba441c1ceacb01c2",
        "type": "mqtt in",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp Temp",
        "topic": "rasp/send/temp",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 210,
        "y": 360,
        "wires": [
            [
                "62725dac66e3b4d8",
                "9b74f95f301663d1"
            ]
        ]
    },
    {
        "id": "98504900d8fce1ed",
        "type": "mqtt out",
        "z": "2c1da2e8cee2c047",
        "name": "Temp Motor on/off",
        "topic": "rasp/rcv/motor",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 810,
        "y": 240,
        "wires": []
    },
    {
        "id": "9b74f95f301663d1",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp Temperature ",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 360,
        "wires": []
    },
    {
        "id": "7a74b47bc78a360f",
        "type": "comment",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp 온도센서 : Motor구동",
        "info": "",
        "x": 530,
        "y": 140,
        "wires": []
    },
    {
        "id": "90da6b296684c390",
        "type": "comment",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp 습도센서 :  LED 구동",
        "info": "",
        "x": 530,
        "y": 540,
        "wires": []
    },
    {
        "id": "6e97b15938f691fe",
        "type": "comment",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp mqtt 시험 : LED on/off",
        "info": "",
        "x": 560,
        "y": 940,
        "wires": []
    },
    {
        "id": "f9a674b252b29559",
        "type": "comment",
        "z": "2c1da2e8cee2c047",
        "name": "Beagle mqtt 시험 : LED on/off",
        "info": "",
        "x": 540,
        "y": 1300,
        "wires": []
    },
    {
        "id": "3d4f2151e08a8716",
        "type": "comment",
        "z": "2c1da2e8cee2c047",
        "name": "Beagle Motion 센서 : LED 구동",
        "info": "",
        "x": 520,
        "y": 1560,
        "wires": []
    },
    {
        "id": "64898b576a219ea7",
        "type": "comment",
        "z": "2c1da2e8cee2c047",
        "name": "Beagle Ambient Light 센서 : LED 구동",
        "info": "",
        "x": 320,
        "y": 1960,
        "wires": []
    },
    {
        "id": "a0f0104f13f4e92c",
        "type": "link out",
        "z": "2c1da2e8cee2c047",
        "name": "ALS Light Check Link Out",
        "mode": "link",
        "links": [
            "5e14c7d559133fcf"
        ],
        "x": 705,
        "y": 2260,
        "wires": []
    },
    {
        "id": "9b2b4295391b2ba4",
        "type": "link out",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp Motor OnOff command",
        "mode": "link",
        "links": [
            "99f39ecf5be1dbdf"
        ],
        "x": 735,
        "y": 420,
        "wires": []
    },
    {
        "id": "2f76c1aa868c9347",
        "type": "debug",
        "z": "2c1da2e8cee2c047",
        "name": "Rasp Humidity",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 800,
        "y": 740,
        "wires": []
    },
    {
        "id": "51049c773fd651a1",
        "type": "mqtt in",
        "z": "a55c097fe48c3be4",
        "name": "Rasp Temp",
        "topic": "rasp/send/temp",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 310,
        "y": 200,
        "wires": [
            [
                "4196f249e46e8637"
            ]
        ]
    },
    {
        "id": "c83b6b3b87e7c17c",
        "type": "mqtt in",
        "z": "a55c097fe48c3be4",
        "name": "Rasp Humi",
        "topic": "rasp/send/humi",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 300,
        "y": 300,
        "wires": [
            [
                "8f4630281b02ffee"
            ]
        ]
    },
    {
        "id": "8f4630281b02ffee",
        "type": "ui_gauge",
        "z": "a55c097fe48c3be4",
        "name": "시험용 라즈 습도",
        "group": "ba995c473d26e48f",
        "order": 6,
        "width": 6,
        "height": 5,
        "gtype": "wave",
        "title": "Humidity",
        "label": "%",
        "format": "{{value}}",
        "min": 0,
        "max": "100",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 760,
        "y": 300,
        "wires": []
    },
    {
        "id": "c5f78e92f8d79044",
        "type": "comment",
        "z": "a55c097fe48c3be4",
        "name": "데시보드  (온도 / 습도 게이지)",
        "info": "",
        "x": 510,
        "y": 160,
        "wires": []
    },
    {
        "id": "97e38681984cbedb",
        "type": "ui_text",
        "z": "a55c097fe48c3be4",
        "group": "06c1256582a05183",
        "order": 9,
        "width": 6,
        "height": 2,
        "name": "ALS LED 점등상태",
        "label": "Light",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "style": true,
        "font": "Arial,Arial,Helvetica,sans-serif",
        "fontSize": "50",
        "color": "#21eb1e",
        "x": 770,
        "y": 960,
        "wires": []
    },
    {
        "id": "03efd8724cef3036",
        "type": "comment",
        "z": "a55c097fe48c3be4",
        "name": "데시보드  ( LED상태 점등)",
        "info": "",
        "x": 500,
        "y": 460,
        "wires": []
    },
    {
        "id": "a77900a3f64a765b",
        "type": "comment",
        "z": "a55c097fe48c3be4",
        "name": "데시보드 ( ALS 센서)",
        "info": "",
        "x": 510,
        "y": 800,
        "wires": []
    },
    {
        "id": "f9a9c439d57b0893",
        "type": "mqtt in",
        "z": "a55c097fe48c3be4",
        "name": "BBB Ambient",
        "topic": "bbb/send/als",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 310,
        "y": 840,
        "wires": [
            [
                "4bc3fcd9d9f5e994",
                "b395d1b751ff7480"
            ]
        ]
    },
    {
        "id": "4bc3fcd9d9f5e994",
        "type": "ui_gauge",
        "z": "a55c097fe48c3be4",
        "name": "ALS센서",
        "group": "06c1256582a05183",
        "order": 2,
        "width": 6,
        "height": 4,
        "gtype": "donut",
        "title": "ALS sensor",
        "label": "units",
        "format": "{{value}}",
        "min": 0,
        "max": "1.8",
        "colors": [
            "#550f02",
            "#f54e42",
            "#fcfcfc"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 740,
        "y": 840,
        "wires": []
    },
    {
        "id": "b395d1b751ff7480",
        "type": "debug",
        "z": "a55c097fe48c3be4",
        "name": "debug 22",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 740,
        "y": 900,
        "wires": []
    },
    {
        "id": "a48a42020f9bbd7b",
        "type": "ui_text",
        "z": "a55c097fe48c3be4",
        "group": "ba995c473d26e48f",
        "order": 2,
        "width": 5,
        "height": 7,
        "name": "Motor 동작상태",
        "label": "Motor",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "style": true,
        "font": "Arial,Arial,Helvetica,sans-serif",
        "fontSize": "50",
        "color": "#fd3908",
        "x": 740,
        "y": 500,
        "wires": []
    },
    {
        "id": "cb7c651974980b44",
        "type": "debug",
        "z": "a55c097fe48c3be4",
        "name": "debug 23",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 720,
        "y": 620,
        "wires": []
    },
    {
        "id": "19f0205cc5e04ed7",
        "type": "mqtt in",
        "z": "a55c097fe48c3be4",
        "name": "BBB motion",
        "topic": "bbb/rcv/motion",
        "qos": "0",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 310,
        "y": 1140,
        "wires": [
            [
                "cc81e2f896bccd49",
                "7e98bbb2a6f24408",
                "a1f0dca35445fde0",
                "45676e320983706a"
            ]
        ]
    },
    {
        "id": "7e98bbb2a6f24408",
        "type": "debug",
        "z": "a55c097fe48c3be4",
        "name": "debug 24",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 740,
        "y": 1200,
        "wires": []
    },
    {
        "id": "cc81e2f896bccd49",
        "type": "ui_text",
        "z": "a55c097fe48c3be4",
        "group": "06c1256582a05183",
        "order": 3,
        "width": 6,
        "height": 2,
        "name": "Motion LED 점등상태",
        "label": "Motion",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "style": true,
        "font": "Arial,Arial,Helvetica,sans-serif",
        "fontSize": "50",
        "color": "#18f109",
        "x": 780,
        "y": 1140,
        "wires": []
    },
    {
        "id": "a3773b30c04fb96e",
        "type": "ui_gauge",
        "z": "a55c097fe48c3be4",
        "name": "Motion Guage표시",
        "group": "06c1256582a05183",
        "order": 6,
        "width": 6,
        "height": 4,
        "gtype": "donut",
        "title": "",
        "label": "",
        "format": "{{value}}",
        "min": 0,
        "max": "1",
        "colors": [
            "#111211",
            "#e6e600",
            "#f90606"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 770,
        "y": 1260,
        "wires": []
    },
    {
        "id": "a1f0dca35445fde0",
        "type": "function",
        "z": "a55c097fe48c3be4",
        "name": "on2one",
        "func": "var value = msg.payload;\n\nif (value == \"on\") \n{\n    msg.payload = 1;\n    return msg;\n}\nelse if(value == \"off\")\n{\n    msg.payload = 0;\n    return msg;\n}",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 540,
        "y": 1260,
        "wires": [
            [
                "a3773b30c04fb96e"
            ]
        ]
    },
    {
        "id": "5e14c7d559133fcf",
        "type": "link in",
        "z": "a55c097fe48c3be4",
        "name": "ALS Light Check Link In",
        "links": [
            "a0f0104f13f4e92c"
        ],
        "x": 255,
        "y": 960,
        "wires": [
            [
                "97e38681984cbedb",
                "45676e320983706a"
            ]
        ]
    },
    {
        "id": "99f39ecf5be1dbdf",
        "type": "link in",
        "z": "a55c097fe48c3be4",
        "name": "Rasp Motor OnOff command checker",
        "links": [
            "9b2b4295391b2ba4"
        ],
        "x": 235,
        "y": 500,
        "wires": [
            [
                "a48a42020f9bbd7b",
                "cb7c651974980b44"
            ]
        ]
    },
    {
        "id": "a43d7a6e5b3495b1",
        "type": "inject",
        "z": "a55c097fe48c3be4",
        "name": "Motor 대시보드시험(on)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "on",
        "payloadType": "str",
        "x": 320,
        "y": 560,
        "wires": [
            [
                "a48a42020f9bbd7b",
                "cb7c651974980b44"
            ]
        ]
    },
    {
        "id": "246237b9d5ba14ae",
        "type": "inject",
        "z": "a55c097fe48c3be4",
        "name": "Motor 대시보드시험(off)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "off",
        "payloadType": "str",
        "x": 320,
        "y": 620,
        "wires": [
            [
                "a48a42020f9bbd7b",
                "cb7c651974980b44"
            ]
        ]
    },
    {
        "id": "12c602a2c6ac022d",
        "type": "comment",
        "z": "a55c097fe48c3be4",
        "name": "데시보드 ( Motor 상태표시 )",
        "info": "",
        "x": 550,
        "y": 1080,
        "wires": []
    },
    {
        "id": "fa9e7f04382f1140",
        "type": "ui_widget_bulb_basic",
        "z": "a55c097fe48c3be4",
        "group": "06c1256582a05183",
        "order": 11,
        "width": 0,
        "height": 0,
        "name": "BBB Light",
        "title": "Light",
        "color": "#ffffff",
        "scale": "normal",
        "x": 760,
        "y": 1040,
        "wires": []
    },
    {
        "id": "45676e320983706a",
        "type": "function",
        "z": "a55c097fe48c3be4",
        "name": "on2boolean",
        "func": "var value = msg.payload;\n\nif (value == \"on\") \n{\n    msg.payload = true;\n    return msg;\n}\nelse if(value == \"off\")\n{\n    msg.payload = false;\n    return msg;\n}",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 530,
        "y": 1040,
        "wires": [
            [
                "fa9e7f04382f1140"
            ]
        ]
    },
    {
        "id": "4196f249e46e8637",
        "type": "ui_widget_thermometer",
        "z": "a55c097fe48c3be4",
        "group": "ba995c473d26e48f",
        "order": 5,
        "width": 6,
        "height": 6,
        "name": "온도",
        "title": "Temperature",
        "numColor": 3,
        "colorTop": "#f32020",
        "colorMiddle": "#f1e904",
        "colorBottom": "#383ff5",
        "unit": "°C",
        "scale": "normal",
        "minTemp": "20",
        "maxTemp": "30",
        "minTempMoreThanMaxTemp": "1",
        "numberOfDecimals": "0",
        "showPercentage": "1",
        "currentTempFontSize": "1.2",
        "x": 750,
        "y": 200,
        "wires": []
    },
    {
        "id": "80d281c8cbdf4906",
        "type": "ui_switch",
        "z": "a55c097fe48c3be4",
        "name": "",
        "label": "switch",
        "tooltip": "",
        "group": "ba995c473d26e48f",
        "order": 12,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "true",
        "onvalueType": "bool",
        "onicon": "",
        "oncolor": "",
        "offvalue": "false",
        "offvalueType": "bool",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 550,
        "y": 1380,
        "wires": [
            []
        ]
    },
    {
        "id": "2d326d1dd718040f",
        "type": "inject",
        "z": "bdcebe59fe8dbe4d",
        "name": "연결시험",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "bbb/rcv/dev",
        "payload": "Hello.",
        "payloadType": "str",
        "x": 340,
        "y": 280,
        "wires": [
            [
                "1636c9bdd50427cc",
                "5b35759a8c5a98ff"
            ]
        ]
    },
    {
        "id": "1636c9bdd50427cc",
        "type": "mqtt out",
        "z": "bdcebe59fe8dbe4d",
        "name": "",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 710,
        "y": 280,
        "wires": []
    },
    {
        "id": "a8156c5686afbc12",
        "type": "mqtt in",
        "z": "bdcebe59fe8dbe4d",
        "name": "BBB Client",
        "topic": "bbb/send/dev",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 320,
        "y": 360,
        "wires": [
            [
                "d0509bf3d17399e7"
            ]
        ]
    },
    {
        "id": "d0509bf3d17399e7",
        "type": "debug",
        "z": "bdcebe59fe8dbe4d",
        "name": "from BBB",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 680,
        "y": 360,
        "wires": []
    },
    {
        "id": "5b35759a8c5a98ff",
        "type": "debug",
        "z": "bdcebe59fe8dbe4d",
        "name": "to BBB",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 200,
        "wires": []
    },
    {
        "id": "7f4e671e105c4964",
        "type": "comment",
        "z": "bdcebe59fe8dbe4d",
        "name": "BBB Mqtt client 동작시험",
        "info": "",
        "x": 370,
        "y": 180,
        "wires": []
    },
    {
        "id": "c166a9f8909cdaf3",
        "type": "inject",
        "z": "bdcebe59fe8dbe4d",
        "name": "연결시험",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/rcv/dev",
        "payload": "Hello.",
        "payloadType": "str",
        "x": 360,
        "y": 700,
        "wires": [
            [
                "13e39346ec3b5c19",
                "0bc698fe42d3ce5b"
            ]
        ]
    },
    {
        "id": "13e39346ec3b5c19",
        "type": "mqtt out",
        "z": "bdcebe59fe8dbe4d",
        "name": "",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 730,
        "y": 700,
        "wires": []
    },
    {
        "id": "b168391d5be8d33f",
        "type": "mqtt in",
        "z": "bdcebe59fe8dbe4d",
        "name": "Rasp Client",
        "topic": "rasp/send/dev",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 350,
        "y": 780,
        "wires": [
            [
                "2c346a27b2474372"
            ]
        ]
    },
    {
        "id": "2c346a27b2474372",
        "type": "debug",
        "z": "bdcebe59fe8dbe4d",
        "name": "from Rasp",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 780,
        "wires": []
    },
    {
        "id": "0bc698fe42d3ce5b",
        "type": "debug",
        "z": "bdcebe59fe8dbe4d",
        "name": "to Rasp",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 720,
        "y": 620,
        "wires": []
    },
    {
        "id": "772bc6d5af83ccc5",
        "type": "comment",
        "z": "bdcebe59fe8dbe4d",
        "name": "Raspberry Mqtt client 동작시험",
        "info": "",
        "x": 400,
        "y": 600,
        "wires": []
    },
    {
        "id": "534be447bee8572a",
        "type": "inject",
        "z": "83a5364e51c6f82c",
        "name": "입력(1)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "30",
        "payloadType": "num",
        "x": 250,
        "y": 180,
        "wires": [
            [
                "126897c449754117",
                "2cd04c2dde185bd8"
            ]
        ]
    },
    {
        "id": "601bd1d95d9b879c",
        "type": "inject",
        "z": "83a5364e51c6f82c",
        "name": "입력(2)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "199",
        "payloadType": "str",
        "x": 250,
        "y": 320,
        "wires": [
            [
                "126897c449754117"
            ]
        ]
    },
    {
        "id": "126897c449754117",
        "type": "switch",
        "z": "83a5364e51c6f82c",
        "name": "조건",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lte",
                "v": "100",
                "vt": "str"
            },
            {
                "t": "gt",
                "v": "100",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 450,
        "y": 240,
        "wires": [
            [
                "d9b36dcabdaeec57"
            ],
            [
                "e8792cac78c9a6f9"
            ]
        ]
    },
    {
        "id": "d9b36dcabdaeec57",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "결과(1)",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 180,
        "wires": []
    },
    {
        "id": "e8792cac78c9a6f9",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "결과(2)",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 260,
        "wires": []
    },
    {
        "id": "2cd04c2dde185bd8",
        "type": "change",
        "z": "83a5364e51c6f82c",
        "name": "변환기",
        "rules": [
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "30",
                "fromt": "num",
                "to": "삼십",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 450,
        "y": 360,
        "wires": [
            [
                "9240390d319fed19"
            ]
        ]
    },
    {
        "id": "9240390d319fed19",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "변환결과",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 720,
        "y": 360,
        "wires": []
    },
    {
        "id": "041a8beac94d6d27",
        "type": "inject",
        "z": "83a5364e51c6f82c",
        "name": "입력1",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "Topic1",
        "payload": "First Data",
        "payloadType": "str",
        "x": 250,
        "y": 480,
        "wires": [
            [
                "036011316160c5dd"
            ]
        ]
    },
    {
        "id": "f30ed621eb4a4e6d",
        "type": "inject",
        "z": "83a5364e51c6f82c",
        "name": "입력2",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "Topic2",
        "payload": "Second Data",
        "payloadType": "str",
        "x": 250,
        "y": 560,
        "wires": [
            [
                "036011316160c5dd"
            ]
        ]
    },
    {
        "id": "036011316160c5dd",
        "type": "function",
        "z": "83a5364e51c6f82c",
        "name": "function(대문자변환)",
        "func": "let a = msg.topic;\n\nif (a == \"Topic1\")\n{\n    let str = msg.payload;\n    msg.payload = str.toUpperCase();\n    return [msg, null];\n}\nelse\n{\n    let str = msg.payload;\n    msg.payload = str.toLowerCase();\n    return [null, msg];\n}",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 470,
        "y": 520,
        "wires": [
            [
                "f955b0421c2d6cfd"
            ],
            [
                "67d157ea58217990"
            ]
        ]
    },
    {
        "id": "f955b0421c2d6cfd",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 460,
        "wires": []
    },
    {
        "id": "67d157ea58217990",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "debug 4",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 560,
        "wires": []
    },
    {
        "id": "3cac39b0b716e32b",
        "type": "inject",
        "z": "83a5364e51c6f82c",
        "name": "입력1",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "20",
        "payloadType": "num",
        "x": 270,
        "y": 740,
        "wires": [
            [
                "07abe875f908ba9f"
            ]
        ]
    },
    {
        "id": "e672f01ee501253d",
        "type": "inject",
        "z": "83a5364e51c6f82c",
        "name": "입력2",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "30",
        "payloadType": "num",
        "x": 270,
        "y": 820,
        "wires": [
            [
                "07abe875f908ba9f"
            ]
        ]
    },
    {
        "id": "07abe875f908ba9f",
        "type": "range",
        "z": "83a5364e51c6f82c",
        "minin": "0",
        "maxin": "50",
        "minout": "0",
        "maxout": "100",
        "action": "scale",
        "round": true,
        "property": "payload",
        "name": "",
        "x": 500,
        "y": 760,
        "wires": [
            [
                "f304385d6e2114da",
                "e2360f73dee8b867",
                "7c70f65c78419702"
            ]
        ]
    },
    {
        "id": "f304385d6e2114da",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "debug 5",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 760,
        "wires": []
    },
    {
        "id": "e2360f73dee8b867",
        "type": "delay",
        "z": "83a5364e51c6f82c",
        "name": "",
        "pauseType": "delay",
        "timeout": "2",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 600,
        "y": 860,
        "wires": [
            [
                "fb0a6d17214eb1cf"
            ]
        ]
    },
    {
        "id": "fb0a6d17214eb1cf",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "debug 6",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 760,
        "y": 860,
        "wires": []
    },
    {
        "id": "7c70f65c78419702",
        "type": "trigger",
        "z": "83a5364e51c6f82c",
        "name": "",
        "op1": "1",
        "op2": "0",
        "op1type": "str",
        "op2type": "str",
        "duration": "2",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 580,
        "y": 940,
        "wires": [
            [
                "bbdffe4205812b6c"
            ]
        ]
    },
    {
        "id": "bbdffe4205812b6c",
        "type": "debug",
        "z": "83a5364e51c6f82c",
        "name": "debug 7",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 760,
        "y": 940,
        "wires": []
    },
    {
        "id": "7f2f15bbfbf4e409",
        "type": "mqtt in",
        "z": "69c5d7d729244630",
        "name": "Rasp Temp",
        "topic": "rasp/send/temp",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 270,
        "y": 320,
        "wires": [
            [
                "3144289995d9ec15"
            ]
        ]
    },
    {
        "id": "3144289995d9ec15",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 320,
        "wires": []
    },
    {
        "id": "c3e8dd7faef2461b",
        "type": "mqtt out",
        "z": "69c5d7d729244630",
        "name": "Rasp LED",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 610,
        "y": 480,
        "wires": []
    },
    {
        "id": "f1b4c7aaea4e1e02",
        "type": "inject",
        "z": "69c5d7d729244630",
        "name": "Rasp LED 켜기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/rcv/led",
        "payload": "on",
        "payloadType": "str",
        "x": 280,
        "y": 400,
        "wires": [
            [
                "27ecc94f663ce796",
                "c3e8dd7faef2461b"
            ]
        ]
    },
    {
        "id": "566b2c6abc1fb412",
        "type": "inject",
        "z": "69c5d7d729244630",
        "name": "Rasp LED 끄기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "rasp/rcv/led",
        "payload": "off",
        "payloadType": "str",
        "x": 280,
        "y": 480,
        "wires": [
            [
                "27ecc94f663ce796",
                "c3e8dd7faef2461b"
            ]
        ]
    },
    {
        "id": "27ecc94f663ce796",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 600,
        "y": 400,
        "wires": []
    },
    {
        "id": "97ebf318c74a67a3",
        "type": "mqtt in",
        "z": "69c5d7d729244630",
        "name": "BBB Client",
        "topic": "bbb/send",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 240,
        "y": 640,
        "wires": [
            [
                "f082bc616ac9e5a9"
            ]
        ]
    },
    {
        "id": "f082bc616ac9e5a9",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 8",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 640,
        "wires": []
    },
    {
        "id": "8f6becc5452f4c0c",
        "type": "mqtt out",
        "z": "69c5d7d729244630",
        "name": "BeagleBoneBlack",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 590,
        "y": 820,
        "wires": []
    },
    {
        "id": "80801341cb65835e",
        "type": "inject",
        "z": "69c5d7d729244630",
        "name": "BBB LED 켜기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "bbb/rcv/led",
        "payload": "on",
        "payloadType": "str",
        "x": 250,
        "y": 740,
        "wires": [
            [
                "6a2865918f100eb1",
                "8f6becc5452f4c0c"
            ]
        ]
    },
    {
        "id": "98c4ad776d2ae125",
        "type": "inject",
        "z": "69c5d7d729244630",
        "name": "BBB LED 끄기",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "bbb/rcv/led",
        "payload": "off",
        "payloadType": "str",
        "x": 250,
        "y": 820,
        "wires": [
            [
                "6a2865918f100eb1",
                "8f6becc5452f4c0c"
            ]
        ]
    },
    {
        "id": "6a2865918f100eb1",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 9",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 740,
        "wires": []
    },
    {
        "id": "923ae5bf37fd1969",
        "type": "mqtt in",
        "z": "69c5d7d729244630",
        "name": "BBB motion",
        "topic": "bbb/rcv/motion",
        "qos": "0",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 270,
        "y": 920,
        "wires": [
            [
                "a48f731784d730f3",
                "e82d6cbe33646dd3"
            ]
        ]
    },
    {
        "id": "a48f731784d730f3",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 10",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 600,
        "y": 920,
        "wires": []
    },
    {
        "id": "91db96d204693052",
        "type": "mqtt out",
        "z": "69c5d7d729244630",
        "name": "",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 610,
        "y": 1020,
        "wires": []
    },
    {
        "id": "e82d6cbe33646dd3",
        "type": "trigger",
        "z": "69c5d7d729244630",
        "name": "",
        "op1": "",
        "op2": "off",
        "op1type": "nul",
        "op2type": "str",
        "duration": "7",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "off",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 440,
        "y": 1020,
        "wires": [
            [
                "91db96d204693052"
            ]
        ]
    },
    {
        "id": "14a440718908b3c4",
        "type": "inject",
        "z": "69c5d7d729244630",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "bbb/rcv/motion",
        "payload": "True",
        "payloadType": "str",
        "x": 250,
        "y": 1020,
        "wires": [
            [
                "e82d6cbe33646dd3"
            ]
        ]
    },
    {
        "id": "af5a48209f6f709e",
        "type": "mqtt in",
        "z": "69c5d7d729244630",
        "name": "BBB Ambient",
        "topic": "bbb/send/als",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 270,
        "y": 1100,
        "wires": [
            [
                "9d158e4e41aa1c23",
                "78b46499d30fe51f"
            ]
        ]
    },
    {
        "id": "9d158e4e41aa1c23",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 11",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 600,
        "y": 1100,
        "wires": []
    },
    {
        "id": "78b46499d30fe51f",
        "type": "function",
        "z": "69c5d7d729244630",
        "name": "ALS Light Check",
        "func": "var on_state = global.get(\"on_state\");\nvar als_light_level = msg.payload;\n\nif (als_light_level < 0.5)\n{\n    if(on_state == false)\n    {\n        msg.payload = \"on\";\n        on_state = true;\n        global.set(\"on_state\", true)\n        return msg;\n    }\n    else\n    {\n        return null;\n    }\n    \n}\nelse\n{\n     if(on_state == true)\n    {\n        msg.payload = \"off\";\n        on_state = false;\n         global.set(\"on_state\", false)\n        return msg;\n    }\n    else\n    {\n         return null;\n    }\n    \n}",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "// Code added here will be run once\n// whenever the node is started.\nvar on_state = false;",
        "finalize": "",
        "libs": [],
        "x": 470,
        "y": 1180,
        "wires": [
            [
                "6c6e90016e7bea27",
                "be1cd5c3de06fa41"
            ]
        ]
    },
    {
        "id": "6c6e90016e7bea27",
        "type": "mqtt out",
        "z": "69c5d7d729244630",
        "name": "ALS Light On",
        "topic": "bbb/rcv/als",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "f21124056980c42e",
        "x": 670,
        "y": 1180,
        "wires": []
    },
    {
        "id": "be1cd5c3de06fa41",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 12",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 660,
        "y": 1260,
        "wires": []
    },
    {
        "id": "da0fb5fdfe04dfc9",
        "type": "mqtt in",
        "z": "69c5d7d729244630",
        "name": "Rasp Humi",
        "topic": "rasp/send/humi",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "f21124056980c42e",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 260,
        "y": 260,
        "wires": [
            [
                "8f9d5b51ba4af6a6"
            ]
        ]
    },
    {
        "id": "8f9d5b51ba4af6a6",
        "type": "debug",
        "z": "69c5d7d729244630",
        "name": "debug 13",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 260,
        "wires": []
    }
]