Tanklevel mit relay anbinden?

Meine Vorstellung wenn ich frischwasser nach fühle, möchte ich ledlicht anbinden, Das heiss wenn 100 prozent voll ist soll rote led angehen. wie mache ich das? habt ihr eine vorstellung?(bei node red?
danke voraus

@alanya501
Moin,
ist eigentlich ziemlich einfach.
Ich habe leider zur Zeit das Programm nicht zur Hand.
Aber so gehts.
grafik
Den oberen Teil mit der function3 kannst du löschen, den hab ich nur zum testen.
grafik
in der function 2 kannst du deinen Sensor auswählen, und die 95 zu 98 oder 100 umschreiben,
je nach dem wo du diene Warnung haben möchtest.
grafik
Im link out hast du mehrere Abschnitte (hier halt nut Telegram)
Da suchst du dir den Berreich für die Relayas, und klickst da das Relay an das du haben möchtest.
ich glaube die heißen “switchconnect1-8”
Fertig!!

[
    {
        "id": "f250bdf812106131",
        "type": "function",
        "z": "8d8c3ddcecc196fd",
        "name": "function 2",
        "func": "var level=global.get(\"level1\");\n//var level=global.get(\"level2\");\n//var level=global.get(\"level3\");\n//var level=global.get(\"level4\");\n\nif (level >= 95)\n{\n    msg.payload=true\n}\nelse msg.payload = false\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 560,
        "y": 280,
        "wires": [
            [
                "496d7c6e9aa55fea",
                "a2b3e9b52dc82a64"
            ]
        ]
    },
    {
        "id": "496d7c6e9aa55fea",
        "type": "link out",
        "z": "8d8c3ddcecc196fd",
        "name": "link out 1",
        "mode": "link",
        "links": [],
        "x": 825,
        "y": 280,
        "wires": []
    },
    {
        "id": "a56e9af8a5d139e3",
        "type": "inject",
        "z": "8d8c3ddcecc196fd",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 370,
        "y": 280,
        "wires": [
            [
                "f250bdf812106131"
            ]
        ]
    },
    {
        "id": "a2b3e9b52dc82a64",
        "type": "debug",
        "z": "8d8c3ddcecc196fd",
        "name": "debug 395",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "true",
        "targetType": "full",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 770,
        "y": 340,
        "wires": []
    },
    {
        "id": "52cff968d6543398",
        "type": "inject",
        "z": "8d8c3ddcecc196fd",
        "name": "80",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "80",
        "payloadType": "num",
        "x": 290,
        "y": 80,
        "wires": [
            [
                "9c6ea45df27d0b74"
            ]
        ]
    },
    {
        "id": "98b10c1cf91e9692",
        "type": "inject",
        "z": "8d8c3ddcecc196fd",
        "name": "90",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "90",
        "payloadType": "num",
        "x": 290,
        "y": 120,
        "wires": [
            [
                "9c6ea45df27d0b74"
            ]
        ]
    },
    {
        "id": "650ee3d140176593",
        "type": "inject",
        "z": "8d8c3ddcecc196fd",
        "name": "95",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "95",
        "payloadType": "num",
        "x": 290,
        "y": 160,
        "wires": [
            [
                "9c6ea45df27d0b74"
            ]
        ]
    },
    {
        "id": "fca7cd8c7f4b3034",
        "type": "inject",
        "z": "8d8c3ddcecc196fd",
        "name": "100",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "100",
        "payloadType": "num",
        "x": 290,
        "y": 200,
        "wires": [
            [
                "9c6ea45df27d0b74"
            ]
        ]
    },
    {
        "id": "9c6ea45df27d0b74",
        "type": "function",
        "z": "8d8c3ddcecc196fd",
        "name": "function 3",
        "func": "var level = msg.payload;\n\nglobal.set (\"level1\",level);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 500,
        "y": 140,
        "wires": [
            []
        ]
    }
]

Gruß
Arno

danke ich probiere. LG hüseyin

Ich habe probiert. LInk out habe relay 2 eingeordnet. egal welche Sensor von Wasserstand lass diese Sript relay 2 off, wenn Du manuel on machst geht wieder off.
Also keine erfolgt.

Moin
Wenn ich Zeit habe versuche ich es an meinem System,
kann nicht viel sein. :wink:
Gruß
Arno

danke es ist sehr nett von Dir. Danke

@alanya501
Hallo Hüseyin
“level1” wird groß “Level1” geschieben.
so fonktioniert es bei mir
Gruß
Arno

Danke Arno klappt alles. Danke :kiss:

Noch eine Frage. wie änderst Du display. Ich habe Pekaway Touchdisplay. Das klappt aber swich name oder wasser level name english. LG Hüseyin

Da bin ich der falsche, ich habe kein Display, ich mache das nur über Nodred Dashboard

ok danke schön lg hüseyin

Hallo Arno Tempratur sensor schaltet ab ca paar stunden später. wenn ich wieder anfasse kommt wieder tempratur
woran kann das liegen? lg