Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Emails empfangen.

    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

    Emails empfangen.

    This topic has been deleted. Only users with topic management privileges can see it.
    • Salzer Michael
      Salzer Michael @liv-in-sky last edited by

      @liv-in-sky

      hab neue e-mail angelegt
      gmail machte probleme

      was sollte eigentlich bei dp "reception" angelegt werden ?
      der bleibt mir leer ?

      bis auf meine alarmquittierung klappt das so weit.
      bekomm derzeit noch nit hin das wenn "neue mail " da ist und die anrufe gestartet werden das mit nem quittieren die anrufe bende.

      für jeden denkanstoß dankbar wäre .
      oder nach was könnt suchen im forum ?

      liv-in-sky 1 Reply Last reply Reply Quote 0
      • liv-in-sky
        liv-in-sky @Salzer Michael last edited by

        @salzer-michael

        reception ist ein überbleibsel von einem anderen script - wird nicht aktualisiert !

        was meinst du mit anrufe quittieren ? wo bzw wie willst du quittieren. bei einem neuen mail, kommt es zu einem anruf. den kannst du annehmen oder "wegdrücken" - dann kommt doch erst wieder ein anruf, wenn ein neues mail da ist

        Salzer Michael 1 Reply Last reply Reply Quote 0
        • Salzer Michael
          Salzer Michael @liv-in-sky last edited by

          @liv-in-sky
          hab ne schleife drinnen
          neues mail
          anruf und nachricht per telegram
          max 10 wiederholungen wenn in der nacht nicht höre
          quittieren wenns gehört wurde damit nicht noch x mal angerufen wird

          so sollts funktionieren
          58d521b5-1a0e-4a1b-b7dc-2850c2740dc3-image.png

          Vielen lieben Dank für die Unterstützung

          liv-in-sky 2 Replies Last reply Reply Quote 0
          • liv-in-sky
            liv-in-sky @Salzer Michael last edited by

            @salzer-michael

            jetzt verstehe ich, du möchtest den call mit einem datenpunkt bestätigen (also von hand) - das problem bei dem blockly baustein mit dem anrufen ist, dass man kein feedback bekommt, ob der anruf angenommen wurde.

            mit diesem baustein kann man auch direkt den apibot nutzen und bekommt dann ein feedback

            Image 2.png

            damit kann man dann einfach ein script machen, welches automatisch die call-antwort erkennt. das script kann wahrscheinlich noch verbessert werden

            • es versucht 10 mal anzurufen, wenn der call nicht beanrwortet wird
            • wird der call angenommen oder "rejected" wird das script nicht weiter anrufen
            • es prüft, dass zwischen den anrufen mind. 65 sek sind, da der bot sonst nicht anruft

            Image 3.png

            script für import:

            <xml xmlns="https://developers.google.com/blockly/xml">
             <variables>
               <variable id="m6C(]?IK|wH{|pGVVx@F">countCalls</variable>
               <variable id="29eNbdg;U(3)s_]JhfG2">Misse4dCallsVar</variable>
               <variable id="[9YV3=smQW.ZVpWWwXyG">lastCallInBetween</variable>
               <variable id="i2LQ+=xJVh:3^NtkAcE$">result</variable>
             </variables>
             <block type="procedures_defnoreturn" id="ux`IV].M751b?;Id]*CQ" x="1413" y="63">
               <field name="NAME">anrufen</field>
               <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
               <statement name="STACK">
                 <block type="math_change" id="@|u4G~+fe/@#aZE1cp7b">
                   <field name="VAR" id="m6C(]?IK|wH{|pGVVx@F">countCalls</field>
                   <value name="DELTA">
                     <shadow type="math_number" id="PAI{Cj+Xd,(J-DA0zgs%">
                       <field name="NUM">1</field>
                     </shadow>
                     <block type="math_number" id="=RDU.+p]E/DJzGm*I@ey">
                       <field name="NUM">1</field>
                     </block>
                   </value>
                   <next>
                     <block type="controls_if" id=")`$4~$?txUI2X:K4xqV4">
                       <value name="IF0">
                         <block type="logic_compare" id="1mF%x4~(prJ6YmK!3k_A">
                           <field name="OP">LT</field>
                           <value name="A">
                             <block type="variables_get" id="YE+MB8z?eO}8O),)*0Rc">
                               <field name="VAR" id="m6C(]?IK|wH{|pGVVx@F">countCalls</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id=".wU_rLAPg4s;U.Yhi9vu">
                               <field name="NUM">2</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="comment" id="79ampt.4|Gqw%}5$Sdu.">
                           <field name="COMMENT">schickt einmal ein  telegram</field>
                           <next>
                             <block type="telegram" id="!_:#CRZHI2e-=?zZaJUN">
                               <field name="INSTANCE">.1</field>
                               <field name="LOG"></field>
                               <field name="SILENT">FALSE</field>
                               <field name="PARSEMODE">default</field>
                               <value name="MESSAGE">
                                 <shadow type="text" id="]9F^/Xb@#M;c`D),$+s)">
                                   <field name="TEXT">text</field>
                                 </shadow>
                                 <block type="text" id="*}(vP^Q:#n.aw7$w,-W)">
                                   <field name="TEXT">probier mal das</field>
                                 </block>
                               </value>
                             </block>
                           </next>
                         </block>
                       </statement>
                       <next>
                         <block type="variables_set" id="WTJ2`@BtvM5tldAX~V(i">
                           <field name="VAR" id="[9YV3=smQW.ZVpWWwXyG">lastCallInBetween</field>
                           <value name="VALUE">
                             <block type="time_get" id="4d20,*8:=Opx(KxoZ``*">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                               <field name="OPTION">object</field>
                             </block>
                           </value>
                           <next>
                             <block type="comment" id="q|$d?X6b~INeNArC+z[L">
                               <field name="COMMENT">macht anruf</field>
                               <next>
                                 <block type="comment" id="L?H?s]~7E0%lna8b`OFh">
                                   <field name="COMMENT">du musst deinen user eintragen</field>
                                   <next>
                                     <block type="request" id="|4I@U}}Q6wf,Uno!Bd,-">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                       <field name="WITH_STATEMENT">TRUE</field>
                                       <field name="LOG"></field>
                                       <value name="URL">
                                         <shadow type="text">
                                           <field name="TEXT">http://api.callmebot.com/start.php?source=auth&amp;user=@Liv_in_sky&amp;text=This%20is%20a%20test%20from%20Callmebot&amp;lang=en-US-Standard-B</field>
                                         </shadow>
                                         <block type="text_join" id="p[R,:ztM15x2J?QU0DfA">
                                           <mutation items="5"></mutation>
                                           <value name="ADD0">
                                             <block type="text" id="yr[ec+??K%bVJ!|/R:_C">
                                               <field name="TEXT">http://api.callmebot.com/start.php?source=auth&amp;user=</field>
                                             </block>
                                           </value>
                                           <value name="ADD1">
                                             <block type="text" id="[D6*/}W7yWpht/cAIH{F">
                                               <field name="TEXT">@ ....</field>
                                             </block>
                                           </value>
                                           <value name="ADD2">
                                             <block type="text" id="j@d.mO:FABpY8I;gl8Wu">
                                               <field name="TEXT">&amp;text=</field>
                                             </block>
                                           </value>
                                           <value name="ADD3">
                                             <block type="text" id="WDPr)`ki,akEgV.CcU4v">
                                               <field name="TEXT">probier mal das</field>
                                             </block>
                                           </value>
                                           <value name="ADD4">
                                             <block type="text" id="uui}}~5d$/T(]ZM0ZFv2">
                                               <field name="TEXT">&amp;lang=de-DE-Standard-A</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <statement name="STATEMENT">
                                         <block type="comment" id="Xzh[N7Gz)yrdm9-W;{hS">
                                           <field name="COMMENT">wertet anruf aus</field>
                                           <next>
                                             <block type="comment" id="^K~xrFOdrv;b,3oCOo~@">
                                               <field name="COMMENT">und setzt vari's für wiederholung</field>
                                               <next>
                                                 <block type="debug" id="cZgLE]gC^Io$7S0#tuVY">
                                                   <field name="Severity">log</field>
                                                   <value name="TEXT">
                                                     <shadow type="text">
                                                       <field name="TEXT">test</field>
                                                     </shadow>
                                                     <block type="variables_get" id="wn(+f-2+~B4y_q/o,#1H">
                                                       <field name="VAR" id="i2LQ+=xJVh:3^NtkAcE$">result</field>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="comment" id="=%=S~fZvghI0p$iUjYru">
                                                       <field name="COMMENT">hier anzahl der call-versuche</field>
                                                       <next>
                                                         <block type="controls_if" id="E{NyJ6G!F9X7DehK`r^i">
                                                           <mutation else="1"></mutation>
                                                           <value name="IF0">
                                                             <block type="logic_operation" id="QX?/[Qm+[n83@p9QRd;U" inline="false">
                                                               <field name="OP">AND</field>
                                                               <value name="A">
                                                                 <block type="logic_compare" id="MuJF1o1jsFvNP!ayQW74">
                                                                   <field name="OP">GT</field>
                                                                   <value name="A">
                                                                     <block type="text_indexOf" id="?0Dkcl,zmSHYyX:-Yqxt">
                                                                       <field name="END">FIRST</field>
                                                                       <value name="VALUE">
                                                                         <block type="variables_get" id="uU`wax%}zN|u}8*NfI=b">
                                                                           <field name="VAR" id="i2LQ+=xJVh:3^NtkAcE$">result</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="FIND">
                                                                         <shadow type="text">
                                                                           <field name="TEXT">abc</field>
                                                                         </shadow>
                                                                         <block type="text" id="BqPbq}%X3KZKAE`|UU,S">
                                                                           <field name="TEXT">Missed Call</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <block type="math_number" id="bfd+[,yK*:^Y!_Z8#0wq">
                                                                       <field name="NUM">0</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <block type="logic_compare" id=":CzdR*CH[*-e{suzcck-">
                                                                   <field name="OP">LT</field>
                                                                   <value name="A">
                                                                     <block type="variables_get" id="zF{yhfZB$D!?]kR+twRR">
                                                                       <field name="VAR" id="m6C(]?IK|wH{|pGVVx@F">countCalls</field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <block type="math_number" id="wnI6Y@WgvKCgZ/7YQxbC">
                                                                       <field name="NUM">10</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <statement name="DO0">
                                                             <block type="debug" id="L-$yj]W_@xmF{Vp0LNGS">
                                                               <field name="Severity">log</field>
                                                               <value name="TEXT">
                                                                 <shadow type="text" id="*X2^|^SPKa%ic^rYgg$h">
                                                                   <field name="TEXT">Missed Call detected !!!</field>
                                                                 </shadow>
                                                                 <block type="text_join" id="kaDX(%6~rby2}:d#.Ht|">
                                                                   <mutation items="3"></mutation>
                                                                   <value name="ADD0">
                                                                     <block type="text" id="7@wQT=/7dak2?zFZ?LpY">
                                                                       <field name="TEXT">Missed Call detected !!! ( </field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="ADD1">
                                                                     <block type="variables_get" id="w`1}YSQ(cGKkUG^,9XXy">
                                                                       <field name="VAR" id="m6C(]?IK|wH{|pGVVx@F">countCalls</field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="ADD2">
                                                                     <block type="text" id="nR;v}u3YgytslLc*Ac|n">
                                                                       <field name="TEXT"> Versuch(e) )</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <next>
                                                                 <block type="variables_set" id="S,Zp$@LMOc!Q,BsVnS_w">
                                                                   <field name="VAR" id="29eNbdg;U(3)s_]JhfG2">Misse4dCallsVar</field>
                                                                   <value name="VALUE">
                                                                     <block type="logic_boolean" id=")}tOKg-CmM!t(JZt4OVG">
                                                                       <field name="BOOL">TRUE</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </statement>
                                                           <statement name="ELSE">
                                                             <block type="variables_set" id="#({H[[%2+Sy:hu]h$XXd">
                                                               <field name="VAR" id="29eNbdg;U(3)s_]JhfG2">Misse4dCallsVar</field>
                                                               <value name="VALUE">
                                                                 <block type="logic_boolean" id="b*1M)0yiQt!2mAVWi7vu">
                                                                   <field name="BOOL">FALSE</field>
                                                                 </block>
                                                               </value>
                                                               <next>
                                                                 <block type="variables_set" id="rbaj|pnm!T-5evLmVdq|">
                                                                   <field name="VAR" id="m6C(]?IK|wH{|pGVVx@F">countCalls</field>
                                                                   <value name="VALUE">
                                                                     <block type="math_number" id="WmegkCAAecU9a.t:kwB1">
                                                                       <field name="NUM">0</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </statement>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </statement>
             </block>
             <block type="comment" id="~mlTh!n}|hPy_=K}KWf-" x="662" y="113">
               <field name="COMMENT">reset der var bei script start</field>
               <next>
                 <block type="variables_set" id="{WCj92D-ah(I{S!yZzvX">
                   <field name="VAR" id="29eNbdg;U(3)s_]JhfG2">Misse4dCallsVar</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="cf3]a..0X`WW(7)b-bN_">
                       <field name="BOOL">FALSE</field>
                     </block>
                   </value>
                   <next>
                     <block type="variables_set" id="-bg~[a$z:MfVA3=Y3:DO">
                       <field name="VAR" id="m6C(]?IK|wH{|pGVVx@F">countCalls</field>
                       <value name="VALUE">
                         <block type="math_number" id="ad*PYsXl~36~1c)~Py},">
                           <field name="NUM">0</field>
                         </block>
                       </value>
                       <next>
                         <block type="comment" id="nd8}MtT?]rTfX_~Fv*B9">
                           <field name="COMMENT">überwacht mail anzahl</field>
                           <next>
                             <block type="on_ext" id="RXXy|pD]+ANEsquZ3nz(">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                               <field name="CONDITION">gt</field>
                               <field name="ACK_CONDITION"></field>
                               <value name="OID0">
                                 <shadow type="field_oid" id="m+};7-.0w^3mFD6k6mB*">
                                   <field name="oid">controll-own.0.AAATEST.TestZahlPx</field>
                                 </shadow>
                               </value>
                               <statement name="STATEMENT">
                                 <block type="procedures_callnoreturn" id="BPH)lv`ZwM%vUEA,Q0s5">
                                   <mutation name="anrufen"></mutation>
                                 </block>
                               </statement>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
             <block type="comment" id=")[t,*FL{VOOmoUX$d^$U" x="587" y="363">
               <field name="COMMENT">reset der var bei script start</field>
               <next>
                 <block type="schedule" id=":~{_(%v8m6cCEj9f%=/K">
                   <field name="SCHEDULE">*/2 * * * *</field>
                   <statement name="STATEMENT">
                     <block type="controls_if" id="w:NA4`G:xAbrE6C3W0TI">
                       <value name="IF0">
                         <block type="logic_operation" id="pp,^]Ih[`Ge`33UH$(n/" inline="false">
                           <field name="OP">AND</field>
                           <value name="A">
                             <block type="variables_get" id="+BOwCKN^c+np]/One..f">
                               <field name="VAR" id="29eNbdg;U(3)s_]JhfG2">Misse4dCallsVar</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="logic_compare" id="=i+!8]5183XaOdXk9-|t">
                               <field name="OP">GT</field>
                               <value name="A">
                                 <block type="math_arithmetic" id="P|{=L(-Cy+jL}X^93Jpz">
                                   <field name="OP">MINUS</field>
                                   <value name="A">
                                     <shadow type="math_number" id="1j!@r6)Oi#Vy`/vn+n45">
                                       <field name="NUM">1</field>
                                     </shadow>
                                     <block type="time_get" id="Xsly6*[)yg9O;{f2|JZ=">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                       <field name="OPTION">object</field>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <shadow type="math_number" id="lw8pDe]iN0yvTbt~HEX)">
                                       <field name="NUM">1</field>
                                     </shadow>
                                     <block type="variables_get" id="RSxQ%G*X4%{gK8gG[8G%">
                                       <field name="VAR" id="[9YV3=smQW.ZVpWWwXyG">lastCallInBetween</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="d{,rpn3T)pT)CysWoXO}">
                                   <field name="NUM">65000</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="procedures_callnoreturn" id="u@heKzaj;).)Utr9KYP[">
                           <mutation name="anrufen"></mutation>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
            </xml>
            

            1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @Salzer Michael last edited by liv-in-sky

              @salzer-michael

              wenn du das script importierst,

              • mußt du noch den datenpunkt für die mailanzahl definieren
              • deinen usernamen im request blockly eingeben
              • und definieren, was der anruf sagen soll

              Image 4.png

              Image 5.png

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

                Hallo Forum,

                das Script hier ist genau das, was ich gesucht habe! Leider komme ich nicht mehr weiter und benötige Hilfe:
                Ich habe in der Instanz des Javascript-Adapters die folgenden npm-Pakete eingetragen:
                99fe0ef5-d197-4f1f-a86e-1a1870b14cc9-image.png
                Und dann ein Script angelegt, wie es hier im Thread zu finden ist:

                var mailobj = {val:
                                {
                                    from:  "",
                                    topic: "",
                                    text: "",
                                }
                            };
                createState("Email.Reception",mailobj);
                createState("Email.from_address");
                createState("Email.from_name");
                createState("Email.mail_subject");
                createState("Email.mail_text");
                
                schedule("*/2 * * * *", function (obj) {
                    var MailListener = require("mail-listener2");
                    var mailListener = new MailListener({
                        username: "meine Mailadresse",
                        password: "mein Passwort",
                        host: "mein Host",
                        port: 993, // imap port
                        tls: true,
                        connTimeout: 10000, // Default by node-imap
                        authTimeout: 5000, // Default by node-imap,
                        debug: console.log, // Or your custom function with only one incoming argument. Default: null
                        tlsOptions: { rejectUnauthorized: false },
                        mailbox: "INBOX", // mailbox to monitor
                        searchFilter: ["UNSEEN", "FLAGGED"], // the search filter being used after an IDLE notification has been retrieved
                        markSeen: false, // all fetched email willbe marked as seen and not fetched next time
                        fetchUnreadOnStart: true, // use it only if you want to get all unread email on lib start. Default is `false`,
                        mailParserOptions: {streamAttachments: false}, // options to be passed to mailParser lib.
                        attachments: false, // download attachments as they are encountered to the project directory
                        attachmentOptions: { directory: "attachments/" } // specify a download directory for attachments
                    });
                
                    mailListener.start(); // start listening
                    mailListener.on("server:connected", function(){console.log("imapconconnected");});
                    mailListener.on("server:disconnected", function(){console.log("imapDisconnected");});
                    mailListener.on("error", function(err){console.log(err);});
                    mailListener.on("mail", function(mail, seqno, attributes){
                        log(mail.from[0].address);
                        log(mail.from[0].name);
                        log(mail.subject);
                        log( mail.text);
                
                        console.log('Mailabsender: '+mail.from[0].address);
                        console.log('Absendername: '+mail.from[0].name);
                        console.log('Betreff: '+mail.subject);
                
                        var mailobj = {val:
                                {
                                    from:  mail.from[0].name,
                                    topic: mail.subject,
                                    text:  mail.text
                                }
                            };
                        setState("Email.Reception", mailobj);
                        setState("Email.from_address", mail.from[0].address);
                        setState("Email.from_name", mail.from[0].name);
                        setState("Email.mail_subject", mail.subject);
                        setState("Email.mail_text", mail.text);
                 
                    });
                    mailListener.on("attachment", function(attachment){console.log(attachment.path);});
                    setTimeout(function(){mailListener.stop();},20000);
                });  
                

                Das Script scheint grundsätzlich zu funktionieren, denn im Log-File erhalte ich die entsprechenden Meldungen:
                f74ca8b8-e49e-4d01-9720-6797b731c0da-image.png

                Allerdings werden weder die console.log-Anweisungen in der obigen Funktion: mailListener.on("mail", function(mail, seqn, attributes){... ausgegeben, noch die Datenpunkte mit Werten befüllt - was natürlich logisch ist, wenn die Funktion nicht ausgeführt wird.

                Ein Neustart von Adapter und Iobroker bringt leider nichts.

                Könnte es evtl. mit der folgenden Meldung zusammen hängen:
                c1657172-3709-4189-882d-66a8dc8987e3-image.png
                Was ist zu tun?

                Danke Euch vorab!

                S 1 Reply Last reply Reply Quote 0
                • S
                  SirTom @SirTom last edited by

                  So, wie es häufig zugeht: Wenn man jemand um Hilfe bittet, findet man das Problem oft doch selbst. Für alle die das gleiche Problem haben sollten:

                  Es scheint wohl mit dem Mailserver zusammenzuhängen. Nachdem ich im Script unter searchFilter "Flagged" entfernt habe, funktioniert es nun:

                   searchFilter: ["UNSEEN"], // the search filter being used after an IDLE notification has been retrieved
                  
                  1 Reply Last reply Reply Quote 0
                  • C
                    chhe last edited by chhe

                    Hallo,

                    ich konnte das Script erfolgreich installieren. Leider funktioniert die Option nicht, dass eingelesene Emails nicht als gelesen markiert werden.

                    markSeen: false, // all fetched email will be marked as seen and not fetched next time
                    

                    Dennoch werden die Emails im Postfach durch das Script als gelesen markiert. Woran könnte das liegen?
                    Bei dem Postfach handelt es sich um ein Apple iCloud Postfach.

                    1 Reply Last reply Reply Quote 0
                    • D
                      Dragon last edited by

                      Ich habe einen Fehler im Log:

                      script.js.common.Automatisierung.ioBroker.Mail_listener: <= 'A1 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)'
                      

                      Das Problem ist aber die Logindaten stimmen zu 100%

                      hat jemand eine Idee?

                      1 Reply Last reply Reply Quote 0
                      • D
                        Dragon last edited by

                        Tja, was soll ich sagen. Es liegt an Gmail. Es ist nicht möglich dieses Skript mit Gmail zu nutzen. Ein anderer Anbieter und es funktioniert auf Anhieb...

                        Danke trotzdem für die Hilfe.

                        liv-in-sky M 2 Replies Last reply Reply Quote 0
                        • liv-in-sky
                          liv-in-sky @Dragon last edited by

                          @dragon

                          ich bin mitttlerweile auf nodered umgestiegen, um emails zu lesen - mail-listener funktioniert bei mir auch nicht mehr richtig

                          D3ltoroxp 1 Reply Last reply Reply Quote 0
                          • M
                            MCU @Dragon last edited by

                            @dragon Man kann auch mit Google gmail das Script nutzen. Man muss dann nur ein sogenanntes APP-Passwort nutzen. Mit dem normalen Google-Passwort klappt es nicht, da dort 2-Faktoren-Authentifizierung genutzt wird.

                            D 1 Reply Last reply Reply Quote 0
                            • D3ltoroxp
                              D3ltoroxp @liv-in-sky last edited by

                              @liv-in-sky Gibt es da Infos oder eine Anleitung, wie ich sowas mit Nodered umsetzte, Mails zu lesen. Ich würde hier ganz gern auf Mails von Teams Accounts hören, damit ich dann in der VIS angezeigt bekomme, das Lehrer geschrieben haben. Bei mehr als einem Kind wirds schon schwierig, ich will ja nicht ständig die Accounts switchen um zu sehen ob jemand was geschrieben hat.

                              liv-in-sky 1 Reply Last reply Reply Quote 0
                              • liv-in-sky
                                liv-in-sky @D3ltoroxp last edited by

                                @d3ltoroxp

                                habe das vor kurzem gemacht: https://forum.iobroker.net/post/859755

                                evtl kannst du das mal importieren (in nodered) und für dich angleichen - ich lese nur bestimmte absender aus und brauche die subjects der mails - welche dann in einem json landen und in ener tabelle in der vis angezeigt werden

                                [
                                   {
                                       "id": "d52ebcff53c14799",
                                       "type": "switch",
                                       "z": "5a6176b51ab86746",
                                       "name": "filter Subjects",
                                       "property": "topic",
                                       "propertyType": "msg",
                                       "rules": [
                                           {
                                               "t": "cont",
                                               "v": "Mister-xtra",
                                               "vt": "str"
                                           }
                                       ],
                                       "checkall": "true",
                                       "repair": false,
                                       "outputs": 1,
                                       "x": 380,
                                       "y": 160,
                                       "wires": [
                                           [
                                               "c841e936c5fb836e",
                                               "874f0070cd2c8aed"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "91776f473b1d5a94",
                                       "type": "debug",
                                       "z": "5a6176b51ab86746",
                                       "name": "debug 2",
                                       "active": false,
                                       "tosidebar": true,
                                       "console": false,
                                       "tostatus": false,
                                       "complete": "payload.date",
                                       "targetType": "msg",
                                       "statusVal": "",
                                       "statusType": "auto",
                                       "x": 640,
                                       "y": 240,
                                       "wires": []
                                   },
                                   {
                                       "id": "a301776e0b4ab440",
                                       "type": "ioBroker out",
                                       "z": "5a6176b51ab86746",
                                       "name": "EMAILSSerien",
                                       "topic": "0_userdata.0.CONTROL-OWN.LG-TV.EMAILSSerien",
                                       "ack": "false",
                                       "autoCreate": "false",
                                       "stateName": "",
                                       "role": "",
                                       "stateUnit": "",
                                       "stateMin": "",
                                       "stateMax": "",
                                       "x": 1380,
                                       "y": 240,
                                       "wires": []
                                   },
                                   {
                                       "id": "c841e936c5fb836e",
                                       "type": "change",
                                       "z": "5a6176b51ab86746",
                                       "name": "PayloadZuTopic",
                                       "rules": [
                                           {
                                               "t": "move",
                                               "p": "payload",
                                               "pt": "msg",
                                               "to": "payload.text",
                                               "tot": "msg"
                                           },
                                           {
                                               "t": "move",
                                               "p": "topic",
                                               "pt": "msg",
                                               "to": "payload.title",
                                               "tot": "msg"
                                           },
                                           {
                                               "t": "move",
                                               "p": "date",
                                               "pt": "msg",
                                               "to": "payload.date",
                                               "tot": "msg"
                                           }
                                       ],
                                       "action": "",
                                       "property": "",
                                       "from": "",
                                       "to": "",
                                       "reg": false,
                                       "x": 580,
                                       "y": 160,
                                       "wires": [
                                           [
                                               "2577918675fe0576",
                                               "91776f473b1d5a94"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "fdd008106af609cd",
                                       "type": "json",
                                       "z": "5a6176b51ab86746",
                                       "name": "",
                                       "property": "payload",
                                       "action": "str",
                                       "pretty": true,
                                       "x": 1470,
                                       "y": 160,
                                       "wires": [
                                           [
                                               "a301776e0b4ab440"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "1e178307f45b0ef9",
                                       "type": "join",
                                       "z": "5a6176b51ab86746",
                                       "name": "",
                                       "mode": "custom",
                                       "build": "array",
                                       "property": "payload",
                                       "propertyType": "msg",
                                       "key": "topic",
                                       "joiner": "\\n",
                                       "joinerType": "str",
                                       "accumulate": false,
                                       "timeout": "10",
                                       "count": "",
                                       "reduceRight": false,
                                       "reduceExp": "",
                                       "reduceInit": "",
                                       "reduceInitType": "",
                                       "reduceFixup": "",
                                       "x": 1090,
                                       "y": 160,
                                       "wires": [
                                           [
                                               "507fb8bc44d94c4b",
                                               "9aa040b4c0ec620f"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "2577918675fe0576",
                                       "type": "change",
                                       "z": "5a6176b51ab86746",
                                       "name": "KommaErsetzen",
                                       "rules": [
                                           {
                                               "t": "change",
                                               "p": "payload.title",
                                               "pt": "msg",
                                               "from": ",",
                                               "fromt": "str",
                                               "to": "",
                                               "tot": "str"
                                           },
                                           {
                                               "t": "change",
                                               "p": "payload.title",
                                               "pt": "msg",
                                               "from": "Mister-xtra ",
                                               "fromt": "str",
                                               "to": "",
                                               "tot": "str"
                                           },
                                           {
                                               "t": "change",
                                               "p": "payload.title",
                                               "pt": "msg",
                                               "from": "ist online verfügbar.",
                                               "fromt": "str",
                                               "to": "",
                                               "tot": "str"
                                           }
                                       ],
                                       "action": "",
                                       "property": "",
                                       "from": "",
                                       "to": "",
                                       "reg": false,
                                       "x": 770,
                                       "y": 160,
                                       "wires": [
                                           [
                                               "6001653e634e71a1"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "874f0070cd2c8aed",
                                       "type": "debug",
                                       "z": "5a6176b51ab86746",
                                       "name": "debug 3",
                                       "active": false,
                                       "tosidebar": true,
                                       "console": false,
                                       "tostatus": false,
                                       "complete": "true",
                                       "targetType": "full",
                                       "statusVal": "",
                                       "statusType": "auto",
                                       "x": 420,
                                       "y": 240,
                                       "wires": []
                                   },
                                   {
                                       "id": "507fb8bc44d94c4b",
                                       "type": "function",
                                       "z": "5a6176b51ab86746",
                                       "name": "function 1",
                                       "func": "var x = msg.payload;\nmsg.payload=x.slice().reverse()\n\nreturn msg;",
                                       "outputs": 1,
                                       "noerr": 0,
                                       "initialize": "",
                                       "finalize": "",
                                       "libs": [],
                                       "x": 1320,
                                       "y": 160,
                                       "wires": [
                                           [
                                               "fdd008106af609cd"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "9aa040b4c0ec620f",
                                       "type": "debug",
                                       "z": "5a6176b51ab86746",
                                       "name": "debug 4",
                                       "active": false,
                                       "tosidebar": true,
                                       "console": false,
                                       "tostatus": false,
                                       "complete": "true",
                                       "targetType": "full",
                                       "statusVal": "",
                                       "statusType": "auto",
                                       "x": 1160,
                                       "y": 240,
                                       "wires": []
                                   },
                                   {
                                       "id": "6001653e634e71a1",
                                       "type": "function",
                                       "z": "5a6176b51ab86746",
                                       "name": "function 4",
                                       "func": "\n\n\nvar xx = String(msg.payload.date);\n\nmsg.payload.date = Date.parse(xx);\n\n\nreturn msg;",
                                       "outputs": 1,
                                       "noerr": 0,
                                       "initialize": "",
                                       "finalize": "",
                                       "libs": [],
                                       "x": 920,
                                       "y": 160,
                                       "wires": [
                                           [
                                               "1e178307f45b0ef9"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "a6593e1122fcf4d2",
                                       "type": "e-mail in",
                                       "z": "5a6176b51ab86746",
                                       "name": "NoPersonalMails",
                                       "protocol": "IMAP",
                                       "server": "imap.1und1.de",
                                       "useSSL": true,
                                       "autotls": "never",
                                       "port": "993",
                                       "box": "INBOX",
                                       "disposition": "None",
                                       "criteria": "ALL",
                                       "repeat": "600",
                                       "fetch": "auto",
                                       "inputs": 0,
                                       "credentials": {
                                           "userid": "",
                                           "password": ""
                                       },
                                       "x": 180,
                                       "y": 180,
                                       "wires": [
                                           [
                                               "d52ebcff53c14799"
                                           ]
                                       ]
                                   }
                                ]
                                

                                Image 156.png

                                1 Reply Last reply Reply Quote 1
                                • D
                                  Dragon @MCU last edited by

                                  @mcu Danke für die Info. mal schauen ob ich dazu was finde...

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    MCU @Dragon last edited by

                                    @dragon
                                    https://mcuiobroker.gitbook.io/jarvis-infos/jarvis/besonderheiten-v3/module/calendar#google-account-kalender

                                    D 1 Reply Last reply Reply Quote 0
                                    • D
                                      Dragon @MCU last edited by

                                      @mcu super! vielen dank!

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        Masl last edited by Masl

                                        Kann mir jemand damit weiterhelfen???
                                        EMails werden zwar abgerufen und im Datenpunkt angezeigt, aber es kommt zu diesem Error.
                                        Habe versucht die NPM Module direkt zu installieren oder über die Java Instanz. Bei beiden Varianten ist es das gleiche Problem.

                                        host.iobroker
                                        	2022-10-22 10:40:34.202	error	instance system.adapter.javascript.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
                                        host.iobroker
                                        	2022-10-22 10:40:34.202	error	Caught by controller[1]: at processImmediate (node:internal/timers:466:21)
                                        host.iobroker
                                        	2022-10-22 10:40:34.202	error	Caught by controller[1]: at MailParser._process (/opt/iobroker/node_modules/iobroker.javascript/node_modules/mailparser/lib/mailparser.js:227:22)
                                        host.iobroker
                                        	2022-10-22 10:40:34.202	error	Caught by controller[1]: at MailParser._processStateHeader (/opt/iobroker/node_modules/iobroker.javascript/node_modules/mailparser/lib/mailparser.js:309:61)
                                        host.iobroker
                                        	2022-10-22 10:40:34.201	error	Caught by controller[1]: at MailParser._generateFileName (/opt/iobroker/node_modules/iobroker.javascript/node_modules/mailparser/lib/mailparser.js:1407:27)
                                        host.iobroker
                                        	2022-10-22 10:40:34.201	error	Caught by controller[1]: TypeError: mime.extension is not a function
                                        javascript.0
                                        	2022-10-22 10:40:34.124	error	TypeError: mime.extension is not a function at MailParser._generateFileName (/opt/iobroker/node_modules/iobroker.javascript/node_modules/mailparser/lib/mailparser.js:1407:27) at MailParser._processStateHeader (/opt/iobroker/node_modules/iobroker.javascript/node_modules/mailparser/lib/mailparser.js:309:61) at MailParser._process (/opt/iobroker/node_modules/iobroker.javascript/node_modules/mailparser/lib/mailparser.js:227:22) at processImmediate (node:internal/timers:466:21)
                                        javascript.0
                                        	2022-10-22 10:40:34.124	error	Error: mime.extension is not a function
                                        javascript.0
                                        	2022-10-22 10:40:34.124	error	An error happened which is most likely from one of your scripts, but the originating script could not be detected.
                                        
                                        Glasfaser 1 Reply Last reply Reply Quote 0
                                        • Glasfaser
                                          Glasfaser @Masl last edited by

                                          @masl sagte in Emails empfangen.:

                                          Kann mir jemand damit weiterhelfen???

                                          hier stehen auch Lösungen dazu drin :

                                          https://forum.iobroker.net/topic/55923/javascript-instanz-wird-von-maillistener-getötet?

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            Masl last edited by Masl

                                            Es hat tatsächlich nun doch funktioniert. Hab mich nochmal ein wenig durchgelesen.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            933
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            31
                                            119
                                            18755
                                            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