Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xml xmlns="https://developers.google.com/blockly/xml">
- <variables>
- <variable id="H{a0JACElT%%,PMH]Sck">channel_id</variable>
- <variable id="NgkdFNf,x,S;@JhO@)OP">alive_time</variable>
- <variable id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</variable>
- <variable type="cron" id="check_per_min">check_per_min</variable>
- <variable id="LU![?GpYM2%:Lukq1/_0">zigbee_id</variable>
- </variables>
- <block type="procedures_defcustomreturn" id="n?({J#$M/A[Z1IG9Z.fz" x="13" y="13">
- <mutation statements="false">
- <arg name="channel_id" varid="H{a0JACElT%%,PMH]Sck"></arg>
- </mutation>
- <field name="NAME">channel_name</field>
- <field name="SCRIPT">cmV0dXJuIGdldE9iamVjdChjaGFubmVsX2lkKS5jb21tb24ubmFtZTs=</field>
- <comment pinned="false" h="77" w="179">channel_name Funktion</comment>
- </block>
- <block type="comment" id="lpo+#Whdl@j_,q;K#Tlf" x="13" y="63">
- <field name="COMMENT">Check alle x min ob Sensor Daten zu alt sind</field>
- <next>
- <block type="variables_set" id="td+^|_S%};=Ui3JOf[y]">
- <field name="VAR" id="NgkdFNf,x,S;@JhO@)OP">alive_time</field>
- <value name="VALUE">
- <block type="math_arithmetic" id="Y|zzOynwKh{5P[Wy!yRz">
- <field name="OP">MULTIPLY</field>
- <comment pinned="false" h="80" w="160">x Stunden</comment>
- <value name="A">
- <shadow type="math_number" id="M#6j*uiT+R*EnS~|^V~J">
- <field name="NUM">12</field>
- </shadow>
- </value>
- <value name="B">
- <shadow type="math_number" id="+s7nS~/u/d:kz{~rM9G=">
- <field name="NUM">3600000</field>
- </shadow>
- </value>
- </block>
- </value>
- <next>
- <block type="variables_set" id="AMx+t{BbW?E=4C0c3X%]">
- <field name="VAR" id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</field>
- <value name="VALUE">
- <block type="lists_create_with" id="[E*/h+eO;D1oOa`Lngaz">
- <mutation items="0"></mutation>
- </block>
- </value>
- <next>
- <block type="schedule_clear" id="%esYNI/@_*0;}#O{N)wV">
- <field name="NAME">check_per_min</field>
- <next>
- <block type="schedule_create" id="KH:tR|R33%7dalN^=sJz">
- <field name="NAME">check_per_min</field>
- <value name="SCHEDULE">
- <shadow type="field_cron" id="*QE;5u$Bn2Q$Bm1MR/Hv">
- <field name="CRON">*/5 * * * *</field>
- </shadow>
- <block type="cron_builder" id="u]bH*%8+_adpsPf=.VE-" inline="true">
- <mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"></mutation>
- <field name="LINE">TRUE</field>
- <field name="WITH_SECONDS">FALSE</field>
- <value name="DOW">
- <shadow type="text" id="*1=gQU-bSUaa08#qQFH,">
- <field name="TEXT">*</field>
- </shadow>
- </value>
- <value name="MONTHS">
- <shadow type="text" id="61~+t+D`*{SPJ*gH6yCx">
- <field name="TEXT">*</field>
- </shadow>
- </value>
- <value name="DAYS">
- <shadow type="text" id="w-mHmcp_Y-76P0cV7s0-">
- <field name="TEXT">*</field>
- </shadow>
- </value>
- <value name="HOURS">
- <shadow type="text" id="11TKimhc^NsHD9@{_d8T">
- <field name="TEXT">*</field>
- </shadow>
- </value>
- <value name="MINUTES">
- <shadow type="text" id="C2-ZM$LpamH.aNAgRgq#">
- <field name="TEXT">*/5</field>
- </shadow>
- </value>
- </block>
- </value>
- <statement name="STATEMENT">
- <block type="controls_forEach" id="JWG570~CCGI2}lQ{M[k8">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- <value name="LIST">
- <block type="selector" id="W=F66Rewy(#z^95XOn,A">
- <field name="TEXT">channel[state.id=zigbee.0.*.msg_from_zigbee]</field>
- </block>
- </value>
- <statement name="DO">
- <block type="controls_if" id="2a36MWpufLW?G6m^{^ik">
- <value name="IF0">
- <block type="logic_compare" id="Z3n$._s]ignjN^SaE/70">
- <field name="OP">NEQ</field>
- <value name="A">
- <block type="get_value_var" id="J?MDiAm]18@bahwNpFv3">
- <field name="ATTR">val</field>
- <value name="OID">
- <shadow type="text" id="g@XdqoGu%7nxYQ%dg+)c">
- <field name="TEXT"></field>
- </shadow>
- <block type="variables_get" id="79aWVoPQCM%ShKKB#sMX">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="logic_null" id="D0Y_#qNHFi_,e9@C5UdM"></block>
- </value>
- </block>
- </value>
- <statement name="DO0">
- <block type="controls_if" id="p6Z7CE;olvnn4VNIwDq=">
- <mutation elseif="1"></mutation>
- <value name="IF0">
- <block type="logic_operation" id="IS]*=roX`4XUkLW[zMVu" inline="false">
- <field name="OP">AND</field>
- <value name="A">
- <block type="logic_compare" id="q4,)9v^Q_`q[74{%Ep7`">
- <field name="OP">GTE</field>
- <value name="A">
- <block type="math_arithmetic" id="ldxnaSo[$Q%eSsuacufe">
- <field name="OP">MINUS</field>
- <value name="A">
- <shadow type="math_number" id="Pp1(x./R5QfuV|twE~P.">
- <field name="NUM">0</field>
- </shadow>
- <block type="time_get" id="gG7R7/+d(-y+sD5s{UQ@">
- <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
- <field name="OPTION">object</field>
- </block>
- </value>
- <value name="B">
- <shadow type="math_number" id="J$S6Zfgfi)O5Eh`AU|y/">
- <field name="NUM">0</field>
- </shadow>
- <block type="get_value_var" id="Abj0ngi$zhchw59dUNvA">
- <field name="ATTR">ts</field>
- <value name="OID">
- <shadow type="text" id="g@XdqoGu%7nxYQ%dg+)c">
- <field name="TEXT"></field>
- </shadow>
- <block type="variables_get" id="9s3!Yr@8hM=aL_=3,aAv">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="variables_get" id="FJ6oi,xNKQZU.kVzuS#H">
- <field name="VAR" id="NgkdFNf,x,S;@JhO@)OP">alive_time</field>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="logic_compare" id=")M,;u7~HlbTVXwIm7SV=">
- <field name="OP">EQ</field>
- <value name="A">
- <block type="lists_indexOf" id="gzg}5jf[.Gmid%c,(e}H">
- <field name="END">FIRST</field>
- <value name="VALUE">
- <block type="variables_get" id="L4UH5~|lnZzTrARXGH8w">
- <field name="VAR" id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</field>
- </block>
- </value>
- <value name="FIND">
- <block type="procedures_callcustomreturn" id="*{%gC-`riac30_ek(wT/" inline="true">
- <mutation name="channel_name">
- <arg name="channel_id"></arg>
- </mutation>
- <value name="ARG0">
- <block type="text_getSubstring" id="xqRW)*|cQ8a=BQ+?uYje">
- <mutation at1="false" at2="true"></mutation>
- <field name="WHERE1">FIRST</field>
- <field name="WHERE2">FROM_END</field>
- <value name="STRING">
- <block type="variables_get" id="L/`2{SB:m=nO;ji~Vw*=">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- <value name="AT2">
- <block type="math_number" id="vXR*s2*ZyPtgA`Qp3blY">
- <field name="NUM">17</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="math_number" id="!/h9#3A*6#zgN.j6R;y5">
- <field name="NUM">0</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <statement name="DO0">
- <block type="lists_setIndex" id="f|nyw6RaN(Ex)Mut,Ur]">
- <mutation at="false"></mutation>
- <field name="MODE">INSERT</field>
- <field name="WHERE">LAST</field>
- <value name="LIST">
- <block type="variables_get" id=";hn+P@-K[$,!@V8vt|Ze">
- <field name="VAR" id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</field>
- </block>
- </value>
- <value name="TO">
- <block type="procedures_callcustomreturn" id="YM0[lZ3I;QOVMr@W/-?s" inline="true">
- <mutation name="channel_name">
- <arg name="channel_id"></arg>
- </mutation>
- <value name="ARG0">
- <block type="text_getSubstring" id="?$+MLG1=|ghI-@KV%zEN">
- <mutation at1="false" at2="true"></mutation>
- <field name="WHERE1">FIRST</field>
- <field name="WHERE2">FROM_END</field>
- <value name="STRING">
- <block type="variables_get" id="4hO-xO,bcel`Rkd=g`fy">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- <value name="AT2">
- <block type="math_number" id="mO^]*O!l.-O]7X.`IZsK">
- <field name="NUM">17</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <next>
- <block type="debug" id="y#9SoUjdCz51_F6a?XBJ">
- <field name="Severity">warn</field>
- <value name="TEXT">
- <shadow type="text" id="|=1f$+4AG8.(GP1C/L++">
- <field name="TEXT"></field>
- </shadow>
- <block type="text_join" id="p#KK@;BwK:%`z)p,iP/c">
- <mutation items="4"></mutation>
- <value name="ADD0">
- <block type="text" id="pM%l,BvA9O#qOooa+y5F">
- <field name="TEXT">*** Zigbee Sensor offline: </field>
- </block>
- </value>
- <value name="ADD1">
- <block type="procedures_callcustomreturn" id="R!/.],34h.BSp=xd:D)G">
- <mutation name="channel_name">
- <arg name="channel_id"></arg>
- </mutation>
- <value name="ARG0">
- <block type="text_getSubstring" id="K1]o|v5Pl]teFcGgu%g^">
- <mutation at1="false" at2="true"></mutation>
- <field name="WHERE1">FIRST</field>
- <field name="WHERE2">FROM_END</field>
- <value name="STRING">
- <block type="variables_get" id="uzWN0yllP_~Qj*0kW?x+">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- <value name="AT2">
- <block type="math_number" id="h#=dq|rpw#55xcMo;R6l">
- <field name="NUM">17</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <value name="ADD2">
- <block type="text" id="*`Q*Ar=lk4WAIPlgn#-d">
- <field name="TEXT">, letzte Aktualisierung: </field>
- </block>
- </value>
- <value name="ADD3">
- <block type="convert_from_date" id="UA+NzNpq+e4tgT?7@(BE">
- <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
- <field name="OPTION">custom</field>
- <field name="FORMAT">JJJJ-MM-TT SS:mm:ss</field>
- <value name="VALUE">
- <block type="get_value_var" id="86Y,P*xqjUbZwdyUlf4Y">
- <field name="ATTR">ts</field>
- <value name="OID">
- <shadow type="text" id="JETiA7WQSUl/B@TMI)pd">
- <field name="TEXT"></field>
- </shadow>
- <block type="variables_get" id=":#Mt~2fI3O^v7XPxltdr">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </next>
- </block>
- </statement>
- <value name="IF1">
- <block type="logic_operation" id="${barkvtV4N.U-^D?gjB" inline="false">
- <field name="OP">AND</field>
- <value name="A">
- <block type="logic_compare" id="Bb-[JaTQoiH,swN#5%8f">
- <field name="OP">LTE</field>
- <value name="A">
- <block type="math_arithmetic" id="f@/M]uF|%n4!rdE%I]zJ">
- <field name="OP">MINUS</field>
- <value name="A">
- <shadow type="math_number" id="WDd;!ao/7vqJvUu)|:dF">
- <field name="NUM">0</field>
- </shadow>
- <block type="time_get" id="$pW!9VN,Y3GWob-fmo(H">
- <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
- <field name="OPTION">object</field>
- </block>
- </value>
- <value name="B">
- <shadow type="math_number" id="e/0f^jiaJQ~:bor7-CUW">
- <field name="NUM">0</field>
- </shadow>
- <block type="get_value_var" id="jBe_$ZevN8;Eaw,2tr@X">
- <field name="ATTR">ts</field>
- <value name="OID">
- <shadow type="text" id="kw^SDOLbhhm546C`.h=a">
- <field name="TEXT"></field>
- </shadow>
- <block type="variables_get" id=")9C!$.O)XJeti%}|+7/I">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="math_number" id="3!LyP1(vOdkcZ(6BUu)z">
- <field name="NUM">300000</field>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="logic_operation" id="@-:8Rp@!OZPmL,Y@Uw??" inline="false">
- <field name="OP">AND</field>
- <value name="A">
- <block type="logic_compare" id=".4rXm=(=+;1W54WUR#|E">
- <field name="OP">NEQ</field>
- <value name="A">
- <block type="lists_indexOf" id="ks`1l3%ROvt`mqYs]lu-">
- <field name="END">FIRST</field>
- <value name="VALUE">
- <block type="variables_get" id="A1JhT%DWB(c42c{_9tDV">
- <field name="VAR" id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</field>
- </block>
- </value>
- <value name="FIND">
- <block type="procedures_callcustomreturn" id="j|EPn,Gf`GQQY;y,Q67;" inline="true">
- <mutation name="channel_name">
- <arg name="channel_id"></arg>
- </mutation>
- <value name="ARG0">
- <block type="text_getSubstring" id="*A_=86dwhd?dCT)26x,5">
- <mutation at1="false" at2="true"></mutation>
- <field name="WHERE1">FIRST</field>
- <field name="WHERE2">FROM_END</field>
- <value name="STRING">
- <block type="variables_get" id="6Z,wkhV+a-s$kH4UM^WF">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- <value name="AT2">
- <block type="math_number" id="x..XDCZpDQ!NEYY0!odn">
- <field name="NUM">17</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="math_number" id="ggf/=!i%Nkw]wsWezG~K">
- <field name="NUM">0</field>
- </block>
- </value>
- </block>
- </value>
- <value name="B">
- <block type="logic_negate" id="$WcyLhQ-1P~5q[q^CRLH">
- <value name="BOOL">
- <block type="lists_isEmpty" id="*zH{;YBq$l$OmWfwa^d]">
- <value name="VALUE">
- <block type="variables_get" id="lcHIp%U[|P-CDM4o9Zn3">
- <field name="VAR" id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <statement name="DO1">
- <block type="lists_getIndex" id="M3`0k5BFojotld754#])">
- <mutation statement="true" at="true"></mutation>
- <field name="MODE">REMOVE</field>
- <field name="WHERE">FROM_START</field>
- <value name="VALUE">
- <block type="variables_get" id="jk0dfMGTEImFxH}GI@|?">
- <field name="VAR" id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</field>
- </block>
- </value>
- <value name="AT">
- <block type="lists_indexOf" id="4b|b[];ep)jHw6{%;UaQ">
- <field name="END">FIRST</field>
- <value name="VALUE">
- <block type="variables_get" id="WF?tH/~X/-^nXB*9%5YN">
- <field name="VAR" id="v.2z*vHMFvM)V:QMx6.I">sensor_offline</field>
- </block>
- </value>
- <value name="FIND">
- <block type="procedures_callcustomreturn" id="10~Oa{~tm1wl.IjiWEdv" inline="true">
- <mutation name="channel_name">
- <arg name="channel_id"></arg>
- </mutation>
- <value name="ARG0">
- <block type="text_getSubstring" id="$a{|~[b$eyHi(CdK}yTs">
- <mutation at1="false" at2="true"></mutation>
- <field name="WHERE1">FIRST</field>
- <field name="WHERE2">FROM_END</field>
- <value name="STRING">
- <block type="variables_get" id="{LT|!/*i~p/@nh9L[Pe^">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- <value name="AT2">
- <block type="math_number" id="vS0-M1TU/]OHu5`~i3Ec">
- <field name="NUM">17</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <next>
- <block type="debug" id="VRv.#JmZZt|R)T,.}_5%">
- <field name="Severity">log</field>
- <value name="TEXT">
- <shadow type="text" id="K5%/:Od)TS^iSjEnrs0U">
- <field name="TEXT"></field>
- </shadow>
- <block type="text_join" id="Ag6=^#-n%6r*G0ep$U:f">
- <mutation items="4"></mutation>
- <value name="ADD0">
- <block type="text" id="(lK(W{*l4El*793YDI1U">
- <field name="TEXT">*** Zigbee Sensor wieder online: </field>
- </block>
- </value>
- <value name="ADD1">
- <block type="procedures_callcustomreturn" id=".Hjmm:H4Cde[nb2P@Moo">
- <mutation name="channel_name">
- <arg name="channel_id"></arg>
- </mutation>
- <value name="ARG0">
- <block type="text_getSubstring" id="L2mo$vCfP=@$0kAp71Pa">
- <mutation at1="false" at2="true"></mutation>
- <field name="WHERE1">FIRST</field>
- <field name="WHERE2">FROM_END</field>
- <value name="STRING">
- <block type="variables_get" id="n-Iwe71%8z3D?c{}cA-t">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- <value name="AT2">
- <block type="math_number" id="QIgi*Oi@=69LJga-Q6`f">
- <field name="NUM">17</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- <value name="ADD2">
- <block type="text" id="ick7pQY,_gaiS0_M%Opc">
- <field name="TEXT">, letzte Aktualisierung: </field>
- </block>
- </value>
- <value name="ADD3">
- <block type="convert_from_date" id="TyydlCYSszhm*!OG-:tt">
- <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
- <field name="OPTION">custom</field>
- <field name="FORMAT">JJJJ-MM-TT SS:mm:ss</field>
- <value name="VALUE">
- <block type="get_value_var" id="TmV*8Eyr@wx:j_XmCT55">
- <field name="ATTR">ts</field>
- <value name="OID">
- <shadow type="text" id="7=oI1FklYFpsN*%R/]Cq">
- <field name="TEXT"></field>
- </shadow>
- <block type="variables_get" id="M-be0IXNA7z~ZBqt#@#|">
- <field name="VAR" id="LU![?GpYM2%:Lukq1/_0">zigbee_id</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </value>
- </block>
- </next>
- </block>
- </statement>
- </block>
- </statement>
- </block>
- </statement>
- </block>
- </statement>
- </block>
- </next>
- </block>
- </next>
- </block>
- </next>
- </block>
- </next>
- </block>
- </xml>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement