NEWS
Timeout greift sporadisch nicht- Aufnahme Befehl stoppen.
-
Hallo zusammen,
mein unteres Skript läuft soweit gut, allerdings wird hin und wieder der Befehl Timeout - stoppe Kamera Aufnahme nicht immer ausgeführt.
In diesem Fall läuft der Bereich "Film Speichern" exec immer weiter.
Dadurch könnte es zu Speicherplatz Problemen kommen.
Im Standard läuft die Aufnahme 50 Sek. und wird dann beendet, aber halt nicht immer....Seht ihr eine Möglichkeit zur Absicherung das der Timeout auch sicher ausgeführt wird?
Hier der Code dazu, vermutlich einfacher hier die änderung durchzuführen als wenn man es beschreibt:
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id="z2Iu|HFWgrZ%)}YDk?,`">zeit13</variable> <variable type="" id="{|llBf,cnq-jqz=C]LNx">Tueroffen</variable> <variable type="undefined" id="timeout9">timeout9</variable> <variable type="undefined" id="timeout2">timeout2</variable> </variables> <block type="variables_set" id="zyld$PC]1_Siu6zfu`(K" x="-162" y="-912"> <field name="VAR" id="z2Iu|HFWgrZ%)}YDk?,`" variabletype="">zeit13</field> <value name="VALUE"> <block type="math_number" id="cOHEpB+)llH2l^6bo*_["> <field name="NUM">0</field> </block> </value> <next> <block type="on_ext" id="ie!o(`},y!W_nQm2O}qM"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="UUp`wRVA;u40;DDch#qV"> <field name="oid">deconz.0.Sensors.2.open</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="fN8y_LfenC*+lfzZKro0"> <field name="VAR" id="{|llBf,cnq-jqz=C]LNx" variabletype="">Tueroffen</field> <value name="VALUE"> <block type="on_source" id="ib;8+SoOLQ{De}4bqyTk"> <field name="ATTR">state.val</field> </block> </value> </block> </statement> <next> <block type="on_ext" id="zv)zkR(C]NOpeQ#GdUg%"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=",3/wbsg4yPH_cmOP]Qk{"> <field name="oid">shelly.0.SHSW-1#259DD2#1.Relay0.Switch</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="p{O+wRg0V(;3U_SM?w38"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="Ay:;6+j:q;d8n/9*)VQC" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="+rX0(RQLXJQM|7f$:80N"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="DR%}efAc:{m%tuWWhaA["> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="?YvKce@+rn-P.Kfn@7|u"> <field name="VAR" id="z2Iu|HFWgrZ%)}YDk?,`" variabletype="">zeit13</field> </block> </value> <value name="B"> <block type="math_number" id="+BzI*tm3#WPsv[m!ESeE"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="W:3BSRAoD$gHoxo2vG4r"> <field name="OP">AND</field> <value name="A"> <block type="on_source" id="yXx`/(6l{2us.#%MH3c~"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="logic_negate" id="#L^|H);kGhZ/f8guPZOt"> <value name="BOOL"> <block type="variables_get" id=":tuvquK-MQq=:%MJ(8`,"> <field name="VAR" id="{|llBf,cnq-jqz=C]LNx" variabletype="">Tueroffen</field> </block> </value> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id=":bVQVcrIL(YDY32VCsAp"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="Qq4-:mE3r.sA9^D{Luee"> <field name="ATTR">val</field> <field name="OID">kamera.0.Eigene-Objekte-Manni.Alarm_Trigger.Alarm_Hof_Garten</field> </block> </value> <value name="B"> <block type="logic_boolean" id="%C|:bx-oZCzz_A7vqcWK"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="Kvk$n[]7cV}%-T$`LQXc"> <field name="VAR" id="z2Iu|HFWgrZ%)}YDk?,`" variabletype="">zeit13</field> <value name="VALUE"> <block type="math_number" id="qvK}JUCFmQ|5S[.h05s`"> <field name="NUM">1</field> </block> </value> <next> <block type="timeouts_settimeout" id="pbDSc@yzVhz+zhfCr=?N"> <field name="NAME">timeout9</field> <field name="DELAY">50</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="variables_set" id=".ccBS/_tYnhS5IfFl%0?"> <field name="VAR" id="z2Iu|HFWgrZ%)}YDk?,`" variabletype="">zeit13</field> <value name="VALUE"> <block type="math_number" id="[m@[knvOMCb6Y5]sC%ce"> <field name="NUM">0</field> </block> </value> </block> </statement> <next> <block type="control" id="w}ODk#)A8K{i%QCy[{Eg"> <mutation delay_input="false"></mutation> <field name="OID">kamera.0.Alarm_Hof_Trigger</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="of8X-|Bsy=$IbAf35eRN"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="comment" id="2tW1i]vl)4Z_=y*8~yFm"> <field name="COMMENT">Film speichern</field> <next> <block type="exec" id="~3kn{DxjE{;zPe3f::-$"> <mutation with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="Kmg#A=NUIf}pgqA~o;7d"> <field name="TEXT">openRTSP -w 1280 -h 960 -4 -d 40 -t -b 100000 rtsp......mp4</field> </shadow> </value> <next> <block type="comment" id=",Q8HUlmMT=}zz@eKs=JS"> <field name="COMMENT">Bild speichern</field> <next> <block type="exec" id="?2@LWX@U)DRfoMI?KmRe"> <mutation with_statement="false"></mutation> <field name="WITH_STATEMENT">FALSE</field> <field name="LOG"></field> <value name="COMMAND"> <shadow type="text" id="_NF7]^{5l(6zTdh.SXi;"> <field name="TEXT">ffmpeg -loglevel fatal -i rtsp:.......jpg</field> </shadow> </value> <next> <block type="telegram" id="WC]o9!Q[E=rY6~s#U[0q"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">default</field> <value name="MESSAGE"> <shadow type="text" id="@rpRAn.t]M40U2v,qZ%2"> <field name="TEXT">Alarm Hof_Neu!</field> </shadow> </value> <next> <block type="timeouts_settimeout" id="/|bb!Jx+qPT)o7}^U5TB"> <field name="NAME">timeout2</field> <field name="DELAY">7</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="telegram" id="g:1BW@5K`DJ/%3is*+21"> <field name="INSTANCE"></field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">default</field> <value name="MESSAGE"> <shadow type="text" id="t}ra]Bfc.ay5_)LChRgk"> <field name="TEXT">/home/.......jpg</field> </shadow> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="control" id="Irj+AdQe](/s{qwwY9.*"> <mutation delay_input="true"></mutation> <field name="OID">kamera.0.Alarm_Hof_Trigger</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">3000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="#LR7R{hJpO8gK-7^_G0T"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </xml>
-
-
Die Aufnahme länge befindet sich innerhalb vom Befehl der wert 40 (sek)
openRTSP -w 1280 -h 960 -4 -d 40 -t -b 100000 rtsp......mp4Zur Absicherung das der befehl "Film speichern" auf jeden Fall gestoppt wird, wurde das Ausführen des Timeout 9 in Kombi mit der Variabel "zeit13" hinzugefügt.
Hier scheint das Problem zu sein. -
@Yoda sagte:
der befehl "Film speichern" auf jeden Fall gestoppt wird
In dem Script wird kein Befehl gestoppt, sondern exec() wird einmal ausgeführt und die Variable zeit13 sorgt zusammen mit dem timeout9 dafür, dass erst nach frühestens 50 s einer neuer exec() ausgeführt werden kann. Sollte die Aufzeichnung nicht nach 40 s stoppen, dann hat es nichts mit dem Script (timeout9) zu tun.
-
@paul53 ok Danke.
Dann wäre ein Ansatz vielleicht das der gleiche Befehl nach 50 sec mit dem Wert statt 40 mit 0 nochmal ausgeführt wird?
Es ist schon Komischen das die Aufnahme ca. 15 mal nach der angeben Zeit beendet wird und die Datei dann ein Größe von Rund 5 MB erzeugt wird.
Und dann kommt es zum "Fehlerfall" und eine Datei über 1G wird gespeichert