[
    {
        "id": "568b927a715df2e4",
        "type": "tab",
        "label": "Oven Temperature Monitoring",
        "disabled": false,
        "info": "Smart home oven monitoring system with local MQTT broker"
    },
    {
        "id": "fb8f05c2a577694d",
        "type": "mqtt in",
        "z": "568b927a715df2e4",
        "name": "Subscribe to Oven Temperature",
        "topic": "home/kitchen/oven/temperature",
        "qos": "2",
        "datatype": "auto",
        "broker": "e0634ad5f73b533c",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 200,
        "y": 120,
        "wires": [
            [
                "d20f4ff89228fc61"
            ]
        ]
    },
    {
        "id": "d20f4ff89228fc61",
        "type": "function",
        "z": "568b927a715df2e4",
        "name": "Process Temperature",
        "func": "// Parse the temperature\nvar temperature = parseFloat(msg.payload);\n\n// Check if temperature is valid\nif (!isNaN(temperature)) {\n    // Add a timestamp\n    msg.timestamp = new Date().toISOString();\n    \n    // Create status object for analysis\n    msg.status = {\n        value: temperature,\n        unit: \"°C\",\n        warning: temperature > 50,  // Warning level\n        critical: temperature > 80   // Critical level\n    };\n    \n    // Format temperature for display\n    msg.payload = temperature;\n    \n    // Add a danger indicator\n    if (temperature > 80) {\n        msg.dangerLevel = \"critical\";\n        msg.dangerMessage = \"DANGER: OVEN TOO HOT!\";\n        msg.dangerIcon = \"⚠️\";\n        msg.dangerColor = \"#ff0000\";\n    } else if (temperature > 50) {\n        msg.dangerLevel = \"warning\";\n        msg.dangerMessage = \"Warning: Oven temperature elevated\";\n        msg.dangerIcon = \"⚠️\";\n        msg.dangerColor = \"#ff9900\";\n    } else {\n        msg.dangerLevel = \"normal\";\n        msg.dangerMessage = \"Oven temperature normal\";\n        msg.dangerIcon = \"\";\n        msg.dangerColor = \"#009900\";\n    }\n    \n    return msg;\n} else {\n    node.warn(\"Invalid temperature reading\");\n    return null;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 430,
        "y": 120,
        "wires": [
            [
                "45714590afe3089a",
                "d1e95f9d2ae20330",
                "4c85f55654c7f471",
                "1e7915521019dce6",
                "temperature-timer"
            ]
        ]
    },
    {
        "id": "45714590afe3089a",
        "type": "ui_gauge",
        "z": "568b927a715df2e4",
        "name": "Oven Temperature",
        "group": "9fc82ba3577ae1fc",
        "order": 1,
        "width": "6",
        "height": "4",
        "gtype": "gage",
        "title": "Oven Temperature",
        "label": "°C",
        "format": "{{value}}",
        "min": 0,
        "max": "150",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "50",
        "seg2": "80",
        "x": 680,
        "y": 80,
        "wires": []
    },
    {
        "id": "4c85f55654c7f471",
        "type": "ui_chart",
        "z": "568b927a715df2e4",
        "name": "Temperature History",
        "group": "9fc82ba3577ae1fc",
        "order": 3,
        "width": "12",
        "height": "4",
        "label": "Temperature History",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "0",
        "ymax": "150",
        "removeOlder": "10",
        "removeOlderPoints": "",
        "removeOlderUnit": "60",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 680,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "d1e95f9d2ae20330",
        "type": "ui_text",
        "z": "568b927a715df2e4",
        "group": "9fc82ba3577ae1fc",
        "order": 2,
        "width": "6",
        "height": "2",
        "name": "Danger Indicator",
        "label": "",
        "format": "<div style=\"text-align: center; padding: 10px; background-color: {{msg.dangerColor}}; color: white; font-weight: bold; border-radius: 5px;\">{{msg.dangerIcon}} {{msg.dangerMessage}}</div>",
        "layout": "row-spread",
        "x": 680,
        "y": 120,
        "wires": []
    },
    {
        "id": "1e7915521019dce6",
        "type": "ui_text",
        "z": "568b927a715df2e4",
        "group": "9fc82ba3577ae1fc",
        "order": 4,
        "width": "6",
        "height": "1",
        "name": "Current Temperature",
        "label": "Current Temperature",
        "format": "{{msg.payload}}°C",
        "layout": "row-spread",
        "x": 690,
        "y": 200,
        "wires": []
    },
    {
        "id": "c54002287b923458",
        "type": "inject",
        "z": "568b927a715df2e4",
        "name": "Test Normal Temp",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "home/kitchen/oven/temperature",
        "payload": "35",
        "payloadType": "num",
        "x": 180,
        "y": 180,
        "wires": [
            [
                "5d017b42160422f4"
            ]
        ]
    },
    {
        "id": "5d017b42160422f4",
        "type": "mqtt out",
        "z": "568b927a715df2e4",
        "name": "Publish Test Temperature",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "e0634ad5f73b533c",
        "x": 410,
        "y": 180,
        "wires": []
    },
    {
        "id": "4034821e30d9e373",
        "type": "inject",
        "z": "568b927a715df2e4",
        "name": "Test Warning Temp",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "home/kitchen/oven/temperature",
        "payload": "65",
        "payloadType": "num",
        "x": 180,
        "y": 220,
        "wires": [
            [
                "5d017b42160422f4"
            ]
        ]
    },
    {
        "id": "c4b8d325a19e88e8",
        "type": "inject",
        "z": "568b927a715df2e4",
        "name": "Test Critical Temp",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "home/kitchen/oven/temperature",
        "payload": "95",
        "payloadType": "num",
        "x": 180,
        "y": 260,
        "wires": [
            [
                "5d017b42160422f4"
            ]
        ]
    },
    {
        "id": "7896a7375b33c329",
        "type": "aedes broker",
        "z": "568b927a715df2e4",
        "name": "MQTT Broker",
        "mqtt_port": 1883,
        "mqtt_ws_bind": "port",
        "mqtt_ws_port": "",
        "mqtt_ws_path": "",
        "cert": "",
        "key": "",
        "certname": "",
        "keyname": "",
        "persistence_bind": "memory",
        "dburl": "",
        "usetls": false,
        "x": 130,
        "y": 60,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "temperature-timer",
        "type": "function",
        "z": "568b927a715df2e4",
        "name": "Heat Duration Monitor",
        "func": "// Initialize context variables if they don't exist\ncontext.highTempStartTime = context.highTempStartTime || null;\ncontext.alerted = context.alerted || false;\n\n// Parse the temperature\nvar temperature = parseFloat(msg.payload);\nvar currentTime = new Date().getTime();\nvar durationThreshold = 5000; // 30 seconds in milliseconds\n\n// For debugging\nnode.status({fill:\"blue\", shape:\"dot\", text:\"Temp: \" + temperature + \"°C\"});\n\n// Check if temperature is above threshold\nif (temperature > 25) {\n    // If we haven't started timing yet\n    if (context.highTempStartTime === null) {\n        context.highTempStartTime = currentTime;\n        node.status({fill:\"yellow\", shape:\"dot\", text:\"Timing: \" + Math.round((currentTime - context.highTempStartTime)/1000) + \"s\"});\n    } else {\n        // We're already timing, check if threshold is reached\n        var elapsedTime = currentTime - context.highTempStartTime;\n        node.status({fill:\"yellow\", shape:\"dot\", text:\"Timing: \" + Math.round(elapsedTime/1000) + \"s\"});\n        \n        // If more than 30 seconds have passed and we haven't alerted yet\n        if (elapsedTime >= durationThreshold && !context.alerted) {\n            // Create alert message\n            var alertMsg = {\n                payload: {\n                    type: \"message\",  // This is what's missing!\n                    content: \"🔥 ALERT: Oven has been hot (\" + temperature + \"°C) for more than 30 seconds!...\",\n                    chatId: 6665361560  // The chat ID from your configuration\n                },\n                temperature: temperature,\n                duration: elapsedTime\n            };\n            \n            context.alerted = true;\n            node.status({fill:\"red\", shape:\"ring\", text:\"Alert sent! \" + Math.round(elapsedTime/1000) + \"s\"});\n            return alertMsg;\n        }\n    }\n} else {\n    // Temperature dropped below threshold, reset\n    if (context.highTempStartTime !== null) {\n        context.highTempStartTime = null;\n        node.status({fill:\"green\", shape:\"dot\", text:\"Normal temp\"});\n    }\n    \n    // If temperature drops below 28°C (with some buffer), reset the alert flag\n    if (temperature < 28 && context.alerted) {\n        context.alerted = false;\n        node.status({fill:\"green\", shape:\"dot\", text:\"Monitor reset\"});\n    }\n}\n\n// Don't pass on a message unless it's an alert\nreturn null;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "// Initialize context variables\ncontext.highTempStartTime = null;\ncontext.alerted = false;",
        "finalize": "",
        "libs": [],
        "x": 420,
        "y": 300,
        "wires": [
            [
                "telegram-debug",
                "telegram-sender"
            ]
        ]
    },
    {
        "id": "telegram-debug",
        "type": "debug",
        "z": "568b927a715df2e4",
        "name": "Alert Debug",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 650,
        "y": 260,
        "wires": []
    },
    {
        "id": "telegram-sender",
        "type": "telegram sender",
        "z": "568b927a715df2e4",
        "name": "Send Telegram Alert",
        "bot": "2c13be983292a5d5",
        "haserroroutput": false,
        "outputs": 1,
        "x": 670,
        "y": 300,
        "wires": [
            []
        ]
    },
    {
        "id": "lightLevelMQTT",
        "type": "mqtt in",
        "z": "568b927a715df2e4",
        "name": "Light Level",
        "topic": "home/room/light/level",
        "qos": "2",
        "datatype": "auto",
        "broker": "e0634ad5f73b533c",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 160,
        "y": 400,
        "wires": [
            [
                "lightLevelFunction",
                "lightLevelGauge"
            ]
        ]
    },
    {
        "id": "lightLevelFunction",
        "type": "function",
        "z": "568b927a715df2e4",
        "name": "Light Level Monitor",
        "func": "// Initialize context variables if they don't exist\ncontext.brightLightStartTime = context.brightLightStartTime || null;\ncontext.lightAlerted = context.lightAlerted || false;\nconst brightThreshold = 1400; // Light is too bright above this value\nconst darkThreshold = 1000;   // Light is too dark below this value\nconst durationThreshold = 5000; // 20 seconds in milliseconds\n\n// Parse the light level\nvar lightLevel = parseInt(msg.payload);\nvar currentTime = new Date().getTime();\n\n// For debugging\nnode.status({fill:\"blue\", shape:\"dot\", text:\"Light: \" + lightLevel});\n\n// Check if light level is above bright threshold\nif (lightLevel > brightThreshold) {\n    // If we haven't started timing yet\n    if (context.brightLightStartTime === null) {\n        context.brightLightStartTime = currentTime;\n        node.status({fill:\"yellow\", shape:\"dot\", text:\"Bright: \" + Math.round((currentTime - context.brightLightStartTime)/1000) + \"s\"});\n    } else {\n        // We're already timing, check if threshold is reached\n        var elapsedTime = currentTime - context.brightLightStartTime;\n        node.status({fill:\"yellow\", shape:\"dot\", text:\"Bright: \" + Math.round(elapsedTime/1000) + \"s\"});\n        \n        // If more than 20 seconds have passed and we haven't alerted yet\n        if (elapsedTime >= durationThreshold && !context.lightAlerted) {\n            // Create alert message\n            var alertMsg = {\n                payload: {\n                    type: \"message\",\n                    content: \"💡 ALERT: Room has been too bright (Light level: \" + lightLevel + \") for more than 20 seconds!\",\n                    chatId: 6665361560  // Replace with your Telegram chat ID\n                },\n                lightLevel: lightLevel,\n                duration: elapsedTime\n            };\n            \n            context.lightAlerted = true;\n            node.status({fill:\"red\", shape:\"ring\", text:\"Alert sent! \" + Math.round(elapsedTime/1000) + \"s\"});\n            return alertMsg;\n        }\n    }\n} else {\n    // Light level below bright threshold, reset timer\n    if (context.brightLightStartTime !== null) {\n        context.brightLightStartTime = null;\n        \n        // Determine status color based on if it's dark or normal\n        if (lightLevel < darkThreshold) {\n            node.status({fill:\"red\", shape:\"dot\", text:\"Dark: \" + lightLevel});\n        } else {\n            node.status({fill:\"green\", shape:\"dot\", text:\"Normal light: \" + lightLevel});\n        }\n    }\n    \n    // If light level goes below bright threshold with hysteresis, reset the alert flag\n    if (lightLevel < (brightThreshold - 200) && context.lightAlerted) {\n        context.lightAlerted = false;\n        node.status({fill:\"green\", shape:\"dot\", text:\"Alert reset\"});\n    }\n}\n\n// Don't pass on a message unless it's an alert\nreturn null;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "// Initialize context variables\ncontext.lowLightStartTime = null;\ncontext.lightAlerted = false;",
        "finalize": "",
        "libs": [],
        "x": 380,
        "y": 400,
        "wires": [
            [
                "lightTelegramSender"
            ]
        ]
    },
    {
        "id": "lightTelegramSender",
        "type": "telegram sender",
        "z": "568b927a715df2e4",
        "name": "Light Telegram Alert",
        "bot": "2c13be983292a5d5",
        "haserroroutput": false,
        "outputs": 1,
        "x": 590,
        "y": 400,
        "wires": [
            [
                "lightDebug"
            ]
        ]
    },
    {
        "id": "lightDebug",
        "type": "debug",
        "z": "568b927a715df2e4",
        "name": "Light Alert Debug",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 780,
        "y": 400,
        "wires": []
    },
    {
        "id": "lightLevelGauge",
        "type": "ui_gauge",
        "z": "568b927a715df2e4",
        "name": "Light Level",
        "group": "8104dbaf06fdedaf",
        "order": 3,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Light Level",
        "label": "",
        "format": "{{value}}",
        "min": 0,
        "max": "4095",
        "colors": [
            "#5ce600",
            "#e6e600",
            "#b30000"
        ],
        "seg1": "500",
        "seg2": "1000",
        "diff": false,
        "className": "",
        "x": 360,
        "y": 460,
        "wires": []
    },
    {
        "id": "lightChart",
        "type": "ui_chart",
        "z": "568b927a715df2e4",
        "name": "Light History",
        "group": "8104dbaf06fdedaf",
        "order": 4,
        "width": 0,
        "height": 0,
        "label": "Light Level History",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "0",
        "ymax": "4095",
        "removeOlder": 1,
        "removeOlderPoints": "",
        "removeOlderUnit": "3600",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 560,
        "y": 460,
        "wires": [
            []
        ]
    },
    {
        "id": "lightLevelTest",
        "type": "inject",
        "z": "568b927a715df2e4",
        "name": "Test Low Light",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "home/room/light/level",
        "payload": "300",
        "payloadType": "num",
        "x": 170,
        "y": 520,
        "wires": [
            [
                "lightTestPublish"
            ]
        ]
    },
    {
        "id": "lightTestPublish",
        "type": "mqtt out",
        "z": "568b927a715df2e4",
        "name": "Publish Test Light Level",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "e0634ad5f73b533c",
        "x": 390,
        "y": 520,
        "wires": []
    },
    {
        "id": "normalLightTest",
        "type": "inject",
        "z": "568b927a715df2e4",
        "name": "Test Normal Light",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "home/room/light/level",
        "payload": "1500",
        "payloadType": "num",
        "x": 170,
        "y": 560,
        "wires": [
            [
                "lightTestPublish"
            ]
        ]
    },
    {
        "id": "1b12ae9050d59bca",
        "type": "mqtt in",
        "z": "568b927a715df2e4",
        "name": "Sound Level",
        "topic": "home/room/sound/level",
        "qos": "2",
        "datatype": "auto",
        "broker": "e0634ad5f73b533c",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 140,
        "y": 660,
        "wires": [
            [
                "4a8a0127e9fd8704",
                "ed3e206eb0f4cab2",
                "fc9b9de012bcb4da"
            ]
        ]
    },
    {
        "id": "4a8a0127e9fd8704",
        "type": "function",
        "z": "568b927a715df2e4",
        "name": "Sound Level Monitor",
        "func": "// Initialize context variables if they don't exist\ncontext.loudSoundStartTime = context.loudSoundStartTime || null;\ncontext.soundAlerted = context.soundAlerted || false;\nconst soundThreshold = 300; // Sound is too loud above this value\ncontext.peakValue = context.peakValue || 0;\nconst durationThreshold = 5000; // 10 seconds in milliseconds\n\n// Parse the sound level\nvar soundLevel = parseInt(msg.payload);\nvar currentTime = new Date().getTime();\n\n// Update peak value for last minute\nif (soundLevel > context.peakValue) {\n    context.peakValue = soundLevel;\n    // Reset peak value every minute\n    setTimeout(() => { context.peakValue = 0; }, 60000);\n}\n\n// Create a normalized percentage (0-100%) for easier interpretation\nconst maxPossibleValue = 4095; // 12-bit ADC on ESP32\nconst normalizedPercentage = Math.round((soundLevel / maxPossibleValue) * 100);\n\n// For debugging\nnode.status({fill:\"blue\", shape:\"dot\", text:\"Sound: \" + soundLevel + \" (\" + normalizedPercentage + \"%), Peak: \" + context.peakValue});\n\n// Check if sound level is above loud threshold\nif (soundLevel > soundThreshold) {\n    // If we haven't started timing yet\n    if (context.loudSoundStartTime === null) {\n        context.loudSoundStartTime = currentTime;\n        node.status({fill:\"yellow\", shape:\"dot\", text:\"Loud: \" + Math.round((currentTime - context.loudSoundStartTime)/1000) + \"s\"});\n    } else {\n        // We're already timing, check if threshold is reached\n        var elapsedTime = currentTime - context.loudSoundStartTime;\n        node.status({fill:\"yellow\", shape:\"dot\", text:\"Loud: \" + Math.round(elapsedTime/1000) + \"s\"});\n        \n        // If more than 10 seconds have passed and we haven't alerted yet\n        if (elapsedTime >= durationThreshold && !context.soundAlerted) {\n            // Create alert message\n            var alertMsg = {\n                payload: {\n                    type: \"message\",\n                    content: \"🔊 ALERT: Noise level has been too high (\" + soundLevel + \") for more than 10 seconds! Please reduce volume to avoid disturbing neighbors.\",\n                    chatId: 6665361560  // Replace with your Telegram chat ID\n                },\n                soundLevel: soundLevel,\n                normalizedPercentage: normalizedPercentage,\n                peakValue: context.peakValue,\n                duration: elapsedTime\n            };\n            \n            context.soundAlerted = true;\n            node.status({fill:\"red\", shape:\"ring\", text:\"Alert sent! \" + Math.round(elapsedTime/1000) + \"s\"});\n            return alertMsg;\n        }\n    }\n} else {\n    // Sound level below loud threshold, reset timer\n    if (context.loudSoundStartTime !== null) {\n        context.loudSoundStartTime = null;\n        node.status({fill:\"green\", shape:\"dot\", text:\"Normal sound: \" + soundLevel});\n    }\n    \n    // If sound level goes below threshold with hysteresis, reset the alert flag\n    if (soundLevel < (soundThreshold - 300) && context.soundAlerted) {\n        var recoveryMsg = {\n            payload: {\n                type: \"message\",\n                content: \"✅ Noise level has returned to normal (\" + soundLevel + \"). Thank you!\",\n                chatId: 6665361560  // Replace with your Telegram chat ID\n            },\n            soundLevel: soundLevel,\n            normalizedPercentage: normalizedPercentage\n        };\n        \n        context.soundAlerted = false;\n        node.status({fill:\"green\", shape:\"dot\", text:\"Alert reset\"});\n        return recoveryMsg;\n    }\n}\n\n// Don't pass on a message unless it's an alert\nreturn null;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "// Initialize context variables\ncontext.loudSoundStartTime = null;\ncontext.soundAlerted = false;\ncontext.peakValue = 0;",
        "finalize": "",
        "libs": [],
        "x": 360,
        "y": 660,
        "wires": [
            [
                "ed6061f515bc87f7"
            ]
        ]
    },
    {
        "id": "ed6061f515bc87f7",
        "type": "telegram sender",
        "z": "568b927a715df2e4",
        "name": "Sound Telegram Alert",
        "bot": "2c13be983292a5d5",
        "haserroroutput": false,
        "outputs": 1,
        "x": 570,
        "y": 660,
        "wires": [
            [
                "40b2f6a237dc7c54"
            ]
        ]
    },
    {
        "id": "40b2f6a237dc7c54",
        "type": "debug",
        "z": "568b927a715df2e4",
        "name": "Sound Alert Debug",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 660,
        "wires": []
    },
    {
        "id": "ed3e206eb0f4cab2",
        "type": "ui_gauge",
        "z": "568b927a715df2e4",
        "name": "Sound Level",
        "group": "sound-ui-group",
        "order": 1,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Noise Level",
        "label": "Level",
        "format": "{{value}}",
        "min": 0,
        "max": "4095",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "1000",
        "seg2": "2000",
        "diff": false,
        "className": "",
        "x": 340,
        "y": 720,
        "wires": []
    },
    {
        "id": "fc9b9de012bcb4da",
        "type": "ui_chart",
        "z": "568b927a715df2e4",
        "name": "Sound History",
        "group": "sound-ui-group",
        "order": 2,
        "width": 0,
        "height": 0,
        "label": "Noise Level History",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "0",
        "ymax": "4095",
        "removeOlder": 1,
        "removeOlderPoints": "",
        "removeOlderUnit": "3600",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 340,
        "y": 780,
        "wires": [
            []
        ]
    },
    {
        "id": "dc7b2259bc30112a",
        "type": "inject",
        "z": "568b927a715df2e4",
        "name": "Test Normal Sound",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "home/room/sound/level",
        "payload": "1000",
        "payloadType": "num",
        "x": 160,
        "y": 840,
        "wires": [
            [
                "afb617934a372da3"
            ]
        ]
    },
    {
        "id": "afb617934a372da3",
        "type": "mqtt out",
        "z": "568b927a715df2e4",
        "name": "Publish Test Sound Level",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "e0634ad5f73b533c",
        "x": 370,
        "y": 880,
        "wires": []
    },
    {
        "id": "9f3f3e9f2993f495",
        "type": "inject",
        "z": "568b927a715df2e4",
        "name": "Test Loud Sound",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "home/room/sound/level",
        "payload": "2500",
        "payloadType": "num",
        "x": 150,
        "y": 880,
        "wires": [
            [
                "afb617934a372da3"
            ]
        ]
    },
    {
        "id": "e0634ad5f73b533c",
        "type": "mqtt-broker",
        "name": "MQTT Broker",
        "broker": "localhost",
        "port": "1883",
        "clientid": "node-red-mqtt",
        "usetls": false,
        "compatmode": false,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "node-red/status",
        "birthQos": "0",
        "birthPayload": "online",
        "closeTopic": "node-red/status",
        "closeQos": "0",
        "closePayload": "offline",
        "willTopic": "node-red/status",
        "willQos": "0",
        "willPayload": "unexpected-disconnect"
    },
    {
        "id": "9fc82ba3577ae1fc",
        "type": "ui_group",
        "name": "Oven Monitor",
        "tab": "dashboard-tab",
        "order": 1,
        "disp": true,
        "width": "12",
        "collapse": false,
        "className": ""
    },
    {
        "id": "2c13be983292a5d5",
        "type": "telegram bot",
        "botname": "IOT_FINAL_V2",
        "usernames": "6665361560",
        "chatids": "6665361560",
        "baseapiurl": "",
        "testenvironment": false,
        "updatemode": "polling",
        "pollinterval": 300,
        "usesocks": false,
        "sockshost": "",
        "socksprotocol": "socks5",
        "socksport": 6667,
        "socksusername": "anonymous",
        "sockspassword": "",
        "bothost": "",
        "botpath": "",
        "localbothost": "0.0.0.0",
        "localbotport": 8443,
        "publicbotport": 8443,
        "privatekey": "",
        "certificate": "",
        "useselfsignedcertificate": false,
        "sslterminated": false,
        "verboselogging": false
    },
    {
        "id": "8104dbaf06fdedaf",
        "type": "ui_group",
        "name": "g-kitchen",
        "tab": "dashboard-tab",
        "order": 2,
        "disp": true,
        "width": 6,
        "collapse": false,
        "className": ""
    },
    {
        "id": "sound-ui-group",
        "type": "ui_group",
        "name": "Sound Monitor",
        "tab": "dashboard-tab",
        "order": 3,
        "disp": true,
        "width": "12",
        "collapse": false,
        "className": ""
    },
    {
        "id": "dashboard-tab",
        "type": "ui_tab",
        "name": "ESP32 Sensor Dashboard",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]