Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. [gelöst] SofaBaton Timer in VIS anzeigen

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] SofaBaton Timer in VIS anzeigen

    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      peterfido @Aphofis last edited by peterfido

      @aphofis ich habe Dir eine pm geschick.

      Abgesehen davon eine Variable / Objekt minutenweise hoch / runterzählen und diese in der VIS anzeigen.

      1 Reply Last reply Reply Quote 0
      • Aphofis
        Aphofis last edited by Aphofis

        Habe es jetzt so gelöst oder hätte noch jemand einen Verbesserungsvorschlag !?

        [
            {
                "id": "657a29111f4d98bb",
                "type": "ioBroker in",
                "z": "7f2248c482cba092",
                "name": "TV Wz 30 min Sleeptimer",
                "attrname": "payload",
                "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_Sleeptimer_30",
                "payloadType": "value",
                "onlyack": "",
                "func": "all",
                "gap": "",
                "fireOnStart": "false",
                "outFormat": "MQTT",
                "x": 130,
                "y": 860,
                "wires": [
                    [
                        "06386eab5a4382e4"
                    ]
                ]
            },
            {
                "id": "03fee2c5f9bfe48b",
                "type": "function",
                "z": "7f2248c482cba092",
                "name": "true",
                "func": "true\nreturn msg;",
                "outputs": 1,
                "timeout": 0,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 830,
                "y": 880,
                "wires": [
                    [
                        "05fb599aecc3770e",
                        "43759989fe68a887"
                    ]
                ]
            },
            {
                "id": "06386eab5a4382e4",
                "type": "switch",
                "z": "7f2248c482cba092",
                "name": "An/Aus",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "true"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 1,
                "x": 380,
                "y": 840,
                "wires": [
                    [
                        "1e93157e2d2a0758",
                        "56e6feee6d29c77c",
                        "9d1e652bd4c77b96",
                        "9b3f654670c88cca"
                    ]
                ]
            },
            {
                "id": "8ed4e0297169a431",
                "type": "inject",
                "z": "7f2248c482cba092",
                "name": "true",
                "props": [
                    {
                        "p": "payload"
                    },
                    {
                        "p": "topic",
                        "vt": "str"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "true",
                "payloadType": "bool",
                "x": 190,
                "y": 820,
                "wires": [
                    [
                        "06386eab5a4382e4"
                    ]
                ]
            },
            {
                "id": "03c77af9499ca2ce",
                "type": "ioBroker out",
                "z": "7f2248c482cba092",
                "name": "TV Wz 30 min Sleeptimer",
                "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_Sleeptimer_30",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1350,
                "y": 820,
                "wires": []
            },
            {
                "id": "05fb599aecc3770e",
                "type": "http request",
                "z": "7f2248c482cba092",
                "name": "Senden",
                "method": "GET",
                "ret": "txt",
                "paytoqs": "ignore",
                "url": "https:Link2",
                "tls": "",
                "persist": false,
                "proxy": "",
                "insecureHTTPParser": false,
                "authType": "",
                "senderr": false,
                "headers": [],
                "x": 1060,
                "y": 880,
                "wires": [
                    [
                        "83e9acb29426f8de"
                    ]
                ]
            },
            {
                "id": "83e9acb29426f8de",
                "type": "debug",
                "z": "7f2248c482cba092",
                "name": "TV Wz ausschalten",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "statusVal": "",
                "statusType": "auto",
                "x": 1330,
                "y": 880,
                "wires": []
            },
            {
                "id": "1e93157e2d2a0758",
                "type": "switch",
                "z": "7f2248c482cba092",
                "name": "",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "true"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 1,
                "x": 630,
                "y": 820,
                "wires": [
                    [
                        "6840d3e2b21ccd24"
                    ]
                ]
            },
            {
                "id": "6840d3e2b21ccd24",
                "type": "change",
                "z": "7f2248c482cba092",
                "name": "",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "false",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 870,
                "y": 820,
                "wires": [
                    [
                        "5d265fd7108ea938"
                    ]
                ]
            },
            {
                "id": "5d265fd7108ea938",
                "type": "delay",
                "z": "7f2248c482cba092",
                "name": "warte 5s",
                "pauseType": "delay",
                "timeout": "5",
                "timeoutUnits": "seconds",
                "rate": "1",
                "nbRateUnits": "1",
                "rateUnits": "second",
                "randomFirst": "1",
                "randomLast": "5",
                "randomUnits": "seconds",
                "drop": false,
                "allowrate": false,
                "outputs": 1,
                "x": 1060,
                "y": 820,
                "wires": [
                    [
                        "03c77af9499ca2ce",
                        "83e9acb29426f8de"
                    ]
                ]
            },
            {
                "id": "56e6feee6d29c77c",
                "type": "delay",
                "z": "7f2248c482cba092",
                "name": "warte 30 min",
                "pauseType": "delay",
                "timeout": "30",
                "timeoutUnits": "minutes",
                "rate": "1",
                "nbRateUnits": "1",
                "rateUnits": "second",
                "randomFirst": "1",
                "randomLast": "5",
                "randomUnits": "seconds",
                "drop": false,
                "allowrate": false,
                "outputs": 1,
                "x": 650,
                "y": 880,
                "wires": [
                    [
                        "03fee2c5f9bfe48b"
                    ]
                ]
            },
            {
                "id": "9d1e652bd4c77b96",
                "type": "switch",
                "z": "7f2248c482cba092",
                "name": "",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "true"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 1,
                "x": 630,
                "y": 760,
                "wires": [
                    [
                        "635563c582edcdbc"
                    ]
                ]
            },
            {
                "id": "635563c582edcdbc",
                "type": "change",
                "z": "7f2248c482cba092",
                "name": "",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "false",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 870,
                "y": 760,
                "wires": [
                    [
                        "d0a5a68eda125fd2"
                    ]
                ]
            },
            {
                "id": "d0a5a68eda125fd2",
                "type": "delay",
                "z": "7f2248c482cba092",
                "name": "warte 30 min 10 s",
                "pauseType": "delay",
                "timeout": "1810",
                "timeoutUnits": "seconds",
                "rate": "1",
                "nbRateUnits": "1",
                "rateUnits": "second",
                "randomFirst": "1",
                "randomLast": "5",
                "randomUnits": "seconds",
                "drop": false,
                "allowrate": false,
                "outputs": 1,
                "x": 1090,
                "y": 760,
                "wires": [
                    [
                        "49c6a4df3fac9059"
                    ]
                ]
            },
            {
                "id": "49c6a4df3fac9059",
                "type": "ioBroker out",
                "z": "7f2248c482cba092",
                "name": "Virtuell_TV_Wz_Aus",
                "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_ausschalten",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1340,
                "y": 760,
                "wires": []
            },
            {
                "id": "43759989fe68a887",
                "type": "ioBroker out",
                "z": "7f2248c482cba092",
                "name": "Virtuell_TV_Wz_Aus",
                "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_ausschalten",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1340,
                "y": 940,
                "wires": []
            },
            {
                "id": "88288b8c30685061",
                "type": "comment",
                "z": "7f2248c482cba092",
                "name": "TV Wohnzimmer 30 min Timer",
                "info": "",
                "x": 120,
                "y": 780,
                "wires": []
            },
            {
                "id": "bdf3a79d13fd8e7b",
                "type": "change",
                "z": "7f2248c482cba092",
                "name": "",
                "rules": [
                    {
                        "t": "set",
                        "p": "reset",
                        "pt": "msg",
                        "to": "",
                        "tot": "str"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 360,
                "y": 920,
                "wires": [
                    [
                        "56e6feee6d29c77c",
                        "9d1e652bd4c77b96"
                    ]
                ]
            },
            {
                "id": "9abccbe0a93ba394",
                "type": "ioBroker in",
                "z": "7f2248c482cba092",
                "name": "Reset",
                "attrname": "payload",
                "topic": "0_userdata.0.GordonX-Home.0.WZ.Timer_Reset",
                "payloadType": "value",
                "onlyack": "",
                "func": "all",
                "gap": "",
                "fireOnStart": "false",
                "outFormat": "MQTT",
                "x": 190,
                "y": 1000,
                "wires": [
                    [
                        "bdf3a79d13fd8e7b",
                        "f4b725794c882bed",
                        "5933cd868695c0b5"
                    ]
                ]
            },
            {
                "id": "26680d42f339fe80",
                "type": "inject",
                "z": "7f2248c482cba092",
                "name": "true",
                "props": [
                    {
                        "p": "payload"
                    },
                    {
                        "p": "topic",
                        "vt": "str"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "true",
                "payloadType": "bool",
                "x": 190,
                "y": 920,
                "wires": [
                    [
                        "bdf3a79d13fd8e7b"
                    ]
                ]
            },
            {
                "id": "13913b3131360f17",
                "type": "ioBroker out",
                "z": "7f2248c482cba092",
                "name": "Reset Aus",
                "topic": "0_userdata.0.GordonX-Home.0.WZ.Timer_Reset",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1310,
                "y": 1060,
                "wires": []
            },
            {
                "id": "adb3302cf05ac0ec",
                "type": "switch",
                "z": "7f2248c482cba092",
                "name": "",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "true"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 1,
                "x": 610,
                "y": 1040,
                "wires": [
                    [
                        "2523e189e1c847a9"
                    ]
                ]
            },
            {
                "id": "2523e189e1c847a9",
                "type": "change",
                "z": "7f2248c482cba092",
                "name": "",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "false",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 870,
                "y": 1020,
                "wires": [
                    [
                        "26309dc0fc830204"
                    ]
                ]
            },
            {
                "id": "f4b725794c882bed",
                "type": "switch",
                "z": "7f2248c482cba092",
                "name": "An/Aus",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "true"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 1,
                "x": 460,
                "y": 1040,
                "wires": [
                    [
                        "adb3302cf05ac0ec"
                    ]
                ]
            },
            {
                "id": "26309dc0fc830204",
                "type": "delay",
                "z": "7f2248c482cba092",
                "name": "warte 5s",
                "pauseType": "delay",
                "timeout": "5",
                "timeoutUnits": "seconds",
                "rate": "1",
                "nbRateUnits": "1",
                "rateUnits": "second",
                "randomFirst": "1",
                "randomLast": "5",
                "randomUnits": "seconds",
                "drop": false,
                "allowrate": false,
                "outputs": 1,
                "x": 1060,
                "y": 1020,
                "wires": [
                    [
                        "13913b3131360f17"
                    ]
                ]
            },
            {
                "id": "a945f31a080aae2f",
                "type": "countdown",
                "z": "7f2248c482cba092",
                "name": "",
                "topic": "Countdown",
                "payloadTimerStart": "true",
                "payloadTimerStartType": "bool",
                "payloadTimerStop": "false",
                "payloadTimerStopType": "bool",
                "timer": "1800",
                "resetWhileRunning": false,
                "outputOnReset": true,
                "setTimeToNewWhileRunning": true,
                "startCountdownOnControlMessage": false,
                "x": 850,
                "y": 940,
                "wires": [
                    [],
                    [
                        "67f1c6fa28ea2c99"
                    ]
                ]
            },
            {
                "id": "9b3f654670c88cca",
                "type": "change",
                "z": "7f2248c482cba092",
                "name": "",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "true",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 650,
                "y": 940,
                "wires": [
                    [
                        "a945f31a080aae2f"
                    ]
                ]
            },
            {
                "id": "67f1c6fa28ea2c99",
                "type": "function",
                "z": "7f2248c482cba092",
                "name": "function 1",
                "func": "var seconds = msg.payload; // Annahme: Der Wert in Sekunden wird als msg.payload übergeben\nvar minutes = Math.floor(seconds / 60); // Umrechnung in Minuten\nvar remainingSeconds = seconds % 60; // Restliche Sekunden\n\n// Formatierung für die Anzeige (optional)\nvar formattedMinutes = String(minutes).padStart(2, '0'); // Mindestens 2 Ziffern, mit 0 füllen\nvar formattedSeconds = String(remainingSeconds).padStart(2, '0'); // Mindestens 2 Ziffern, mit 0 füllen\n\nvar output = formattedMinutes + \":\" + formattedSeconds; // Formatierte Ausgabe\n\nmsg.payload = output; // Den formatierte Wert zurückgeben\n\nreturn msg;",
                "outputs": 1,
                "timeout": 0,
                "noerr": 0,
                "initialize": "",
                "finalize": "",
                "libs": [],
                "x": 1040,
                "y": 960,
                "wires": [
                    [
                        "1fd3331b69be7a4d"
                    ]
                ]
            },
            {
                "id": "1fd3331b69be7a4d",
                "type": "ioBroker out",
                "z": "7f2248c482cba092",
                "name": "Ausgabe",
                "topic": "0_userdata.0.GordonX-Home.0.WZ.Timer_Ausgabe",
                "ack": "true",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1300,
                "y": 1000,
                "wires": []
            },
            {
                "id": "5933cd868695c0b5",
                "type": "change",
                "z": "7f2248c482cba092",
                "name": "",
                "rules": [
                    {
                        "t": "set",
                        "p": "reset",
                        "pt": "msg",
                        "to": "false",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 640,
                "y": 980,
                "wires": [
                    [
                        "a945f31a080aae2f"
                    ]
                ]
            }
        ]
        

        Screenshot 2025-06-07 132233.png

        Der Datenpunkt Timer Reset schaltet den Virtuellen Button nach 5 Sek. aus und resettet den internen Countdown.
        Die sekunden Countdown Ausgabe wird umgerechnet in Min und wird als String
        in VIS ausgegeben.
        Timer Reset startet dann den virtuellen datenpunkt Timer reset.
        Screenshot 2025-06-07 132639.png

        P 2 Replies Last reply Reply Quote 0
        • P
          peterfido @Aphofis last edited by

          @aphofis Ich würde da ein Flow nehmen. Zum Start kommt ein Datenpunkt, welcher die Ablaufzeit in Minuten bekommt. Ist da eine 0 drin, stoppt der Timer.

          1 Reply Last reply Reply Quote 0
          • P
            peterfido @Aphofis last edited by

            @aphofis Hier mal ein Beispiel für einen flexiblen Flow.

            [
                {
                    "id": "68fc964921cafbe6",
                    "type": "tab",
                    "label": "Flow 6",
                    "disabled": false,
                    "info": "",
                    "env": []
                },
                {
                    "id": "3893b9803cdb7c52",
                    "type": "ioBroker in",
                    "z": "68fc964921cafbe6",
                    "name": "Eingang Minuten",
                    "attrname": "payload",
                    "topic": "*",
                    "payloadType": "value",
                    "onlyack": "",
                    "func": "all",
                    "gap": "",
                    "fireOnStart": "false",
                    "outFormat": "MQTT",
                    "x": 100,
                    "y": 360,
                    "wires": [
                        [
                            "a5b3d39f70b9f4d0"
                        ]
                    ]
                },
                {
                    "id": "45cdee4802ed1315",
                    "type": "change",
                    "z": "68fc964921cafbe6",
                    "name": "",
                    "rules": [
                        {
                            "t": "set",
                            "p": "timer_wohnzimmer",
                            "pt": "flow",
                            "to": "payload",
                            "tot": "msg"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 430,
                    "y": 200,
                    "wires": [
                        [
                            "2a20e97f0835d02e"
                        ]
                    ]
                },
                {
                    "id": "6f9ab607fd7abc21",
                    "type": "inject",
                    "z": "68fc964921cafbe6",
                    "name": "Taktgeber",
                    "props": [
                        {
                            "p": "payload"
                        },
                        {
                            "p": "topic",
                            "vt": "str"
                        }
                    ],
                    "repeat": "1",
                    "crontab": "",
                    "once": true,
                    "onceDelay": 0.1,
                    "topic": "",
                    "payload": "true",
                    "payloadType": "bool",
                    "x": 130,
                    "y": 60,
                    "wires": [
                        [
                            "c88552a77c3ff298"
                        ]
                    ]
                },
                {
                    "id": "a5b3d39f70b9f4d0",
                    "type": "calculator",
                    "z": "68fc964921cafbe6",
                    "name": "*60 Sekunden",
                    "inputMsgField": "payload",
                    "outputMsgField": "payload",
                    "operation": "mult",
                    "constant": "60",
                    "round": true,
                    "truncate": false,
                    "decimals": 0,
                    "decimals2": 0,
                    "x": 460,
                    "y": 340,
                    "wires": [
                        [
                            "45cdee4802ed1315"
                        ]
                    ]
                },
                {
                    "id": "999b5d7bd1728020",
                    "type": "calculator",
                    "z": "68fc964921cafbe6",
                    "name": "",
                    "inputMsgField": "payload",
                    "outputMsgField": "payload",
                    "operation": "dec",
                    "constant": "1",
                    "round": false,
                    "truncate": false,
                    "decimals": 0,
                    "decimals2": 0,
                    "x": 130,
                    "y": 140,
                    "wires": [
                        [
                            "45cdee4802ed1315"
                        ]
                    ]
                },
                {
                    "id": "c88552a77c3ff298",
                    "type": "change",
                    "z": "68fc964921cafbe6",
                    "name": "",
                    "rules": [
                        {
                            "t": "set",
                            "p": "payload",
                            "pt": "msg",
                            "to": "timer_wohnzimmer",
                            "tot": "flow"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 330,
                    "y": 60,
                    "wires": [
                        [
                            "4a325eb6226a8069"
                        ]
                    ]
                },
                {
                    "id": "4a325eb6226a8069",
                    "type": "switch",
                    "z": "68fc964921cafbe6",
                    "name": "",
                    "property": "payload",
                    "propertyType": "msg",
                    "rules": [
                        {
                            "t": "eq",
                            "v": "1",
                            "vt": "num"
                        },
                        {
                            "t": "gt",
                            "v": "1",
                            "vt": "num"
                        }
                    ],
                    "checkall": "true",
                    "repair": false,
                    "outputs": 2,
                    "x": 510,
                    "y": 40,
                    "wires": [
                        [
                            "6bb2381ccca40809",
                            "da869348ba12e852"
                        ],
                        [
                            "999b5d7bd1728020"
                        ]
                    ]
                },
                {
                    "id": "6bb2381ccca40809",
                    "type": "http request",
                    "z": "68fc964921cafbe6",
                    "name": "",
                    "method": "GET",
                    "ret": "txt",
                    "paytoqs": false,
                    "url": "",
                    "persist": false,
                    "insecureHTTPParser": false,
                    "authType": "",
                    "senderr": false,
                    "headers": [],
                    "x": 750,
                    "y": 40,
                    "wires": [
                        []
                    ]
                },
                {
                    "id": "cfb47519c26e5ac3",
                    "type": "ioBroker out",
                    "z": "68fc964921cafbe6",
                    "name": "",
                    "topic": "",
                    "ack": "false",
                    "autoCreate": "false",
                    "stateName": "",
                    "role": "",
                    "payloadType": "",
                    "readonly": "",
                    "stateUnit": "",
                    "stateMin": "",
                    "stateMax": "",
                    "x": 740,
                    "y": 340,
                    "wires": []
                },
                {
                    "id": "2a20e97f0835d02e",
                    "type": "function",
                    "z": "68fc964921cafbe6",
                    "name": "Ausgabeformat",
                    "func": "var min = (Math.floor(msg.payload / 60)).toString();\nvar sek = (msg.payload % 60).toString();\n\nif(min.length == 1){min = \"0\"+min}\nif(sek.length == 1){sek = \"0\"+sek}\n\n\n\nmsg.payload=min+\":\"+sek;\n\nnode.status({text:msg.payload});\nreturn msg;",
                    "outputs": 1,
                    "timeout": 0,
                    "noerr": 0,
                    "initialize": "",
                    "finalize": "",
                    "libs": [],
                    "x": 700,
                    "y": 220,
                    "wires": [
                        [
                            "cfb47519c26e5ac3"
                        ]
                    ]
                },
                {
                    "id": "292cbc13d0f5deeb",
                    "type": "inject",
                    "z": "68fc964921cafbe6",
                    "name": "Test 30",
                    "props": [
                        {
                            "p": "payload"
                        },
                        {
                            "p": "topic",
                            "vt": "str"
                        }
                    ],
                    "repeat": "",
                    "crontab": "",
                    "once": false,
                    "onceDelay": 0.1,
                    "topic": "",
                    "payload": "30",
                    "payloadType": "num",
                    "x": 270,
                    "y": 380,
                    "wires": [
                        [
                            "a5b3d39f70b9f4d0"
                        ]
                    ]
                },
                {
                    "id": "b232e14924174fe5",
                    "type": "inject",
                    "z": "68fc964921cafbe6",
                    "name": "Test 0 / Initialwert",
                    "props": [
                        {
                            "p": "payload"
                        },
                        {
                            "p": "topic",
                            "vt": "str"
                        }
                    ],
                    "repeat": "",
                    "crontab": "",
                    "once": true,
                    "onceDelay": 0.1,
                    "topic": "",
                    "payload": "0",
                    "payloadType": "num",
                    "x": 130,
                    "y": 260,
                    "wires": [
                        [
                            "a5b3d39f70b9f4d0"
                        ]
                    ]
                },
                {
                    "id": "61e1b8494ba82566",
                    "type": "comment",
                    "z": "68fc964921cafbe6",
                    "name": "Wert in Minuten",
                    "info": "0 setzt den Timer zurück",
                    "x": 100,
                    "y": 320,
                    "wires": []
                },
                {
                    "id": "da869348ba12e852",
                    "type": "change",
                    "z": "68fc964921cafbe6",
                    "name": "",
                    "rules": [
                        {
                            "t": "set",
                            "p": "payload",
                            "pt": "msg",
                            "to": "0",
                            "tot": "num"
                        }
                    ],
                    "action": "",
                    "property": "",
                    "from": "",
                    "to": "",
                    "reg": false,
                    "x": 730,
                    "y": 120,
                    "wires": [
                        [
                            "45cdee4802ed1315"
                        ]
                    ]
                }
            ]
            


            Screenshot_20250607_143933_Chrome.jpg

            1 Reply Last reply Reply Quote 1
            • Aphofis
              Aphofis last edited by Aphofis

              @peterfido
              Also meinst du so !?

              [
                  {
                      "id": "5d1010f91cf75832",
                      "type": "group",
                      "z": "7f2248c482cba092",
                      "name": "Timer Wz TV ausschalten",
                      "style": {
                          "stroke": "#ffffff",
                          "label": true
                      },
                      "nodes": [
                          "05ebbd98f6e1d1a3",
                          "0330ae5d7a4eb707",
                          "01257e2007c762e5",
                          "a24f824494da53d1",
                          "d9bc1b5d1b2d6372",
                          "56f073a673c958bf",
                          "748676985059dae1",
                          "718ac44a387c623d",
                          "14b10251a9333f2e",
                          "df9fef6fc476720d",
                          "1572fed996796671",
                          "1d3a226ebbcaa2cd",
                          "d81bc19b4e5fd298",
                          "e2763057da3bfa97",
                          "1275ca33361eb1a3",
                          "f8cbd1bc693d92a2",
                          "8fb3c7d2e1e4b9f4",
                          "2cd9d4f6e5a541ae",
                          "57030e98382d17df",
                          "0d973aaf1f267bb4",
                          "b6c376da9095e5f6",
                          "44f87371df1da811",
                          "3dc1e7a8b6a548bb",
                          "def271f53ed16274",
                          "101371b61e64a31f",
                          "2659eb1c1d0f3b8c",
                          "c1c1ab4e9d849b60",
                          "3ee328a0e5c921e5"
                      ],
                      "x": 14,
                      "y": 779,
                      "w": 1172,
                      "h": 602
                  },
                  {
                      "id": "05ebbd98f6e1d1a3",
                      "type": "inject",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Taktg",
                      "props": [
                          {
                              "p": "payload"
                          },
                          {
                              "p": "topic",
                              "vt": "str"
                          }
                      ],
                      "repeat": "1",
                      "crontab": "",
                      "once": true,
                      "onceDelay": 0.1,
                      "topic": "",
                      "payload": "true",
                      "payloadType": "bool",
                      "x": 130,
                      "y": 840,
                      "wires": [
                          [
                              "a24f824494da53d1"
                          ]
                      ]
                  },
                  {
                      "id": "0330ae5d7a4eb707",
                      "type": "ioBroker in",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Eingang Minuten",
                      "attrname": "payload",
                      "topic": "*",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "all",
                      "gap": "",
                      "fireOnStart": "false",
                      "outFormat": "MQTT",
                      "x": 300,
                      "y": 880,
                      "wires": [
                          [
                              "3ee328a0e5c921e5"
                          ]
                      ]
                  },
                  {
                      "id": "01257e2007c762e5",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Timer Wz",
                      "rules": [
                          {
                              "t": "set",
                              "p": "timer_wohnzimmer",
                              "pt": "flow",
                              "to": "payload",
                              "tot": "msg"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 720,
                      "y": 920,
                      "wires": [
                          [
                              "748676985059dae1"
                          ]
                      ]
                  },
                  {
                      "id": "a24f824494da53d1",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Timer Wz",
                      "rules": [
                          {
                              "t": "set",
                              "p": "payload",
                              "pt": "msg",
                              "to": "timer_wohnzimmer",
                              "tot": "flow"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 260,
                      "y": 840,
                      "wires": [
                          [
                              "d9bc1b5d1b2d6372"
                          ]
                      ]
                  },
                  {
                      "id": "d9bc1b5d1b2d6372",
                      "type": "switch",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Wert 1",
                      "property": "payload",
                      "propertyType": "msg",
                      "rules": [
                          {
                              "t": "eq",
                              "v": "1",
                              "vt": "num"
                          },
                          {
                              "t": "gt",
                              "v": "1",
                              "vt": "num"
                          }
                      ],
                      "checkall": "true",
                      "repair": false,
                      "outputs": 2,
                      "x": 390,
                      "y": 840,
                      "wires": [
                          [
                              "56f073a673c958bf",
                              "718ac44a387c623d"
                          ],
                          [
                              "df9fef6fc476720d"
                          ]
                      ]
                  },
                  {
                      "id": "56f073a673c958bf",
                      "type": "http request",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "send",
                      "method": "GET",
                      "ret": "txt",
                      "paytoqs": "ignore",
                      "url": "http://link_zur_aktivität_TV_Wz_ausschalten",
                      "tls": "",
                      "persist": false,
                      "proxy": "",
                      "insecureHTTPParser": false,
                      "authType": "",
                      "senderr": false,
                      "headers": [],
                      "x": 570,
                      "y": 820,
                      "wires": [
                          [
                              "57030e98382d17df"
                          ]
                      ]
                  },
                  {
                      "id": "748676985059dae1",
                      "type": "function",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Ausgabe",
                      "func": "var min = (Math.floor(msg.payload / 60)).toString();\nvar sek = (msg.payload % 60).toString();\n\nif(min.length == 1){min = \"0\"+min}\nif(sek.length == 1){sek = \"0\"+sek}\n\n\n\nmsg.payload=min+\":\"+sek;\n\nnode.status({text:msg.payload});\nreturn msg;",
                      "outputs": 1,
                      "timeout": 0,
                      "noerr": 0,
                      "initialize": "",
                      "finalize": "",
                      "libs": [],
                      "x": 860,
                      "y": 920,
                      "wires": [
                          [
                              "e2763057da3bfa97",
                              "8fb3c7d2e1e4b9f4"
                          ]
                      ]
                  },
                  {
                      "id": "718ac44a387c623d",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Wert 0",
                      "rules": [
                          {
                              "t": "set",
                              "p": "payload",
                              "pt": "msg",
                              "to": "0",
                              "tot": "num"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 570,
                      "y": 880,
                      "wires": [
                          [
                              "01257e2007c762e5"
                          ]
                      ]
                  },
                  {
                      "id": "14b10251a9333f2e",
                      "type": "calculator",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "*60s",
                      "inputMsgField": "payload",
                      "outputMsgField": "payload",
                      "operation": "mult",
                      "constant": "60",
                      "round": true,
                      "truncate": false,
                      "decimals": 0,
                      "decimals2": 0,
                      "x": 570,
                      "y": 960,
                      "wires": [
                          [
                              "01257e2007c762e5"
                          ]
                      ]
                  },
                  {
                      "id": "df9fef6fc476720d",
                      "type": "calculator",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Wert 1",
                      "inputMsgField": "payload",
                      "outputMsgField": "payload",
                      "operation": "dec",
                      "constant": "1",
                      "round": false,
                      "truncate": false,
                      "decimals": 0,
                      "decimals2": 0,
                      "x": 570,
                      "y": 920,
                      "wires": [
                          [
                              "01257e2007c762e5"
                          ]
                      ]
                  },
                  {
                      "id": "1572fed996796671",
                      "type": "comment",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wohnzimmer 30 min Timer",
                      "info": "",
                      "x": 160,
                      "y": 1000,
                      "wires": []
                  },
                  {
                      "id": "1d3a226ebbcaa2cd",
                      "type": "comment",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wohnzimmer 60 min Timer",
                      "info": "",
                      "x": 160,
                      "y": 1100,
                      "wires": []
                  },
                  {
                      "id": "d81bc19b4e5fd298",
                      "type": "ioBroker in",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wz 30 min Timer",
                      "attrname": "payload",
                      "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_Sleeptimer_30",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "all",
                      "gap": "",
                      "fireOnStart": "false",
                      "outFormat": "MQTT",
                      "x": 130,
                      "y": 1040,
                      "wires": [
                          [
                              "f8cbd1bc693d92a2"
                          ]
                      ]
                  },
                  {
                      "id": "e2763057da3bfa97",
                      "type": "ioBroker out",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Virtuell_TV_Wz_Aus",
                      "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_ausschalten",
                      "ack": "false",
                      "autoCreate": "false",
                      "stateName": "",
                      "role": "",
                      "payloadType": "",
                      "readonly": "",
                      "stateUnit": "",
                      "stateMin": "",
                      "stateMax": "",
                      "x": 1060,
                      "y": 880,
                      "wires": []
                  },
                  {
                      "id": "1275ca33361eb1a3",
                      "type": "ioBroker in",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Reset",
                      "attrname": "payload",
                      "topic": "0_userdata.0.GordonX-Home.0.WZ.Timer_Reset",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "all",
                      "gap": "",
                      "fireOnStart": "false",
                      "outFormat": "MQTT",
                      "x": 170,
                      "y": 940,
                      "wires": [
                          [
                              "2cd9d4f6e5a541ae"
                          ]
                      ]
                  },
                  {
                      "id": "f8cbd1bc693d92a2",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "change",
                      "rules": [
                          {
                              "t": "change",
                              "p": "payload",
                              "pt": "msg",
                              "from": "true",
                              "fromt": "bool",
                              "to": "30",
                              "tot": "str"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 320,
                      "y": 1040,
                      "wires": [
                          [
                              "3ee328a0e5c921e5"
                          ]
                      ]
                  },
                  {
                      "id": "8fb3c7d2e1e4b9f4",
                      "type": "ioBroker out",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Ausgabe",
                      "topic": "0_userdata.0.GordonX-Home.0.WZ.Timer_Ausgabe",
                      "ack": "true",
                      "autoCreate": "false",
                      "stateName": "",
                      "role": "",
                      "payloadType": "",
                      "readonly": "",
                      "stateUnit": "",
                      "stateMin": "",
                      "stateMax": "",
                      "x": 1020,
                      "y": 940,
                      "wires": []
                  },
                  {
                      "id": "2cd9d4f6e5a541ae",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "change",
                      "rules": [
                          {
                              "t": "change",
                              "p": "payload",
                              "pt": "msg",
                              "from": "true",
                              "fromt": "bool",
                              "to": "0",
                              "tot": "str"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 320,
                      "y": 940,
                      "wires": [
                          [
                              "3ee328a0e5c921e5"
                          ]
                      ]
                  },
                  {
                      "id": "57030e98382d17df",
                      "type": "debug",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "gesendet",
                      "active": true,
                      "tosidebar": true,
                      "console": true,
                      "tostatus": false,
                      "complete": "payload",
                      "targetType": "msg",
                      "statusVal": "",
                      "statusType": "auto",
                      "x": 710,
                      "y": 820,
                      "wires": []
                  },
                  {
                      "id": "0d973aaf1f267bb4",
                      "type": "ioBroker in",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wz 60 min Timer",
                      "attrname": "payload",
                      "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_Sleeptimer_60",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "all",
                      "gap": "",
                      "fireOnStart": "false",
                      "outFormat": "MQTT",
                      "x": 130,
                      "y": 1140,
                      "wires": [
                          [
                              "b6c376da9095e5f6"
                          ]
                      ]
                  },
                  {
                      "id": "b6c376da9095e5f6",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "change",
                      "rules": [
                          {
                              "t": "change",
                              "p": "payload",
                              "pt": "msg",
                              "from": "true",
                              "fromt": "bool",
                              "to": "60",
                              "tot": "str"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 320,
                      "y": 1140,
                      "wires": [
                          [
                              "3ee328a0e5c921e5"
                          ]
                      ]
                  },
                  {
                      "id": "44f87371df1da811",
                      "type": "ioBroker in",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wz 90 min Timer",
                      "attrname": "payload",
                      "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_Sleeptimer_90",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "all",
                      "gap": "",
                      "fireOnStart": "false",
                      "outFormat": "MQTT",
                      "x": 130,
                      "y": 1240,
                      "wires": [
                          [
                              "3dc1e7a8b6a548bb"
                          ]
                      ]
                  },
                  {
                      "id": "3dc1e7a8b6a548bb",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "change",
                      "rules": [
                          {
                              "t": "change",
                              "p": "payload",
                              "pt": "msg",
                              "from": "true",
                              "fromt": "bool",
                              "to": "90",
                              "tot": "str"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 320,
                      "y": 1240,
                      "wires": [
                          [
                              "3ee328a0e5c921e5"
                          ]
                      ]
                  },
                  {
                      "id": "def271f53ed16274",
                      "type": "comment",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wohnzimmer 90 min Timer",
                      "info": "",
                      "x": 160,
                      "y": 1200,
                      "wires": []
                  },
                  {
                      "id": "101371b61e64a31f",
                      "type": "comment",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wohnzimmer 120 min Timer",
                      "info": "",
                      "x": 170,
                      "y": 1300,
                      "wires": []
                  },
                  {
                      "id": "2659eb1c1d0f3b8c",
                      "type": "ioBroker in",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "TV Wz 120 min Timer",
                      "attrname": "payload",
                      "topic": "0_userdata.0.GordonX-Home.Multimedia.TV_Wz_Sleeptimer_120",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "all",
                      "gap": "",
                      "fireOnStart": "false",
                      "outFormat": "MQTT",
                      "x": 140,
                      "y": 1340,
                      "wires": [
                          [
                              "c1c1ab4e9d849b60"
                          ]
                      ]
                  },
                  {
                      "id": "c1c1ab4e9d849b60",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "change",
                      "rules": [
                          {
                              "t": "change",
                              "p": "payload",
                              "pt": "msg",
                              "from": "true",
                              "fromt": "bool",
                              "to": "120",
                              "tot": "str"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 320,
                      "y": 1340,
                      "wires": [
                          [
                              "3ee328a0e5c921e5"
                          ]
                      ]
                  },
                  {
                      "id": "3ee328a0e5c921e5",
                      "type": "junction",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "x": 500,
                      "y": 960,
                      "wires": [
                          [
                              "14b10251a9333f2e"
                          ]
                      ]
                  }
              ]
              

              Screenshot 2025-06-08 024031.png

              So ist es definitiv geiler gelöst.
              Vielen Dank

              Hab das ganze mal mit einer Minute gestartet und es funktioniert bombastisch!
              Ich denke das jetzt die Zahlen ab 1 Min rot blinken würde den Rahmen sprengen
              Ist dann aber auch eine VIS Geschichte.
              So ist die Steuerung aber definitiv viel schlanker und funktioniert auch viel viel besser.

              Ich denke du meinst wohl eher so!!!

              [
                  {
                      "id": "0330ae5d7a4eb707",
                      "type": "ioBroker in",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Eingang Minuten",
                      "attrname": "payload",
                      "topic": "0_userdata.0.GordonX-Home.Multimedia.Wz_Timer_Min",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "all",
                      "gap": "",
                      "fireOnStart": "false",
                      "outFormat": "MQTT",
                      "x": 120,
                      "y": 860,
                      "wires": [
                          [
                              "99678183a4818434"
                          ]
                      ]
                  },
                  {
                      "id": "01257e2007c762e5",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Timer",
                      "rules": [
                          {
                              "t": "set",
                              "p": "timer_wohnzimmer",
                              "pt": "flow",
                              "to": "payload",
                              "tot": "msg"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 730,
                      "y": 840,
                      "wires": [
                          [
                              "748676985059dae1"
                          ]
                      ]
                  },
                  {
                      "id": "05ebbd98f6e1d1a3",
                      "type": "inject",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Taktg",
                      "props": [
                          {
                              "p": "payload"
                          },
                          {
                              "p": "topic",
                              "vt": "str"
                          }
                      ],
                      "repeat": "1",
                      "crontab": "",
                      "once": true,
                      "onceDelay": 0.1,
                      "topic": "",
                      "payload": "true",
                      "payloadType": "bool",
                      "x": 110,
                      "y": 820,
                      "wires": [
                          [
                              "a24f824494da53d1"
                          ]
                      ]
                  },
                  {
                      "id": "a24f824494da53d1",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Timer Wz",
                      "rules": [
                          {
                              "t": "set",
                              "p": "payload",
                              "pt": "msg",
                              "to": "timer_wohnzimmer",
                              "tot": "flow"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 260,
                      "y": 820,
                      "wires": [
                          [
                              "d9bc1b5d1b2d6372"
                          ]
                      ]
                  },
                  {
                      "id": "d9bc1b5d1b2d6372",
                      "type": "switch",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Wert 1",
                      "property": "payload",
                      "propertyType": "msg",
                      "rules": [
                          {
                              "t": "eq",
                              "v": "1",
                              "vt": "num"
                          },
                          {
                              "t": "gt",
                              "v": "1",
                              "vt": "num"
                          }
                      ],
                      "checkall": "true",
                      "repair": false,
                      "outputs": 2,
                      "x": 390,
                      "y": 820,
                      "wires": [
                          [
                              "56f073a673c958bf",
                              "718ac44a387c623d"
                          ],
                          [
                              "df9fef6fc476720d"
                          ]
                      ]
                  },
                  {
                      "id": "56f073a673c958bf",
                      "type": "http request",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "send",
                      "method": "GET",
                      "ret": "txt",
                      "paytoqs": "ignore",
                      "url": "https://link_zur_TV_aktivität=0",
                      "tls": "",
                      "persist": false,
                      "proxy": "",
                      "insecureHTTPParser": false,
                      "authType": "",
                      "senderr": false,
                      "headers": [],
                      "x": 550,
                      "y": 800,
                      "wires": [
                          [
                              "57030e98382d17df"
                          ]
                      ]
                  },
                  {
                      "id": "748676985059dae1",
                      "type": "function",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Ausg.",
                      "func": "var min = (Math.floor(msg.payload / 60)).toString();\nvar sek = (msg.payload % 60).toString();\n\nif(min.length == 1){min = \"0\"+min}\nif(sek.length == 1){sek = \"0\"+sek}\n\n\n\nmsg.payload=min+\":\"+sek;\n\nnode.status({text:msg.payload});\nreturn msg;",
                      "outputs": 1,
                      "timeout": 0,
                      "noerr": 0,
                      "initialize": "",
                      "finalize": "",
                      "libs": [],
                      "x": 850,
                      "y": 840,
                      "wires": [
                          [
                              "8fb3c7d2e1e4b9f4"
                          ]
                      ]
                  },
                  {
                      "id": "718ac44a387c623d",
                      "type": "change",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Wert 0",
                      "rules": [
                          {
                              "t": "set",
                              "p": "payload",
                              "pt": "msg",
                              "to": "0",
                              "tot": "num"
                          }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 550,
                      "y": 840,
                      "wires": [
                          [
                              "01257e2007c762e5"
                          ]
                      ]
                  },
                  {
                      "id": "14b10251a9333f2e",
                      "type": "calculator",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "*60s",
                      "inputMsgField": "payload",
                      "outputMsgField": "payload",
                      "operation": "mult",
                      "constant": "60",
                      "round": true,
                      "truncate": false,
                      "decimals": 0,
                      "decimals2": 0,
                      "x": 550,
                      "y": 920,
                      "wires": [
                          [
                              "01257e2007c762e5"
                          ]
                      ]
                  },
                  {
                      "id": "df9fef6fc476720d",
                      "type": "calculator",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Wert 1",
                      "inputMsgField": "payload",
                      "outputMsgField": "payload",
                      "operation": "dec",
                      "constant": "1",
                      "round": false,
                      "truncate": false,
                      "decimals": 0,
                      "decimals2": 0,
                      "x": 550,
                      "y": 880,
                      "wires": [
                          [
                              "01257e2007c762e5"
                          ]
                      ]
                  },
                  {
                      "id": "8fb3c7d2e1e4b9f4",
                      "type": "ioBroker out",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "Ausgabe",
                      "topic": "0_userdata.0.GordonX-Home.0.WZ.Timer_Ausgabe",
                      "ack": "true",
                      "autoCreate": "false",
                      "stateName": "",
                      "role": "",
                      "payloadType": "",
                      "readonly": "",
                      "stateUnit": "",
                      "stateMin": "",
                      "stateMax": "",
                      "x": 980,
                      "y": 840,
                      "wires": []
                  },
                  {
                      "id": "57030e98382d17df",
                      "type": "debug",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "name": "gesendet",
                      "active": true,
                      "tosidebar": true,
                      "console": true,
                      "tostatus": false,
                      "complete": "payload",
                      "targetType": "msg",
                      "statusVal": "",
                      "statusType": "auto",
                      "x": 690,
                      "y": 800,
                      "wires": []
                  },
                  {
                      "id": "99678183a4818434",
                      "type": "junction",
                      "z": "7f2248c482cba092",
                      "g": "5d1010f91cf75832",
                      "x": 440,
                      "y": 860,
                      "wires": [
                          [
                              "14b10251a9333f2e"
                          ]
                      ]
                  }
              ]
              

              Screenshot 2025-06-08 032250.png
              Mit den VIS Buttons werden dann die Werte in den Datenpunkt Eingang Minuten geschrieben mit
              30,60,90,120 & 0 das ziemlich sehr viel einfacher!

              P 1 Reply Last reply Reply Quote 0
              • P
                peterfido last edited by peterfido

                @aphofis Wenn Du Bindings nimmst, kannst Du die Farbe dynamisch ändern. Blinken wurde in den letzten Jahren abgeschafft.

                Der Code für die Ausgabe - Function:

                var min = Math.floor(msg.payload / 60);
                var sek = msg.payload % 60;
                var smin = min.toString();
                var ssek = sek.toString();
                
                if(smin.length == 1){smin = "0"+smin}
                if(ssek.length == 1){ssek = "0"+ssek}
                
                if (min == 0 && sek > 1) {
                    msg.payload = '<font color="red">' + smin + ':' + ssek + '</font>';
                }else{
                    msg.payload = '<font color="green">' + smin + ':' + ssek + '</font>';
                
                }
                
                node.status({text:msg.payload});
                return msg;
                

                Das Binding in VIS geschieht über Voranstellen HTML:
                4a84464c-6f63-4c95-b34e-3767d2706b83-image.png

                Aphofis 1 Reply Last reply Reply Quote 0
                • P
                  peterfido @Aphofis last edited by peterfido

                  @aphofis Blinken geht doch. Halt über Umwege. Man könnte z.B die Schriftfarbe abwechselnd auf Hintergrundfarbe ändern, oder die Sichtbarkeit nutzen.

                  var min = Math.floor(msg.payload / 60);
                  var sek = msg.payload % 60;
                  var smin = min.toString();
                  var ssek = sek.toString();
                  //const Hintergrundfarbe="#000000"; //RGB
                  const Hintergrundfarbe="yellow";    //Farbe
                  
                  if(smin.length == 1){smin = "0"+smin}
                  if(ssek.length == 1){ssek = "0"+ssek}
                  
                  if (min == 0 && sek > 1) {
                      if(sek %2 == 0){
                          msg.payload = '<font color="red">' + smin + ':' + ssek + '</font>';
                      }else{
                          msg.payload = '<font color="' + Hintergrundfarbe + '">' + smin + ':' + ssek + '</font>';
                      }
                  
                  }else{
                      msg.payload = '<font color="green">' + smin + ':' + ssek + '</font>';
                  
                  }
                  
                  node.status({text:msg.payload});
                  return msg;
                  

                  1 Reply Last reply Reply Quote 0
                  • Aphofis
                    Aphofis @peterfido last edited by Aphofis

                    @peterfido
                    Klingt toll, aber wo kommt denn da der Datenpunkt mit rein !?

                    {0_userdata.0.GordonX-Home.0.WZ.Timer_Ausgabe}
                    

                    ist mir noch nicht ganz schlüßig und html ist zu lange her da bin ich raus

                    1 Reply Last reply Reply Quote 0
                    • P
                      peterfido last edited by

                      @aphofis Genau so, wie ich es im Screenshot gezeigt habe. Object ID bleibt leer und wird statt dessen unter Voranstellen HTML in geschweiften Klammern eingetragen.

                      Für weitere Infos einfach nach VIS und BINDING googlen. Hier ein Thema in diesem Forum.

                      Aphofis 1 Reply Last reply Reply Quote 0
                      • Aphofis
                        Aphofis @peterfido last edited by

                        @peterfido
                        Danke für die Infos am Rande!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        748
                        Online

                        31.9k
                        Users

                        80.2k
                        Topics

                        1.3m
                        Posts

                        2
                        11
                        211
                        Loading More Posts
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes
                        Reply
                        • Reply as topic
                        Log in to reply
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                        The ioBroker Community 2014-2023
                        logo