[ { "id": "f271535cb0921814", "type": "tab", "label": "Netzfrequenz", "disabled": false, "info": "", "env": [] }, { "id": "cc2580d9d9b74a34", "type": "group", "z": "f271535cb0921814", "name": "", "style": { "fill": "#bfdbef", "label": true }, "nodes": [ "4fbf298b16d2175c", "c8183ed878f00901", "af094afe8cc6365e", "71c5b266fd4e1dfb", "daf1ab2ff2a82e33", "9e155d6fc334cfd7", "c73b80c80340c897", "1b8c0534a8bf05aa", "5593b637082408d4", "e4d1c17a58350d3b", "45d1deed8eb29e0b", "b2c6ca466d31d233", "a7bf87d44b312b3b", "3683993178d2b5f1", "58b95e250e2977df", "c762f0bf3b2b91f1" ], "x": 134, "y": 59, "w": 1032, "h": 342 }, { "id": "4fbf298b16d2175c", "type": "comment", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "Netzfrequenz Überwachung", "info": "", "x": 580, "y": 100, "wires": [] }, { "id": "c8183ed878f00901", "type": "switch", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "Schwellwerte", "property": "payload", "propertyType": "msg", "rules": [ { "t": "lt", "v": "49.850", "vt": "str" }, { "t": "gt", "v": "50.000", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 830, "y": 160, "wires": [ [ "daf1ab2ff2a82e33" ], [] ] }, { "id": "af094afe8cc6365e", "type": "inject", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "Test Telegram", "props": [ { "p": "payload.text", "v": "50.01", "vt": "str" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 470, "y": 360, "wires": [ [ "71c5b266fd4e1dfb" ] ] }, { "id": "71c5b266fd4e1dfb", "type": "function", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "Sende zu Telegram", "func": "var msg1 = msg.payload.text;\nmsg.payload = {}\nmsg.payload.chatId = 617681859\nmsg.payload.type = \"message\"\nmsg.payload.content = \"Aktuelle Netzfrequenz: \" +msg1+\" Hz\";\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 670, "y": 360, "wires": [ [ "e4d1c17a58350d3b" ] ] }, { "id": "daf1ab2ff2a82e33", "type": "change", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "Text Payload", "rules": [ { "t": "move", "p": "payload", "pt": "msg", "to": "payload.text", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1010, "y": 160, "wires": [ [ "a7bf87d44b312b3b" ] ] }, { "id": "1b8c0534a8bf05aa", "type": "inject", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "*/1 0-23 * * *", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 250, "y": 160, "wires": [ [ "c73b80c80340c897" ] ] }, { "id": "9e155d6fc334cfd7", "type": "function", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "Netzfrequenz", "func": "//msg.payload = (msg.payload.results[0].series[0].values[18][1])\n\n// Annahme: msg.payload enthält die Nummer 123456\n// let originalNumber = (msg.payload.results[0].series[0].values[4][1])\nlet originalNumber = (msg.payload[0].Frequency)\n\n// Die Nummer in eine Zeichenkette umwandeln\nlet numberAsString = originalNumber.toString();\n\n// Die ersten drei Ziffern extrahieren\nlet shortenedNumber = numberAsString.substr(0, 6);\n\n\n// Erstellen Sie ein neues Nachrichtenobjekt mit dem gekürzten Wert\nlet newMsg = {\n payload: shortenedNumber\n};\n\n// Rückgabe des neuen Nachrichtenobjekts\nreturn newMsg;\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 650, "y": 160, "wires": [ [ "c8183ed878f00901", "5593b637082408d4", "45d1deed8eb29e0b", "b2c6ca466d31d233", "58b95e250e2977df" ] ] }, { "id": "c73b80c80340c897", "type": "influxdb in", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "influxdb": "e5abf1603d3de1f1", "name": "", "query": "SELECT \"Frequency\" FROM \"autogen\".\"energy\" WHERE (\"meter\" = 'Meter Group 1') AND time >= now() - 5m AND time <= now() ORDER BY time DESC LIMIT 1", "rawOutput": false, "precision": "", "retentionPolicy": "", "org": "organisation", "x": 440, "y": 160, "wires": [ [ "9e155d6fc334cfd7", "c762f0bf3b2b91f1" ] ] }, { "id": "5593b637082408d4", "type": "debug", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "debug 1", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 820, "y": 120, "wires": [] }, { "id": "e4d1c17a58350d3b", "type": "telegram sender", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "", "bot": "5f67fb38.18d094", "haserroroutput": false, "outputs": 1, "x": 880, "y": 360, "wires": [ [] ] }, { "id": "45d1deed8eb29e0b", "type": "ui_gauge", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "", "group": "5606a0cfcaa653f5", "order": 0, "width": 0, "height": 0, "gtype": "gage", "title": "Netzfrequenz", "label": "Hz", "format": "{{value}}", "min": "49", "max": "51", "colors": [ "#cc3333", "#33cc33", "#33cc33" ], "seg1": "49.8", "seg2": "", "diff": false, "className": "", "x": 830, "y": 200, "wires": [] }, { "id": "b2c6ca466d31d233", "type": "ui_chart", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "", "group": "5606a0cfcaa653f5", "order": 1, "width": 0, "height": 0, "label": "Netzfrequenz", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "bezier", "nodata": "", "dot": true, "ymin": "49", "ymax": "51", "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": 830, "y": 240, "wires": [ [] ] }, { "id": "a7bf87d44b312b3b", "type": "link out", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "link out 1", "mode": "link", "links": [ "3683993178d2b5f1" ], "x": 1125, "y": 160, "wires": [] }, { "id": "3683993178d2b5f1", "type": "link in", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "link in 1", "links": [ "a7bf87d44b312b3b" ], "x": 505, "y": 300, "wires": [ [ "71c5b266fd4e1dfb" ] ] }, { "id": "58b95e250e2977df", "type": "mqtt out", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "", "topic": "netz", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "020a2e05c51bd021", "x": 810, "y": 280, "wires": [] }, { "id": "c762f0bf3b2b91f1", "type": "debug", "z": "f271535cb0921814", "g": "cc2580d9d9b74a34", "name": "debug 4", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 620, "y": 240, "wires": [] }, { "id": "e5abf1603d3de1f1", "type": "influxdb", "hostname": "192.168.0.8", "port": "8086", "protocol": "http", "database": "db_meter_home", "name": "DB-Meter Home", "usetls": false, "tls": "", "influxdbVersion": "1.x", "url": "http://localhost:8086", "timeout": "", "rejectUnauthorized": true }, { "id": "5f67fb38.18d094", "type": "telegram bot", "botname": "nodered", "usernames": "", "chatids": "59", "baseapiurl": "", "updatemode": "polling", "pollinterval": "300", "usesocks": false, "sockshost": "", "socksport": "6667", "socksusername": "anonymous", "sockspassword": "", "bothost": "", "botpath": "", "localbotport": "8443", "publicbotport": "8443", "privatekey": "", "certificate": "", "useselfsignedcertificate": false, "sslterminated": false, "verboselogging": false }, { "id": "5606a0cfcaa653f5", "type": "ui_group", "name": "Standard", "tab": "4b174893e72db361", "order": 1, "disp": true, "width": "6", "collapse": false, "className": "" }, { "id": "020a2e05c51bd021", "type": "mqtt-broker", "name": "", "broker": "mqtt.unixweb.eu", "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": "4b174893e72db361", "type": "ui_tab", "name": "Home", "icon": "dashboard", "disabled": false, "hidden": false } ]