[ { "id": "f9f497884963ad3a", "type": "tab", "label": "atividade20.1", "disabled": false, "info": "", "env": [] }, { "id": "361280a75830e014", "type": "group", "z": "f9f497884963ad3a", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "f12574016724d6a1", "b424688c5f1a4bf0", "43777802e28e2a78", "b4a46c8c0d1f2360", "30f31c2dcf7c5a78" ], "x": 414, "y": 19, "w": 572, "h": 262 }, { "id": "54d96fc1e275a47f", "type": "group", "z": "f9f497884963ad3a", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "345ccc3c84c142a2", "1fa953e408bf838f", "4bd0e97af11124c7", "bce6fcd4f0a528bb", "3a1048de5d15798f", "d0cc932d761da095", "6e565b71b1fa7180", "92d940cb9dd9f65d", "8090b335c5b8e074", "6a1e3f298de310e9", "d803ec13c6eda77d", "3a6efa7a4044a202", "095d517f344bda26" ], "x": 134, "y": 299, "w": 1032, "h": 648 }, { "id": "095d517f344bda26", "type": "group", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "3a6d2173cf208d0f", "20915ca62a394b09", "d4bc4eb11aece004", "6f889a4a53a9da63", "5d247d20f892f418", "7480d0340a38c62b", "a7c9b05471b49673", "87dee325b50c8678" ], "x": 174, "y": 679, "w": 732, "h": 242 }, { "id": "3a6d2173cf208d0f", "type": "mqtt in", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "leitura de telemetria do SENSOR", "topic": "tele/tasmota_81151/SENSOR", "qos": "2", "datatype": "json", "broker": "ee1b1a1d8f3d34fc", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 330, "y": 800, "wires": [ [ "20915ca62a394b09", "6f889a4a53a9da63" ] ] }, { "id": "20915ca62a394b09", "type": "function", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "temperatura", "func": "msg.payload=msg.payload.DHT11.Temperature;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 630, "y": 720, "wires": [ [ "d4bc4eb11aece004", "1fa953e408bf838f", "87dee325b50c8678" ] ] }, { "id": "d4bc4eb11aece004", "type": "debug", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "debug 18", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "payload", "statusType": "auto", "x": 800, "y": 720, "wires": [] }, { "id": "6f889a4a53a9da63", "type": "function", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "humidade", "func": "msg.payload = msg.payload.DHT11.Humidity;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 620, "y": 840, "wires": [ [ "5d247d20f892f418", "7480d0340a38c62b" ] ] }, { "id": "5d247d20f892f418", "type": "debug", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "debug 19", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 800, "y": 820, "wires": [] }, { "id": "345ccc3c84c142a2", "type": "ui_chart", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "", "group": "776a13b6d6b36920", "order": 5, "width": 0, "height": 0, "label": "temperature", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "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": 370, "y": 660, "wires": [ [] ] }, { "id": "7480d0340a38c62b", "type": "ui_chart", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "", "group": "e7b984b5467368fb", "order": 6, "width": 0, "height": 0, "label": "sensor hum", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "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": 810, "y": 880, "wires": [ [] ] }, { "id": "1fa953e408bf838f", "type": "function", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "comparador", "func": "if (context.get(\"tmax\") === undefined) {\n context.set(\"tmax\", 30)\n}\n\nif(msg.topic==\"TMAX\") {\n context.set (\"tmax\", msg.payload);\n return null;\n}\n\nif (msg.payload >= context.get(\"tmax\") ) msg.payload=1\nelse msg.payload=0;\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 810, "y": 620, "wires": [ [ "d0cc932d761da095", "92d940cb9dd9f65d", "d803ec13c6eda77d" ] ] }, { "id": "4bd0e97af11124c7", "type": "inject", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "TMAX", "payload": "30", "payloadType": "num", "x": 380, "y": 380, "wires": [ [ "1fa953e408bf838f" ] ] }, { "id": "bce6fcd4f0a528bb", "type": "ui_slider", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "", "label": "entrada tmax", "tooltip": "", "group": "e103dde7e5dd346a", "order": 9, "width": 0, "height": 0, "passthru": true, "outs": "all", "topic": "topic", "topicType": "msg", "min": "0", "max": "50", "step": 1, "className": "", "x": 370, "y": 480, "wires": [ [ "3a1048de5d15798f", "1fa953e408bf838f" ] ] }, { "id": "3a1048de5d15798f", "type": "ui_chart", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "", "group": "e103dde7e5dd346a", "order": 12, "width": 0, "height": 0, "label": "tmax", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "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": 390, "y": 540, "wires": [ [] ] }, { "id": "d0cc932d761da095", "type": "ui_chart", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "", "group": "ca92b48efdeb0ad7", "order": 13, "width": 0, "height": 0, "label": "controle", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "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": 1020, "y": 480, "wires": [ [ "6e565b71b1fa7180" ] ] }, { "id": "6e565b71b1fa7180", "type": "debug", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "debug 20", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 1040, "y": 380, "wires": [] }, { "id": "92d940cb9dd9f65d", "type": "debug", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "debug 21", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 1040, "y": 660, "wires": [] }, { "id": "8090b335c5b8e074", "type": "inject", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "30", "payloadType": "num", "x": 390, "y": 440, "wires": [ [ "1fa953e408bf838f" ] ] }, { "id": "6a1e3f298de310e9", "type": "ui_slider", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "", "label": "entrada temp", "tooltip": "", "group": "776a13b6d6b36920", "order": 1, "width": 0, "height": 0, "passthru": true, "outs": "all", "topic": "topic", "topicType": "msg", "min": 0, "max": "50", "step": 1, "className": "", "x": 370, "y": 600, "wires": [ [ "345ccc3c84c142a2", "1fa953e408bf838f" ] ] }, { "id": "d803ec13c6eda77d", "type": "mqtt out", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "controle do RELAY", "topic": "cmnd/tasmota_81151/POWER", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "ee1b1a1d8f3d34fc", "x": 1050, "y": 560, "wires": [] }, { "id": "f12574016724d6a1", "type": "mqtt out", "z": "f9f497884963ad3a", "g": "361280a75830e014", "name": "", "topic": "cmnd/tasmota_81151/MqttWifiTimeout", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "ee1b1a1d8f3d34fc", "x": 810, "y": 160, "wires": [] }, { "id": "b424688c5f1a4bf0", "type": "inject", "z": "f9f497884963ad3a", "g": "361280a75830e014", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "5000", "payloadType": "num", "x": 510, "y": 160, "wires": [ [ "f12574016724d6a1" ] ] }, { "id": "43777802e28e2a78", "type": "mqtt out", "z": "f9f497884963ad3a", "g": "361280a75830e014", "name": "", "topic": "cmnd/tasmota_81151/teleperiod", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "ee1b1a1d8f3d34fc", "x": 790, "y": 240, "wires": [] }, { "id": "b4a46c8c0d1f2360", "type": "inject", "z": "f9f497884963ad3a", "g": "361280a75830e014", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "3", "payloadType": "num", "x": 510, "y": 240, "wires": [ [ "43777802e28e2a78" ] ] }, { "id": "30f31c2dcf7c5a78", "type": "comment", "z": "f9f497884963ad3a", "g": "361280a75830e014", "name": "inicializacao do tasmota", "info": "", "x": 540, "y": 60, "wires": [] }, { "id": "3a6efa7a4044a202", "type": "comment", "z": "f9f497884963ad3a", "g": "54d96fc1e275a47f", "name": "controle de temperatura", "info": "", "x": 260, "y": 340, "wires": [] }, { "id": "a7c9b05471b49673", "type": "comment", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "leitura do sensor MQTT", "info": "", "x": 300, "y": 720, "wires": [] }, { "id": "87dee325b50c8678", "type": "ui_chart", "z": "f9f497884963ad3a", "g": "095d517f344bda26", "name": "", "group": "776a13b6d6b36920", "order": 2, "width": 0, "height": 0, "label": "sensor temp", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "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": 810, "y": 780, "wires": [ [] ] }, { "id": "ee1b1a1d8f3d34fc", "type": "mqtt-broker", "name": "", "broker": "broker.hivemq.com", "port": "1883", "clientid": "", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "birthMsg": {}, "closeTopic": "", "closeQos": "0", "closePayload": "", "closeMsg": {}, "willTopic": "", "willQos": "0", "willPayload": "", "willMsg": {}, "userProps": "", "sessionExpiry": "" }, { "id": "776a13b6d6b36920", "type": "ui_group", "name": "temp", "tab": "81b103e963f54d57", "order": 1, "disp": true, "width": "6", "collapse": false, "className": "" }, { "id": "e7b984b5467368fb", "type": "ui_group", "name": "Humidade", "tab": "81b103e963f54d57", "order": 4, "disp": true, "width": "6", "collapse": false, "className": "" }, { "id": "e103dde7e5dd346a", "type": "ui_group", "name": "tmax", "tab": "81b103e963f54d57", "order": 2, "disp": true, "width": "6", "collapse": false, "className": "" }, { "id": "ca92b48efdeb0ad7", "type": "ui_group", "name": "controle", "tab": "81b103e963f54d57", "order": 3, "disp": true, "width": "6", "collapse": false, "className": "" }, { "id": "81b103e963f54d57", "type": "ui_tab", "name": "Home", "icon": "dashboard", "disabled": false, "hidden": false } ]