Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [GELÖST] - Dateinamen mit Datum

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    [GELÖST] - Dateinamen mit Datum

    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fastfoot @puls200 last edited by

      @puls200 sagte in Dateinamen mit Datum:

      werde mal diesen Tipp ausprobieren:

      Oder evtl. so:
      BildMitExec.PNG

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="a~7N.oHS8M[d$1i?{A;S">Bildpfad</variable>
         <variable id="w%Oi/$hcBg!kzv0aR`9N">cmd</variable>
       </variables>
       <block type="variables_set" id="]iZvD04QO*d7@Z1I58K4" x="12" y="13">
         <field name="VAR" id="a~7N.oHS8M[d$1i?{A;S">Bildpfad</field>
         <value name="VALUE">
           <block type="text_join" id="Td[meJm}.)jsxi,G-RUk">
             <mutation items="3"></mutation>
             <value name="ADD0">
               <block type="text" id="}nl%9`OiyoQQKNq95D!R">
                 <field name="TEXT">/opt/iobroker/Cam/Pic</field>
               </block>
             </value>
             <value name="ADD1">
               <block type="time_get" id="#:XC{Z4y|RH3@UTc67#Q">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                 <field name="OPTION">custom</field>
                 <field name="FORMAT">JJJJ-MM-TT-SS-mm-ss</field>
               </block>
             </value>
             <value name="ADD2">
               <block type="text" id="|s2/;{~XEv}E57~RD^*U">
                 <field name="TEXT">.jpg</field>
               </block>
             </value>
           </block>
         </value>
         <next>
           <block type="variables_set" id="*qdzZEj?0QqD)LF*{Uzs">
             <field name="VAR" id="w%Oi/$hcBg!kzv0aR`9N">cmd</field>
             <value name="VALUE">
               <block type="text_join" id="n0qgmm,/iXB[lX%(-rrT">
                 <mutation items="3"></mutation>
                 <value name="ADD0">
                   <block type="text" id="U!6]R]VpvJdN7niT4m?T">
                     <field name="TEXT">wget --output-document </field>
                   </block>
                 </value>
                 <value name="ADD1">
                   <block type="variables_get" id="r1[dn@)m7oks,T83zuG@">
                     <field name="VAR" id="a~7N.oHS8M[d$1i?{A;S">Bildpfad</field>
                   </block>
                 </value>
                 <value name="ADD2">
                   <block type="text" id="PyfU!4.-d`EHr|6T1/2g">
                     <field name="TEXT"> "http://x.x.x.x/ISAPI/Streaming/channels/101/picture"</field>
                   </block>
                 </value>
               </block>
             </value>
             <next>
               <block type="exec" id="2H}OCFVLW$H^QXD*h@I`" inline="true">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                 <field name="WITH_STATEMENT">TRUE</field>
                 <field name="LOG"></field>
                 <value name="COMMAND">
                   <shadow type="text" id="!eJ$33dW_X#{CygciO.,">
                     <field name="TEXT">echo wget --output-document /opt/iobroker/Cam/Pic`date +%Y-%m-%d-%H-%M-%S`.jpg "http://x.x.x.x/ISAPI/Streaming/channels/101/picture"</field>
                   </shadow>
                   <block type="variables_get" id="s$.{+$`.RQV`b:XLTR_*">
                     <field name="VAR" id="w%Oi/$hcBg!kzv0aR`9N">cmd</field>
                   </block>
                 </value>
                 <statement name="STATEMENT">
                   <block type="telegram" id=":%)Q#;0o=Q[f1P:+Vi#Q">
                     <field name="INSTANCE"></field>
                     <field name="LOG"></field>
                     <field name="SILENT">FALSE</field>
                     <field name="PARSEMODE">default</field>
                     <value name="MESSAGE">
                       <shadow type="text" id="$60-z/}uaT,?SbSS_kvL">
                         <field name="TEXT">text</field>
                       </shadow>
                       <block type="variables_get" id="uwBW_t#B:g=?cPcHx{%(">
                         <field name="VAR" id="a~7N.oHS8M[d$1i?{A;S">Bildpfad</field>
                       </block>
                     </value>
                   </block>
                 </statement>
               </block>
             </next>
           </block>
         </next>
       </block>
      </xml>
      

      P 1 Reply Last reply Reply Quote 0
      • P
        puls200 @fastfoot last edited by

        @fastfoot Mmmh... so habe ich es eigentlich nach meinem Kenntnisstand gemacht... leider hat es nicht funktioniert. Aber ich probiere es nochmal...

        @haselchen Jepp.

        F 1 Reply Last reply Reply Quote 0
        • F
          fastfoot @puls200 last edited by

          @puls200 sagte in Dateinamen mit Datum:

          @fastfoot Mmmh... so habe ich es eigentlich nach meinem Kenntnisstand gemacht... leider hat es nicht funktioniert. Aber ich probiere es nochmal...

          @haselchen Jepp.

          Das sieht anders aus als dein Beispiel und vor Allem es ist anders 🙂

          P 1 Reply Last reply Reply Quote 0
          • P
            puls200 @fastfoot last edited by puls200

            @fastfoot Ich hatte im Vorfeld schon über die Hilfsvariable (-->Bildpfad) ein bisschen rumprobiert, aber es hat nie funktioniert, weil die Telegram-Funktion den String nicht akzeptietr hat. Mein Beispiel oben beinhaltete den Stand ohne jegliche dynamische Dateinamenerstellung.

            ABER JETZT GEHT ALLES! Besten Dank an alle und vor Allem an fastfoot!!!

            Für alle anderen... so sieht es aus:

            bee455c5-8650-43b8-936a-22e164a54219-grafik.png

            Homoran F 2 Replies Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @puls200 last edited by

              @puls200 sagte in Dateinamen mit Datum:

              so sieht es aus:

              was spielst du denn da mit Systemdatenpunkten?
              schaltest du mit script_enabled ein Skript an und aus, anstelle mit Triggern zu arbeiten?

              P 1 Reply Last reply Reply Quote 0
              • P
                puls200 @Homoran last edited by puls200

                @homoran Jepp. Über VIS aktiviere/deaktiviere ich direkt Scripte. Was spricht dagegen?

                Homoran 1 Reply Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators @puls200 last edited by

                  @puls200 sagte in Dateinamen mit Datum:

                  Aber ich verstehe nur Bahnhof.

                  [Erklärbärmodus]
                  in Javascript werden Skripte niemals deaktiviert.
                  Sie laufen immer und warten auf Trigger um ausgeführt zu werden.

                  Du solltest also nicht mit script-enabled arbeiten, sondern mit einem Trigger.

                  Dazu könnte man einen selbst erstellten Datenpunkt vom Typ Bool hier in diesem Skript auf false setzen und das Skript "AlarmPhoto" startet seine Ausführung wenn dieser Datenpunkt (wodurch auch immer) wieder auf true gesetzt wird.

                  [/Erklärbärmodus]

                  P 1 Reply Last reply Reply Quote 0
                  • F
                    fastfoot @puls200 last edited by

                    @puls200 sagte in Dateinamen mit Datum:

                    ABER JETZT GEHT ALLES!

                    Warum machst du es nicht wie von mir gezeigt, Exec mit Result! Das spart den unsicheren timeout und erfolgt sofort wenn das wget beendet ist.

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      puls200 @Homoran last edited by

                      @homoran Schon klar mit der Bool´schen Variable, aber warum werden Scripte niemals deaktiviert?

                      1 Reply Last reply Reply Quote 0
                      • P
                        puls200 @fastfoot last edited by

                        @fastfoot Sehe gerade erst, dass Du noch einen Exec-Befehl dazwischen hast... aber den finde ich bei mir nicht...?! Ich sehe nur den normalen Exec-Baustein...

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          fastfoot @puls200 last edited by

                          @puls200 sagte in Dateinamen mit Datum:

                          @fastfoot Sehe gerade erst, dass Du noch einen Exec-Befehl dazwischen hast... aber den finde ich bei mir nicht...?! Ich sehe nur den normalen Exec-Baustein...

                          Du hattest doch meinen Export! Beim Exec mit Ergebnissen anklicken

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            puls200 @fastfoot last edited by

                            @fastfoot Bingo! Habe es jetzt... und in der Tat... guter Tip. Die Timeouts bringen manchmal Schwierigkeiten.

                            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

                            475
                            Online

                            31.7k
                            Users

                            79.9k
                            Topics

                            1.3m
                            Posts

                            4
                            37
                            1321
                            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