@gelberlemmy
ich habe mir ein blockly gebaut mit dem ich mir alle 10 Schichten, aber nur maximal alle 10 Minuten, ein aktuelles Bild mit der Info über die aktuelle Schichthöhe und der gesamten Schichten per Telegram zuschicken lasse.
Vllt. hilft es dir
Spoiler
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="b`Ni%Tozvg/NGlwc`OHx">timer</variable>
<variable id="-x2Ff8hq5IHG@NX-jVLz">layerhoehe</variable>
<variable type="timeout" id="timeout3">timeout3</variable>
</variables>
<block type="variables_set" id="liZJ71RrA3fHYv;P5lJ~" x="-2987" y="1063">
<field name="VAR" id="b`Ni%Tozvg/NGlwc`OHx">timer</field>
<value name="VALUE">
<block type="logic_boolean" id="W6`A6BBf-*s5C~c58Nfk">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="V/e#S0`W-!3~0,W`rtSz">
<field name="VAR" id="-x2Ff8hq5IHG@NX-jVLz">layerhoehe</field>
<value name="VALUE">
<block type="math_number" id="}E*(+.v=@KU04pFNCx(K">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="on" id="iwhUf}7|Or]/p,7,UOIU">
<field name="OID">octoprint.0.plugins.displayLayerProgress.layer.current</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="^=A!LDGc0(OOq{,WrFE^" disabled="true">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="_.W%S6u%M8h|b]1LvYBM">
<field name="OP">GTE</field>
<value name="A">
<block type="on_source" id="V.+{F,UEP0=_.T^ja?Rx">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="fkloJ,PkI.Kwh(QWl]|c">
<field name="NUM">9</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="8|]+Di_$a3-F.N8;$*;4">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">octoprint.0.command.custom</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="5]@Xk+?od2!K@TuEL*OJ">
<field name="TEXT">M0</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="lAJWB$63p73F)^AGTbzn">
<field name="OP">GTE</field>
<value name="A">
<block type="on_source" id="B[{{1aPBm,jBvo~jtJ;h">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="T)Kg#~@Y|(gf1q_9fUL!">
<field name="NUM">11</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="O+sm3EI0iJ/lvgpr;]]G">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">octoprint.0.command.custom</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="~40gEB;?})@6,6TuIxhP">
<field name="TEXT">M0</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="WSo[PhN^`Oq6v/vv[S|6">
<value name="IF0">
<block type="logic_compare" id="vZ1ZJvfgzvIaj2y`7$bM">
<field name="OP">GTE</field>
<value name="A">
<block type="math_arithmetic" id="X0QRQiy,uzyX(!i|t;B1">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="F%`T2w}Y3^}?ru=E.O$j">
<field name="NUM">1</field>
</shadow>
<block type="on_source" id="C[Jyw_4i-{5GhVIB%M,3">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="i`!EWQx@t5u!qw.{L-p0">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="sU!#!|^6~!:$%.R=u[+s">
<field name="VAR" id="-x2Ff8hq5IHG@NX-jVLz">layerhoehe</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="TZF(PsCCzUULbp[j(@MH">
<field name="NUM">10</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="0Sd84r9|:r9oD,wMZe17">
<field name="VAR" id="-x2Ff8hq5IHG@NX-jVLz">layerhoehe</field>
<value name="VALUE">
<block type="on_source" id="W%LDq}MSKM3o{MT5=Bq5">
<field name="ATTR">state.val</field>
</block>
</value>
<next>
<block type="controls_if" id="[Ge36]/-G)I?H?Yoj#fB">
<value name="IF0">
<block type="logic_negate" id="v#MeqL*TL??2.Z}WMkgA">
<value name="BOOL">
<block type="get_value" id="JO`GM@yc*OO8*`:3|zxU">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.imBüro</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="Prbp;E}sl~P75Af0/JY1">
<value name="IF0">
<block type="logic_operation" id="r+#:bcVhBUZ,A).6}#K5" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="%ox*pThh0zWaAsvDp0x=">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="Dg,nqcxK9na6IY/nz()_">
<field name="ATTR">val</field>
<field name="OID">javascript.0.schalfen</field>
</block>
</value>
<value name="B">
<block type="math_number" id="tRjV!-kcavt{Q*!=qI}u">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_negate" id="GeBtsn!K$-MQZ$VtDMI(">
<value name="BOOL">
<block type="variables_get" id="M|/@+5S!:0UmdfVLkH]n">
<field name="VAR" id="b`Ni%Tozvg/NGlwc`OHx">timer</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="telegram" id="!^1(jOOe62o6FQ;nizqE">
<field name="INSTANCE"></field>
<field name="LOG"></field>
<field name="SILENT">FALSE</field>
<field name="PARSEMODE">default</field>
<field name="ESCAPING">FALSE</field>
<field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
<value name="MESSAGE">
<shadow type="text" id="#zrF6Y=c`wybO0n,PP@E">
<field name="TEXT">text</field>
</shadow>
<block type="text_join" id="[h[CBx{{!j}9IEikkKf9">
<mutation items="13"></mutation>
<value name="ADD0">
<block type="text" id="s!K4kinlUF7Wnr1Jj]s+">
<field name="TEXT">Momentane Schichthöhe:</field>
</block>
</value>
<value name="ADD1">
<block type="text_newline" id="=J:=+WJiy!,n2S6Ti,Bz">
<field name="Type">\n</field>
</block>
</value>
<value name="ADD2">
<block type="get_value" id="LFsI|+#?sXG0*Qb`,hI4">
<field name="ATTR">val</field>
<field name="OID">octoprint.0.plugins.displayLayerProgress.layer.current</field>
</block>
</value>
<value name="ADD3">
<block type="text" id="Ic13AeC*;a?Gp}Vl]*hv">
<field name="TEXT"> von </field>
</block>
</value>
<value name="ADD4">
<block type="get_value" id="xCk,7i2x?${~v5l#ZoJM">
<field name="ATTR">val</field>
<field name="OID">octoprint.0.plugins.displayLayerProgress.layer.total</field>
</block>
</value>
<value name="ADD5">
<block type="text" id="o{:6V{BKnL]^!RINV9V?">
<field name="TEXT"> Schichten</field>
</block>
</value>
<value name="ADD6">
<block type="text_newline" id="8AnckRNa/@A)I({:2%3O">
<field name="Type">\n</field>
</block>
</value>
<value name="ADD7">
<block type="get_value" id="TAB`Qj.qa/uzApWECCpD">
<field name="ATTR">val</field>
<field name="OID">octoprint.0.printjob.progress.completion</field>
</block>
</value>
<value name="ADD8">
<block type="text" id="x{}xya5L5MwmHr*|s9N#">
<field name="TEXT">% fertig gestellt</field>
</block>
</value>
<value name="ADD9">
<block type="text_newline" id="SC~-n9J/q%@Fr_6a;#xr">
<field name="Type">\n</field>
</block>
</value>
<value name="ADD10">
<block type="text" id="!vQ}RbJ-YTn71ps43[0E">
<field name="TEXT">Geschätzte Restzeit:</field>
</block>
</value>
<value name="ADD11">
<block type="text_newline" id="LKUag;17IUMCPoK@VObY">
<field name="Type">\n</field>
</block>
</value>
<value name="ADD12">
<block type="get_value" id=",iU/:+gF+CtEO@^4rLbk">
<field name="ATTR">val</field>
<field name="OID">octoprint.0.printjob.progress.printtimeLeftFormat</field>
</block>
</value>
</block>
</value>
<next>
<block type="exec" id="Q%.+UAgMkWBG2+4(;E|M">
<mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
<field name="WITH_STATEMENT">TRUE</field>
<field name="LOG">debug</field>
<value name="COMMAND">
<shadow type="text" id="f:W)ej0T0P)?wV/0AF!9">
<field name="TEXT">wget -q -O /home/pi/pictures/octoprint.snap.jpg "http://192.168.178.37/webcam/?action=snapshot"</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="telegram" id="X4uk?iU9AL,+=Ub8-!{5">
<field name="INSTANCE">.0</field>
<field name="LOG">debug</field>
<field name="SILENT">FALSE</field>
<field name="PARSEMODE">default</field>
<field name="ESCAPING">FALSE</field>
<field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
<value name="MESSAGE">
<shadow type="text" id=":^gzF@/rGK6L3RKr2wGQ">
<field name="TEXT">/home/pi/pictures/octoprint.snap.jpg</field>
</shadow>
</value>
</block>
</statement>
<next>
<block type="variables_set" id="]m)84sib]x/FW!lO^Z;S">
<field name="VAR" id="b`Ni%Tozvg/NGlwc`OHx">timer</field>
<value name="VALUE">
<block type="logic_boolean" id="[C)@XDJE6E#NHG!_y6jO">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="timeouts_settimeout" id="}^`dwU{93HQZ32{]Mv-+">
<field name="NAME">timeout3</field>
<field name="DELAY">10</field>
<field name="UNIT">min</field>
<statement name="STATEMENT">
<block type="variables_set" id="yITI@8eLFO:.g-HsJk_[">
<field name="VAR" id="b`Ni%Tozvg/NGlwc`OHx">timer</field>
<value name="VALUE">
<block type="logic_boolean" id="lin{J9-uv?=rKE6b~F^,">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</xml>