Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [HowTo] Script Sticky Notes (PostIt) für VIS und Telegram

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [HowTo] Script Sticky Notes (PostIt) für VIS und Telegram

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

      @liv-in-sky sagte in [HowTo] Script Sticky Notes (PostIt) für VIS und Telegram:

      @skokarl sagte in [HowTo] Script Sticky Notes (PostIt) für VIS und Telegram:

      an meinem ersten Javascript Code

      geht ja auch zur not in einem extra blockly script 🙂

      nö.... mit kurz vor 59 muss man auch mal nen Javascript geschrieben haben .. 😁

      oder ich wünsche mir eins zum Geburtstag 😂

      1 Reply Last reply Reply Quote 1
      • S
        skokarl @liv-in-sky last edited by

        @liv-in-sky sagte in [HowTo] Script Sticky Notes (PostIt) für VIS und Telegram:

        • bestimmte kalendereinträge - evtl geburtstage
          letztlich hat jeder seine eigenen wünsche - und ist alles machbar - mit dem richtigen script

        das mit den Kalendereinträgen gefällt mir immer besser.

        Einen Tag vor dem Ereignis nen Postit könnte ich gut gebrauchen, ähnlich Mülltonne, also ganz einfach.
        ( Geburtstage ausgeschlossen, nur wichtige Einträge aus dem Google Kalender ) 😬

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

          @skokarl

          mit dem trashschedule ist das mit den tonnen leicht gemacht mit blockly

          habe es letztes mal auch vergessen - die tonne rauszubringen - daher

          Image 15.png

          <xml xmlns="https://developers.google.com/blockly/xml">
           <variables>
             <variable id="VwW!)`Eb|1I5/6Pyt_d|">myList</variable>
             <variable id=";8pvJT(Cj96J3)]DKhrw">i</variable>
           </variables>
           <block type="on" id="eolLL/moVb7t8d[E5~7?" x="37" y="237">
             <field name="OID">trashschedule.0.next.daysLeft</field>
             <field name="CONDITION">ne</field>
             <field name="ACK_CONDITION"></field>
             <statement name="STATEMENT">
               <block type="controls_if" id="QDq2yZ)_,PyDxZ3%FwEB">
                 <value name="IF0">
                   <block type="logic_compare" id="Bw}ZJV8:!;ML5KkTuO5@">
                     <field name="OP">EQ</field>
                     <value name="A">
                       <block type="get_value" id="nO:ex3@Xi22h0dozFXEH">
                         <field name="ATTR">val</field>
                         <field name="OID">trashschedule.0.next.daysLeft</field>
                       </block>
                     </value>
                     <value name="B">
                       <block type="math_number" id="T1@QXv(_9wM5`1C=B^61">
                         <field name="NUM">1</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="variables_set" id="3OV,,vB{m?5A$]W+^Vvw">
                     <field name="VAR" id="VwW!)`Eb|1I5/6Pyt_d|">myList</field>
                     <value name="VALUE">
                       <block type="lists_split" id="|1RZ-URv7b.$.^%DcLvF">
                         <mutation mode="SPLIT"></mutation>
                         <field name="MODE">SPLIT</field>
                         <value name="INPUT">
                           <block type="get_value" id=".p-?$$~m_G_15.6noC;r">
                             <field name="ATTR">val</field>
                             <field name="OID">trashschedule.0.next.typesText</field>
                           </block>
                         </value>
                         <value name="DELIM">
                           <shadow type="text" id="%z-7RbRa1/#{Oy|-`tme">
                             <field name="TEXT">,</field>
                           </shadow>
                         </value>
                       </block>
                     </value>
                     <next>
                       <block type="debug" id="(n-2yz5QP.5hhIUh_XBy">
                         <field name="Severity">log</field>
                         <value name="TEXT">
                           <shadow type="text" id="q4Htkj2:lM8j8MdGkZUQ">
                             <field name="TEXT">test</field>
                           </shadow>
                           <block type="variables_get" id="u:S99_IplmV1cD)Nc0$P">
                             <field name="VAR" id="VwW!)`Eb|1I5/6Pyt_d|">myList</field>
                           </block>
                         </value>
                         <next>
                           <block type="controls_forEach" id="gP[^X)vu87}JL$Q}u`jM">
                             <field name="VAR" id=";8pvJT(Cj96J3)]DKhrw">i</field>
                             <value name="LIST">
                               <block type="variables_get" id="h5aP`3Rvg4b%1s^{1k89">
                                 <field name="VAR" id="VwW!)`Eb|1I5/6Pyt_d|">myList</field>
                               </block>
                             </value>
                             <statement name="DO">
                               <block type="timeouts_wait" id=":aVSQT=W%YZ?^XUagoMh">
                                 <field name="DELAY">3000</field>
                                 <field name="UNIT">ms</field>
                                 <next>
                                   <block type="control" id="*C?=A-ah_tHOijCd3p=q">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">0_userdata.0.Alarm-MaterialDesign.PostItAktualBot</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="text" id="SkJFb#!I`anD[EyFa?d^">
                                         <field name="TEXT">1</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="control" id="Qv/P!yEPnv2t^iYF`S}W">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                         <field name="OID">0_userdata.0.Alarm-MaterialDesign.PostItErstellen</field>
                                         <field name="WITH_DELAY">TRUE</field>
                                         <field name="DELAY_MS">1000</field>
                                         <field name="UNIT">ms</field>
                                         <field name="CLEAR_RUNNING">FALSE</field>
                                         <value name="VALUE">
                                           <block type="variables_get" id="X=Za.;-asK9!TrW?UY]c">
                                             <field name="VAR" id=";8pvJT(Cj96J3)]DKhrw">i</field>
                                           </block>
                                         </value>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
             </statement>
           </block>
          </xml>
          

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

            @liv-in-sky

            das hab ich doch schon von Dir, läuft super.

            Dadurch bin ich erst auf die Kalendereinträge gekommen 😀

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

              @skokarl voll den überblick verloren 😞

              S 2 Replies Last reply Reply Quote 1
              • S
                skokarl @liv-in-sky last edited by

                @liv-in-sky sagte in [HowTo] Script Sticky Notes (PostIt) für VIS und Telegram:

                @skokarl voll den überblick verloren 😞

                so fängt das an .... 😀 , kenn ich

                1 Reply Last reply Reply Quote 1
                • S
                  skokarl @liv-in-sky last edited by

                  @liv-in-sky

                  Danke nochmal....das mit dem PostIT Script läuft super, gefällt sogar meiner Frau.

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

                    @skokarl aber gerne doch - ich mag das script auch sehr gerne

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

                      Ich habe mir das Script gerade mal geladen und gestartet.

                      17:23:04.487	info	javascript.0 (21192) Start javascript script.js.VIS.PostIt
                      17:23:04.500	info	javascript.0 (21192) script.js.VIS.PostIt: registered 5 subscriptions and 0 schedules
                      17:23:04.714	error	javascript.0 (21192) script.js.VIS.PostIt: SyntaxError: Unexpected end of JSON input
                      17:23:04.715	error	javascript.0 (21192) at materialDelete (script.js.VIS.PostIt:109:20)
                      17:23:04.715	error	javascript.0 (21192) at Object.<anonymous> (script.js.VIS.PostIt:196:9)
                      

                      Das ist das Ergebnis. Kann damit jemand was anfangen ?

                      @liv-in-sky said in [HowTo] Script Sticky Notes (PostIt) für VIS und Telegram:

                      erzeugt die dp und übernimmt die steuerung:

                      telegram instanz eingeben !!! (oben im script)

                      wäre bei mir dann telegram.0 ? So stehts in den DP's.

                      EDIT::

                      Ok, sieht recht easy aus, scheint zu laufen. Indem Fall muss man eigentlich gar nichts einstellen. Super läuft. Wo könnte ich denn das Design von dem Hintergrund einstellen ?

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

                        @d3ltoroxp

                        bild dahinterlegen https://forum.iobroker.net/post/767078

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

                          @liv-in-sky Wird das dann einfach durchsichtig ? Bei mir sieht es aktuell so aus.

                          866eaad0-ed49-4c48-bb06-c449f1d04fcb-grafik.png

                          Ah, das kann man direkt oben mybackground einstellen !!

                          Jetzt müsste mir nur jemand helfen, wie ich diese Werte dort rein bekomme.

                          a3dd8242-1ff8-4d0c-b26c-895f11cef6e4-grafik.png

                          Damit kann ich leider gar nichts anfangen.

                          linear-gradient(90deg, rgba(85,95,125,1) 0%, rgba(124,139,183,1) 49%, rgba(65,74,98,1) 100%)
                          
                          liv-in-sky 1 Reply Last reply Reply Quote 0
                          • liv-in-sky
                            liv-in-sky @D3ltoroxp last edited by liv-in-sky

                            @d3ltoroxp dieser linear hintergrund

                            ist in deinem ersten bild sichtbar - probiere mal im script dort "transparent" einzusetzen

                            wie sieht es dann aus

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

                              @liv-in-sky Genau. Das 2. Bild enthält so meine Vorstellungen für meinen Background, aber ka wie ich das so in dieses Format bekomme.

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

                                @d3ltoroxp das kannst du aber so nicht einstellen

                                als background musst du dann #2424e eintragen

                                unter rahmen machst du einen rahmen um das ganze widget - nicht um die einzelnen postits

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

                                  @liv-in-sky Meinte eher, ob man das in dieses Format ändern kann ?

                                  linear-gradient(90deg, rgba(85,95,125,1) 0%, rgba(124,139,183,1) 49%, rgba(65,74,98,1) 100%)
                                  

                                  Die Settings aus dem Bild war von diesem Hintergrund. Wenn ich die Postits ähnlich hinbekomme, wäre super.

                                  3b31fa48-e431-4745-b7ce-6117c8f2949a-grafik.png

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

                                    @d3ltoroxp

                                    du meinst die durchsichtbarkeit ? irgendwie verstehe ich nicht, was du eigentlich illst - den background kannst du im blockly einstellen - die farbe - ob nun als gradient oder einfach alls farb-code (z.b.: # 654654)

                                    wenn ja, dann im vis editor im css tab folgrendes eintragen

                                    .v-alert{ 
                                    opacity:.8;} 
                                    
                                    .materialdesign-v-alerts-image-prepand {
                                    opacity:1;} 
                                     
                                    
                                    .materialdesign-v-alert-text{
                                    opacity:1;} 
                                    
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @skokarl last edited by

                                      @skokarl

                                      wollte die postit's auch über alexa eingeben

                                      habe das so über umweg gelöst - habe mir eine alexa liste mit namen post angelegt - wird nur dafür genutzt !

                                      wenn ich jetzt sage: alexa füge bier kaufen der liste post hinzu

                                      wird ein postit angelegt - in der alexa liste darf nichts anderes stehen, den es wird ein listeneintrag angelegt und auch sofort wieder gelöscht

                                      das blockly

                                      Image 3.png

                                      <block xmlns="https://developers.google.com/blockly/xml" type="on" id="wS*w6+(st$F.CZvCpL{R" x="-437.3773193359375" y="412.8678741455072">
                                       <field name="OID">alexa2.0.Lists.post.json</field>
                                       <field name="CONDITION">ne</field>
                                       <field name="ACK_CONDITION"></field>
                                       <statement name="STATEMENT">
                                         <block type="debug" id="/x0k;=v+#-Wat1meZXm=">
                                           <field name="Severity">log</field>
                                           <value name="TEXT">
                                             <shadow type="text" id="`KOMl]RdpWxdMnx|G|,B">
                                               <field name="TEXT">test</field>
                                             </shadow>
                                             <block type="text_length" id="$%kk{r.1|A@y6aVNH72f">
                                               <value name="VALUE">
                                                 <shadow type="text" id="liS*d-(n6uQmb={zVfnM">
                                                   <field name="TEXT">abc</field>
                                                 </shadow>
                                                 <block type="get_value" id="F7YGRzsG$bwDR2@b6WU~">
                                                   <field name="ATTR">val</field>
                                                   <field name="OID">alexa2.0.Lists.post.json</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="controls_if" id="O~b1L9HL;TV;us-:vW=1">
                                               <value name="IF0">
                                                 <block type="logic_compare" id="NI+s=6;~+,tJx@FKI6mR">
                                                   <field name="OP">GT</field>
                                                   <value name="A">
                                                     <block type="text_length" id="K),$x#0{Ahfpe@I!]eX;">
                                                       <value name="VALUE">
                                                         <shadow type="text" id="^Tna+WNK.-J2X{xoH+CI">
                                                           <field name="TEXT">abc</field>
                                                         </shadow>
                                                         <block type="get_value" id="#Tolg+=gIcT/;vtJ;j0r">
                                                           <field name="ATTR">val</field>
                                                           <field name="OID">alexa2.0.Lists.post.json</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <block type="math_number" id="+Hrcx-Ps!(~.DVD8afeG">
                                                       <field name="NUM">5</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <statement name="DO0">
                                                 <block type="debug" id="m6/%PW[OTV?pqCDK$0YO">
                                                   <field name="Severity">log</field>
                                                   <value name="TEXT">
                                                     <shadow type="text" id="yp4gBopa@sLh?C$9N}NB">
                                                       <field name="TEXT">test</field>
                                                     </shadow>
                                                     <block type="get_attr" id="XzC)0s+W@ez#5g,1KILX">
                                                       <value name="PATH">
                                                         <shadow type="text" id="GS}|pR3}G7[Qj~2kC$*7">
                                                           <field name="TEXT">value</field>
                                                         </shadow>
                                                       </value>
                                                       <value name="OBJECT">
                                                         <block type="lists_getIndex" id="%mwB3GFpbdz[*N#W%9GG">
                                                           <mutation statement="false" at="true"></mutation>
                                                           <field name="MODE">GET</field>
                                                           <field name="WHERE">FROM_START</field>
                                                           <value name="VALUE">
                                                             <block type="convert_json2object" id="c;sYbH?QlOYRRp/E_@(t">
                                                               <value name="VALUE">
                                                                 <block type="on_source" id="gU,s7!5U9Nok7tzx8Oe3">
                                                                   <field name="ATTR">state.val</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <value name="AT">
                                                             <block type="math_number" id="c-EAxYKUKdyaQmmbO_B*">
                                                               <field name="NUM">1</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="control" id="7G9Bk$A_4jtK,L%m~Di4">
                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                       <field name="OID">0_userdata.0.Alarm-MaterialDesign.PostItErstellen</field>
                                                       <field name="WITH_DELAY">TRUE</field>
                                                       <field name="DELAY_MS">3</field>
                                                       <field name="UNIT">sec</field>
                                                       <field name="CLEAR_RUNNING">FALSE</field>
                                                       <value name="VALUE">
                                                         <block type="get_attr" id="06dq8i+.W|!ZKmhE0e3G">
                                                           <value name="PATH">
                                                             <shadow type="text" id="j`QRTM2FP*I:Q=H*=H8C">
                                                               <field name="TEXT">value</field>
                                                             </shadow>
                                                           </value>
                                                           <value name="OBJECT">
                                                             <block type="lists_getIndex" id="7a,({6bar@J63grF`2vv">
                                                               <mutation statement="false" at="true"></mutation>
                                                               <field name="MODE">GET</field>
                                                               <field name="WHERE">FROM_START</field>
                                                               <value name="VALUE">
                                                                 <block type="convert_json2object" id="X^2U#VUG.,vr-V`zviU=">
                                                                   <value name="VALUE">
                                                                     <block type="on_source" id="*=mUiqXriiiEiLE:wAD6">
                                                                       <field name="ATTR">state.val</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <value name="AT">
                                                                 <block type="math_number" id="jZ,0jV%GW65K(S]~|B^{">
                                                                   <field name="NUM">1</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="control_ex" id="O/PFIX.fwKSbZP`TneUy">
                                                           <field name="TYPE">false</field>
                                                           <field name="CLEAR_RUNNING">FALSE</field>
                                                           <value name="OID">
                                                             <shadow type="field_oid" id="gaO5Ly%lCQjX5nph:,y;">
                                                               <field name="oid">Object ID</field>
                                                             </shadow>
                                                             <block type="text_join" id="OCZgt]^=xopI2WqJWg`2">
                                                               <mutation items="3"></mutation>
                                                               <value name="ADD0">
                                                                 <block type="text" id="X)1{q4||jJk}ORS{:M,%">
                                                                   <field name="TEXT">alexa2.0.Lists.post.items.</field>
                                                                 </block>
                                                               </value>
                                                               <value name="ADD1">
                                                                 <block type="get_attr" id="pog3J3lnNuXMe2fG`$U7">
                                                                   <value name="PATH">
                                                                     <shadow type="text" id=".LqioO6q7.FyZ+Yp0gL`">
                                                                       <field name="TEXT">id</field>
                                                                     </shadow>
                                                                   </value>
                                                                   <value name="OBJECT">
                                                                     <block type="lists_getIndex" id="?FxC=AfV=2!JFC,AcU*5">
                                                                       <mutation statement="false" at="true"></mutation>
                                                                       <field name="MODE">GET</field>
                                                                       <field name="WHERE">FROM_START</field>
                                                                       <value name="VALUE">
                                                                         <block type="convert_json2object" id="o=En}5ZFm31cNg}RqH67">
                                                                           <value name="VALUE">
                                                                             <block type="on_source" id="%:q/xoMcMv*9of[pPw7z">
                                                                               <field name="ATTR">state.val</field>
                                                                             </block>
                                                                           </value>
                                                                         </block>
                                                                       </value>
                                                                       <value name="AT">
                                                                         <block type="math_number" id="f{Jn3[^Q}m@,f5Vwb5J!">
                                                                           <field name="NUM">1</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <value name="ADD2">
                                                                 <block type="text" id="Y]d.$er(I4%saSg{~KA?">
                                                                   <field name="TEXT">.#delete</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <value name="VALUE">
                                                             <shadow type="logic_boolean" id="Pq#N=zc6Jc1_CcO#@jh]">
                                                               <field name="BOOL">TRUE</field>
                                                             </shadow>
                                                           </value>
                                                           <value name="DELAY_MS">
                                                             <shadow type="math_number" id="^vaRR$}dfLsPZS#xpGyL">
                                                               <field name="NUM">7000</field>
                                                             </shadow>
                                                           </value>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                      </block>
                                      

                                      S M 2 Replies Last reply Reply Quote 1
                                      • S
                                        skokarl @liv-in-sky last edited by

                                        @liv-in-sky

                                        Haha, coole Idee.

                                        dieses PostIt müsste allerdings auch nach drei Tagen "rot" werden sofern es noch nicht erledigt ist.

                                        Sag mal, kannst Du Dich noch dunkel erinnern wie man eine Message vom Handy an IOBroker schicken kann ?
                                        Hat es mal mit einer Nachricht an meinen Boot probiert, ging aber nicht.
                                        Ich hatte das vor Jahren schonmal, weiß aber nicht mehr den Weg dahin.

                                        Ziel ist es, das PostIt von unterwegs zu schreiben.

                                        Danke, Gruß

                                        liv-in-sky 1 Reply Last reply Reply Quote 0
                                        • S
                                          skokarl last edited by

                                          @liv-in-sky

                                          sag mal .....

                                          Du benutzt doch diesen Paket Verfolgungsadapter vom @tombox, ( ich kenne den Adapter noch nicht )

                                          kannst Du da nicht auch ein PostIt raushauen sobald das Paket in der Zustellung ist ? 😬

                                          Gruß

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

                                            @skokarl
                                            Wenn du in Telegram den bot öffnest und dort
                                            postit neue Nachricht
                                            eingibst, sendet er seine Nachricht als Post it

                                            Oder verstehe ich dich falsch

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            890
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            11
                                            145
                                            11565
                                            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