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. [gelöst]Türenabfrage Hilfe

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    16
    1
    297

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

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

[gelöst]Türenabfrage Hilfe

Scheduled Pinned Locked Moved Blockly
26 Posts 2 Posters 1.9k Views 2 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.
  • paul53P paul53

    @kuessel25: Tür:falseManuell:true

    manuell_ein geht auf true, was nicht sein dürfte. Poste bitte den von Blockly erzeugten Javascript-Code ohne die letzte Zeile in Code tags.

    K Offline
    K Offline
    kuessel25
    wrote on last edited by kuessel25
    #21

    @paul53 sagte in Türenabfrage Hilfe:

    Blockly erzeugten Javascript-Code

    ich weiß jetzt nicht ob ich das richtig verstanden habe,

    
    var manuell_ein, urspung;
    
    
    on({id: 'zigbee.0.00158d0003d08254.opened', change: "ne"}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      console.log((['Tür:',(obj.state ? obj.state.val : ""),'Manuell:',manuell_ein].join('')));
      if (!manuell_ein) {
        setState("sonoff.0.Küche Licht.POWER"/*Küche Licht POWER*/, (obj.state ? obj.state.val : ""));
      }
    });
    // licht
    on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      console.log((['Licht:',(obj.state ? obj.state.val : ""),'Ursprung:',(obj.state ? obj.state.from : "")].join('')));
      manuell_ein = (obj.state ? obj.state.val : "") && (obj.state ? obj.state.from : "") != 'system.adapter.javascript.0';
    });
    
    on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      manuell_ein = (obj.state ? obj.state.val : "") && urspung != 'javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';
    });
    
    paul53P 1 Reply Last reply
    0
    • K kuessel25

      @paul53 sagte in Türenabfrage Hilfe:

      Blockly erzeugten Javascript-Code

      ich weiß jetzt nicht ob ich das richtig verstanden habe,

      
      var manuell_ein, urspung;
      
      
      on({id: 'zigbee.0.00158d0003d08254.opened', change: "ne"}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        console.log((['Tür:',(obj.state ? obj.state.val : ""),'Manuell:',manuell_ein].join('')));
        if (!manuell_ein) {
          setState("sonoff.0.Küche Licht.POWER"/*Küche Licht POWER*/, (obj.state ? obj.state.val : ""));
        }
      });
      // licht
      on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        console.log((['Licht:',(obj.state ? obj.state.val : ""),'Ursprung:',(obj.state ? obj.state.from : "")].join('')));
        manuell_ein = (obj.state ? obj.state.val : "") && (obj.state ? obj.state.from : "") != 'system.adapter.javascript.0';
      });
      
      on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        manuell_ein = (obj.state ? obj.state.val : "") && urspung != 'javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';
      });
      
      paul53P Offline
      paul53P Offline
      paul53
      wrote on last edited by paul53
      #22

      @kuessel25 sagte: manuell_ein = (obj.state ? obj.state.val : "") && urspung != javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';

      So kann es nicht funktionieren ! Lösche den Trigger-Block rechts unten.

      Bild_2021-01-25_115912.png

      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

      K 1 Reply Last reply
      1
      • paul53P paul53

        @kuessel25 sagte: manuell_ein = (obj.state ? obj.state.val : "") && urspung != javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';

        So kann es nicht funktionieren ! Lösche den Trigger-Block rechts unten.

        Bild_2021-01-25_115912.png

        K Offline
        K Offline
        kuessel25
        wrote on last edited by
        #23

        @paul53
        Peinlich :cold_sweat:

        hatte ich nicht gesehen,danke! jetzt gehts

        paul53P 1 Reply Last reply
        0
        • K kuessel25

          @paul53
          Peinlich :cold_sweat:

          hatte ich nicht gesehen,danke! jetzt gehts

          paul53P Offline
          paul53P Offline
          paul53
          wrote on last edited by
          #24

          @kuessel25 sagte: hatte ich nicht gesehen,danke!

          Vor einem Import alles löschen!

          @kuessel25 sagte in Türenabfrage Hilfe:

          jetzt gehts

          Dann markiere das Thema in der Überschrift des ersten Beitrags als [gelöst].

          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

          K 1 Reply Last reply
          0
          • paul53P paul53

            @kuessel25 sagte: hatte ich nicht gesehen,danke!

            Vor einem Import alles löschen!

            @kuessel25 sagte in Türenabfrage Hilfe:

            jetzt gehts

            Dann markiere das Thema in der Überschrift des ersten Beitrags als [gelöst].

            K Offline
            K Offline
            kuessel25
            wrote on last edited by
            #25

            @paul53
            hätte noch ne kleine frage,und zwar wäre es jetzt noch möglich eine verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?

            paul53P 1 Reply Last reply
            0
            • K kuessel25

              @paul53
              hätte noch ne kleine frage,und zwar wäre es jetzt noch möglich eine verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?

              paul53P Offline
              paul53P Offline
              paul53
              wrote on last edited by
              #26

              @kuessel25 sagte: verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?

              Bild_2021-01-25_143736.png

              Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
              Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

              1 Reply Last reply
              1
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              Support us

              ioBroker
              Community Adapters
              Donate

              273

              Online

              32.7k

              Users

              82.5k

              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