Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    16
    1
    1.1k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    728

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.0k

jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?

Geplant Angeheftet Gesperrt Verschoben Blockly
blocklymonitoringmultimedia
16 Beiträge 3 Kommentatoren 1.9k Aufrufe 3 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • lost in translationL lost in translation

    Moin,
    ich habe eine IP-Cam. Der kann ich einen aktuellen Snapshot mit http://ip-der-cam/?user=admin&pwd=&action=snapshot entlocken.
    Ich hätte jetzt gerne ein Skript mit einem Timer, das jede Minute einen Snapshot zieht, und diesen mit dem aktuellen Datum/Uhrzeit als Dateiname per SFTP auf mein NAS hochlädt.
    Geht das? brauche ich dafür einen speziellen Adapter? hat das jemand in irgendeiner Art schon gemacht und könnte mir sein Skript zeigen?
    Ich könnte jetzt mit ein bisschen knobeln ein shell-skript dafür basteln, aber das geht ja an der Idee vorbei. Es hat ja so schöne Timer in blockly. Da könnte man sogar per Astro Funktion von Sonnenauf bis -untergang die Fotos schießen.
    Idee ist ja nicht zuletzt auch, dass ich das mit dem Blockly mal lerne.
    Anregungen, mit welchen tricks ich zum Ziel komme, gerne genommen.

    ciao

    frank

    K Offline
    K Offline
    Kuddel
    schrieb am zuletzt editiert von
    #2

    @lost-in-translation ich habe rein per blocky ein skript zur kamera überwachung meiner haustür erstellt.

    wenn der bewegungsmelder auslöst, werden automatisch 20 billder (jede sek. ein bild) gespeichert und per scp auf mein NAS kopiert.

    Den Dateinamen der Bilder habe ich selber definiert.

    Bei unteresse, kann ich gern die einzelnen Schritte posten

    lost in translationL 1 Antwort Letzte Antwort
    0
    • K Kuddel

      @lost-in-translation ich habe rein per blocky ein skript zur kamera überwachung meiner haustür erstellt.

      wenn der bewegungsmelder auslöst, werden automatisch 20 billder (jede sek. ein bild) gespeichert und per scp auf mein NAS kopiert.

      Den Dateinamen der Bilder habe ich selber definiert.

      Bei unteresse, kann ich gern die einzelnen Schritte posten

      lost in translationL Offline
      lost in translationL Offline
      lost in translation
      schrieb am zuletzt editiert von
      #3

      @Kuddel said in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

      Das hört sich sehr gut an. Vielleicht geht ja auch scp mit meiner Synology, das kann ich ja ausprobieren.
      Im Moment brauche ich einfach mal Beispiele, um in die Thematik einzutauchen.
      So ein importiertes Blockly nachzuvollziehen ist deutlich einfacher, als es sich ohne jede Vorkenntnisse auszudenken.

      ciao

      frank

      K 1 Antwort Letzte Antwort
      0
      • lost in translationL lost in translation

        @Kuddel said in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

        Das hört sich sehr gut an. Vielleicht geht ja auch scp mit meiner Synology, das kann ich ja ausprobieren.
        Im Moment brauche ich einfach mal Beispiele, um in die Thematik einzutauchen.
        So ein importiertes Blockly nachzuvollziehen ist deutlich einfacher, als es sich ohne jede Vorkenntnisse auszudenken.

        ciao

        frank

        K Offline
        K Offline
        Kuddel
        schrieb am zuletzt editiert von
        #4

        @lost-in-translation

        <xml xmlns="http://www.w3.org/1999/xhtml">
          <variables>
            <variable type="" id="e7=:mfMkCQ%a~}-KhJ:f">ueberwachung</variable>
            <variable type="" id="jQ^$686N{uBqpW:3SG?B">zahl</variable>
            <variable type="undefined" id="Intervall">Intervall</variable>
            <variable type="" id="93iKlm8q,8t/S#zh{),_">datum</variable>
            <variable type="" id="$#BWP))B*5:wJCO:]03!">zeit</variable>
            <variable type="" id="*I-JHB}{qxl!8uB~fDIM">dateiname</variable>
          </variables>
          <block type="variables_set" id="q`K{z#!5XPHSWS{HhHqQ" x="-413" y="-538">
            <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
            <value name="VALUE">
              <block type="logic_boolean" id="P8{7!,/i?*GW()g)%dhk">
                <field name="BOOL">FALSE</field>
              </block>
            </value>
            <next>
              <block type="on_ext" id="vn%V:|0$H3TtEM+{kH!:">
                <mutation items="2"></mutation>
                <field name="CONDITION">gt</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="O*3[qDEZ`IC2b%xK}.gs">
                    <field name="oid">mihome.0.devices.sensor_motion_aq2_158d0002579f57.state</field>
                  </shadow>
                </value>
                <value name="OID1">
                  <shadow type="field_oid" id="zZNr)|?Z;/(O30m^xBgD">
                    <field name="oid">mihome.0.devices.sensor_motion_aq2_158d0002b9584e.state</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="controls_if" id="leU6oQs0r6T,lQxJIFZ{">
                    <value name="IF0">
                      <block type="logic_operation" id="vqs7msIE4tnQU70-[m}T" inline="false">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="logic_compare" id="mj_x.,VBcp}5K#W?H@O%">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="~0;`]`RGv8Xwu]39-$W3">
                                <field name="ATTR">val</field>
                                <field name="OID">javascript.0.sonstige.kamera_ueberwachung</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="eAT9pEyXQWOBXvW]J{+9">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="73C^gIULfU=V1SdAGke^">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="variables_get" id="p[5+`H_sh$jG3V,=)$~1">
                                <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="3l4/!=,Z06s83rrCa%yg">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="variables_set" id="22A_oSkw4y*ukUnfMQDU">
                        <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="4XVXD^Zl@rm1d$o4m,7H">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="Y=8:~gQ8hSUh$@([-FJ$">
                            <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                            <value name="VALUE">
                              <block type="math_number" id="$_wci)*9zN-G^LE_{G-k">
                                <field name="NUM">0</field>
                              </block>
                            </value>
                            <next>
                              <block type="timeouts_setinterval" id="kUUyExcZ[XXIfGckhj=D">
                                <field name="NAME">Intervall</field>
                                <field name="INTERVAL">1</field>
                                <field name="UNIT">sec</field>
                                <statement name="STATEMENT">
                                  <block type="variables_set" id="=RtnA{6UiK3sjAoO6Lza">
                                    <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field>
                                    <value name="VALUE">
                                      <block type="time_get" id="*3ZY(-gyrtBQByJM.+/~">
                                        <mutation format="true" language="false"></mutation>
                                        <field name="OPTION">custom</field>
                                        <field name="FORMAT">JJJJ-MM-TT</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="variables_set" id="QWgD|dQePEx-,:KeB:B~">
                                        <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field>
                                        <value name="VALUE">
                                          <block type="time_get" id="x/]r.D=IKmR[H0mgA~SC">
                                            <mutation format="true" language="false"></mutation>
                                            <field name="OPTION">custom</field>
                                            <field name="FORMAT">SS.mm.ss</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="variables_set" id=",/sWlnr!hp*y6o,E^MyD">
                                            <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                            <value name="VALUE">
                                              <block type="text_join" id="O6cv-G1Rf{UT}b;P%_tr">
                                                <mutation items="5"></mutation>
                                                <value name="ADD0">
                                                  <block type="variables_get" id=").6t[B9Z]x8~9Nwus`jT">
                                                    <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field>
                                                  </block>
                                                </value>
                                                <value name="ADD1">
                                                  <block type="text" id="^N:t*:^^/LIc4zq`[=`m">
                                                    <field name="TEXT">__</field>
                                                  </block>
                                                </value>
                                                <value name="ADD2">
                                                  <block type="variables_get" id="|]yL:G[QFV*wvhiq@4k9">
                                                    <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field>
                                                  </block>
                                                </value>
                                                <value name="ADD3">
                                                  <block type="text" id="K+;r0,bm+U{dUMdX5Gh-">
                                                    <field name="TEXT">_</field>
                                                  </block>
                                                </value>
                                                <value name="ADD4">
                                                  <block type="text" id=";SgAZ-h6,y)_hoi(w`nr">
                                                    <field name="TEXT">Uhr__Haustuer.jpg</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="exec" id="|)}c(Cq=HT2o+McH]wnJ">
                                                <mutation with_statement="false"></mutation>
                                                <field name="WITH_STATEMENT">FALSE</field>
                                                <field name="LOG"></field>
                                                <value name="COMMAND">
                                                  <shadow type="text" id=".W.b.](1gZ#(PZ,jO+dw">
                                                    <field name="TEXT"></field>
                                                  </shadow>
                                                  <block type="text_join" id="WW-~4.F,w=O@Rh3aKhjb">
                                                    <mutation items="3"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="|HV]oYje^/{`^+-wFVv%">
                                                        <field name="TEXT">sudo wget --output-document /opt/iobroker/kameras/haustuer/</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="variables_get" id="=P?]fVIBS@__fQ!02{o+">
                                                        <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD2">
                                                      <block type="text" id="huw8PuMC.6y3LWV!kFk5">
                                                        <field name="TEXT"> 'http://192.168.4.72:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&amp;usr=USER&amp;pwd=PASSWORD'</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="exec" id="DAuEe=)zDn3|2-Jxem3y">
                                                    <mutation with_statement="false"></mutation>
                                                    <field name="WITH_STATEMENT">FALSE</field>
                                                    <field name="LOG"></field>
                                                    <value name="COMMAND">
                                                      <shadow type="text" id="DMpMf4e*shRl5DSo54Kk">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="text_join" id="W)]5UOW#%2X3XvXXRxsV">
                                                        <mutation items="3"></mutation>
                                                        <value name="ADD0">
                                                          <block type="text" id="ZW6H^$N`kTnH;FgXFB]9">
                                                            <field name="TEXT">scp /opt/iobroker/kameras/haustuer/</field>
                                                          </block>
                                                        </value>
                                                        <value name="ADD1">
                                                          <block type="variables_get" id="=vi2Fze@bvK)@,}^P[4#">
                                                            <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                                          </block>
                                                        </value>
                                                        <value name="ADD2">
                                                          <block type="text" id="O%bp-``m7/$7Hm6=i=E~">
                                                            <field name="TEXT"> admin@192.168.1.11:/share/Data/Tauschordner/Kamera_Ueberwachung/</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="math_change" id="5ovcK!yoC!0PGKOadT4j">
                                                        <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                                                        <value name="DELTA">
                                                          <shadow type="math_number" id="r0iu=G{HyR8eN~c$Rah{">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                        </value>
                                                        <next>
                                                          <block type="controls_if" id="$Y]{P6I8TZlkigS,V$LR">
                                                            <value name="IF0">
                                                              <block type="logic_compare" id="B[Xbg;9t!k4(Ftz;)5kP">
                                                                <field name="OP">GT</field>
                                                                <value name="A">
                                                                  <block type="variables_get" id="gQYmatd15NKfoKe.U=LG">
                                                                    <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="math_number" id="JQp-LEO26*;bo3sA[-P3">
                                                                    <field name="NUM">19</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <statement name="DO0">
                                                              <block type="timeouts_clearinterval" id="fR[z-H%`*r[__my1r?kl">
                                                                <field name="NAME">Intervall</field>
                                                                <next>
                                                                  <block type="exec" id="R=j$5si=9L(vBdN/*n.|">
                                                                    <mutation with_statement="false"></mutation>
                                                                    <field name="WITH_STATEMENT">FALSE</field>
                                                                    <field name="LOG"></field>
                                                                    <value name="COMMAND">
                                                                      <shadow type="text" id="uzQG_gzK+5$1X6*OnDj{">
                                                                        <field name="TEXT">rm /opt/iobroker/kameras/haustuer/*.jpg</field>
                                                                      </shadow>
                                                                    </value>
                                                                    <next>
                                                                      <block type="variables_set" id="Z?ip(tOjDN[M9mEug-cg">
                                                                        <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                                                                        <value name="VALUE">
                                                                          <block type="logic_boolean" id="`$$}q8cIUV#@)Qo%*(UX">
                                                                            <field name="BOOL">FALSE</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </statement>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </xml>
        

        lost in translationL 2 Antworten Letzte Antwort
        0
        • K Kuddel

          @lost-in-translation

          <xml xmlns="http://www.w3.org/1999/xhtml">
            <variables>
              <variable type="" id="e7=:mfMkCQ%a~}-KhJ:f">ueberwachung</variable>
              <variable type="" id="jQ^$686N{uBqpW:3SG?B">zahl</variable>
              <variable type="undefined" id="Intervall">Intervall</variable>
              <variable type="" id="93iKlm8q,8t/S#zh{),_">datum</variable>
              <variable type="" id="$#BWP))B*5:wJCO:]03!">zeit</variable>
              <variable type="" id="*I-JHB}{qxl!8uB~fDIM">dateiname</variable>
            </variables>
            <block type="variables_set" id="q`K{z#!5XPHSWS{HhHqQ" x="-413" y="-538">
              <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
              <value name="VALUE">
                <block type="logic_boolean" id="P8{7!,/i?*GW()g)%dhk">
                  <field name="BOOL">FALSE</field>
                </block>
              </value>
              <next>
                <block type="on_ext" id="vn%V:|0$H3TtEM+{kH!:">
                  <mutation items="2"></mutation>
                  <field name="CONDITION">gt</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="O*3[qDEZ`IC2b%xK}.gs">
                      <field name="oid">mihome.0.devices.sensor_motion_aq2_158d0002579f57.state</field>
                    </shadow>
                  </value>
                  <value name="OID1">
                    <shadow type="field_oid" id="zZNr)|?Z;/(O30m^xBgD">
                      <field name="oid">mihome.0.devices.sensor_motion_aq2_158d0002b9584e.state</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="controls_if" id="leU6oQs0r6T,lQxJIFZ{">
                      <value name="IF0">
                        <block type="logic_operation" id="vqs7msIE4tnQU70-[m}T" inline="false">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_compare" id="mj_x.,VBcp}5K#W?H@O%">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="~0;`]`RGv8Xwu]39-$W3">
                                  <field name="ATTR">val</field>
                                  <field name="OID">javascript.0.sonstige.kamera_ueberwachung</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="eAT9pEyXQWOBXvW]J{+9">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="73C^gIULfU=V1SdAGke^">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="variables_get" id="p[5+`H_sh$jG3V,=)$~1">
                                  <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="3l4/!=,Z06s83rrCa%yg">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="variables_set" id="22A_oSkw4y*ukUnfMQDU">
                          <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="4XVXD^Zl@rm1d$o4m,7H">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                          <next>
                            <block type="variables_set" id="Y=8:~gQ8hSUh$@([-FJ$">
                              <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                              <value name="VALUE">
                                <block type="math_number" id="$_wci)*9zN-G^LE_{G-k">
                                  <field name="NUM">0</field>
                                </block>
                              </value>
                              <next>
                                <block type="timeouts_setinterval" id="kUUyExcZ[XXIfGckhj=D">
                                  <field name="NAME">Intervall</field>
                                  <field name="INTERVAL">1</field>
                                  <field name="UNIT">sec</field>
                                  <statement name="STATEMENT">
                                    <block type="variables_set" id="=RtnA{6UiK3sjAoO6Lza">
                                      <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field>
                                      <value name="VALUE">
                                        <block type="time_get" id="*3ZY(-gyrtBQByJM.+/~">
                                          <mutation format="true" language="false"></mutation>
                                          <field name="OPTION">custom</field>
                                          <field name="FORMAT">JJJJ-MM-TT</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="variables_set" id="QWgD|dQePEx-,:KeB:B~">
                                          <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field>
                                          <value name="VALUE">
                                            <block type="time_get" id="x/]r.D=IKmR[H0mgA~SC">
                                              <mutation format="true" language="false"></mutation>
                                              <field name="OPTION">custom</field>
                                              <field name="FORMAT">SS.mm.ss</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="variables_set" id=",/sWlnr!hp*y6o,E^MyD">
                                              <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                              <value name="VALUE">
                                                <block type="text_join" id="O6cv-G1Rf{UT}b;P%_tr">
                                                  <mutation items="5"></mutation>
                                                  <value name="ADD0">
                                                    <block type="variables_get" id=").6t[B9Z]x8~9Nwus`jT">
                                                      <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="text" id="^N:t*:^^/LIc4zq`[=`m">
                                                      <field name="TEXT">__</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD2">
                                                    <block type="variables_get" id="|]yL:G[QFV*wvhiq@4k9">
                                                      <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD3">
                                                    <block type="text" id="K+;r0,bm+U{dUMdX5Gh-">
                                                      <field name="TEXT">_</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD4">
                                                    <block type="text" id=";SgAZ-h6,y)_hoi(w`nr">
                                                      <field name="TEXT">Uhr__Haustuer.jpg</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="exec" id="|)}c(Cq=HT2o+McH]wnJ">
                                                  <mutation with_statement="false"></mutation>
                                                  <field name="WITH_STATEMENT">FALSE</field>
                                                  <field name="LOG"></field>
                                                  <value name="COMMAND">
                                                    <shadow type="text" id=".W.b.](1gZ#(PZ,jO+dw">
                                                      <field name="TEXT"></field>
                                                    </shadow>
                                                    <block type="text_join" id="WW-~4.F,w=O@Rh3aKhjb">
                                                      <mutation items="3"></mutation>
                                                      <value name="ADD0">
                                                        <block type="text" id="|HV]oYje^/{`^+-wFVv%">
                                                          <field name="TEXT">sudo wget --output-document /opt/iobroker/kameras/haustuer/</field>
                                                        </block>
                                                      </value>
                                                      <value name="ADD1">
                                                        <block type="variables_get" id="=P?]fVIBS@__fQ!02{o+">
                                                          <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                                        </block>
                                                      </value>
                                                      <value name="ADD2">
                                                        <block type="text" id="huw8PuMC.6y3LWV!kFk5">
                                                          <field name="TEXT"> 'http://192.168.4.72:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&amp;usr=USER&amp;pwd=PASSWORD'</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="exec" id="DAuEe=)zDn3|2-Jxem3y">
                                                      <mutation with_statement="false"></mutation>
                                                      <field name="WITH_STATEMENT">FALSE</field>
                                                      <field name="LOG"></field>
                                                      <value name="COMMAND">
                                                        <shadow type="text" id="DMpMf4e*shRl5DSo54Kk">
                                                          <field name="TEXT"></field>
                                                        </shadow>
                                                        <block type="text_join" id="W)]5UOW#%2X3XvXXRxsV">
                                                          <mutation items="3"></mutation>
                                                          <value name="ADD0">
                                                            <block type="text" id="ZW6H^$N`kTnH;FgXFB]9">
                                                              <field name="TEXT">scp /opt/iobroker/kameras/haustuer/</field>
                                                            </block>
                                                          </value>
                                                          <value name="ADD1">
                                                            <block type="variables_get" id="=vi2Fze@bvK)@,}^P[4#">
                                                              <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                                            </block>
                                                          </value>
                                                          <value name="ADD2">
                                                            <block type="text" id="O%bp-``m7/$7Hm6=i=E~">
                                                              <field name="TEXT"> admin@192.168.1.11:/share/Data/Tauschordner/Kamera_Ueberwachung/</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="math_change" id="5ovcK!yoC!0PGKOadT4j">
                                                          <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                                                          <value name="DELTA">
                                                            <shadow type="math_number" id="r0iu=G{HyR8eN~c$Rah{">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                          </value>
                                                          <next>
                                                            <block type="controls_if" id="$Y]{P6I8TZlkigS,V$LR">
                                                              <value name="IF0">
                                                                <block type="logic_compare" id="B[Xbg;9t!k4(Ftz;)5kP">
                                                                  <field name="OP">GT</field>
                                                                  <value name="A">
                                                                    <block type="variables_get" id="gQYmatd15NKfoKe.U=LG">
                                                                      <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <block type="math_number" id="JQp-LEO26*;bo3sA[-P3">
                                                                      <field name="NUM">19</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <statement name="DO0">
                                                                <block type="timeouts_clearinterval" id="fR[z-H%`*r[__my1r?kl">
                                                                  <field name="NAME">Intervall</field>
                                                                  <next>
                                                                    <block type="exec" id="R=j$5si=9L(vBdN/*n.|">
                                                                      <mutation with_statement="false"></mutation>
                                                                      <field name="WITH_STATEMENT">FALSE</field>
                                                                      <field name="LOG"></field>
                                                                      <value name="COMMAND">
                                                                        <shadow type="text" id="uzQG_gzK+5$1X6*OnDj{">
                                                                          <field name="TEXT">rm /opt/iobroker/kameras/haustuer/*.jpg</field>
                                                                        </shadow>
                                                                      </value>
                                                                      <next>
                                                                        <block type="variables_set" id="Z?ip(tOjDN[M9mEug-cg">
                                                                          <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                                                                          <value name="VALUE">
                                                                            <block type="logic_boolean" id="`$$}q8cIUV#@)Qo%*(UX">
                                                                              <field name="BOOL">FALSE</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </statement>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </xml>
          

          lost in translationL Offline
          lost in translationL Offline
          lost in translation
          schrieb am zuletzt editiert von lost in translation
          #5

          @Kuddel said in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

          Spitze! Damit bastel ich mal rum.
          ciao
          frank

          1 Antwort Letzte Antwort
          0
          • K Kuddel

            @lost-in-translation

            <xml xmlns="http://www.w3.org/1999/xhtml">
              <variables>
                <variable type="" id="e7=:mfMkCQ%a~}-KhJ:f">ueberwachung</variable>
                <variable type="" id="jQ^$686N{uBqpW:3SG?B">zahl</variable>
                <variable type="undefined" id="Intervall">Intervall</variable>
                <variable type="" id="93iKlm8q,8t/S#zh{),_">datum</variable>
                <variable type="" id="$#BWP))B*5:wJCO:]03!">zeit</variable>
                <variable type="" id="*I-JHB}{qxl!8uB~fDIM">dateiname</variable>
              </variables>
              <block type="variables_set" id="q`K{z#!5XPHSWS{HhHqQ" x="-413" y="-538">
                <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                <value name="VALUE">
                  <block type="logic_boolean" id="P8{7!,/i?*GW()g)%dhk">
                    <field name="BOOL">FALSE</field>
                  </block>
                </value>
                <next>
                  <block type="on_ext" id="vn%V:|0$H3TtEM+{kH!:">
                    <mutation items="2"></mutation>
                    <field name="CONDITION">gt</field>
                    <field name="ACK_CONDITION"></field>
                    <value name="OID0">
                      <shadow type="field_oid" id="O*3[qDEZ`IC2b%xK}.gs">
                        <field name="oid">mihome.0.devices.sensor_motion_aq2_158d0002579f57.state</field>
                      </shadow>
                    </value>
                    <value name="OID1">
                      <shadow type="field_oid" id="zZNr)|?Z;/(O30m^xBgD">
                        <field name="oid">mihome.0.devices.sensor_motion_aq2_158d0002b9584e.state</field>
                      </shadow>
                    </value>
                    <statement name="STATEMENT">
                      <block type="controls_if" id="leU6oQs0r6T,lQxJIFZ{">
                        <value name="IF0">
                          <block type="logic_operation" id="vqs7msIE4tnQU70-[m}T" inline="false">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="logic_compare" id="mj_x.,VBcp}5K#W?H@O%">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value" id="~0;`]`RGv8Xwu]39-$W3">
                                    <field name="ATTR">val</field>
                                    <field name="OID">javascript.0.sonstige.kamera_ueberwachung</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="eAT9pEyXQWOBXvW]J{+9">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="73C^gIULfU=V1SdAGke^">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="variables_get" id="p[5+`H_sh$jG3V,=)$~1">
                                    <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="3l4/!=,Z06s83rrCa%yg">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="variables_set" id="22A_oSkw4y*ukUnfMQDU">
                            <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="4XVXD^Zl@rm1d$o4m,7H">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                            <next>
                              <block type="variables_set" id="Y=8:~gQ8hSUh$@([-FJ$">
                                <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                                <value name="VALUE">
                                  <block type="math_number" id="$_wci)*9zN-G^LE_{G-k">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="timeouts_setinterval" id="kUUyExcZ[XXIfGckhj=D">
                                    <field name="NAME">Intervall</field>
                                    <field name="INTERVAL">1</field>
                                    <field name="UNIT">sec</field>
                                    <statement name="STATEMENT">
                                      <block type="variables_set" id="=RtnA{6UiK3sjAoO6Lza">
                                        <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field>
                                        <value name="VALUE">
                                          <block type="time_get" id="*3ZY(-gyrtBQByJM.+/~">
                                            <mutation format="true" language="false"></mutation>
                                            <field name="OPTION">custom</field>
                                            <field name="FORMAT">JJJJ-MM-TT</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="variables_set" id="QWgD|dQePEx-,:KeB:B~">
                                            <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field>
                                            <value name="VALUE">
                                              <block type="time_get" id="x/]r.D=IKmR[H0mgA~SC">
                                                <mutation format="true" language="false"></mutation>
                                                <field name="OPTION">custom</field>
                                                <field name="FORMAT">SS.mm.ss</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="variables_set" id=",/sWlnr!hp*y6o,E^MyD">
                                                <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                                <value name="VALUE">
                                                  <block type="text_join" id="O6cv-G1Rf{UT}b;P%_tr">
                                                    <mutation items="5"></mutation>
                                                    <value name="ADD0">
                                                      <block type="variables_get" id=").6t[B9Z]x8~9Nwus`jT">
                                                        <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="text" id="^N:t*:^^/LIc4zq`[=`m">
                                                        <field name="TEXT">__</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD2">
                                                      <block type="variables_get" id="|]yL:G[QFV*wvhiq@4k9">
                                                        <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD3">
                                                      <block type="text" id="K+;r0,bm+U{dUMdX5Gh-">
                                                        <field name="TEXT">_</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD4">
                                                      <block type="text" id=";SgAZ-h6,y)_hoi(w`nr">
                                                        <field name="TEXT">Uhr__Haustuer.jpg</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="exec" id="|)}c(Cq=HT2o+McH]wnJ">
                                                    <mutation with_statement="false"></mutation>
                                                    <field name="WITH_STATEMENT">FALSE</field>
                                                    <field name="LOG"></field>
                                                    <value name="COMMAND">
                                                      <shadow type="text" id=".W.b.](1gZ#(PZ,jO+dw">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="text_join" id="WW-~4.F,w=O@Rh3aKhjb">
                                                        <mutation items="3"></mutation>
                                                        <value name="ADD0">
                                                          <block type="text" id="|HV]oYje^/{`^+-wFVv%">
                                                            <field name="TEXT">sudo wget --output-document /opt/iobroker/kameras/haustuer/</field>
                                                          </block>
                                                        </value>
                                                        <value name="ADD1">
                                                          <block type="variables_get" id="=P?]fVIBS@__fQ!02{o+">
                                                            <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                                          </block>
                                                        </value>
                                                        <value name="ADD2">
                                                          <block type="text" id="huw8PuMC.6y3LWV!kFk5">
                                                            <field name="TEXT"> 'http://192.168.4.72:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&amp;usr=USER&amp;pwd=PASSWORD'</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="exec" id="DAuEe=)zDn3|2-Jxem3y">
                                                        <mutation with_statement="false"></mutation>
                                                        <field name="WITH_STATEMENT">FALSE</field>
                                                        <field name="LOG"></field>
                                                        <value name="COMMAND">
                                                          <shadow type="text" id="DMpMf4e*shRl5DSo54Kk">
                                                            <field name="TEXT"></field>
                                                          </shadow>
                                                          <block type="text_join" id="W)]5UOW#%2X3XvXXRxsV">
                                                            <mutation items="3"></mutation>
                                                            <value name="ADD0">
                                                              <block type="text" id="ZW6H^$N`kTnH;FgXFB]9">
                                                                <field name="TEXT">scp /opt/iobroker/kameras/haustuer/</field>
                                                              </block>
                                                            </value>
                                                            <value name="ADD1">
                                                              <block type="variables_get" id="=vi2Fze@bvK)@,}^P[4#">
                                                                <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                                                              </block>
                                                            </value>
                                                            <value name="ADD2">
                                                              <block type="text" id="O%bp-``m7/$7Hm6=i=E~">
                                                                <field name="TEXT"> admin@192.168.1.11:/share/Data/Tauschordner/Kamera_Ueberwachung/</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="math_change" id="5ovcK!yoC!0PGKOadT4j">
                                                            <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                                                            <value name="DELTA">
                                                              <shadow type="math_number" id="r0iu=G{HyR8eN~c$Rah{">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                            </value>
                                                            <next>
                                                              <block type="controls_if" id="$Y]{P6I8TZlkigS,V$LR">
                                                                <value name="IF0">
                                                                  <block type="logic_compare" id="B[Xbg;9t!k4(Ftz;)5kP">
                                                                    <field name="OP">GT</field>
                                                                    <value name="A">
                                                                      <block type="variables_get" id="gQYmatd15NKfoKe.U=LG">
                                                                        <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="math_number" id="JQp-LEO26*;bo3sA[-P3">
                                                                        <field name="NUM">19</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <statement name="DO0">
                                                                  <block type="timeouts_clearinterval" id="fR[z-H%`*r[__my1r?kl">
                                                                    <field name="NAME">Intervall</field>
                                                                    <next>
                                                                      <block type="exec" id="R=j$5si=9L(vBdN/*n.|">
                                                                        <mutation with_statement="false"></mutation>
                                                                        <field name="WITH_STATEMENT">FALSE</field>
                                                                        <field name="LOG"></field>
                                                                        <value name="COMMAND">
                                                                          <shadow type="text" id="uzQG_gzK+5$1X6*OnDj{">
                                                                            <field name="TEXT">rm /opt/iobroker/kameras/haustuer/*.jpg</field>
                                                                          </shadow>
                                                                        </value>
                                                                        <next>
                                                                          <block type="variables_set" id="Z?ip(tOjDN[M9mEug-cg">
                                                                            <field name="VAR" id="e7=:mfMkCQ%a~}-KhJ:f" variabletype="">ueberwachung</field>
                                                                            <value name="VALUE">
                                                                              <block type="logic_boolean" id="`$$}q8cIUV#@)Qo%*(UX">
                                                                                <field name="BOOL">FALSE</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </statement>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </xml>
            

            lost in translationL Offline
            lost in translationL Offline
            lost in translation
            schrieb am zuletzt editiert von
            #6

            @Kuddel
            Ich habe es mal getestet.
            Ich habe das mit dem Bewegungssensor entfernt und einen einfachen Timer davor gesetzt. Wenn das Skript läuft, dann werden laut log auch execs abgesetzt. Aber: Es passiert nix. Wenn ich den sudo wget befehl aus dem Log kopiere und im terminal ausführe, dann klappt es. Ebenso der scp Befehl. Nur das der scp nicht klappen kann, wenn die jpg Datei erst gar nicht geschrieben wurde, ist selbst mir klar.
            Ich habe den exec in den Einstellungen der javascript Instanz aktiviert. Hast Du eine Idee, woran es liegen könnte?

            ciao
            frank

            lost in translationL 1 Antwort Letzte Antwort
            0
            • lost in translationL lost in translation

              @Kuddel
              Ich habe es mal getestet.
              Ich habe das mit dem Bewegungssensor entfernt und einen einfachen Timer davor gesetzt. Wenn das Skript läuft, dann werden laut log auch execs abgesetzt. Aber: Es passiert nix. Wenn ich den sudo wget befehl aus dem Log kopiere und im terminal ausführe, dann klappt es. Ebenso der scp Befehl. Nur das der scp nicht klappen kann, wenn die jpg Datei erst gar nicht geschrieben wurde, ist selbst mir klar.
              Ich habe den exec in den Einstellungen der javascript Instanz aktiviert. Hast Du eine Idee, woran es liegen könnte?

              ciao
              frank

              lost in translationL Offline
              lost in translationL Offline
              lost in translation
              schrieb am zuletzt editiert von
              #7

              @lost-in-translation

              Ich habe jetzt mal beim wget das sudo entfernt und siehe da, der wget klappt jetzt.
              Leider nicht der scp, was mir logisch erscheint, da nur pi den "Ausweis" hat, scp ohne Passwort zu machen.
              das javascript läuft aber unter dem user iobroker
              vom user iobroker weiss ich aber nicht das passwort.

              Wie stelle ich das an, das ich den user iobroker mit dem nötigen ssh Schlüssel ausstatte um einen scp auf mein NAS zu machen?
              Mit dem User pi habe ich das durch, da klappt der scp Befehl im Terminal.

              ciao

              frank

              1 Antwort Letzte Antwort
              0
              • lost in translationL Offline
                lost in translationL Offline
                lost in translation
                schrieb am zuletzt editiert von
                #8

                Meine Idee gerade ist, der user iobroker darf kein sudo im javascript. Das würde es erklären. Sowohl der wget als auch der whoami laufen, die Dateien finde ich in der Konsole wieder. Eigentlich müsste der scp unter user pi meines Erachtens auch funktionieren, das kann ich aber nicht prüfen, da ich nicht an den user iobroker rankomme.

                Würde mich freuen, wenn mir mal jemand die Tomaten von den Augen nehmen könnte.

                ciao

                frank
                Hier mal mein Blockly:

                ```
                <xml xmlns="http://www.w3.org/1999/xhtml">
                <variables>
                <variable type="" id="jQ^$686N{uBqpW:3SG?B">zahl</variable>
                <variable type="" id="93iKlm8q,8t/S#zh{),">datum</variable>
                <variable type="" id="$#BWP))B5:wJCO:]03!">zeit</variable>
                <variable type="" id="I-JHB}{qxl!8uB~fDIM">dateiname</variable>
                </variables>
                <block type="variables_set" id="s_6@:)kLK#:H62wZEcqx" x="-812" y="-1337">
                <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                <value name="VALUE">
                <block type="math_number" id="[:Ck1eHWT;j,1]5y/%3S">
                <field name="NUM">0</field>
                </block>
                </value>
                <next>
                <block type="schedule" id="rZ0t~6s+m/7u$vrlu
                Ts">
                <field name="SCHEDULE">
                /30 * 6-22 * * *</field>
                <next>
                <block type="variables_set" id="=RtnA{6UiK3sjAoO6Lza">
                <field name="VAR" id="93iKlm8q,8t/S#zh{),
                " variabletype="">datum</field>
                <value name="VALUE">
                <block type="time_get" id="3ZY(-gyrtBQByJM.+/~">
                <mutation format="true" language="false"></mutation>
                <field name="OPTION">custom</field>
                <field name="FORMAT">JJJJ-MM-TT</field>
                </block>
                </value>
                <next>
                <block type="variables_set" id="QWgD|dQePEx-,:KeB:B~">
                <field name="VAR" id="$#BWP))B
                5:wJCO:]03!" variabletype="">zeit</field>
                <value name="VALUE">
                <block type="time_get" id="x/]r.D=IKmR[H0mgA~SC">
                <mutation format="true" language="false"></mutation>
                <field name="OPTION">custom</field>
                <field name="FORMAT">SS.mm.ss</field>
                </block>
                </value>
                <next>
                <block type="variables_set" id=",/sWlnr!hpy6o,E^MyD">
                <field name="VAR" id="I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                <value name="VALUE">
                <block type="text_join" id="O6cv-G1Rf{UT}b;P%tr">
                <mutation items="5"></mutation>
                <value name="ADD0">
                <block type="variables_get" id=").6t[B9Z]x8~9NwusjT"> <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field> </block> </value> <value name="ADD1"> <block type="text" id="^N:t*:^^/LIc4zq[=m"> <field name="TEXT">__</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="|]yL:G[QFV*wvhiq@4k9"> <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field> </block> </value> <value name="ADD3"> <block type="text" id="K+;r0,bm+U{dUMdX5Gh-"> <field name="TEXT">_</field> </block> </value> <value name="ADD4"> <block type="text" id=";SgAZ-h6,y)_hoi(wnr">
                <field name="TEXT">Uhr__PflanzenCam.jpg</field>
                </block>
                </value>
                </block>
                </value>
                <next>
                <block type="exec" id="|)}c(Cq=HT2o+McH]wnJ">
                <mutation with_statement="false"></mutation>
                <field name="WITH_STATEMENT">FALSE</field>
                <field name="LOG">log</field>
                <value name="COMMAND">
                <shadow type="text" id=".W.b.](1gZ#(PZ,jO+dw">
                <field name="TEXT"></field>
                </shadow>
                <block type="text_join" id="WW-~4.F,w=O@Rh3aKhjb">
                <mutation items="3"></mutation>
                <value name="ADD0">
                <block type="text" id="|HV]oYje^/{^+-wFVv%"> <field name="TEXT">wget --output-document /opt/iobroker/kameras/kuechenfenster/</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="=P?]fVIBS@__fQ!02{o+"> <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field> </block> </value> <value name="ADD2"> <block type="text" id="huw8PuMC.6y3LWV!kFk5"> <field name="TEXT"> 'http://192.168.nnn.mm/media/?user=admin&amp;pwd=&amp;action=snapshot'</field> </block> </value> </block> </value> <next> <block type="exec" id="DAuEe=)zDn3|2-Jxem3y"> <mutation with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG">log</field> <value name="COMMAND"> <shadow type="text" id="DMpMf4e*shRl5DSo54Kk"> <field name="TEXT"></field> </shadow> <block type="text_join" id="W)]5UOW#%2X3XvXXRxsV"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="ZW6H^$NkTnH;FgXFB]9">
                <field name="TEXT">sudo --user=pi scp /opt/iobroker/kameras/kuechenfenster/</field>
                </block>
                </value>
                <value name="ADD1">
                <block type="variables_get" id="=vi2Fze@bvK)@,}^P[4#">
                <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                </block>
                </value>
                <value name="ADD2">
                <block type="text" id="O%bp-``m7/$7Hm6=i=E~">
                <field name="TEXT"> nasuser@192.168.nnn.mm:/volume1/dateien/Bilder/Kameras/Kuechenfenster/</field>
                </block>
                </value>
                </block>
                </value>
                <next>
                <block type="exec" id=";nc6VYP2VEhak
                $pTCH/">
                <mutation with_statement="false"></mutation>
                <field name="WITH_STATEMENT">FALSE</field>
                <field name="LOG">log</field>
                <value name="COMMAND">
                <shadow type="text" id="DMpMf4e
                shRl5DSo54Kk">
                <field name="TEXT"></field>
                </shadow>
                <block type="text_join" id="bsgM
                TK6n]5I$X_?iRR6">
                <mutation items="3"></mutation>
                <value name="ADD0">
                <block type="text" id="4|rA(/@Vu)tx+A#Z$rr.">
                <field name="TEXT">whoami >>/opt/iobroker/kameras/debug_</field>
                </block>
                </value>
                <value name="ADD1">
                <block type="variables_get" id="}m$%-:/zC$g_]f|vVcYH">
                <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                </block>
                </value>
                <value name="ADD2">
                <block type="text" id="kMh=#gFC$)pP5$V~UxY"> <field name="TEXT">.txt</field> </block> </value> </block> </value> <next> <block type="math_change" id="5ovcK!yoC!0PGKOadT4j"> <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field> <value name="DELTA"> <shadow type="math_number" id="r0iu=G{HyR8eN~c$Rah{"> <field name="NUM">1</field> </shadow> </value> <next> <block type="controls_if" id="$Y]{P6I8TZlkigS,V$LR"> <value name="IF0"> <block type="logic_compare" id="B[Xbg;9t!k4(Ftz;)5kP"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="gQYmatd15NKfoKe.U=LG"> <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field> </block> </value> <value name="B"> <block type="math_number" id="JQp-LEO26*;bo3sA[-P3"> <field name="NUM">100</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_clearinterval" id="fR[z-H%r[__my1r?kl">
                <field name="NAME">Intervall</field>
                <next>
                <block type="exec" id="R=j$5si=9L(vBdN/n.|">
                <mutation with_statement="false"></mutation>
                <field name="WITH_STATEMENT">FALSE</field>
                <field name="LOG">log</field>
                <value name="COMMAND">
                <shadow type="text" id="uzQG_gzK+5$1X6
                OnDj{">
                <field name="TEXT">rm /opt/iobroker/kameras/kuechenfenster/
                .jpog (dieser Befehl absichtlich kaputt)</field>
                </shadow>
                </value>
                </block>
                </next>
                </block>
                </statement>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </xml>

                AlCalzoneA 1 Antwort Letzte Antwort
                0
                • lost in translationL lost in translation

                  Meine Idee gerade ist, der user iobroker darf kein sudo im javascript. Das würde es erklären. Sowohl der wget als auch der whoami laufen, die Dateien finde ich in der Konsole wieder. Eigentlich müsste der scp unter user pi meines Erachtens auch funktionieren, das kann ich aber nicht prüfen, da ich nicht an den user iobroker rankomme.

                  Würde mich freuen, wenn mir mal jemand die Tomaten von den Augen nehmen könnte.

                  ciao

                  frank
                  Hier mal mein Blockly:

                  ```
                  <xml xmlns="http://www.w3.org/1999/xhtml">
                  <variables>
                  <variable type="" id="jQ^$686N{uBqpW:3SG?B">zahl</variable>
                  <variable type="" id="93iKlm8q,8t/S#zh{),">datum</variable>
                  <variable type="" id="$#BWP))B5:wJCO:]03!">zeit</variable>
                  <variable type="" id="I-JHB}{qxl!8uB~fDIM">dateiname</variable>
                  </variables>
                  <block type="variables_set" id="s_6@:)kLK#:H62wZEcqx" x="-812" y="-1337">
                  <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field>
                  <value name="VALUE">
                  <block type="math_number" id="[:Ck1eHWT;j,1]5y/%3S">
                  <field name="NUM">0</field>
                  </block>
                  </value>
                  <next>
                  <block type="schedule" id="rZ0t~6s+m/7u$vrlu
                  Ts">
                  <field name="SCHEDULE">
                  /30 * 6-22 * * *</field>
                  <next>
                  <block type="variables_set" id="=RtnA{6UiK3sjAoO6Lza">
                  <field name="VAR" id="93iKlm8q,8t/S#zh{),
                  " variabletype="">datum</field>
                  <value name="VALUE">
                  <block type="time_get" id="3ZY(-gyrtBQByJM.+/~">
                  <mutation format="true" language="false"></mutation>
                  <field name="OPTION">custom</field>
                  <field name="FORMAT">JJJJ-MM-TT</field>
                  </block>
                  </value>
                  <next>
                  <block type="variables_set" id="QWgD|dQePEx-,:KeB:B~">
                  <field name="VAR" id="$#BWP))B
                  5:wJCO:]03!" variabletype="">zeit</field>
                  <value name="VALUE">
                  <block type="time_get" id="x/]r.D=IKmR[H0mgA~SC">
                  <mutation format="true" language="false"></mutation>
                  <field name="OPTION">custom</field>
                  <field name="FORMAT">SS.mm.ss</field>
                  </block>
                  </value>
                  <next>
                  <block type="variables_set" id=",/sWlnr!hpy6o,E^MyD">
                  <field name="VAR" id="I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                  <value name="VALUE">
                  <block type="text_join" id="O6cv-G1Rf{UT}b;P%tr">
                  <mutation items="5"></mutation>
                  <value name="ADD0">
                  <block type="variables_get" id=").6t[B9Z]x8~9NwusjT"> <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field> </block> </value> <value name="ADD1"> <block type="text" id="^N:t*:^^/LIc4zq[=m"> <field name="TEXT">__</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="|]yL:G[QFV*wvhiq@4k9"> <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field> </block> </value> <value name="ADD3"> <block type="text" id="K+;r0,bm+U{dUMdX5Gh-"> <field name="TEXT">_</field> </block> </value> <value name="ADD4"> <block type="text" id=";SgAZ-h6,y)_hoi(wnr">
                  <field name="TEXT">Uhr__PflanzenCam.jpg</field>
                  </block>
                  </value>
                  </block>
                  </value>
                  <next>
                  <block type="exec" id="|)}c(Cq=HT2o+McH]wnJ">
                  <mutation with_statement="false"></mutation>
                  <field name="WITH_STATEMENT">FALSE</field>
                  <field name="LOG">log</field>
                  <value name="COMMAND">
                  <shadow type="text" id=".W.b.](1gZ#(PZ,jO+dw">
                  <field name="TEXT"></field>
                  </shadow>
                  <block type="text_join" id="WW-~4.F,w=O@Rh3aKhjb">
                  <mutation items="3"></mutation>
                  <value name="ADD0">
                  <block type="text" id="|HV]oYje^/{^+-wFVv%"> <field name="TEXT">wget --output-document /opt/iobroker/kameras/kuechenfenster/</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="=P?]fVIBS@__fQ!02{o+"> <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field> </block> </value> <value name="ADD2"> <block type="text" id="huw8PuMC.6y3LWV!kFk5"> <field name="TEXT"> 'http://192.168.nnn.mm/media/?user=admin&amp;pwd=&amp;action=snapshot'</field> </block> </value> </block> </value> <next> <block type="exec" id="DAuEe=)zDn3|2-Jxem3y"> <mutation with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG">log</field> <value name="COMMAND"> <shadow type="text" id="DMpMf4e*shRl5DSo54Kk"> <field name="TEXT"></field> </shadow> <block type="text_join" id="W)]5UOW#%2X3XvXXRxsV"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="ZW6H^$NkTnH;FgXFB]9">
                  <field name="TEXT">sudo --user=pi scp /opt/iobroker/kameras/kuechenfenster/</field>
                  </block>
                  </value>
                  <value name="ADD1">
                  <block type="variables_get" id="=vi2Fze@bvK)@,}^P[4#">
                  <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                  </block>
                  </value>
                  <value name="ADD2">
                  <block type="text" id="O%bp-``m7/$7Hm6=i=E~">
                  <field name="TEXT"> nasuser@192.168.nnn.mm:/volume1/dateien/Bilder/Kameras/Kuechenfenster/</field>
                  </block>
                  </value>
                  </block>
                  </value>
                  <next>
                  <block type="exec" id=";nc6VYP2VEhak
                  $pTCH/">
                  <mutation with_statement="false"></mutation>
                  <field name="WITH_STATEMENT">FALSE</field>
                  <field name="LOG">log</field>
                  <value name="COMMAND">
                  <shadow type="text" id="DMpMf4e
                  shRl5DSo54Kk">
                  <field name="TEXT"></field>
                  </shadow>
                  <block type="text_join" id="bsgM
                  TK6n]5I$X_?iRR6">
                  <mutation items="3"></mutation>
                  <value name="ADD0">
                  <block type="text" id="4|rA(/@Vu)tx+A#Z$rr.">
                  <field name="TEXT">whoami >>/opt/iobroker/kameras/debug_</field>
                  </block>
                  </value>
                  <value name="ADD1">
                  <block type="variables_get" id="}m$%-:/zC$g_]f|vVcYH">
                  <field name="VAR" id="*I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                  </block>
                  </value>
                  <value name="ADD2">
                  <block type="text" id="kMh=#gFC$)pP5$V~UxY"> <field name="TEXT">.txt</field> </block> </value> </block> </value> <next> <block type="math_change" id="5ovcK!yoC!0PGKOadT4j"> <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field> <value name="DELTA"> <shadow type="math_number" id="r0iu=G{HyR8eN~c$Rah{"> <field name="NUM">1</field> </shadow> </value> <next> <block type="controls_if" id="$Y]{P6I8TZlkigS,V$LR"> <value name="IF0"> <block type="logic_compare" id="B[Xbg;9t!k4(Ftz;)5kP"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="gQYmatd15NKfoKe.U=LG"> <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">zahl</field> </block> </value> <value name="B"> <block type="math_number" id="JQp-LEO26*;bo3sA[-P3"> <field name="NUM">100</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_clearinterval" id="fR[z-H%r[__my1r?kl">
                  <field name="NAME">Intervall</field>
                  <next>
                  <block type="exec" id="R=j$5si=9L(vBdN/n.|">
                  <mutation with_statement="false"></mutation>
                  <field name="WITH_STATEMENT">FALSE</field>
                  <field name="LOG">log</field>
                  <value name="COMMAND">
                  <shadow type="text" id="uzQG_gzK+5$1X6
                  OnDj{">
                  <field name="TEXT">rm /opt/iobroker/kameras/kuechenfenster/
                  .jpog (dieser Befehl absichtlich kaputt)</field>
                  </shadow>
                  </value>
                  </block>
                  </next>
                  </block>
                  </statement>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </next>
                  </block>
                  </xml>

                  AlCalzoneA Offline
                  AlCalzoneA Offline
                  AlCalzone
                  Developer
                  schrieb am zuletzt editiert von
                  #9

                  @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                  Würde mich freuen, wenn mir mal jemand die Tomaten von den Augen nehmen könnte.

                  Ich hab dir in nem anderen Thread geantwortet, wie du iobroker erlaubst, scp als pi auszuführen. Wenn ich das hier lese: ist es ggf. einfacher, direkt iobroker das Ausführen von scp ohne Passwort zu erlauben?

                  Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

                  lost in translationL 1 Antwort Letzte Antwort
                  0
                  • AlCalzoneA AlCalzone

                    @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                    Würde mich freuen, wenn mir mal jemand die Tomaten von den Augen nehmen könnte.

                    Ich hab dir in nem anderen Thread geantwortet, wie du iobroker erlaubst, scp als pi auszuführen. Wenn ich das hier lese: ist es ggf. einfacher, direkt iobroker das Ausführen von scp ohne Passwort zu erlauben?

                    lost in translationL Offline
                    lost in translationL Offline
                    lost in translation
                    schrieb am zuletzt editiert von lost in translation
                    #10

                    @AlCalzone
                    Ja, das denke ich auch.
                    ich könnte ja ein Schlüsselpaar anlegen und im user iobroker entsprechend hinterlegen.
                    Problem ist, ich bekomme keinen su iobroker hin.
                    Das Rechtekonzept habe ich noch nicht vor Augen.

                    wenn ich versuche einen su iobroker zu machen, gibt es folgende Meldung:

                    root@ioBroker-RasPi:/home/pi# su iobroker
                    This account is currently not available.
                    root@ioBroker-RasPi:/home/pi#
                    

                    somit bleibt wohl nur iobroker sudo zu ermöglichen?

                    ciao

                    frank

                    AlCalzoneA 1 Antwort Letzte Antwort
                    0
                    • lost in translationL lost in translation

                      @AlCalzone
                      Ja, das denke ich auch.
                      ich könnte ja ein Schlüsselpaar anlegen und im user iobroker entsprechend hinterlegen.
                      Problem ist, ich bekomme keinen su iobroker hin.
                      Das Rechtekonzept habe ich noch nicht vor Augen.

                      wenn ich versuche einen su iobroker zu machen, gibt es folgende Meldung:

                      root@ioBroker-RasPi:/home/pi# su iobroker
                      This account is currently not available.
                      root@ioBroker-RasPi:/home/pi#
                      

                      somit bleibt wohl nur iobroker sudo zu ermöglichen?

                      ciao

                      frank

                      AlCalzoneA Offline
                      AlCalzoneA Offline
                      AlCalzone
                      Developer
                      schrieb am zuletzt editiert von
                      #11

                      @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                      su iobroker

                      Der User hat keine Login-Shell, die musst du "erzwingen" für solche Spielchen:
                      su -s /bin/bash iobroker

                      Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

                      lost in translationL 1 Antwort Letzte Antwort
                      0
                      • AlCalzoneA AlCalzone

                        @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                        su iobroker

                        Der User hat keine Login-Shell, die musst du "erzwingen" für solche Spielchen:
                        su -s /bin/bash iobroker

                        lost in translationL Offline
                        lost in translationL Offline
                        lost in translation
                        schrieb am zuletzt editiert von lost in translation
                        #12

                        @AlCalzone
                        Ich hab jetzt mit sudo den keygen im iobroker user ausgeführt und dann entsprechend den Schlüssel auf dem NAS hinterlegt.
                        SCP funktioniert jetzt im iobroker user, ich benötige nicht mehr ein sudo für die Aufgabe.

                        Aber: ich musste feststelen, dass die jpg unvollständig auf dem NAS ankamen. Offenbar wurde das kopieren bereits angefangen, bevor der wget zu Ende war.
                        Ich habe jetzt 5 sekunden Wartezeit vorgesehen, aber so richtig elegant finde ich das nicht.

                        8f3c78cd-5596-4f82-ab98-f627744bdb01-image.png

                        Was bewirkt das Häkchen "mit Ergebnissen" könnte ich damit arbeiten? Mein Eindruck ist, der wget exec wird abgesetzt ohne das Ergebnis abzuwarten und der scp startet dann schneller als wget fertig wird. So wird nur ein viertel des jpg kopiert.

                        andere mögliche Lösung wäre wget und scp in ein bash script zu stecken. Aber dann habe ich von diesem schönen grafischen Puzzle nichts.

                        Deswegen meine Frage: wie erreiche ich, dass scp erst dann aufgerufen wird, wenn wget mit dem download fertig ist?
                        Frage am Rande, wo ich mir den Screenshot anschaue: wo kann ich ein ticket für blockly erstellen? Das "ms" hinter "Sek" beim timeout macht nicht wirklich Sinn, denke ich.

                        Und wo finde ich die genaue Beschreibung was Ausführen timeout in 5 Sek genau macht?

                        Mein Intuitives Verständnis war: "geb den Befehlen hier drin 5 Sekunden ferdich zu werden, ansonsten kill"
                        Das beobachtete Verhalten war: "warte 5 Sekunden, dann ..."
                        ciao

                        frank

                        AlCalzoneA 1 Antwort Letzte Antwort
                        0
                        • lost in translationL lost in translation

                          @AlCalzone
                          Ich hab jetzt mit sudo den keygen im iobroker user ausgeführt und dann entsprechend den Schlüssel auf dem NAS hinterlegt.
                          SCP funktioniert jetzt im iobroker user, ich benötige nicht mehr ein sudo für die Aufgabe.

                          Aber: ich musste feststelen, dass die jpg unvollständig auf dem NAS ankamen. Offenbar wurde das kopieren bereits angefangen, bevor der wget zu Ende war.
                          Ich habe jetzt 5 sekunden Wartezeit vorgesehen, aber so richtig elegant finde ich das nicht.

                          8f3c78cd-5596-4f82-ab98-f627744bdb01-image.png

                          Was bewirkt das Häkchen "mit Ergebnissen" könnte ich damit arbeiten? Mein Eindruck ist, der wget exec wird abgesetzt ohne das Ergebnis abzuwarten und der scp startet dann schneller als wget fertig wird. So wird nur ein viertel des jpg kopiert.

                          andere mögliche Lösung wäre wget und scp in ein bash script zu stecken. Aber dann habe ich von diesem schönen grafischen Puzzle nichts.

                          Deswegen meine Frage: wie erreiche ich, dass scp erst dann aufgerufen wird, wenn wget mit dem download fertig ist?
                          Frage am Rande, wo ich mir den Screenshot anschaue: wo kann ich ein ticket für blockly erstellen? Das "ms" hinter "Sek" beim timeout macht nicht wirklich Sinn, denke ich.

                          Und wo finde ich die genaue Beschreibung was Ausführen timeout in 5 Sek genau macht?

                          Mein Intuitives Verständnis war: "geb den Befehlen hier drin 5 Sekunden ferdich zu werden, ansonsten kill"
                          Das beobachtete Verhalten war: "warte 5 Sekunden, dann ..."
                          ciao

                          frank

                          AlCalzoneA Offline
                          AlCalzoneA Offline
                          AlCalzone
                          Developer
                          schrieb am zuletzt editiert von
                          #13

                          @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                          Was bewirkt das Häkchen "mit Ergebnissen" könnte ich damit arbeiten.

                          Die Namen der Optionen in Blockly sind IMO stark überarbeitungsbedürftig. Ich vermute, dass "mit Ergebnissen" auf die Beendung des Befehls wartet, also müsstest du es anhaken. Dann brauchst du auch kein Timeout, was versagen würde, wenn die Verbindung mal kurz langsam ist.

                          Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

                          lost in translationL 2 Antworten Letzte Antwort
                          0
                          • AlCalzoneA AlCalzone

                            @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                            Was bewirkt das Häkchen "mit Ergebnissen" könnte ich damit arbeiten.

                            Die Namen der Optionen in Blockly sind IMO stark überarbeitungsbedürftig. Ich vermute, dass "mit Ergebnissen" auf die Beendung des Befehls wartet, also müsstest du es anhaken. Dann brauchst du auch kein Timeout, was versagen würde, wenn die Verbindung mal kurz langsam ist.

                            lost in translationL Offline
                            lost in translationL Offline
                            lost in translation
                            schrieb am zuletzt editiert von lost in translation
                            #14

                            @AlCalzone
                            Wenn es mit dem Haken wartet, kann ich den Rest dann dahinter lassen, oder muss er dann in das neue Feld?
                            c9a52b7d-e7ac-4540-841f-d65126b1b392-image.png verschoben werden?

                            Wird bei "mit Ergebnissen" irgendeine Variable mit der Rückgabe belegt? Dann könnte ich es ja richtig sauber machen und nur bei Errorlevel 0 einen scp anstossen.

                            ciao
                            frank

                            AlCalzoneA 1 Antwort Letzte Antwort
                            0
                            • AlCalzoneA AlCalzone

                              @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                              Was bewirkt das Häkchen "mit Ergebnissen" könnte ich damit arbeiten.

                              Die Namen der Optionen in Blockly sind IMO stark überarbeitungsbedürftig. Ich vermute, dass "mit Ergebnissen" auf die Beendung des Befehls wartet, also müsstest du es anhaken. Dann brauchst du auch kein Timeout, was versagen würde, wenn die Verbindung mal kurz langsam ist.

                              lost in translationL Offline
                              lost in translationL Offline
                              lost in translation
                              schrieb am zuletzt editiert von
                              #15

                              @AlCalzone

                              Hier mal, was ich jetzt daraus gebastelt habe: (Funktioniert im Moment sogar)

                              <xml xmlns="http://www.w3.org/1999/xhtml">
                              <variables>
                              <variable type="" id="]KG2pTxWjSC.613V+lKQ">Zaehler1</variable>
                              <variable type="" id="jQ^$686N{uBqpW:3SG?B">Zaehler2</variable>
                              <variable type="" id="93iKlm8q,8t/S#zh{),">datum</variable>
                              <variable type="" id="$#BWP))B*5:wJCO:]03!">zeit</variable>
                              <variable type="" id="*I-JHB}{qxl!8uB~fDIM">dateiname</variable>
                              <variable type="" id="eV)M8@BfUSafo])3ZCZ8">dateiname2</variable>
                              <variable type="undefined" id="timeout3">timeout3</variable>
                              <variable type="undefined" id="timeout2">timeout2</variable>
                              </variables>
                              <block type="schedule" id="x[c!kbcmnHF{C?Y.gwP$" x="-1363" y="-1862">
                              <field name="SCHEDULE">0 1 * * *</field>
                              <statement name="STATEMENT">
                              <block type="exec" id="}Azsy
                              /O^{44{K~t/W~">
                              <mutation with_statement="false"></mutation>
                              <field name="WITH_STATEMENT">FALSE</field>
                              <field name="LOG">log</field>
                              <value name="COMMAND">
                              <shadow type="text" id="v9IhEQ1htyy)%7ez3:5X">
                              <field name="TEXT">find /opt/iobroker/kameras/kamera1/ -name "
                              .jpg" -mtime +2 -delete</field>
                              </shadow>
                              </value>
                              <next>
                              <block type="exec" id="v$VxxuYHSM5MU~ml?">
                              <mutation with_statement="false"></mutation>
                              <field name="WITH_STATEMENT">FALSE</field>
                              <field name="LOG">log</field>
                              <value name="COMMAND">
                              <shadow type="text" id="3f(;CMm|SmAgfE:4CfG^">
                              <field name="TEXT">find /opt/iobroker/kameras/kamera2/ -name "*.jpg" -mtime +2 -delete</field>
                              </shadow>
                              </value>
                              </block>
                              </next>
                              </block>
                              </statement>
                              </block>
                              <block type="variables_set" id="+dwJ{B,6IiY^#AMn3)B-" x="-837" y="-1612">
                              <field name="VAR" id="]KG2pTxWjSC.613V+lKQ" variabletype="">Zaehler1</field>
                              <value name="VALUE">
                              <block type="math_number" id="qT5^MDKqE{mbdTOiV+z%">
                              <field name="NUM">0</field>
                              </block>
                              </value>
                              <next>
                              <block type="schedule" id="Ku]Rir#v#m6]aMU7b$w
                              ">
                              <field name="SCHEDULE">/30 * 6-22 * * </field>
                              <statement name="STATEMENT">
                              <block type="variables_set" id="BxR[(cW3vnABLM#$BY4W">
                              <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field>
                              <value name="VALUE">
                              <block type="time_get" id="
                              ?U-j9@KKeZNgnjYt3}d">
                              <mutation format="true" language="false"></mutation>
                              <field name="OPTION">custom</field>
                              <field name="FORMAT">JJJJ-MM-TT</field>
                              </block>
                              </value>
                              <next>
                              <block type="variables_set" id="Ey}0W
                              USW=mjj7A%L%wl">
                              <field name="VAR" id="$#BWP))B5:wJCO:]03!" variabletype="">zeit</field>
                              <value name="VALUE">
                              <block type="time_get" id="yD%]+{3^P+RaSV=#z98w">
                              <mutation format="true" language="false"></mutation>
                              <field name="OPTION">custom</field>
                              <field name="FORMAT">SS.mm.ss</field>
                              </block>
                              </value>
                              <next>
                              <block type="variables_set" id=",/sWlnr!hp
                              y6o,E^MyD">
                              <field name="VAR" id="I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                              <value name="VALUE">
                              <block type="text_join" id="O6cv-G1Rf{UT}b;P%_tr">
                              <mutation items="5"></mutation>
                              <value name="ADD0">
                              <block type="variables_get" id=").6t[B9Z]x8~9NwusjT"> <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field> </block> </value> <value name="ADD1"> <block type="text" id="^N:t*:^^/LIc4zq[=m"> <field name="TEXT">_</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="|]yL:G[QFV*wvhiq@4k9"> <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field> </block> </value> <value name="ADD3"> <block type="text" id="K+;r0,bm+U{dUMdX5Gh-"> <field name="TEXT">_</field> </block> </value> <value name="ADD4"> <block type="text" id=";SgAZ-h6,y)_hoi(wnr">
                              <field name="TEXT">Uhr_kamera1.jpg</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              <next>
                              <block type="exec" id="RL}N)s]TL~Z/6d%Es;/K">
                              <mutation with_statement="false"></mutation>
                              <field name="WITH_STATEMENT">FALSE</field>
                              <field name="LOG"></field>
                              <value name="COMMAND">
                              <shadow type="text" id=".W.b.](1gZ#(PZ,jO+dw">
                              <field name="TEXT"></field>
                              </shadow>
                              <block type="text_join" id="Bujqw$!$#Q!I+,Lfj2B">
                              <mutation items="3"></mutation>
                              <value name="ADD0">
                              <block type="text" id="E!,1CF?)LyDL}+M;EV8r">
                              <field name="TEXT">wget --output-document /opt/iobroker/kameras/kamera1/</field>
                              </block>
                              </value>
                              <value name="ADD1">
                              <block type="variables_get" id="d@=Te,Y_F:v?;gjvX~C%">
                              <field name="VAR" id="I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                              </block>
                              </value>
                              <value name="ADD2">
                              <block type="text" id="%-MtOol6hPZ~-F}suVJq">
                              <field name="TEXT"> 'http://ip-kamera1/media/?user=admin&amp;pwd=&amp;action=snapshot'</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              <next>
                              <block type="timeouts_settimeout" id="iCssgzh;cN.lp#eS%LuV">
                              <field name="NAME">timeout3</field>
                              <field name="DELAY">5</field>
                              <field name="UNIT">sec</field>
                              <statement name="STATEMENT">
                              <block type="exec" id="|O{1VjI^HaC[UuQdeDB
                              ">
                              <mutation with_statement="false"></mutation>
                              <field name="WITH_STATEMENT">FALSE</field>
                              <field name="LOG"></field>
                              <value name="COMMAND">
                              <shadow type="text" id="DMpMf4e
                              shRl5DSo54Kk">
                              <field name="TEXT"></field>
                              </shadow>
                              <block type="text_join" id="qpgpoDG7|28]q.#%!3G@">
                              <mutation items="3"></mutation>
                              <value name="ADD0">
                              <block type="text" id="KwkGbxOMO0)A{P$mKB+"> <field name="TEXT">scp /opt/iobroker/kameras/kamera1/</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="LHVaqFt6yx}3m(x#kYs">
                              <field name="VAR" id="I-JHB}{qxl!8uB~fDIM" variabletype="">dateiname</field>
                              </block>
                              </value>
                              <value name="ADD2">
                              <block type="text" id="4^s.C@-2Tgl.xqG!d9I">
                              <field name="TEXT"> nas_user@ip_nas:/volume1/dateien/Bilder/Kameras/kamera1/</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              <next>
                              <block type="math_change" id="#!nVZ+o(04eHip4exzQk">
                              <field name="VAR" id="]KG2pTxWjSC.613V+lKQ" variabletype="">Zaehler1</field>
                              <value name="DELTA">
                              <shadow type="math_number" id="0Q,,)lY)T
                              .Ey/Qcc;">
                              <field name="NUM">1</field>
                              </shadow>
                              </value>
                              </block>
                              </next>
                              </block>
                              </statement>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </statement>
                              </block>
                              </next>
                              </block>
                              <block type="variables_set" id="s_6@:)kLK#:H62wZEcqx" x="-212" y="-1612">
                              <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">Zaehler2</field>
                              <value name="VALUE">
                              <block type="math_number" id="[:Ck1eHWT;j,1]5y/%3S">
                              <field name="NUM">0</field>
                              </block>
                              </value>
                              <next>
                              <block type="schedule" id="rZ0t~6s+m/7u$vrlu
                              Ts">
                              <field name="SCHEDULE">
                              /30 * * * * *</field>
                              <statement name="STATEMENT">
                              <block type="variables_set" id="=RtnA{6UiK3sjAoO6Lza">
                              <field name="VAR" id="93iKlm8q,8t/S#zh{)," variabletype="">datum</field>
                              <value name="VALUE">
                              <block type="time_get" id="3ZY(-gyrtBQByJM.+/~">
                              <mutation format="true" language="false"></mutation>
                              <field name="OPTION">custom</field>
                              <field name="FORMAT">JJJJ-MM-TT</field>
                              </block>
                              </value>
                              <next>
                              <block type="variables_set" id="QWgD|dQePEx-,:KeB:B~">
                              <field name="VAR" id="$#BWP))B
                              5:wJCO:]03!" variabletype="">zeit</field>
                              <value name="VALUE">
                              <block type="time_get" id="x/]r.D=IKmR[H0mgA~SC">
                              <mutation format="true" language="false"></mutation>
                              <field name="OPTION">custom</field>
                              <field name="FORMAT">SS.mm.ss</field>
                              </block>
                              </value>
                              <next>
                              <block type="variables_set" id="ikxNs$-4BfZ}-%2PHy!t">
                              <field name="VAR" id="eV)M8@BfUSafo])3ZCZ8" variabletype="">dateiname2</field>
                              <value name="VALUE">
                              <block type="text_join" id=";%MKP~-owl
                              )|oQQuIw)">
                              <mutation items="5"></mutation>
                              <value name="ADD0">
                              <block type="variables_get" id=")Tc1R9J{+2~p,5G@3o-"> <field name="VAR" id="93iKlm8q,8t/S#zh{),_" variabletype="">datum</field> </block> </value> <value name="ADD1"> <block type="text" id="@P=?Vk6*EX..)Q?bZD[m"> <field name="TEXT">_</field> </block> </value> <value name="ADD2"> <block type="variables_get" id="XSJ;B]le|=t*Cg-hNe@6"> <field name="VAR" id="$#BWP))B*5:wJCO:]03!" variabletype="">zeit</field> </block> </value> <value name="ADD3"> <block type="text" id="fCS@zCJxPignzY[i(io~"> <field name="TEXT">_</field> </block> </value> <value name="ADD4"> <block type="text" id="C$nc8hpI_!:ZH#N6QQrt"> <field name="TEXT">Uhr_kamera2.jpg</field> </block> </value> </block> </value> <next> <block type="exec" id="O7V=Q~A3D5L#6xdWt)P9"> <mutation with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id=".W.b.](1gZ#(PZ,jO+dw"> <field name="TEXT"></field> </shadow> <block type="text_join" id="I*@q.{D65]eYkk8lvh,8"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="st~R#h}Xyk|Nq7?|Oa)$"> <field name="TEXT">wget --output-document /opt/iobroker/kameras/kamera2/</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="14|RDXtGI2uU@?~q:%]">
                              <field name="VAR" id="eV)M8@BfUSafo])3ZCZ8" variabletype="">dateiname2</field>
                              </block>
                              </value>
                              <value name="ADD2">
                              <block type="text" id="V3)cl#!xy!raL:TU$R">
                              <field name="TEXT"> 'http://ip-kamera2/media/?user=admin&amp;pwd=&amp;action=snapshot'</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              <next>
                              <block type="timeouts_settimeout" id="U:lQ+H]5@Q2GRpPGN%%"> <field name="NAME">timeout2</field> <field name="DELAY">5</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="exec" id="F|5G)S37U9}QbMtrV5@."> <mutation with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="DMpMf4e*shRl5DSo54Kk"> <field name="TEXT"></field> </shadow> <block type="text_join" id="B-_VV%6$s.[DlHx)o/}}"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="_.,2P7FC7bgP+apT,FHg"> <field name="TEXT">scp /opt/iobroker/kameras/kamera2/</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="0F$+LN:O^2s-T/U,Fc#2"> <field name="VAR" id="eV)M8@BfUSafo])3ZCZ8" variabletype="">dateiname2</field> </block> </value> <value name="ADD2"> <block type="text" id="j^f?+]d9aeU{|Nnx]l?">
                              <field name="TEXT"> nas_user@ip_nas:/volume1/dateien/Bilder/Kameras/kamera2/</field>
                              </block>
                              </value>
                              </block>
                              </value>
                              <next>
                              <block type="math_change" id="5ovcK!yoC!0PGKOadT4j">
                              <field name="VAR" id="jQ^$686N{uBqpW:3SG?B" variabletype="">Zaehler2</field>
                              <value name="DELTA">
                              <shadow type="math_number" id="r0iu=G{HyR8eN~c$Rah{">
                              <field name="NUM">1</field>
                              </shadow>
                              </value>
                              </block>
                              </next>
                              </block>
                              </statement>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </next>
                              </block>
                              </statement>
                              </block>
                              </next>
                              </block>
                              </xml>

                              Ich habe auf jeden Fall ne Menge gelernt. Vor allem das scp ohne Passwort nochmal aufzufrischen war gar nicht verkehrt.

                              ciao

                              frank

                              1 Antwort Letzte Antwort
                              0
                              • lost in translationL lost in translation

                                @AlCalzone
                                Wenn es mit dem Haken wartet, kann ich den Rest dann dahinter lassen, oder muss er dann in das neue Feld?
                                c9a52b7d-e7ac-4540-841f-d65126b1b392-image.png verschoben werden?

                                Wird bei "mit Ergebnissen" irgendeine Variable mit der Rückgabe belegt? Dann könnte ich es ja richtig sauber machen und nur bei Errorlevel 0 einen scp anstossen.

                                ciao
                                frank

                                AlCalzoneA Offline
                                AlCalzoneA Offline
                                AlCalzone
                                Developer
                                schrieb am zuletzt editiert von AlCalzone
                                #16

                                @lost-in-translation sagte in jede Minute ein Bild downloaden und per sftp uploaden (mit Zeitstempel im Namen) geht das?:

                                Wenn es mit dem Haken wartet, kann ich den Rest dann dahinter lassen, oder muss er dann in das neue Feld?

                                Der zweite Befehl müsste dann geschachtelt in den ersten exec-Befehl. Alles was darin steht, wird nach Beendigung des Befehls ausgeführt.

                                Ich kann mit dem XML leider nichts anfangen, da ich hier kein ioBroker griffbereit habe.

                                Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

                                1 Antwort Letzte Antwort
                                0
                                Antworten
                                • In einem neuen Thema antworten
                                Anmelden zum Antworten
                                • Älteste zuerst
                                • Neuste zuerst
                                • Meiste Stimmen


                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                677

                                Online

                                32.6k

                                Benutzer

                                82.0k

                                Themen

                                1.3m

                                Beiträge
                                Community
                                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                ioBroker Community 2014-2025
                                logo
                                • Anmelden

                                • Du hast noch kein Konto? Registrieren

                                • Anmelden oder registrieren, um zu suchen
                                • Erster Beitrag
                                  Letzter Beitrag
                                0
                                • Home
                                • Aktuell
                                • Tags
                                • Ungelesen 0
                                • Kategorien
                                • Unreplied
                                • Beliebt
                                • GitHub
                                • Docu
                                • Hilfe