From 401b701689176f082b1b5580171d5e42f5a6b5c1 Mon Sep 17 00:00:00 2001 From: rxf Date: Wed, 27 May 2026 16:35:09 +0200 Subject: [PATCH] EZ_Licht: Lichtsensor richtig ausgewertet --- flows.json | 646 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 569 insertions(+), 77 deletions(-) diff --git a/flows.json b/flows.json index c516f4e..abe8c53 100644 --- a/flows.json +++ b/flows.json @@ -1086,7 +1086,7 @@ "page": "9a5095b780d6917f", "width": "6", "height": "1", - "order": 4, + "order": 5, "showTitle": true, "className": "", "visible": "true", @@ -1293,7 +1293,7 @@ "page": "9a5095b780d6917f", "width": 6, "height": 1, - "order": 5, + "order": 4, "showTitle": true, "className": "", "visible": "true", @@ -1331,20 +1331,6 @@ "userProps": "", "sessionExpiry": "" }, - { - "id": "883598fbde3d4269", - "type": "ui-group", - "name": "Boden_Temp", - "page": "c6f339624d3ba639", - "width": 6, - "height": 1, - "order": 3, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, { "id": "c6f339624d3ba639", "type": "ui-page", @@ -1398,7 +1384,7 @@ { "id": "1f934e808f93452b", "type": "ui-group", - "name": "Boden-Feuchte", + "name": "Boden-Feuchte_ELV", "page": "c6f339624d3ba639", "width": 6, "height": 1, @@ -1412,7 +1398,7 @@ { "id": "da32bdb1eddd2918", "type": "ui-group", - "name": "BodeWerte", + "name": "BodeWerte_ELV", "page": "c6f339624d3ba639", "width": "12", "height": 1, @@ -1423,6 +1409,62 @@ "disabled": "false", "groupType": "default" }, + { + "id": "883598fbde3d4269", + "type": "ui-group", + "name": "Boden_Temp_ELV", + "page": "c6f339624d3ba639", + "width": 6, + "height": 1, + "order": 3, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "95a73cfa6c5013af", + "type": "ui-group", + "name": "Boden_Feucht_Z", + "page": "c6f339624d3ba639", + "width": 6, + "height": 1, + "order": 5, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "09959787270d8e78", + "type": "ui-group", + "name": "Boden_Temp_Z", + "page": "c6f339624d3ba639", + "width": 6, + "height": 1, + "order": 6, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "852d8e455b1c7d1e", + "type": "ui-group", + "name": "Boden_Werte_Z", + "page": "c6f339624d3ba639", + "width": "12", + "height": 1, + "order": 7, + "showTitle": false, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, { "id": "4d2812cbd43e95b7", "type": "mqtt in", @@ -9361,6 +9403,7 @@ "name": "detect_motion", "func": "if (msg.payload.occupancy === true) {\n msg.payload = { \"state\": \"on\" }\n}\nreturn msg", "outputs": 1, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", @@ -9411,8 +9454,9 @@ "type": "function", "z": "c23febdb48bc9327", "name": "check brightness", - "func": "\nconst helltop = flow.get('helltop')\nconst hellbot = flow.get('hellbot')\n\nlet hell = msg.payload.illuminance_lux\nflow.set('hell',hell)\nmsg.topic = 'control'\nif (hell >= helltop) {\n msg.payload = 'close'\n} else if (hell <= hellbot) {\n msg.payload = 'open'\n} else {\n msg.payload = ''\n}\nmsg.debug = hell\nreturn msg;", + "func": "\nconst helltop = flow.get('helltop')\nconst hellbot = flow.get('hellbot')\n\nlet hell = msg.payload.illuminance\nflow.set('hell',hell)\nmsg.topic = 'control'\nif (hell >= helltop) {\n msg.payload = 'close'\n} else if (hell <= hellbot) {\n msg.payload = 'open'\n} else {\n msg.payload = ''\n}\nmsg.debug = hell\nreturn msg;", "outputs": 1, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", @@ -9431,7 +9475,7 @@ "type": "debug", "z": "c23febdb48bc9327", "name": "debug 132", - "active": true, + "active": false, "tosidebar": true, "console": false, "tostatus": false, @@ -9528,54 +9572,10 @@ "y": 300, "wires": [ [ - "14c06742e472c598" + "a402db460858613f" ] ] }, - { - "id": "14c06742e472c598", - "type": "ui_chart", - "z": "c23febdb48bc9327", - "name": "Helligkeit", - "group": "51bf0475.ddfd2c", - "order": 14, - "width": 0, - "height": 0, - "label": "Helligkeit [lux]", - "chartType": "line", - "legend": "false", - "xformat": "HH:mm", - "interpolate": "cubic", - "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": 740, - "y": 300, - "wires": [ - [] - ] - }, { "id": "a9f57cca28d627b2", "type": "trigger", @@ -9670,7 +9670,7 @@ "type": "debug", "z": "c23febdb48bc9327", "name": "debug 135", - "active": true, + "active": false, "tosidebar": true, "console": false, "tostatus": false, @@ -9687,7 +9687,7 @@ "type": "debug", "z": "c23febdb48bc9327", "name": "debug 136", - "active": true, + "active": false, "tosidebar": true, "console": false, "tostatus": false, @@ -9790,7 +9790,7 @@ "type": "debug", "z": "c23febdb48bc9327", "name": "debug 138", - "active": true, + "active": false, "tosidebar": true, "console": false, "tostatus": false, @@ -9904,7 +9904,7 @@ "group": "4939a011a90edf7b", "name": "Licht aus", "label": "Lich AUS", - "order": 1, + "order": 2, "width": 0, "height": 0, "emulateClick": false, @@ -9943,7 +9943,7 @@ "group": "4939a011a90edf7b", "name": "Licht ein", "label": "Lich EIN", - "order": 2, + "order": 3, "width": 0, "height": 0, "emulateClick": false, @@ -9975,6 +9975,68 @@ ] ] }, + { + "id": "a402db460858613f", + "type": "ui-chart", + "z": "c23febdb48bc9327", + "group": "4939a011a90edf7b", + "name": "Helligkeit", + "label": "chart", + "order": 1, + "chartType": "line", + "category": "topic", + "categoryType": "msg", + "xAxisLabel": "", + "xAxisProperty": "", + "xAxisPropertyType": "timestamp", + "xAxisType": "time", + "xAxisFormat": "", + "xAxisFormatType": "auto", + "xmin": "", + "xmax": "", + "yAxisLabel": "lux", + "yAxisProperty": "payload", + "yAxisPropertyType": "msg", + "ymin": "", + "ymax": "", + "bins": 10, + "action": "append", + "stackSeries": false, + "pointShape": "circle", + "pointRadius": 4, + "showLegend": true, + "removeOlder": "12", + "removeOlderUnit": "3600", + "removeOlderPoints": "", + "colors": [ + "#0095ff", + "#ff0000", + "#ff7f0e", + "#2ca02c", + "#a347e1", + "#d62728", + "#ff9896", + "#9467bd", + "#c5b0d5" + ], + "textColor": [ + "#666666" + ], + "textColorDefault": true, + "gridColor": [ + "#e5e5e5" + ], + "gridColorDefault": true, + "width": 6, + "height": 8, + "className": "", + "interpolation": "linear", + "x": 720, + "y": 300, + "wires": [ + [] + ] + }, { "id": "60dea7cbf33ac553", "type": "mqtt in", @@ -15367,9 +15429,9 @@ "id": "57c3b66a5f1320b3", "type": "comment", "z": "a78d7fab32058fcd", - "name": "Bodenfeuchte messen und anzeigen", + "name": "Bodenfeuchte_elv messen und anzeigen", "info": "", - "x": 340, + "x": 360, "y": 180, "wires": [] }, @@ -15514,11 +15576,11 @@ "order": 2, "width": "6", "height": "1", - "name": "", - "label": "Batterie [V]", + "name": "Batterie", + "label": "", "format": "{{msg.payload}}", "layout": "row-center", - "style": false, + "style": true, "font": "", "fontSize": 16, "color": "#717171", @@ -15526,7 +15588,7 @@ "className": "", "value": "payload", "valueType": "msg", - "x": 1290, + "x": 1280, "y": 500, "wires": [] }, @@ -15664,7 +15726,7 @@ "y": 440, "wires": [ [ - "a75a0af638bad79d" + "a7645b487ad18cb2" ] ] }, @@ -15836,5 +15898,435 @@ "x": 1180, "y": 700, "wires": [] + }, + { + "id": "7ba750808e28bf09", + "type": "comment", + "z": "a78d7fab32058fcd", + "name": "Bodenfeuchte_zigbee messen und anzeigen", + "info": "", + "x": 390, + "y": 860, + "wires": [] + }, + { + "id": "370cffd1bc1e014c", + "type": "mqtt in", + "z": "a78d7fab32058fcd", + "name": "Bodenfeuchte_zigbee", + "topic": "zigbee2mqtt/Bodenfeuchte_Zigbee", + "qos": "0", + "datatype": "auto-detect", + "broker": "c46833d59903b816", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 340, + "y": 960, + "wires": [ + [ + "831e515311203731", + "dd4881cf4084270c", + "da5febbde802ed74", + "cc466cf1f5464343" + ] + ] + }, + { + "id": "831e515311203731", + "type": "debug", + "z": "a78d7fab32058fcd", + "name": "debug 10", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 460, + "y": 900, + "wires": [] + }, + { + "id": "dd4881cf4084270c", + "type": "change", + "z": "a78d7fab32058fcd", + "name": "Feuchte", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "payload.soil_moisture", + "tot": "msg" + }, + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "Feuchte", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 640, + "y": 940, + "wires": [ + [ + "5ff75c361419dec5", + "c6a53ad477b705f6" + ] + ] + }, + { + "id": "da5febbde802ed74", + "type": "change", + "z": "a78d7fab32058fcd", + "name": "Temperatur", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "payload.temperature", + "tot": "msg" + }, + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "Temperatur", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 650, + "y": 1000, + "wires": [ + [ + "8e56ead367e152a3", + "32645fba88793151" + ] + ] + }, + { + "id": "8e56ead367e152a3", + "type": "ui-gauge", + "z": "a78d7fab32058fcd", + "name": "TempZ_Uhr", + "group": "09959787270d8e78", + "order": 1, + "value": "payload", + "valueType": "msg", + "width": "3", + "height": "3", + "gtype": "gauge-half", + "gstyle": "needle", + "title": "Temperatur", + "alwaysShowTitle": false, + "floatingTitlePosition": "top-left", + "units": "°C", + "icon": "", + "prefix": "", + "suffix": "", + "segments": [ + { + "from": "0", + "color": "#ffc800", + "text": "", + "textType": "label" + }, + { + "from": "10", + "color": "#5cd65c", + "text": "", + "textType": "label" + }, + { + "from": "20", + "color": "#ea5353", + "text": "", + "textType": "label" + } + ], + "min": 0, + "max": "30", + "sizeThickness": 16, + "sizeGap": 4, + "sizeKeyThickness": 8, + "styleRounded": true, + "styleGlow": false, + "className": "", + "x": 970, + "y": 1020, + "wires": [ + [] + ] + }, + { + "id": "32645fba88793151", + "type": "ui-chart", + "z": "a78d7fab32058fcd", + "group": "09959787270d8e78", + "name": "TempZ_chart", + "label": "Temperatur [°C]", + "order": 2, + "chartType": "line", + "category": "topic", + "categoryType": "msg", + "xAxisLabel": "", + "xAxisProperty": "", + "xAxisPropertyType": "timestamp", + "xAxisType": "time", + "xAxisFormat": "", + "xAxisFormatType": "auto", + "xmin": "", + "xmax": "", + "yAxisLabel": "", + "yAxisProperty": "payload", + "yAxisPropertyType": "msg", + "ymin": "", + "ymax": "", + "bins": 10, + "action": "append", + "stackSeries": false, + "pointShape": "circle", + "pointRadius": 4, + "showLegend": true, + "removeOlder": "12", + "removeOlderUnit": "3600", + "removeOlderPoints": "", + "colors": [ + "#0095ff", + "#ff0000", + "#ff7f0e", + "#2ca02c", + "#a347e1", + "#d62728", + "#ff9896", + "#9467bd", + "#c5b0d5" + ], + "textColor": [ + "#666666" + ], + "textColorDefault": true, + "gridColor": [ + "#e5e5e5" + ], + "gridColorDefault": true, + "width": "6", + "height": "8", + "className": "", + "interpolation": "linear", + "x": 970, + "y": 1080, + "wires": [ + [] + ] + }, + { + "id": "5ff75c361419dec5", + "type": "ui-gauge", + "z": "a78d7fab32058fcd", + "name": "FeuchteZ_Uhr", + "group": "95a73cfa6c5013af", + "order": 1, + "value": "payload", + "valueType": "msg", + "width": "3", + "height": "3", + "gtype": "gauge-half", + "gstyle": "needle", + "title": "Feuchte", + "alwaysShowTitle": false, + "floatingTitlePosition": "top-left", + "units": "%", + "icon": "", + "prefix": "", + "suffix": "", + "segments": [ + { + "from": "0", + "color": "#ffc800", + "text": "", + "textType": "label" + }, + { + "from": "30", + "color": "#5cd65c", + "text": "", + "textType": "label" + }, + { + "from": "50", + "color": "#ea5353", + "text": "", + "textType": "label" + } + ], + "min": 0, + "max": "100", + "sizeThickness": 16, + "sizeGap": 4, + "sizeKeyThickness": 8, + "styleRounded": true, + "styleGlow": false, + "className": "", + "x": 980, + "y": 880, + "wires": [ + [] + ] + }, + { + "id": "c6a53ad477b705f6", + "type": "ui-chart", + "z": "a78d7fab32058fcd", + "group": "95a73cfa6c5013af", + "name": "FeuchteZ_Chart", + "label": "Feuchte [%]", + "order": 2, + "chartType": "line", + "category": "topic", + "categoryType": "msg", + "xAxisLabel": "", + "xAxisProperty": "", + "xAxisPropertyType": "timestamp", + "xAxisType": "time", + "xAxisFormat": "", + "xAxisFormatType": "auto", + "xmin": "", + "xmax": "", + "yAxisLabel": "", + "yAxisProperty": "payload", + "yAxisPropertyType": "msg", + "ymin": "0", + "ymax": "100", + "bins": 10, + "action": "append", + "stackSeries": false, + "pointShape": "circle", + "pointRadius": 4, + "showLegend": true, + "removeOlder": "12", + "removeOlderUnit": "3600", + "removeOlderPoints": "", + "colors": [ + "#0095ff", + "#ff0000", + "#ff7f0e", + "#2ca02c", + "#a347e1", + "#d62728", + "#ff9896", + "#9467bd", + "#c5b0d5" + ], + "textColor": [ + "#666666" + ], + "textColorDefault": true, + "gridColor": [ + "#e5e5e5" + ], + "gridColorDefault": true, + "width": "6", + "height": "8", + "className": "", + "interpolation": "linear", + "x": 980, + "y": 940, + "wires": [ + [] + ] + }, + { + "id": "cc466cf1f5464343", + "type": "change", + "z": "a78d7fab32058fcd", + "name": "extract TBatterie", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "payload.battery", + "tot": "msg" + }, + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "Batterie", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 1080, + "wires": [ + [ + "261c666ccf5c91d7" + ] + ] + }, + { + "id": "261c666ccf5c91d7", + "type": "ui-text", + "z": "a78d7fab32058fcd", + "group": "852d8e455b1c7d1e", + "order": 1, + "width": "6", + "height": "1", + "name": "", + "label": "Batterie_Z ", + "format": "{{msg.payload}}", + "layout": "row-center", + "style": false, + "font": "", + "fontSize": 16, + "color": "#717171", + "wrapText": false, + "className": "", + "value": "payload", + "valueType": "msg", + "x": 970, + "y": 1140, + "wires": [] + }, + { + "id": "a7645b487ad18cb2", + "type": "function", + "z": "a78d7fab32058fcd", + "name": "function 9", + "func": "msg.payload = \"Batterie \" + msg.payload + \" V\";\nreturn msg;\n", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1040, + "y": 500, + "wires": [ + [ + "a75a0af638bad79d" + ] + ] } ] \ No newline at end of file