@paul53
Ich habs nun geschafft. Hat etwas Zeit und Nerven gekostet. 🙂
Hab ein script von folgender seite übernommen und etwas verändert.
https://www.machs-smart.de/iobroker-offene-fenster-zaehlen-blockly/
Nochmal vielen Dank für eure Hilfe!!!👍 👏
Hier nun mein script, falls es jemand benötigt.
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="Fwt*3`3ScyT(qDt?gf(T">ObjectID</variable>
<variable id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</variable>
<variable id="MLrrG!H:mqglsc.Y_Ljh">Liste-Licht-An</variable>
<variable id="}K$K4dup~Vnv!`[}vnQy">Liste-Licht-Aus</variable>
<variable id="9sl@{VQ/amrd~ZTB}e/O">i</variable>
</variables>
<block type="procedures_defcustomreturn" id="]lQM=r`L^2M}s^@n(USH" x="-112" y="-887">
<mutation statements="false">
<arg name="ObjectID" varid="Fwt*3`3ScyT(qDt?gf(T"></arg>
</mutation>
<field name="NAME">Name</field>
<field name="SCRIPT">bGV0IG5hbWUgPSBnZXRPYmplY3QoT2JqZWN0SUQpLmNvbW1vbi5uYW1lOwovL2lmKHR5cGVvZiByb29tID09ICdvYmplY3QnKSByZXR1cm4gcm9vbS5kZTsKcmV0dXJuIG5hbWU7</field>
<comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
</block>
<block type="on_ext" id="RT3@Kxqxg#w3f=(kzwCu" x="-112" y="-862">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="0)0sp$I1ccfm%4Sde-mT">
<field name="oid">default</field>
</shadow>
<block type="selector" id=",lvP%A]1J?Mf^@0s2D%[">
<field name="TEXT">state[id=*](functions=Licht)</field>
</block>
</value>
<statement name="STATEMENT">
<block type="variables_set" id="EaZb.Nmx4%jg9Z;%%B!-">
<field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field>
<value name="VALUE">
<block type="text" id="Wh^sL0z$W-HIc=.KAWpS">
<field name="TEXT"></field>
</block>
</value>
<next>
<block type="variables_set" id="SS-}=kJy|nP`aiAV1-xb">
<field name="VAR" id="MLrrG!H:mqglsc.Y_Ljh">Liste-Licht-An</field>
<value name="VALUE">
<block type="lists_create_with" id="$AFtq:sq?.LYHWTSs$x|">
<mutation items="0"></mutation>
</block>
</value>
<next>
<block type="variables_set" id="o_#fa#./grwL0VYZXhV1">
<field name="VAR" id="}K$K4dup~Vnv!`[}vnQy">Liste-Licht-Aus</field>
<value name="VALUE">
<block type="lists_create_with" id="P~^2(u_E4rR`PYMfolf}">
<mutation items="0"></mutation>
</block>
</value>
<next>
<block type="controls_forEach" id="~PaFX`X@5n{TM9K^{Jw6">
<field name="VAR" id="9sl@{VQ/amrd~ZTB}e/O">i</field>
<value name="LIST">
<block type="selector" id="xQ^Q5{h5V@5PLI+YO@i.">
<field name="TEXT">state[id=*](functions=Licht)</field>
</block>
</value>
<statement name="DO">
<block type="controls_if" id="-3J;6~}7Ac!D}IR`/Dr1">
<mutation else="1"></mutation>
<value name="IF0">
<block type="get_value_var" id=")kSAuROX6lA-U2N,FJ1Q">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text" id="e+?Z+-m0_DLYGl{zT3ix">
<field name="TEXT"></field>
</shadow>
<block type="variables_get" id="!fALmmY3PSF+?rGHUXQ,">
<field name="VAR" id="9sl@{VQ/amrd~ZTB}e/O">i</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="lists_setIndex" id="-zUiNM(}BsoQ].Hu.|mx" inline="false">
<mutation at="false"></mutation>
<field name="MODE">INSERT</field>
<field name="WHERE">FIRST</field>
<value name="LIST">
<block type="variables_get" id="Q0Hct8=ken4m!!W]js)U">
<field name="VAR" id="MLrrG!H:mqglsc.Y_Ljh">Liste-Licht-An</field>
</block>
</value>
<value name="TO">
<block type="procedures_callcustomreturn" id="2fUjFt9g8rVF/XheoN.x">
<mutation name="Name">
<arg name="ObjectID"></arg>
</mutation>
<value name="ARG0">
<block type="variables_get" id="k:Is?gkGPl/=r1X^,k3K">
<field name="VAR" id="9sl@{VQ/amrd~ZTB}e/O">i</field>
</block>
</value>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="lists_setIndex" id="-jTzj32XiFWfi?n1Y/LN" inline="false">
<mutation at="false"></mutation>
<field name="MODE">INSERT</field>
<field name="WHERE">FIRST</field>
<value name="LIST">
<block type="variables_get" id="2~tv/YW~42Q$E*%G;Pqi">
<field name="VAR" id="}K$K4dup~Vnv!`[}vnQy">Liste-Licht-Aus</field>
</block>
</value>
<value name="TO">
<block type="procedures_callcustomreturn" id="`Zdw5Kh*[(IY72pyr_o(">
<mutation name="Name">
<arg name="ObjectID"></arg>
</mutation>
<value name="ARG0">
<block type="variables_get" id="dTq}?1$ruG%K+237sR}z">
<field name="VAR" id="9sl@{VQ/amrd~ZTB}e/O">i</field>
</block>
</value>
</block>
</value>
</block>
</statement>
</block>
</statement>
<next>
<block type="controls_if" id="%xroGCihVu8$~$xQ{]ke">
<value name="IF0">
<block type="logic_negate" id="u(+LUZ2=D}K8JRKt()tg">
<value name="BOOL">
<block type="lists_isEmpty" id="zS,AjUzHt0uWh$(li$,h">
<value name="VALUE">
<block type="variables_get" id="b),0*5k:oMF~4H^Xx.Hw">
<field name="VAR" id="MLrrG!H:mqglsc.Y_Ljh">Liste-Licht-An</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="text_append" id="xgCK}K@KSx){tg%A(xl5">
<field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT"></field>
</shadow>
<block type="text" id="-HV%tM;_jbL/K_)=V78_">
<field name="TEXT">Licht An: </field>
</block>
</value>
<next>
<block type="text_append" id="mQWs]oKZy!!UBi#)2pN:">
<field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT"></field>
</shadow>
<block type="lists_split" id="vo;Gre#7RVr3M6$mk7E:">
<mutation mode="JOIN"></mutation>
<field name="MODE">JOIN</field>
<value name="INPUT">
<block type="variables_get" id="o(LRYzD:?:_v5aTHyYuJ">
<field name="VAR" id="MLrrG!H:mqglsc.Y_Ljh">Liste-Licht-An</field>
</block>
</value>
<value name="DELIM">
<shadow type="text" id="lIp}_n+[0|`={eJh]aEe">
<field name="TEXT">, </field>
</shadow>
<block type="text_newline" id="3VGu|;nAg9JYe;6n*G8Q">
<field name="Type">\n</field>
</block>
</value>
</block>
</value>
<next>
<block type="text_append" id=":+)c7I}{1/nyEBI7mJJ{">
<field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field>
<value name="TEXT">
<shadow type="text" id="33ABK`PY}NDK3PSrP/}e">
<field name="TEXT"></field>
</shadow>
<block type="text_newline" id="o(@3V35-R{~llLN+.p?K">
<field name="Type">\n</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="L!}N25QKJ[D61;a?bf%?">
<value name="IF0">
<block type="logic_negate" id="P#;v$=eLxCHvoTF^|O)k">
<value name="BOOL">
<block type="lists_isEmpty" id="7GdP`ErgKtT#V1*MU9gK">
<value name="VALUE">
<block type="variables_get" id="T`YMrp]-^RFDhRULk,7z">
<field name="VAR" id="}K$K4dup~Vnv!`[}vnQy">Liste-Licht-Aus</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="text_append" id="rr-Lu!{,+|n3Pz}r,/|q">
<field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field>
<value name="TEXT">
<shadow type="text" id="u#~AR/M~-4pVtl1Oc_:7">
<field name="TEXT"></field>
</shadow>
<block type="text" id="rHg4[Q1;k=YZ/r;j3e$B">
<field name="TEXT">Licht Aus: </field>
</block>
</value>
<next>
<block type="text_append" id="(`NHR}HYpw]:P`ZNgy6X">
<field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field>
<value name="TEXT">
<shadow type="text" id="LHw-8A|w9lQp3_kLp8XM">
<field name="TEXT"></field>
</shadow>
<block type="lists_split" id="s{W^YIjtci(NGf{R![Df">
<mutation mode="JOIN"></mutation>
<field name="MODE">JOIN</field>
<value name="INPUT">
<block type="variables_get" id="u4US1gL%m8Myl{MI]BFp">
<field name="VAR" id="}K$K4dup~Vnv!`[}vnQy">Liste-Licht-Aus</field>
</block>
</value>
<value name="DELIM">
<shadow type="text" id="),t^.5%yN_V(;k~5h}?^">
<field name="TEXT">, </field>
</shadow>
<block type="text_newline" id="gTATzQaSaQpWZDg1}MY(">
<field name="Type">\n</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
<block type="on_ext" id="Q:@R}~bt`:M4%+)V6`zJ" x="538" y="-837">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="z%tb_ZB,HVK@M.K^TYt=">
<field name="oid">telegram.0.communicate.request</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="H~Dx_I9YlQNeP;w^aiZ~">
<value name="IF0">
<block type="logic_compare" id="3PgRt8mZnR2mBU:S1I+t">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="n0f(7]0?,_9%b8tB9.P*">
<field name="ATTR">val</field>
<field name="OID">telegram.0.communicate.request</field>
</block>
</value>
<value name="B">
<block type="text" id="8Ar66k/.ZtW0`)*%umv]">
<field name="TEXT">[Timur]Status Licht</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="telegram" id="ys1J1;eU^O3UbQr1SxTa">
<field name="INSTANCE">.0</field>
<field name="LOG"></field>
<field name="SILENT">FALSE</field>
<field name="PARSEMODE">default</field>
<field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
<value name="MESSAGE">
<shadow type="text">
<field name="TEXT">text</field>
</shadow>
<block type="variables_get" id="(2UX:[,PkWn9*/xyCX:G">
<field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>