Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst] Alexa macht mich wahnsinnig

    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] Alexa macht mich wahnsinnig

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

      @paul53
      Im Log steht bei mir nix!
      Datenpunkt wird nicht geschaltet nach ablauf des timeouts ich vermute weil auf true steht.
      Nur setze ich steuere Datenpunkt mit false geht die beleuchtung ja aus.
      Das ja blödsinn

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

        @Aphofis sagte:

        Nur setze ich steuere Datenpunkt mit false geht die beleuchtung ja aus.

        Geht der Triggerdatenpunkt auf false, dann geht sie sofort aus. Bleibt der Trigger-Datenpunkt auf true, wird dieser Datenpunkt nach einer Stunde auf false gesetzt, was wiederum zum Triggern und Auschalten führen soll.

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

          @paul53
          OK klappt habe den Timeout auf 20 sek gestellt und Schrank geht nach 20 sek aus nur die Meldung per Alexa bleibt aus
          Nach dem Ablauf bleibt der Datenpunkt auf true

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

            @Aphofis sagte:

            Nach dem Ablauf bleibt der Datenpunkt auf true

            ?? Welcher ?

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

              @Aphofis sagte:

              nur die Meldung per Alexa bleibt aus

              Verträgt Alexa den Zeilenumbruch (\n) nicht ?

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

                @Aphofis
                Zeile 1: 2 mal Variable entpreller ! Ist im Original nicht enthalten:

                var entprell, text, timeout;
                
                
                on({id: "Aqua_Control.0.System.Schrankbeleuchtung", change: "ne"}, function (obj) {
                  var value = obj.state.val;
                  var oldValue = obj.oldState.val;
                  if (!entprell) {
                    entprell = setTimeout(function () {
                      entprell = null;
                    }, 2000);
                    setState("sonoff.0.Aqua_Control.POWER6", (obj.state ? obj.state.val : ""));
                    if ((obj.state ? obj.state.val : "")) {
                      text = 'Schrankbeleuchtung wurde eingeschaltet';
                      timeout = setTimeout(function () {
                        setState("Aqua_Control.0.System.Schrankbeleuchtung", false);
                        text = ['Schrankbeleuchtung wurde automatisch','\n','nach einer Std. abgeschaltet'].join('');
                      }, 3600000);
                    } else {
                      (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                      if (text.length < 50) {
                        text = 'Schrankbeleuchtung wurde ausgeschaltet';
                      }
                    }
                    sendTo("telegram.0", "send", {
                        text: text
                    });
                    setState("alexa2.0.Echo-Devices.G090LV0371040175.Commands.speak", text);
                  }
                });
                
                1 Reply Last reply Reply Quote 0
                • Aphofis
                  Aphofis @paul53 last edited by

                  @paul53
                  Nach dem eigentlichen 60 min Timeout wird keine Alexa meldung ausgegeben. Ist aber auch nicht so wild.

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

                    @paul53
                    es waren schon wieder zwei variablen in der steuerung.
                    Habe jetzt eine gelöscht.
                    Mal sehen ob alexa nun die richtigen zustände ansagt.
                    wenn man den Datenpunkt Schrankbeleuchtung schaltet, sagt Alexa Schrankbeleuchtung automatisch nach einer Std abgeschaltet.
                    Wenn man den Datenpunkt auf false setzt geht die schrankbeleuchtung aus und Alexa sagt schrankbeleuchtung eingeschaltet.
                    Ist schon etwas komisch
                    Nachtrag:
                    Fehler gefunden: länge von Text fehlte.
                    Doch nach ablauf der 60 min sagt Alexa immer noch nix.

                    Fehler 20:16 besteht nach wie vor:
                    Bildschirmfoto 2019-09-14 um 14.02.47.png

                    var entpreller, text, timeout;
                    
                    
                    on({id: "Aqua_Control.0.System.Schrankbeleuchtung"/*Schrankbeleuchtung*/, change: "ne"}, function (obj) {
                      var value = obj.state.val;
                      var oldValue = obj.oldState.val;
                      if (!entpreller) {
                        entpreller = setTimeout(function () {
                          entpreller = null;
                        }, 2000);
                        setState("sonoff.0.Aqua_Control.POWER6"/*Schrankbeleuchtung*/, (obj.state ? obj.state.val : ""));
                        if ((obj.state ? obj.state.val : "")) {
                          text = 'Schrankbeleuchtung wurde eingeschaltet';
                          timeout = setTimeout(function () {
                            setState("sonoff.0.Aqua_Control.POWER6"/*Schrankbeleuchtung*/, false);
                            text = 'Schrankbeleuchtung wurde automatisch' + 'nach einer Std. abgeschaltet ';
                          }, 15000);
                        } else {
                          (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                          if (text.length < 50) {
                            setState("sonoff.0.Aqua_Control.POWER6"/*Schrankbeleuchtung*/, false);
                            text = 'Schrankbeleuchtung wurde ausgeschaltet';
                          }
                        }
                        sendTo("telegram.0", "send", {
                            text: text
                        });
                        setState("alexa2.0.Echo-Devices.G090LV0371040175.Commands.speak"/*speak*/, text);
                      }
                    });
                    
                    paul53 1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @Aphofis last edited by

                      @Aphofis sagte i:

                      Fehler 20:16 besteht nach wie vor:

                      Initialisiere mal die Variable text vor dem Trigger mit "Schrankbeleuchtung wurde ausgeschaltet".

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

                        @paul53
                        initialisiere???

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

                          @Aphofis sagte:

                          initialisiere???

                          Oberhalb des Triggers: setze text auf "Schrankbeleuchtung wurde ausgeschaltet"

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

                            @paul53
                            eingeschaltet und ausgeschaltet klappt aber nach ablauf der zeit wenn die beleuchtung ausgeht,
                            sagt alexa nix

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

                              var text, entpreller, timeout;
                              
                              
                              text = 'Schrankbeleuchtung wurde ausgeschaltet';
                              on({id: "Aqua_Control.0.System.Schrankbeleuchtung"/*Schrankbeleuchtung*/, change: "ne"}, function (obj) {
                                var value = obj.state.val;
                                var oldValue = obj.oldState.val;
                                if (!entpreller) {
                                  entpreller = setTimeout(function () {
                                    entpreller = null;
                                  }, 2000);
                                  setState("sonoff.0.Aqua_Control.POWER6"/*Schrankbeleuchtung*/, (obj.state ? obj.state.val : ""));
                                  if ((obj.state ? obj.state.val : "")) {
                                    text = 'Schrankbeleuchtung wurde eingeschaltet';
                                    timeout = setTimeout(function () {
                                      setState("sonoff.0.Aqua_Control.POWER6"/*Schrankbeleuchtung*/, false);
                                      text = 'Schrankbeleuchtung wurde automatisch' + 'nach einer Std. abgeschaltet ';
                                    }, 15000);
                                  } else {
                                    (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                                    if (text.length < 50) {
                                      setState("sonoff.0.Aqua_Control.POWER6"/*Schrankbeleuchtung*/, false);
                                      text = 'Schrankbeleuchtung wurde ausgeschaltet';
                                    }
                                  }
                                  sendTo("telegram.0", "send", {
                                      text: text
                                  });
                                  setState("alexa2.0.Echo-Devices.G090LV0371040175.Commands.speak"/*speak*/, text);
                                }
                              });
                              
                              1 Reply Last reply Reply Quote 0
                              • paul53
                                paul53 @Aphofis last edited by paul53

                                @Aphofis sagte:

                                sagt alexa nix

                                Du schaltest nach einer Stunde den falschen Datenpunkt auf false: Es muss der Triggerdatenpunkt sein !

                                1568187945608-blockly_temp.jpg

                                Aphofis 2 Replies Last reply Reply Quote 1
                                • Aphofis
                                  Aphofis @paul53 last edited by Aphofis

                                  @paul53
                                  Ja bis auf nach einer std automatisch
                                  Das schmeisst telegram auch einfach mal so raus das automatisch nach einer std abgeschaltet wurde obwohl ich nur den Datenpunkt auf false gesetzt hatte.

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

                                    Wenn die zeit verstrichen ist wo die schrankbeleuchtung abgeschaltet wird bleibt der datenpunkt im true ich denke mal das der fehler daran liegt.

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

                                      @paul53
                                      Da kann man aber auch durcheinander kommen!
                                      So ein kleiner Fehler!!!
                                      jetzt klappt es Danke

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

                                      Support us

                                      ioBroker
                                      Community Adapters
                                      Donate

                                      733
                                      Online

                                      31.9k
                                      Users

                                      80.3k
                                      Topics

                                      1.3m
                                      Posts

                                      2
                                      22
                                      919
                                      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