Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Alexa Reminder bei Fenster offen

    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

    Alexa Reminder bei Fenster offen

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sprojekt007 last edited by sprojekt007

      Hallo Zusammen,

      ich versuche nun schon länger bei meiner Alexa wenn ein Fenster länger als 3min geöffnet ist einen Reminder abzusetzen. Über "Speak" funktioniert es, hat aber den Nachteil, dass auf dem Handy und der Uhr keine Meldung von Alexa kommt.
      Ich möchte es gerne in Blockly umsetzen, weiss jedoch leider nicht, wie ich den Reminder New Parameter beschreiben soll. Ich habe mir einen UnixTimeStamp als Objekt generiert, welcher beim Öffnen des Fenster + 3 min gerechnet wird. Jetzt gibt es noch eine Variable für den ReminderName. Das sind aber 2 Unterpunkte von Reminder New. Wie kann ich diese beiden Punkte gleichzeitig von Blockly schreiben?

      Als JS hatte ich folgendes versucht, leider ohne Erfolg.

      timeout = setTimeout(async function () {
      
      var unixTimestamp ='javascript.0.Eigene_Punkte.UnixTimeStamp'/*UnixTimeStamp*/
      var reminderName = "Hallo Thorsten"
      
      setState('alexa2.0.Echo-Devices.G090L9117516037Q.Reminder.New'/*Neuer Reminder*/, "unixTimestamp, reminderName");
      
      }, parseInt(5000));
      

      Ich würde die Lösung über Blockly bevorzugen, JS wäre aber auch ok.

      Bitte ein komplettes Beispiel vorgeben.

      Grüße
      Thorsten

      htrecksler 1 Reply Last reply Reply Quote 0
      • htrecksler
        htrecksler Forum Testing @sprojekt007 last edited by

        @sprojekt007

        var idHaustuerAuf = "hm-rpc.0.NEQ1158361.1.STATE";
        var timer    = null;
        subscribe(idHaustuerAuf, function (obj) {
           if (obj.state.val) {
              if (!timer) {
                 timer = setTimeout(function () {
                    timer = null;
                    sendTo('telegram.0', "Haustür länger als 5 Minuten offen!");
                 }, 5*60000);
              }
           } else {
              // Tür zugemacht. Falls timer läuft = stopp
              //sendTo('telegram.0', "Haustür wieder geschlossen!");
              if (timer) {
                 clearTimeout(timer);
                 timer = null;
              }
           }
        });
        

        so hab ich es für die Haustür gelöst, sorry blockly ist nicht mein Ding

        1 Reply Last reply Reply Quote 0
        • L
          Lucky_ESA Developer Most Active last edited by

          Du kannst gerne mein Blockly nehmen und anpassen. Die Datenpunkte Heizung_Restart und Heizung_Text_ONOFF musst du als boolean anlegen.

          <xml xmlns="https://developers.google.com/blockly/xml">
           <variables>
             <variable type="cron" id="WC">WC</variable>
           </variables>
           <block type="on_ext" id="7h}7i!!CXJ=QW[A|Y${L" x="-662" y="-437">
             <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
             <field name="CONDITION">ne</field>
             <field name="ACK_CONDITION"></field>
             <value name="OID0">
               <shadow type="field_oid" id="|?8rc)NMtI!X3M~|XlG7">
                 <field name="oid">hm-rpc.0.0000xxxxxxxxxxxxxx.1.STATE</field>
               </shadow>
             </value>
             <value name="OID1">
               <shadow type="field_oid" id="/Yg0!C$BLc+D1.r^*CXc">
                 <field name="oid">0_userdata.0.Sonstiges.Heizung_Restart</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="l=m^dKZ[7OgJ,Xqzf`?J">
                 <mutation else="1"></mutation>
                 <value name="IF0">
                   <block type="get_value" id="759*x88D6a:%].~F7+5p">
                     <field name="ATTR">val</field>
                     <field name="OID">hm-rpc.0.000xxxxxxxxxxxx.1.STATE</field>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="debug" id="3y};d{+iWR}=$8/|x$TS">
                     <field name="Severity">log</field>
                     <value name="TEXT">
                       <shadow type="text" id="r1cdwlQb,*6NAk=9#OIy">
                         <field name="TEXT">Check WC Start</field>
                       </shadow>
                     </value>
                     <next>
                       <block type="telegram" id="IF^gQ}rT-r9#[fXYAaw-">
                         <field name="INSTANCE">.0</field>
                         <field name="LOG"></field>
                         <field name="SILENT">FALSE</field>
                         <field name="PARSEMODE">default</field>
                         <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                         <value name="MESSAGE">
                           <shadow type="text" id=":WI%YwqI:RSu;wToLO]=">
                             <field name="TEXT">Check WC Start</field>
                           </shadow>
                         </value>
                         <next>
                           <block type="schedule_create" id="THIWrMNhth?Dk#u4!nYf">
                             <field name="NAME">WC</field>
                             <value name="SCHEDULE">
                               <shadow type="field_cron" id="Cx(H{1nQXoDk8zhaE9k$">
                                 <field name="CRON">*/10 * * * *</field>
                               </shadow>
                             </value>
                             <statement name="STATEMENT">
                               <block type="controls_if" id="F*:7Pj7EltS!XBe/dL`2">
                                 <value name="IF0">
                                   <block type="get_value" id="v*)Z|28Mx#xa4/!uj}%@">
                                     <field name="ATTR">val</field>
                                     <field name="OID">0_userdata.0.Heizung_Text_ONOFF</field>
                                   </block>
                                 </value>
                                 <statement name="DO0">
                                   <block type="control" id="c1C{w9kHgE#3wzU=-*-t">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">alexa2.0.Echo-Devices.G0911xxxxxxxxxxxW.Commands.speak</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="text" id="!Fl$EF+OQ~c*C/bt=466">
                                         <field name="TEXT">Das Fenster im Gäste WC ist noch geöffnet.</field>
                                       </block>
                                     </value>
                                   </block>
                                 </statement>
                                 <next>
                                   <block type="controls_if" id="sJs/L56gv#IRx#PlosSY">
                                     <value name="IF0">
                                       <block type="logic_compare" id="/u4o1NyaGx38(pxq6cU|">
                                         <field name="OP">EQ</field>
                                         <value name="A">
                                           <block type="get_value" id="-.fL;[fSqQgaOPcu1lBX">
                                             <field name="ATTR">val</field>
                                             <field name="OID">fritzboxdect.0.DECT_xxxxxxxxxxxxxxxxx.hkr.holidayactive</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="logic_boolean" id="*pETG.d$w8Kke.Y4I5Qo">
                                             <field name="BOOL">FALSE</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="controls_if" id="3v_U=-oMWl:;$Dam3VW}">
                                         <value name="IF0">
                                           <block type="logic_operation" id="@2HjxzxR.g84u42)$t3." inline="false">
                                             <field name="OP">OR</field>
                                             <value name="A">
                                               <block type="logic_compare" id="?[7YLtVn=M2K^DwsR57e">
                                                 <field name="OP">NEQ</field>
                                                 <value name="A">
                                                   <block type="get_value" id="yTVxq:~]gr)U|Fig7Z{n">
                                                     <field name="ATTR">val</field>
                                                     <field name="OID">fritzboxdect.0.DECT_xxxxxxxxxxxxxxxxx.hkr.tsoll</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <block type="text" id="}*3*XMYsznu_)J|U%bWP">
                                                     <field name="TEXT">off</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <block type="logic_compare" id="NIbdSJ02{[P%T-rw+Y;*">
                                                 <field name="OP">NEQ</field>
                                                 <value name="A">
                                                   <block type="get_value" id="^WJW/*eHK!ZJ`wNDDxDB">
                                                     <field name="ATTR">val</field>
                                                     <field name="OID">fritzboxdect.0.DECT_xxxxxxxxxxxxxxxxx.hkr.tsoll</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <block type="text" id="%cT1LnDcS$9BEQuzYb/k">
                                                     <field name="TEXT">off</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <statement name="DO0">
                                           <block type="control" id="?5=R,o=G.(@31R@U=$+N">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">fritzboxdect.0.DECT_xxxxxxxxxxxxxxxxx.hkr.tsoll</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="HLJ_/Ngm$v+xoPC(.cPi">
                                                 <field name="NUM">1</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="control" id="l4M=;(:*qxgq_)u}V~Pz">
                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                 <field name="OID">fritzboxdect.0.DECT_xxxxxxxxxxxxxxx.hkr.tsoll</field>
                                                 <field name="WITH_DELAY">FALSE</field>
                                                 <value name="VALUE">
                                                   <block type="math_number" id="`uQ!a3df=g^Ckf7eRk.C">
                                                     <field name="NUM">1</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </next>
                                           </block>
                                         </statement>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <statement name="ELSE">
                   <block type="schedule_clear" id="s:-+BXDxZ!LpSQcQJ_XI">
                     <field name="NAME">WC</field>
                     <next>
                       <block type="debug" id="uLy%OU=[}J.RtDVOB|yW">
                         <field name="Severity">log</field>
                         <value name="TEXT">
                           <shadow type="text" id="SX-COMp@Yl1!U=AM)|`r">
                             <field name="TEXT">Check WC Stopp</field>
                           </shadow>
                         </value>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
             </statement>
           </block>
          </xml>
          

          Gruß//Lucky

          1 Reply Last reply Reply Quote 0
          • S
            sprojekt007 last edited by

            Vielen Dank für die guten Beispiele. Leider suche ich nicht nach dem Command "Speak" sondern nach der Möglichkeit einen neuen Reminder über Blockly oder JS auszulösen. Der Reminder ist z.B. "Alexa, erinnere mich in 3min an das Fenster". Der Vorteil ist, dass diese Meldung auf dem Handy und der Uhr angezeigt werden, die Speak Anweisung jedoch nur am Echo Gerät selbst ausgegeben wird.

            Vielleicht habt ihr noch ein Beispiel für den Reminder Befehl.

            Grüße
            Thorsten

            Dr. Bakterius B 2 Replies Last reply Reply Quote 0
            • Dr. Bakterius
              Dr. Bakterius Most Active @sprojekt007 last edited by

              @sprojekt007 sagte in Alexa Reminder bei Fenster offen:

              Vielleicht habt ihr noch ein Beispiel für den Reminder Befehl.

              Keine Ahnung ob das funktioniert. Wenn es über die Alexa-App nicht geht, dann auch mit ioBroker nicht.

              Wenn man einen neuen Reminder per Sprachbefehl anlegt, scheint dieser im Alexa-Adapter so auf:
              reminder.png

              Wie soll man den (Ordner und Datenpunkte) anlegen?

              Ich würde zum Speak-Command einfach noch mittels Pushover oder Telegram eine Nachricht ans Handy senden.

              1 Reply Last reply Reply Quote 0
              • B
                Buchi @sprojekt007 last edited by

                @sprojekt007
                https://github.com/Apollon77/ioBroker.alexa2 sagt:

                new - Add a new reminder in the format
                time(hh:mm),text

                12:00,Remind me

                Dr. Bakterius 1 Reply Last reply Reply Quote 1
                • Dr. Bakterius
                  Dr. Bakterius Most Active @Buchi last edited by

                  @buchi Danke, wieder etwas gelernt - funktioniert auch so wie beschrieben... 👍

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

                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  935
                  Online

                  31.9k
                  Users

                  80.1k
                  Topics

                  1.3m
                  Posts

                  5
                  7
                  496
                  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