Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Zu viele Trigger, Hilfe für alternative - TV Lift

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    677

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    5.7k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

Zu viele Trigger, Hilfe für alternative - TV Lift

Scheduled Pinned Locked Moved Blockly
javascriptblockly
17 Posts 4 Posters 996 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AtomicIXA Offline
    AtomicIXA Offline
    AtomicIX
    wrote on last edited by
    #1

    Moin,
    ich bastel gerade an einem Skript, das meinen TV Schrank steuern soll.
    Nun hab ich aber das Problem, das ich zu viele Trigger verwende, und darauf hin das Blockly abschmiert.

    TV_Block.PNG

    Das Javascript dazu sieht so aus.

    // TV ist an und Klappe fährt runter
    on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      if (getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val > 20) {
        setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
        setStateDelayed('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, false, 1000, false);
      }
    });
    // Klappe ist unten und fährt auf
    on({ id: [].concat(['sonoff.0.TV_IO_02.POWER2']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      if (getState('sonoff.0.TV_IO_02.POWER2').val == true) {
        setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
        setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, false, 1000, false);
      }
    });
    // Klappe ist offen und TV fährt hoch
    on({ id: [].concat(['sonoff.0.TV_IO_01.POWER1']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      if ((getState('sonoff.0.TV_IO_01.POWER1').val == true && (getState('sonoff.0.TV_IO_02.POWER2').val == true && getState('sonoff.0.TV_IO_03.POWER3').val == true))) {
        setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
        setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Open' /* Open */, true, true, 2000, false);
        setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
      } else {
        setState('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Stop' /* Stop */, true);
      }
    });
    on({ id: [].concat(['sonoff.0.TV_IO_03.POWER1']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      if (getState('sonoff.0.TV_IO_03.POWER1').val == true) {
        setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
      }
    });
    // TV geht aus und fährt runter
    on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      if ((getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val < 20 && getState('sonoff.0.TV_IO_03.POWER3').val == true && getState('sonoff.0.TV_IO_03.POWER2').val == false)) {
        setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
        setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Close' /* Close */, true, true, 2000, false);
      }
    });
    // TV ist unten und Klappe fährt zu
    on({ id: [].concat(['sonoff.0.TV_IO_03.POWER2']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      if (getState('sonoff.0.TV_IO_03.POWER2').val == true) {
        setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
        setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
        setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, true, 1000, false);
      }
    });
    // Wenn klappe wieder zu, dann hochfahren
    on({ id: [].concat(['sonoff.0.TV_IO_01.POWER2']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      if (getState('sonoff.0.TV_IO_01.POWER2').val == true) {
        setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
        setState('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, true);
      }
    });
    

    Die Frage dazu jetzt, warum schmiert das Blockly ab?
    Fehler_Block.PNG

    Wie kann man das ändern?

    Was gibt es dafür eine Alternative, so ein Blockly zu basteln?
    Grundlegend zum Ablauf.
    Ein Shelly PM1 überwacht den Strom vom TV.
    Wenn der Strom größer als 20 Watt ist., soll das Programm starten.
    Der Deckel fährt runter -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Servo steuert.
    Wenn der Deckel unten ist, kann er verschoben werden. -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Stepper steuert.
    Wenn der Deckel offen ist, kann ein Shelly PM2 einen Motor steuern, der den TV hoch fährt.
    Wenn der TV aus geht, das ganze natürlich genau andersrum.

    Alle Positionen haben Endschalter zur Überwachung.
    Stehe da gerade ein wenig aufm Schlauch, wie ich an die Sache ran gehen soll und wäre über Hilfe sehr dankbar.

    CodierknechtC liv-in-skyL haus-automatisierungH 3 Replies Last reply
    0
    • AtomicIXA AtomicIX

      Moin,
      ich bastel gerade an einem Skript, das meinen TV Schrank steuern soll.
      Nun hab ich aber das Problem, das ich zu viele Trigger verwende, und darauf hin das Blockly abschmiert.

      TV_Block.PNG

      Das Javascript dazu sieht so aus.

      // TV ist an und Klappe fährt runter
      on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if (getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val > 20) {
          setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
          setStateDelayed('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, false, 1000, false);
        }
      });
      // Klappe ist unten und fährt auf
      on({ id: [].concat(['sonoff.0.TV_IO_02.POWER2']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if (getState('sonoff.0.TV_IO_02.POWER2').val == true) {
          setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
          setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, false, 1000, false);
        }
      });
      // Klappe ist offen und TV fährt hoch
      on({ id: [].concat(['sonoff.0.TV_IO_01.POWER1']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if ((getState('sonoff.0.TV_IO_01.POWER1').val == true && (getState('sonoff.0.TV_IO_02.POWER2').val == true && getState('sonoff.0.TV_IO_03.POWER3').val == true))) {
          setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
          setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Open' /* Open */, true, true, 2000, false);
          setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
        } else {
          setState('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Stop' /* Stop */, true);
        }
      });
      on({ id: [].concat(['sonoff.0.TV_IO_03.POWER1']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if (getState('sonoff.0.TV_IO_03.POWER1').val == true) {
          setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
        }
      });
      // TV geht aus und fährt runter
      on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if ((getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val < 20 && getState('sonoff.0.TV_IO_03.POWER3').val == true && getState('sonoff.0.TV_IO_03.POWER2').val == false)) {
          setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
          setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Close' /* Close */, true, true, 2000, false);
        }
      });
      // TV ist unten und Klappe fährt zu
      on({ id: [].concat(['sonoff.0.TV_IO_03.POWER2']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if (getState('sonoff.0.TV_IO_03.POWER2').val == true) {
          setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
          setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
          setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, true, 1000, false);
        }
      });
      // Wenn klappe wieder zu, dann hochfahren
      on({ id: [].concat(['sonoff.0.TV_IO_01.POWER2']), change: 'ne' }, async (obj) => {
        let value = obj.state.val;
        let oldValue = obj.oldState.val;
        if (getState('sonoff.0.TV_IO_01.POWER2').val == true) {
          setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
          setState('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, true);
        }
      });
      

      Die Frage dazu jetzt, warum schmiert das Blockly ab?
      Fehler_Block.PNG

      Wie kann man das ändern?

      Was gibt es dafür eine Alternative, so ein Blockly zu basteln?
      Grundlegend zum Ablauf.
      Ein Shelly PM1 überwacht den Strom vom TV.
      Wenn der Strom größer als 20 Watt ist., soll das Programm starten.
      Der Deckel fährt runter -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Servo steuert.
      Wenn der Deckel unten ist, kann er verschoben werden. -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Stepper steuert.
      Wenn der Deckel offen ist, kann ein Shelly PM2 einen Motor steuern, der den TV hoch fährt.
      Wenn der TV aus geht, das ganze natürlich genau andersrum.

      Alle Positionen haben Endschalter zur Überwachung.
      Stehe da gerade ein wenig aufm Schlauch, wie ich an die Sache ran gehen soll und wäre über Hilfe sehr dankbar.

      CodierknechtC Offline
      CodierknechtC Offline
      Codierknecht
      Developer Most Active
      wrote on last edited by Codierknecht
      #2

      @atomicix sagte in Zu viele Trigger, Hilfe für alternative - TV Lift:

      Nun hab ich aber das Problem, das ich zu viele Trigger verwende

      6 Trigger sind bestimmt nicht "zu viele".
      Aber Du solltest im Trigger nicht nochmal den Wert des Objektes auslesen.
      https://forum.iobroker.net/topic/70481/blockly-for-dummies-starthilfe-und-tipps/5

      Und auf einen State setzt man nur einen Trigger. Darin kann man dann mit "Falls" prüfen, welchen Wert der zugehörige State hat.

      12e62b6e-634c-4248-ad30-efb6c85c0201-image.png

      "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

      Proxmox 9.1.1 LXC|8 GB|Core i7-6700
      HmIP|ZigBee|Tasmota|Unifi
      Zabbix Certified Specialist
      Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

      AtomicIXA 1 Reply Last reply
      0
      • CodierknechtC Codierknecht

        @atomicix sagte in Zu viele Trigger, Hilfe für alternative - TV Lift:

        Nun hab ich aber das Problem, das ich zu viele Trigger verwende

        6 Trigger sind bestimmt nicht "zu viele".
        Aber Du solltest im Trigger nicht nochmal den Wert des Objektes auslesen.
        https://forum.iobroker.net/topic/70481/blockly-for-dummies-starthilfe-und-tipps/5

        Und auf einen State setzt man nur einen Trigger. Darin kann man dann mit "Falls" prüfen, welchen Wert der zugehörige State hat.

        12e62b6e-634c-4248-ad30-efb6c85c0201-image.png

        AtomicIXA Offline
        AtomicIXA Offline
        AtomicIX
        wrote on last edited by
        #3

        @codierknecht
        Ok danke, ja das würde Performance sparen, aber ist das die Lösung zum Problem?
        Mein IoBroker läuft unter Proxmox auf einem NUC i9 mit 32GB Ram. Leistung ist eigentlich genug vorhanden.
        Ich werde es mal testen. Schade nur immer um die unnötige Arbeit, wenns nicht geht.
        Ansonsten eine andere Idee, das ohne die Trigger zu machen?

        1 Reply Last reply
        0
        • AtomicIXA AtomicIX

          Moin,
          ich bastel gerade an einem Skript, das meinen TV Schrank steuern soll.
          Nun hab ich aber das Problem, das ich zu viele Trigger verwende, und darauf hin das Blockly abschmiert.

          TV_Block.PNG

          Das Javascript dazu sieht so aus.

          // TV ist an und Klappe fährt runter
          on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            if (getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val > 20) {
              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
              setStateDelayed('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, false, 1000, false);
            }
          });
          // Klappe ist unten und fährt auf
          on({ id: [].concat(['sonoff.0.TV_IO_02.POWER2']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            if (getState('sonoff.0.TV_IO_02.POWER2').val == true) {
              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
              setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, false, 1000, false);
            }
          });
          // Klappe ist offen und TV fährt hoch
          on({ id: [].concat(['sonoff.0.TV_IO_01.POWER1']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            if ((getState('sonoff.0.TV_IO_01.POWER1').val == true && (getState('sonoff.0.TV_IO_02.POWER2').val == true && getState('sonoff.0.TV_IO_03.POWER3').val == true))) {
              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
              setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Open' /* Open */, true, true, 2000, false);
              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
            } else {
              setState('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Stop' /* Stop */, true);
            }
          });
          on({ id: [].concat(['sonoff.0.TV_IO_03.POWER1']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            if (getState('sonoff.0.TV_IO_03.POWER1').val == true) {
              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
            }
          });
          // TV geht aus und fährt runter
          on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            if ((getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val < 20 && getState('sonoff.0.TV_IO_03.POWER3').val == true && getState('sonoff.0.TV_IO_03.POWER2').val == false)) {
              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
              setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Close' /* Close */, true, true, 2000, false);
            }
          });
          // TV ist unten und Klappe fährt zu
          on({ id: [].concat(['sonoff.0.TV_IO_03.POWER2']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            if (getState('sonoff.0.TV_IO_03.POWER2').val == true) {
              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
              setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, true, 1000, false);
            }
          });
          // Wenn klappe wieder zu, dann hochfahren
          on({ id: [].concat(['sonoff.0.TV_IO_01.POWER2']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            if (getState('sonoff.0.TV_IO_01.POWER2').val == true) {
              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
              setState('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, true);
            }
          });
          

          Die Frage dazu jetzt, warum schmiert das Blockly ab?
          Fehler_Block.PNG

          Wie kann man das ändern?

          Was gibt es dafür eine Alternative, so ein Blockly zu basteln?
          Grundlegend zum Ablauf.
          Ein Shelly PM1 überwacht den Strom vom TV.
          Wenn der Strom größer als 20 Watt ist., soll das Programm starten.
          Der Deckel fährt runter -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Servo steuert.
          Wenn der Deckel unten ist, kann er verschoben werden. -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Stepper steuert.
          Wenn der Deckel offen ist, kann ein Shelly PM2 einen Motor steuern, der den TV hoch fährt.
          Wenn der TV aus geht, das ganze natürlich genau andersrum.

          Alle Positionen haben Endschalter zur Überwachung.
          Stehe da gerade ein wenig aufm Schlauch, wie ich an die Sache ran gehen soll und wäre über Hilfe sehr dankbar.

          liv-in-skyL Offline
          liv-in-skyL Offline
          liv-in-sky
          wrote on last edited by liv-in-sky
          #4

          @atomicix den fehler habe ich in letzter zeit auch öfters

          das ist bei mir kein problem vom script selbst

          die blocklys selbst werden zerschossen

          wenn du die fehlermeldung bestätigst, kannst du dann das blockly exportieren ? wen ja - in eine neues script einsetzen und versuchen dann zu speichern

          nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

          AtomicIXA 1 Reply Last reply
          0
          • liv-in-skyL liv-in-sky

            @atomicix den fehler habe ich in letzter zeit auch öfters

            das ist bei mir kein problem vom script selbst

            die blocklys selbst werden zerschossen

            wenn du die fehlermeldung bestätigst, kannst du dann das blockly exportieren ? wen ja - in eine neues script einsetzen und versuchen dann zu speichern

            AtomicIXA Offline
            AtomicIXA Offline
            AtomicIX
            wrote on last edited by
            #5

            @liv-in-sky
            jein, exportieren kann ich es, aber nur einen Teil davon und der Kryptisch Teil am ende fürs Blockly fehlt.
            Also ein Import geht nicht.
            Habe auch schon ältere Javascript Adapter probiert, aber ohne Erfolg.

            liv-in-skyL CodierknechtC 2 Replies Last reply
            0
            • AtomicIXA AtomicIX

              @liv-in-sky
              jein, exportieren kann ich es, aber nur einen Teil davon und der Kryptisch Teil am ende fürs Blockly fehlt.
              Also ein Import geht nicht.
              Habe auch schon ältere Javascript Adapter probiert, aber ohne Erfolg.

              liv-in-skyL Offline
              liv-in-skyL Offline
              liv-in-sky
              wrote on last edited by
              #6

              @atomicix

              ich mußte alte backups öffnen und die blocklys wieder rausholen

              ist das ein altes blockly oder hast du das gerade erstellt

              nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

              AtomicIXA 1 Reply Last reply
              0
              • liv-in-skyL liv-in-sky

                @atomicix

                ich mußte alte backups öffnen und die blocklys wieder rausholen

                ist das ein altes blockly oder hast du das gerade erstellt

                AtomicIXA Offline
                AtomicIXA Offline
                AtomicIX
                wrote on last edited by
                #7

                @liv-in-sky das ist neu erstellt. Also 1 Tag alt.

                liv-in-skyL 3 Replies Last reply
                0
                • AtomicIXA AtomicIX

                  @liv-in-sky das ist neu erstellt. Also 1 Tag alt.

                  liv-in-skyL Offline
                  liv-in-skyL Offline
                  liv-in-sky
                  wrote on last edited by liv-in-sky
                  #8

                  @haus-automatisierung

                  kannst du da irgendwie helfen - den fehler oben kenne ich - die blocklys sind irgendwie defekt - bei mir kommt das öfters bei alten blocklys vor, die ich ändern will oder nur einen block verschieben will - beim speichern kommt dann der fehler

                  @AtomicIX eventuell nochmal ein neues probieren und immer zwischenspeichern pro trigger

                  leider kann ich dazu nicht mehr sagen und dir weiterhelfen

                  nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                  haus-automatisierungH 1 Reply Last reply
                  0
                  • AtomicIXA AtomicIX

                    @liv-in-sky das ist neu erstellt. Also 1 Tag alt.

                    liv-in-skyL Offline
                    liv-in-skyL Offline
                    liv-in-sky
                    wrote on last edited by
                    #9

                    @atomicix

                    evtl ist das ein browser - server - connection problem - war so meine vermutung - da ich den script tab eigentlich dauerhaft offen habe

                    nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                    1 Reply Last reply
                    0
                    • AtomicIXA AtomicIX

                      @liv-in-sky
                      jein, exportieren kann ich es, aber nur einen Teil davon und der Kryptisch Teil am ende fürs Blockly fehlt.
                      Also ein Import geht nicht.
                      Habe auch schon ältere Javascript Adapter probiert, aber ohne Erfolg.

                      CodierknechtC Offline
                      CodierknechtC Offline
                      Codierknecht
                      Developer Most Active
                      wrote on last edited by
                      #10

                      @atomicix sagte in Zu viele Trigger, Hilfe für alternative - TV Lift:

                      der Kryptisch Teil am ende fürs Blockly fehlt

                      Und genau der Teil ist das eigentliche Blockly.
                      Dahinter verbirgt sich (base64 codiert) das XML.

                      Als Workaround könntest Du den generierten JS-Code nehmen und in ein reines JS-Script einfügen.
                      Dann wäre es zumindest mal lauffähig.

                      "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

                      Proxmox 9.1.1 LXC|8 GB|Core i7-6700
                      HmIP|ZigBee|Tasmota|Unifi
                      Zabbix Certified Specialist
                      Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

                      1 Reply Last reply
                      0
                      • liv-in-skyL liv-in-sky

                        @haus-automatisierung

                        kannst du da irgendwie helfen - den fehler oben kenne ich - die blocklys sind irgendwie defekt - bei mir kommt das öfters bei alten blocklys vor, die ich ändern will oder nur einen block verschieben will - beim speichern kommt dann der fehler

                        @AtomicIX eventuell nochmal ein neues probieren und immer zwischenspeichern pro trigger

                        leider kann ich dazu nicht mehr sagen und dir weiterhelfen

                        haus-automatisierungH Online
                        haus-automatisierungH Online
                        haus-automatisierung
                        Developer Most Active
                        wrote on last edited by
                        #11

                        @liv-in-sky sagte in Zu viele Trigger, Hilfe für alternative - TV Lift:

                        kannst du da irgendwie helfen - den fehler oben kenne ich - die blocklys sind irgendwie defekt

                        Ohne genauere Angaben zu Adapter-Versionen usw. und das Blockly-XML eher nicht.

                        Das passiert in 99% der Fälle dann, wenn man Blöcke von anderen Adaptern verwendet und dann die Adapter gelöscht wurden.

                        🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
                        🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
                        📚 Meine inoffizielle ioBroker Dokumentation

                        1 Reply Last reply
                        0
                        • AtomicIXA AtomicIX

                          Moin,
                          ich bastel gerade an einem Skript, das meinen TV Schrank steuern soll.
                          Nun hab ich aber das Problem, das ich zu viele Trigger verwende, und darauf hin das Blockly abschmiert.

                          TV_Block.PNG

                          Das Javascript dazu sieht so aus.

                          // TV ist an und Klappe fährt runter
                          on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            if (getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val > 20) {
                              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
                              setStateDelayed('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, false, 1000, false);
                            }
                          });
                          // Klappe ist unten und fährt auf
                          on({ id: [].concat(['sonoff.0.TV_IO_02.POWER2']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            if (getState('sonoff.0.TV_IO_02.POWER2').val == true) {
                              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
                              setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, false, 1000, false);
                            }
                          });
                          // Klappe ist offen und TV fährt hoch
                          on({ id: [].concat(['sonoff.0.TV_IO_01.POWER1']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            if ((getState('sonoff.0.TV_IO_01.POWER1').val == true && (getState('sonoff.0.TV_IO_02.POWER2').val == true && getState('sonoff.0.TV_IO_03.POWER3').val == true))) {
                              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
                              setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Open' /* Open */, true, true, 2000, false);
                              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
                            } else {
                              setState('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Stop' /* Stop */, true);
                            }
                          });
                          on({ id: [].concat(['sonoff.0.TV_IO_03.POWER1']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            if (getState('sonoff.0.TV_IO_03.POWER1').val == true) {
                              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
                            }
                          });
                          // TV geht aus und fährt runter
                          on({ id: [].concat(['shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            if ((getState('shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power').val < 20 && getState('sonoff.0.TV_IO_03.POWER3').val == true && getState('sonoff.0.TV_IO_03.POWER2').val == false)) {
                              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, true);
                              setStateDelayed('shelly.0.shellyplus2pm#a0a3b3c43630#1.Cover0.Close' /* Close */, true, true, 2000, false);
                            }
                          });
                          // TV ist unten und Klappe fährt zu
                          on({ id: [].concat(['sonoff.0.TV_IO_03.POWER2']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            if (getState('sonoff.0.TV_IO_03.POWER2').val == true) {
                              setState('sonoff.0.TV_IO_03.POWER4' /* TV_IO_03 POWER4 */, false);
                              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, true);
                              setStateDelayed('sonoff.0.TV_IO_01.POWER3' /* TV_IO_01 POWER3 */, true, 1000, false);
                            }
                          });
                          // Wenn klappe wieder zu, dann hochfahren
                          on({ id: [].concat(['sonoff.0.TV_IO_01.POWER2']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            if (getState('sonoff.0.TV_IO_01.POWER2').val == true) {
                              setState('sonoff.0.TV_IO_01.POWER4' /* TV_IO_01 POWER4 */, false);
                              setState('sonoff.0.TV_IO_02.POWER3' /* TV_IO_02 POWER3 */, true);
                            }
                          });
                          

                          Die Frage dazu jetzt, warum schmiert das Blockly ab?
                          Fehler_Block.PNG

                          Wie kann man das ändern?

                          Was gibt es dafür eine Alternative, so ein Blockly zu basteln?
                          Grundlegend zum Ablauf.
                          Ein Shelly PM1 überwacht den Strom vom TV.
                          Wenn der Strom größer als 20 Watt ist., soll das Programm starten.
                          Der Deckel fährt runter -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Servo steuert.
                          Wenn der Deckel unten ist, kann er verschoben werden. -> Wemos D1 mini mit Tasmota steuert einen Arduino der einen Stepper steuert.
                          Wenn der Deckel offen ist, kann ein Shelly PM2 einen Motor steuern, der den TV hoch fährt.
                          Wenn der TV aus geht, das ganze natürlich genau andersrum.

                          Alle Positionen haben Endschalter zur Überwachung.
                          Stehe da gerade ein wenig aufm Schlauch, wie ich an die Sache ran gehen soll und wäre über Hilfe sehr dankbar.

                          haus-automatisierungH Online
                          haus-automatisierungH Online
                          haus-automatisierung
                          Developer Most Active
                          wrote on last edited by
                          #12

                          @atomicix sagte in Zu viele Trigger, Hilfe für alternative - TV Lift:

                          Die Frage dazu jetzt, warum schmiert das Blockly ab?

                          Das Blockly "schmiert nicht ab". Das ist ein Problem auf Client-Seite im Browser. Der Server weiß davon gar nix. Bitte das Blockly-XML (oder das ganze Script-Objekt) teilen.

                          🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
                          🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
                          📚 Meine inoffizielle ioBroker Dokumentation

                          1 Reply Last reply
                          0
                          • AtomicIXA AtomicIX

                            @liv-in-sky das ist neu erstellt. Also 1 Tag alt.

                            liv-in-skyL Offline
                            liv-in-skyL Offline
                            liv-in-sky
                            wrote on last edited by liv-in-sky
                            #13

                            @atomicix

                            mal den browser cache löschen oder anderen browser verwenden und nochmal probieren - hast du noch mehr infos für @haus-automatisierung

                            nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                            AtomicIXA 1 Reply Last reply
                            0
                            • liv-in-skyL liv-in-sky

                              @atomicix

                              mal den browser cache löschen oder anderen browser verwenden und nochmal probieren - hast du noch mehr infos für @haus-automatisierung

                              AtomicIXA Offline
                              AtomicIXA Offline
                              AtomicIX
                              wrote on last edited by
                              #14

                              @liv-in-sky @haus-automatisierung
                              Also das Blockly läuft auch weiterhin. Nur mit Fehlern im Code, die ich noch ändern muss.
                              Adapter habe ich keine gelöscht.
                              Aktuelle JavaScript Version ist 7.11.1 aber unter 7.10.1 ist der Fehler auch.

                              Node.js. 18.09.0
                              NPM 10.2.3

                              Das hier ist das Exportierte Blockly

                              <xml xmlns="https://developers.google.com/blockly/xml">
                                <block type="comment" id="WGe.@DWf%)qRNRH%Y{49" x="0" y="0">
                                  <field name="COMMENT">TV ist an und Klappe fährt runter</field>
                                  <next>
                                    <block type="on_ext" id="E=uv^eoNgYYEU@G;JKW]">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                      <field name="CONDITION">ne</field>
                                      <field name="ACK_CONDITION"></field>
                                      <value name="OID0">
                                        <shadow type="field_oid" id="t1vZ)O#6L^ut]KeU:C}c">
                                          <field name="oid">shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power</field>
                                        </shadow>
                                      </value>
                                      <statement name="STATEMENT">
                                        <block type="controls_if" id="i);A|o`aKcGX;%+9fAkF">
                                          <value name="IF0">
                                            <block type="logic_compare" id="z)65/yKi!(L]k9KyAO~Y">
                                              <field name="OP">GT</field>
                                              <value name="A">
                                                <block type="get_value" id="PO3MBLQ3Y+Uv=]NYT,S,">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="zjjZk/^T1[s1/Lg~}WuM">
                                                  <field name="NUM">20</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="control" id="J=OFFZqnO/wXA/:R|fIS">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                              <field name="OID">sonoff.0.TV_IO_01.POWER4</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="logic_boolean" id="yDV5DVi(3gVl)nx)pYL)">
                                                  <field name="BOOL">TRUE</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="control" id="U=N(Px5I:h-CU`D}AY.4">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                  <field name="OID">sonoff.0.TV_IO_02.POWER3</field>
                                                  <field name="WITH_DELAY">TRUE</field>
                                                  <field name="DELAY_MS">1000</field>
                                                  <field name="UNIT">ms</field>
                                                  <field name="CLEAR_RUNNING">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="logic_boolean" id="^NfaYbkWmX6@}DZ(YDUW">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </statement>
                                      <next>
                                        <block type="comment" id="*=-5fY_`1xJ/IY/.C:nE">
                                          <field name="COMMENT">Klappe ist unten und fährt auf</field>
                                          <next>
                                            <block type="on_ext" id=";]`f5udbbkynLT+^wJz(">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                              <field name="CONDITION">ne</field>
                                              <field name="ACK_CONDITION"></field>
                                              <value name="OID0">
                                                <shadow type="field_oid" id="`ZcBzG+?BuY2/cYBe$5M">
                                                  <field name="oid">sonoff.0.TV_IO_02.POWER2</field>
                                                </shadow>
                                              </value>
                                              <statement name="STATEMENT">
                                                <block type="controls_if" id="~bgCAd`:R9Qa6psrCPt,">
                                                  <value name="IF0">
                                                    <block type="logic_compare" id="mrnN4?RB71(VzMSY7ukp">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="get_value" id="VQ@d4QJr?1Rs:wXlxyUF">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">sonoff.0.TV_IO_02.POWER2</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="hEtoM8ee_@iRK9zopvM,">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="control" id="ypwi]XhW=R|`f|h@Rj75">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                      <field name="OID">sonoff.0.TV_IO_01.POWER4</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="logic_boolean" id="CcX!goju[]aTWSoV$O%c">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="control" id="!~PL+)oL;%D9?)v:18d`">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                          <field name="OID">sonoff.0.TV_IO_01.POWER3</field>
                                                          <field name="WITH_DELAY">TRUE</field>
                                                          <field name="DELAY_MS">1000</field>
                                                          <field name="UNIT">ms</field>
                                                          <field name="CLEAR_RUNNING">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="logic_boolean" id="+usxVhl%$dZ{G?L!~r5]">
                                                              <field name="BOOL">FALSE</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="comment" id=")9f:}WJL|B:#FaNf+J(t">
                                                  <field name="COMMENT">Klappe ist offen und TV fährt hoch</field>
                                                  <next>
                                                    <block type="on_ext" id="L2=5BH_z#InOmocd)4D.">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                      <field name="CONDITION">ne</field>
                                                      <field name="ACK_CONDITION"></field>
                                                      <value name="OID0">
                                                        <shadow type="field_oid" id="22SXZF-kttF?1WT(AN]s">
                                                          <field name="oid">sonoff.0.TV_IO_01.POWER1</field>
                                                        </shadow>
                                                      </value>
                                                      <statement name="STATEMENT">
                                                        <block type="controls_if" id="VCEd#8Dj2AL9[b$)!X^h">
                                                          <mutation else="1"></mutation>
                                                        </block>
                                                      </statement>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </xml>
                              
                              

                              Arbeiten tue ich mit Chrome.
                              Jetzt aktuell über IoBroker Pro per Fernzugriff.
                              Über EDGE geht es gar nicht. Da kann man die Bausteine nicht zusammen fügen.

                              Habe ich noch was vergessen?

                              CodierknechtC haus-automatisierungH 2 Replies Last reply
                              0
                              • AtomicIXA AtomicIX

                                @liv-in-sky @haus-automatisierung
                                Also das Blockly läuft auch weiterhin. Nur mit Fehlern im Code, die ich noch ändern muss.
                                Adapter habe ich keine gelöscht.
                                Aktuelle JavaScript Version ist 7.11.1 aber unter 7.10.1 ist der Fehler auch.

                                Node.js. 18.09.0
                                NPM 10.2.3

                                Das hier ist das Exportierte Blockly

                                <xml xmlns="https://developers.google.com/blockly/xml">
                                  <block type="comment" id="WGe.@DWf%)qRNRH%Y{49" x="0" y="0">
                                    <field name="COMMENT">TV ist an und Klappe fährt runter</field>
                                    <next>
                                      <block type="on_ext" id="E=uv^eoNgYYEU@G;JKW]">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                        <field name="CONDITION">ne</field>
                                        <field name="ACK_CONDITION"></field>
                                        <value name="OID0">
                                          <shadow type="field_oid" id="t1vZ)O#6L^ut]KeU:C}c">
                                            <field name="oid">shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power</field>
                                          </shadow>
                                        </value>
                                        <statement name="STATEMENT">
                                          <block type="controls_if" id="i);A|o`aKcGX;%+9fAkF">
                                            <value name="IF0">
                                              <block type="logic_compare" id="z)65/yKi!(L]k9KyAO~Y">
                                                <field name="OP">GT</field>
                                                <value name="A">
                                                  <block type="get_value" id="PO3MBLQ3Y+Uv=]NYT,S,">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="zjjZk/^T1[s1/Lg~}WuM">
                                                    <field name="NUM">20</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="control" id="J=OFFZqnO/wXA/:R|fIS">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">sonoff.0.TV_IO_01.POWER4</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="logic_boolean" id="yDV5DVi(3gVl)nx)pYL)">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="U=N(Px5I:h-CU`D}AY.4">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                    <field name="OID">sonoff.0.TV_IO_02.POWER3</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">1000</field>
                                                    <field name="UNIT">ms</field>
                                                    <field name="CLEAR_RUNNING">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="logic_boolean" id="^NfaYbkWmX6@}DZ(YDUW">
                                                        <field name="BOOL">FALSE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="comment" id="*=-5fY_`1xJ/IY/.C:nE">
                                            <field name="COMMENT">Klappe ist unten und fährt auf</field>
                                            <next>
                                              <block type="on_ext" id=";]`f5udbbkynLT+^wJz(">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                <field name="CONDITION">ne</field>
                                                <field name="ACK_CONDITION"></field>
                                                <value name="OID0">
                                                  <shadow type="field_oid" id="`ZcBzG+?BuY2/cYBe$5M">
                                                    <field name="oid">sonoff.0.TV_IO_02.POWER2</field>
                                                  </shadow>
                                                </value>
                                                <statement name="STATEMENT">
                                                  <block type="controls_if" id="~bgCAd`:R9Qa6psrCPt,">
                                                    <value name="IF0">
                                                      <block type="logic_compare" id="mrnN4?RB71(VzMSY7ukp">
                                                        <field name="OP">EQ</field>
                                                        <value name="A">
                                                          <block type="get_value" id="VQ@d4QJr?1Rs:wXlxyUF">
                                                            <field name="ATTR">val</field>
                                                            <field name="OID">sonoff.0.TV_IO_02.POWER2</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <block type="logic_boolean" id="hEtoM8ee_@iRK9zopvM,">
                                                            <field name="BOOL">TRUE</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <statement name="DO0">
                                                      <block type="control" id="ypwi]XhW=R|`f|h@Rj75">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                        <field name="OID">sonoff.0.TV_IO_01.POWER4</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="logic_boolean" id="CcX!goju[]aTWSoV$O%c">
                                                            <field name="BOOL">TRUE</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="control" id="!~PL+)oL;%D9?)v:18d`">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                            <field name="OID">sonoff.0.TV_IO_01.POWER3</field>
                                                            <field name="WITH_DELAY">TRUE</field>
                                                            <field name="DELAY_MS">1000</field>
                                                            <field name="UNIT">ms</field>
                                                            <field name="CLEAR_RUNNING">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="logic_boolean" id="+usxVhl%$dZ{G?L!~r5]">
                                                                <field name="BOOL">FALSE</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </statement>
                                                  </block>
                                                </statement>
                                                <next>
                                                  <block type="comment" id=")9f:}WJL|B:#FaNf+J(t">
                                                    <field name="COMMENT">Klappe ist offen und TV fährt hoch</field>
                                                    <next>
                                                      <block type="on_ext" id="L2=5BH_z#InOmocd)4D.">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                        <field name="CONDITION">ne</field>
                                                        <field name="ACK_CONDITION"></field>
                                                        <value name="OID0">
                                                          <shadow type="field_oid" id="22SXZF-kttF?1WT(AN]s">
                                                            <field name="oid">sonoff.0.TV_IO_01.POWER1</field>
                                                          </shadow>
                                                        </value>
                                                        <statement name="STATEMENT">
                                                          <block type="controls_if" id="VCEd#8Dj2AL9[b$)!X^h">
                                                            <mutation else="1"></mutation>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </xml>
                                
                                

                                Arbeiten tue ich mit Chrome.
                                Jetzt aktuell über IoBroker Pro per Fernzugriff.
                                Über EDGE geht es gar nicht. Da kann man die Bausteine nicht zusammen fügen.

                                Habe ich noch was vergessen?

                                CodierknechtC Offline
                                CodierknechtC Offline
                                Codierknecht
                                Developer Most Active
                                wrote on last edited by
                                #15

                                @atomicix
                                Lässt sich einwandfrei importieren, ändern und speichern.

                                37a08bb2-1fe8-44ab-b920-17433ba6e382-image.png

                                JS 7.11.1

                                "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

                                Proxmox 9.1.1 LXC|8 GB|Core i7-6700
                                HmIP|ZigBee|Tasmota|Unifi
                                Zabbix Certified Specialist
                                Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

                                1 Reply Last reply
                                1
                                • AtomicIXA AtomicIX

                                  @liv-in-sky @haus-automatisierung
                                  Also das Blockly läuft auch weiterhin. Nur mit Fehlern im Code, die ich noch ändern muss.
                                  Adapter habe ich keine gelöscht.
                                  Aktuelle JavaScript Version ist 7.11.1 aber unter 7.10.1 ist der Fehler auch.

                                  Node.js. 18.09.0
                                  NPM 10.2.3

                                  Das hier ist das Exportierte Blockly

                                  <xml xmlns="https://developers.google.com/blockly/xml">
                                    <block type="comment" id="WGe.@DWf%)qRNRH%Y{49" x="0" y="0">
                                      <field name="COMMENT">TV ist an und Klappe fährt runter</field>
                                      <next>
                                        <block type="on_ext" id="E=uv^eoNgYYEU@G;JKW]">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                          <field name="CONDITION">ne</field>
                                          <field name="ACK_CONDITION"></field>
                                          <value name="OID0">
                                            <shadow type="field_oid" id="t1vZ)O#6L^ut]KeU:C}c">
                                              <field name="oid">shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power</field>
                                            </shadow>
                                          </value>
                                          <statement name="STATEMENT">
                                            <block type="controls_if" id="i);A|o`aKcGX;%+9fAkF">
                                              <value name="IF0">
                                                <block type="logic_compare" id="z)65/yKi!(L]k9KyAO~Y">
                                                  <field name="OP">GT</field>
                                                  <value name="A">
                                                    <block type="get_value" id="PO3MBLQ3Y+Uv=]NYT,S,">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">shelly.0.shellyplus1pm#08f9e0ffddb8#1.Relay0.Power</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="math_number" id="zjjZk/^T1[s1/Lg~}WuM">
                                                      <field name="NUM">20</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="control" id="J=OFFZqnO/wXA/:R|fIS">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                  <field name="OID">sonoff.0.TV_IO_01.POWER4</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="logic_boolean" id="yDV5DVi(3gVl)nx)pYL)">
                                                      <field name="BOOL">TRUE</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="control" id="U=N(Px5I:h-CU`D}AY.4">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                      <field name="OID">sonoff.0.TV_IO_02.POWER3</field>
                                                      <field name="WITH_DELAY">TRUE</field>
                                                      <field name="DELAY_MS">1000</field>
                                                      <field name="UNIT">ms</field>
                                                      <field name="CLEAR_RUNNING">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="logic_boolean" id="^NfaYbkWmX6@}DZ(YDUW">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </statement>
                                            </block>
                                          </statement>
                                          <next>
                                            <block type="comment" id="*=-5fY_`1xJ/IY/.C:nE">
                                              <field name="COMMENT">Klappe ist unten und fährt auf</field>
                                              <next>
                                                <block type="on_ext" id=";]`f5udbbkynLT+^wJz(">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                  <field name="CONDITION">ne</field>
                                                  <field name="ACK_CONDITION"></field>
                                                  <value name="OID0">
                                                    <shadow type="field_oid" id="`ZcBzG+?BuY2/cYBe$5M">
                                                      <field name="oid">sonoff.0.TV_IO_02.POWER2</field>
                                                    </shadow>
                                                  </value>
                                                  <statement name="STATEMENT">
                                                    <block type="controls_if" id="~bgCAd`:R9Qa6psrCPt,">
                                                      <value name="IF0">
                                                        <block type="logic_compare" id="mrnN4?RB71(VzMSY7ukp">
                                                          <field name="OP">EQ</field>
                                                          <value name="A">
                                                            <block type="get_value" id="VQ@d4QJr?1Rs:wXlxyUF">
                                                              <field name="ATTR">val</field>
                                                              <field name="OID">sonoff.0.TV_IO_02.POWER2</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="logic_boolean" id="hEtoM8ee_@iRK9zopvM,">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <statement name="DO0">
                                                        <block type="control" id="ypwi]XhW=R|`f|h@Rj75">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                          <field name="OID">sonoff.0.TV_IO_01.POWER4</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="logic_boolean" id="CcX!goju[]aTWSoV$O%c">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="control" id="!~PL+)oL;%D9?)v:18d`">
                                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                              <field name="OID">sonoff.0.TV_IO_01.POWER3</field>
                                                              <field name="WITH_DELAY">TRUE</field>
                                                              <field name="DELAY_MS">1000</field>
                                                              <field name="UNIT">ms</field>
                                                              <field name="CLEAR_RUNNING">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="logic_boolean" id="+usxVhl%$dZ{G?L!~r5]">
                                                                  <field name="BOOL">FALSE</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </statement>
                                                    </block>
                                                  </statement>
                                                  <next>
                                                    <block type="comment" id=")9f:}WJL|B:#FaNf+J(t">
                                                      <field name="COMMENT">Klappe ist offen und TV fährt hoch</field>
                                                      <next>
                                                        <block type="on_ext" id="L2=5BH_z#InOmocd)4D.">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                                          <field name="CONDITION">ne</field>
                                                          <field name="ACK_CONDITION"></field>
                                                          <value name="OID0">
                                                            <shadow type="field_oid" id="22SXZF-kttF?1WT(AN]s">
                                                              <field name="oid">sonoff.0.TV_IO_01.POWER1</field>
                                                            </shadow>
                                                          </value>
                                                          <statement name="STATEMENT">
                                                            <block type="controls_if" id="VCEd#8Dj2AL9[b$)!X^h">
                                                              <mutation else="1"></mutation>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </xml>
                                  
                                  

                                  Arbeiten tue ich mit Chrome.
                                  Jetzt aktuell über IoBroker Pro per Fernzugriff.
                                  Über EDGE geht es gar nicht. Da kann man die Bausteine nicht zusammen fügen.

                                  Habe ich noch was vergessen?

                                  haus-automatisierungH Online
                                  haus-automatisierungH Online
                                  haus-automatisierung
                                  Developer Most Active
                                  wrote on last edited by
                                  #16

                                  @atomicix sagte in Zu viele Trigger, Hilfe für alternative - TV Lift:

                                  Jetzt aktuell über IoBroker Pro per Fernzugriff.

                                  Das wird das Problem sein. Auf den ioBroker Servern läuft eine ältere Version des JavaScript-Adapters und dann gibt es manche Blockly-Definitionen nicht.

                                  🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
                                  🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
                                  📚 Meine inoffizielle ioBroker Dokumentation

                                  1 Reply Last reply
                                  0
                                  • AtomicIXA Offline
                                    AtomicIXA Offline
                                    AtomicIX
                                    wrote on last edited by
                                    #17

                                    Das hab ich habe auch mit direkter Verbindung von zuhause.

                                    1 Reply Last reply
                                    0

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better 💗

                                    Register Login
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    Support us

                                    ioBroker
                                    Community Adapters
                                    Donate

                                    329

                                    Online

                                    32.7k

                                    Users

                                    82.6k

                                    Topics

                                    1.3m

                                    Posts
                                    Community
                                    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                    ioBroker Community 2014-2025
                                    logo
                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Home
                                    • Recent
                                    • Tags
                                    • Unread 0
                                    • Categories
                                    • Unreplied
                                    • Popular
                                    • GitHub
                                    • Docu
                                    • Hilfe