Skip to content

Blockly

Hilfe für Skripterstellung mit Blockly

6.6k Topics 79.6k Posts

NEWS

  • Nachfrage Blockly - Einfache Logik

    3
    1
    0 Votes
    3 Posts
    333 Views
    M
    @ITCrowd Danke, echt simpel ;-)
  • Schalterstellungen zählen/auswerten

    4
    1
    0 Votes
    4 Posts
    280 Views
    paul53P
    @bishop sagte: Jetzt bekomme ich aber keine "ausgeschalten" Meldung mehr hin ist das richtig? Ja, das stimmt. Wenn "Aus" benötigt wird, muss auf "wurde geändert" getriggert und das Skript erweitert werden.
  • Fenster lüften Skript

    4
    1
    0 Votes
    4 Posts
    571 Views
    AsgothianA
    @Sebastian-0 Hinter dem Spoiler hast du meinen Vorschlag dazu. Um das auf beliebig viele Fenster zu erweitern musst du nur die Liste am Anfang (siehe kleines Bild) anpassen, der rest geht von alleine. [image: 1605089762953-screen-shot-2020-11-11-at-11.15.59.png] Das Skript zählt die offenen Fenster und merkt sich ihre Namen, so das du in der Meldung gleich ausgeben kannst welche Fenster noch offen sind., Beim Start werden alle Fenster geprüft - wenn eines offen ist wird gleich ein Timeout gestartet (bei allen, das "nag" Intervall alle 10 Minuten) Die Erinnerung zum Schliessen kommt (aktuell)1 Minute nach dem öffnen des 1. geöffneten Fensters - die Zeit kannst du ja noch anpassen. Da ich keinen Baustein zur Benachrichtigung habe habe ich die Benachrichtigung durch einen Debug output as error Baustein ersetzt. Spoiler [image: 1605089734342-screen-shot-2020-11-11-at-11.14.21.png] <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="xAdM=~)~ovsDuh+Xr%]X">x</variable> <variable id="THWRsZRIb3c~V=f;D?%r">OpenWindows</variable> <variable id="RwmbCD{s6og*(:4+WX@2">tmp</variable> <variable id="MQnR=$~orKy=Q^5_qEOi">IdList</variable> <variable id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</variable> <variable id="w(Tfvz@XHnm$MVeg(gMW">WindowId</variable> <variable id="AtEhB4|=_6zTixjPJg?c">WindowTimeout</variable> <variable type="timeout" id="WindowTimeout2">WindowTimeout2</variable> <variable type="interval" id="interval2">interval2</variable> <variable id="ETkby/vrcheZ2V0CW7f9">WindowName</variable> <variable id=",^q$U[hV$m~5y5Z(2E52">Index</variable> <variable type="interval" id="interval">interval</variable> <variable type="timeout" id="WindowTimeout">WindowTimeout</variable> </variables> <block type="procedures_defreturn" id="M0SpI{DfOjz!jzHjA4xD" x="-287" y="-112"> <mutation> <arg name="x" varid="xAdM=~)~ovsDuh+Xr%]X"></arg> </mutation> <field name="NAME">Get Name Of</field> <comment pinned="false" h="80" w="160">Describe this function...</comment> <statement name="STACK"> <block type="variables_set" id="Y~uC5R|:x6b*SxQyhd~E"> <field name="VAR" id="RwmbCD{s6og*(:4+WX@2">tmp</field> <value name="VALUE"> <block type="text_getSubstring" id="Kp7nAm0y%MWH3vCan~.y" inline="false"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="Oaf-)7BQwU4CxA3AiP_4"> <field name="VAR" id="xAdM=~)~ovsDuh+Xr%]X">x</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="r7AXJJZ[Mezqb|*VSf%|" inline="false"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="NY8`FfH`GuwgoU]uJ;[w"> <field name="NUM">1</field> </shadow> <block type="text_indexOf" id="dopby0HJV:caiI]!*j#1" inline="false"> <field name="END">LAST</field> <value name="VALUE"> <block type="variables_get" id="HGQ%OR@lK$$L0Tl[vXN|"> <field name="VAR" id="xAdM=~)~ovsDuh+Xr%]X">x</field> </block> </value> <value name="FIND"> <shadow type="text" id="e,M33M1uK;f;F~3Q4WQR"> <field name="TEXT">.</field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="[k`d*8UkNP1:f~`sF1%e"> <field name="NUM">1</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="text_length" id="/N3m{^j()vO-?XSRyPhX"> <value name="VALUE"> <shadow type="text" id="[-5Z9AXlP%M9fJ,Z{I5v"> <field name="TEXT">abc</field> </shadow> <block type="variables_get" id="P?fay$:u5r=q_?~t|yg{"> <field name="VAR" id="xAdM=~)~ovsDuh+Xr%]X">x</field> </block> </value> </block> </value> </block> </value> </block> </statement> <value name="RETURN"> <block type="variables_get" id="y2L{GZ:-9|_{}hfr.a/?"> <field name="VAR" id="RwmbCD{s6og*(:4+WX@2">tmp</field> </block> </value> </block> <block type="variables_set" id="%f)Dfk@cAdUiY{{*.pS}" x="-287" y="88"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> <value name="VALUE"> <block type="text" id="5R12d3|VmJ{DPCcK4|k2"> <field name="TEXT"></field> </block> </value> <next> <block type="variables_set" id="ro#a~j$@gVX){]UT;.ES"> <field name="VAR" id="MQnR=$~orKy=Q^5_qEOi">IdList</field> <value name="VALUE"> <block type="lists_create_with" id=")xRs!/ZQ?4iLI9UcH$Q:"> <mutation items="3"></mutation> <value name="ADD0"> <block type="field_oid" id="z*7$/D9y*Swz3^:F{jrL"> <field name="oid">0_userdata.0.ScriptTest.Window_1</field> </block> </value> <value name="ADD1"> <block type="field_oid" id="k}$Xv4nM2^Xp#{+0az/-"> <field name="oid">0_userdata.0.ScriptTest.Window_2</field> </block> </value> <value name="ADD2"> <block type="field_oid" id="JG/XgA4$wTWis{AS=pR-"> <field name="oid">0_userdata.0.ScriptTest.Window_3</field> </block> </value> </block> </value> <next> <block type="variables_set" id="d:+A;9U*mQq{#q4bB4WY"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> <value name="VALUE"> <block type="math_number" id="Hg]ocqhbsi#FD-?@.Z~$"> <field name="NUM">0</field> </block> </value> <next> <block type="controls_forEach" id="^6I++;vlnywGQTOr;7yl"> <field name="VAR" id="w(Tfvz@XHnm$MVeg(gMW">WindowId</field> <value name="LIST"> <block type="variables_get" id="Q8dRJHsLcSktv0yTOL]u"> <field name="VAR" id="MQnR=$~orKy=Q^5_qEOi">IdList</field> </block> </value> <statement name="DO"> <block type="controls_if" id="8C?],Qg-o,*h+);sYayw"> <value name="IF0"> <block type="get_value_var" id="9a(ZB0t/^k2!mv:u9$kB"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="?/@Dlu*Q610g]YzUeLaV"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="$K/;?3CoA}edaEy5Y9,W"> <field name="VAR" id="w(Tfvz@XHnm$MVeg(gMW">WindowId</field> </block> </value> </block> </value> <statement name="DO0"> <block type="text_append" id="?[bC:3,1Ut#x=zT6-JuN"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> <value name="TEXT"> <shadow type="text" id="N#W%BT995~pR-?eLXPYz"> <field name="TEXT"></field> </shadow> <block type="text_join" id="iBB@g}^O1T*}/C9LQPf]"> <mutation items="2"></mutation> <value name="ADD0"> <block type="procedures_callreturn" id="+tXBS3;4D:-B9o2V;~Mg"> <mutation name="Get Name Of"> <arg name="x"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="QV=H,UImbHnR5zp^aKz6"> <field name="VAR" id="w(Tfvz@XHnm$MVeg(gMW">WindowId</field> </block> </value> </block> </value> <value name="ADD1"> <block type="text" id="/BH=_Ys2dB7T*/Aro5Nu"> <field name="TEXT"> and </field> </block> </value> </block> </value> <next> <block type="math_change" id="35KT1Z|Bo=WwtmL8[h|m"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> <value name="DELTA"> <shadow type="math_number" id="e4R#[}1dkIwY?|vB$/D1"> <field name="NUM">1</field> </shadow> </value> </block> </next> </block> </statement> </block> </statement> <next> <block type="variables_set" id="@p2V2*Mv}:]BSyhyxz]1"> <field name="VAR" id="AtEhB4|=_6zTixjPJg?c">WindowTimeout</field> <value name="VALUE"> <block type="logic_null" id="$!!,N*TS+BYf$Qe4P:W/"></block> </value> <next> <block type="controls_if" id="vd:jI;9*0;9Z}k~JA8*i"> <value name="IF0"> <block type="logic_compare" id="S}YXS(T%UO,%l|ZQ-d,)"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="pi%l~N[t_Mm|l54`(q/m"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> </block> </value> <value name="B"> <block type="math_number" id=".E/[L9Oh$O!v=Xn=jKVh"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id=",QOZCo-^CCl~`FMI,_8H"> <field name="NAME">WindowTimeout2</field> <field name="DELAY">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="comment" id="}D.cP(UH0V3v.K*@xqVx"> <field name="COMMENT">Message here, use the variable OpenWindows to tell you which windows are open</field> <next> <block type="debug" id="6}3A}+Qh2XFZM*pRo)S{"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="?+0u,m)[ns:U!:_Fq2Mn"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text_getSubstring" id="a9CJX37D~{eLu|-ouH0l"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="zSvF;#_p+Tq_*v~a$#Pc"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> <value name="AT1"> <block type="math_number" id="Nz+:A=u2-P0#7d^S7O`Z"> <field name="NUM">1</field> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="8}PSXQ43,}`LF~!yD-L2"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="text_length" id="6`)LaA},7B?RuJ3u_m%j"> <value name="VALUE"> <shadow type="text"> <field name="TEXT">abc</field> </shadow> <block type="variables_get" id="wpsqol/.L@Aj8U,=;l:k"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="j$,+fR;n8Gr:1b{]6N;K"> <field name="NUM">5</field> </shadow> </value> </block> </value> </block> </value> <value name="ADD1"> <block type="text" id="(,c6jGi:$$r!QY4tHwTh"> <field name="TEXT"> is still open</field> </block> </value> </block> </value> </block> </next> </block> </statement> <next> <block type="controls_if" id="i9.KBtA}rz:86/v^#Mk2"> <value name="IF0"> <block type="logic_compare" id="dF^;0gH+q18b#!Fo;6.~"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="UD??r#[Q?pY$+(]hV1|O"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> </block> </value> <value name="B"> <block type="lists_length" id="p_NC3r4NG@R!mR.b/EtR"> <value name="VALUE"> <block type="variables_get" id="RTqAY#zFB)Dv4n,f/gj1"> <field name="VAR" id="MQnR=$~orKy=Q^5_qEOi">IdList</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_setinterval" id="z%8s6//+_|qeP7_JKE.x"> <field name="NAME">interval2</field> <field name="INTERVAL">10</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="debug" id="_u#2_lPovhc@e]TPd#Y#"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="S32ORp]#7q!`Kx.JRR9K"> <field name="TEXT">All Windows are Open</field> </shadow> </value> </block> </statement> </block> </statement> </block> </next> </block> </statement> <next> <block type="on_ext" id="j9*A0/4[!R%xM8:)*MZT"> <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="]Evg=|WB=PM3lD3VOcnE"> <field name="oid">0_userdata.0.ScriptTest.Window_1</field> </shadow> <block type="variables_get" id="]?8NU(7+Vv#[ysuKJxks"> <field name="VAR" id="MQnR=$~orKy=Q^5_qEOi">IdList</field> </block> </value> <statement name="STATEMENT"> <block type="debug" id="S,xAnoGPBmJeCWwqz0UI"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="IGJXey|dFu~D6NQktBRi"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="J!+x=K:8[t`THu;3Rn7i"> <field name="TEXT">Before Trigger: Open Window Count is </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="4MB=RI}4tWZ;XXQ=osy8"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> </block> </value> </block> </value> <next> <block type="variables_set" id="7:0feuEbu]o{)#UA|+3n"> <field name="VAR" id="ETkby/vrcheZ2V0CW7f9">WindowName</field> <value name="VALUE"> <block type="procedures_callreturn" id="s|B9Nt`4qFC)@|T=25xt"> <mutation name="Get Name Of"> <arg name="x"></arg> </mutation> <value name="ARG0"> <block type="on_source" id="jC;~Bm2w~$K1_`:LsCp|"> <field name="ATTR">id</field> </block> </value> </block> </value> <next> <block type="controls_if" id=")6sD4ulvl#=*=Ye@r$JJ"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="J4@^,=cb_Dyq5Z%+.}A]"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="comment" id="/M#T4hu?P[VrD{(W#9O9"> <field name="COMMENT">A window was opened</field> <next> <block type="text_append" id="R``IB;)=Zb1KXklaJ5sN"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> <value name="TEXT"> <shadow type="text" id="nCX@4Eqt@}Y+IU4rYG.-"> <field name="TEXT"></field> </shadow> <block type="text_join" id="k4]-Sy;Ke:l*:UudzOku"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="Qj(YS5y=Wr/$SueMU[e`"> <field name="VAR" id="ETkby/vrcheZ2V0CW7f9">WindowName</field> </block> </value> <value name="ADD1"> <block type="text" id="WJnC}wsVu,Mp3Qk2b3D$"> <field name="TEXT"> and </field> </block> </value> </block> </value> <next> <block type="math_change" id=":OohNwRzGC_Q;9m$dOo-"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> <value name="DELTA"> <shadow type="math_number" id="gA_1defT|_]P/Hsp+q1b"> <field name="NUM">1</field> </shadow> </value> <next> <block type="debug" id="4K.)RD0a+UCF)[/DUZ[v"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="HPTr?x-o;5O#mZK[IWrE"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="+mVZuoGY~+`+X!8,V@4D"> <field name="TEXT">Open Windows after Opening: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="b{x#gC}iVt@#c6LsSYM@"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> </block> </value> <next> <block type="controls_if" id="^1jyTiu8-j5(/nFzKLJX"> <value name="IF0"> <block type="logic_compare" id="=tJTg)oM(WydnP+2Tds]" inline="false"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="u9$G3kENio)6%V/(lrA%"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> </block> </value> <value name="B"> <block type="lists_length" id="_ZaB,XMbHE6GrwIW9HTP"> <value name="VALUE"> <block type="variables_get" id="3{fyD}(|H@[fzBe6It8l"> <field name="VAR" id="MQnR=$~orKy=Q^5_qEOi">IdList</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_setinterval" id="pJ(6gBxo(KUXfgB3YuPm"> <field name="NAME">interval</field> <field name="INTERVAL">10</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="debug" id="rzM!UVhbTv[p-/wAGJQQ"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="[dCZc:9@L*]Zp%);V-k~"> <field name="TEXT">All Windows are Open</field> </shadow> </value> </block> </statement> </block> </statement> <next> <block type="controls_if" id="MVaa-z)jpRMYb$=9:CCO"> <value name="IF0"> <block type="logic_compare" id="#6;mH]f+85%Jf0;zRvgz"> <field name="OP">EQ</field> <value name="A"> <block type="logic_null" id=",^iDPf}FwbPejrDYsKNM"></block> </value> <value name="B"> <block type="variables_get" id="%^WPR%0pk[|i#j*%AZT#"> <field name="VAR" id="AtEhB4|=_6zTixjPJg?c">WindowTimeout</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id=":j/BK1dayalIUYj0E_@k"> <field name="NAME">WindowTimeout</field> <field name="DELAY">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="comment" id="fxWwIYeu(t1F`=j+s0*;"> <field name="COMMENT">Message here, use the variable OpenWindows to tell you which windows are open</field> <next> <block type="debug" id="+/pi7si+@r!66xhDQ*.W"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="avXPIF2kGT;NBSFhAkvj"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="h;Q=`rL*$-NE[ZdUvIe("> <mutation items="2"></mutation> <value name="ADD0"> <block type="text_getSubstring" id="?G+-mB|[ZR=lf_ALw]ig" inline="false"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id=",uZ;jXm=zNL98Y8{2b9,"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> <value name="AT1"> <block type="math_number" id="y2eh08Qh=6PlUu*69A,c"> <field name="NUM">1</field> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="m4^hn@?1NN5u@SM9Tmth" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="@wGYWIES`(6!8uKk8)lX"> <field name="NUM">1</field> </shadow> <block type="text_length" id="B3FnLgE#S|[tpa?nQgo%"> <value name="VALUE"> <shadow type="text" id="dN9}n@]^oCX;/SRhcO@%"> <field name="TEXT">abc</field> </shadow> <block type="variables_get" id="y!2so5ovxL:F/v){6(.["> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="vL0-*euy^P]/OeH(6QX^"> <field name="NUM">5</field> </shadow> </value> </block> </value> </block> </value> <value name="ADD1"> <block type="text" id="hC/Iy}kX1-j5KNUnn;rx"> <field name="TEXT"> is still open</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id=";./pV}:OPVAp6@0Ap-{k"> <field name="NAME">interval</field> <next> <block type="comment" id="$vsEverm1w=kY2[uB_2("> <field name="COMMENT">A window was closed</field> <next> <block type="math_change" id="M~eyQt,Bq0M{#pnStOza"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> <value name="DELTA"> <shadow type="math_number" id="/C.bHg;gjWScD@eSV`q@"> <field name="NUM">-1</field> </shadow> </value> <next> <block type="controls_if" id="^5:BLL[%h1S|.yH.-f#a"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="A5f@cJ6,M^dWFPPBcO+Y"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="a~G;i3:k~ri7_kk/2!qp"> <field name="VAR" id="`d5)K`K}Po8^5V4(bK8H">NumberOfOpenWindows</field> </block> </value> <value name="B"> <block type="math_number" id="`rKs14t9K_JNLE-.*@Ig"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="y6,y/9JFEY)[lgf.xX*^"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> <value name="VALUE"> <block type="text" id="/gcPk$KzvJ{Mw}q]Mk29"> <field name="TEXT"></field> </block> </value> <next> <block type="timeouts_cleartimeout" id="9Z|A,1C`k^;qFrW,.]og"> <field name="NAME">WindowTimeout</field> </block> </next> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="Qb(Xv}LOkt5!J.N5)eZm"> <field name="VAR" id=",^q$U[hV$m~5y5Z(2E52">Index</field> <value name="VALUE"> <block type="text_indexOf" id="=+QJCsuI6p#[O|U`V(oT"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="V-R{SUBC[MK[d*jds`[Z"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> <value name="FIND"> <shadow type="text" id="HuE+EErn2Pv=4kmRKOk9"> <field name="TEXT">abc</field> </shadow> <block type="variables_get" id="1@j8v9uk,~v2`1U)~aE1"> <field name="VAR" id="ETkby/vrcheZ2V0CW7f9">WindowName</field> </block> </value> </block> </value> <next> <block type="controls_if" id="GKLA3O`=HysX]4yx4r.w"> <value name="IF0"> <block type="logic_compare" id="U]j6|$$Rr!3Rd4QaQ~{0"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="-:e5hn*bz0dO~vb|Nn+Y"> <field name="VAR" id=",^q$U[hV$m~5y5Z(2E52">Index</field> </block> </value> <value name="B"> <block type="math_number" id="GJw9]IQ2^R2Y:C~t9r=F"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="LM4/IVk%afjRzBidI!@["> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> <value name="VALUE"> <block type="text_join" id="+b2$Hrzyq9Rp+yV[d/gY"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text_getSubstring" id="vj!S^hk#-)%YrDw:p0|l" inline="false"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="MaOdxghG)^|yBZB/GEHh"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> <value name="AT1"> <block type="math_number" id="9OkNaT+CBX!-!0zINCJ*"> <field name="NUM">1</field> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="iU592G@zsY0_#ErI?)!("> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="H[@SkKyOB/RM}.Vc;jy*"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="3{t0+%+{37t}xYrSaJFK"> <field name="VAR" id=",^q$U[hV$m~5y5Z(2E52">Index</field> </block> </value> <value name="B"> <shadow type="math_number" id="5Rl:hm6f~q,Xkm@N%YXE"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> <value name="ADD1"> <block type="text_getSubstring" id="kT5/O=8v3M+96F0pG@Gx" inline="false"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="Ck_G5w]mXrmV@)4xTO%u"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="V/]iw76CvN;O~eOAn}Ad" inline="false"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="ql4UTpcd!h0U#{u{FoRi" inline="false"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Hf_/RO3$Tf.eh|meEiG:"> <field name="VAR" id=",^q$U[hV$m~5y5Z(2E52">Index</field> </block> </value> <value name="B"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="text_length" id="=]Fuh?Kt$[:X8ZQU@^Qv"> <value name="VALUE"> <shadow type="text"> <field name="TEXT">abc</field> </shadow> <block type="variables_get" id="uN:lU?:,a9`zc]$rFqu7"> <field name="VAR" id="ETkby/vrcheZ2V0CW7f9">WindowName</field> </block> </value> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="6:b#U[7B%(zAI]3xx-1G"> <field name="NUM">5</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="text_length" id="7htGadV$Ctc(NE]FVC=U"> <value name="VALUE"> <shadow type="text" id="7@3AR!(V9Rnh/6r}YNc9"> <field name="TEXT">abc</field> </shadow> <block type="variables_get" id="RAcB_;r|UUm!7Ft]y.$S"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </statement> </block> </next> </block> </statement> <next> <block type="debug" id="4I~godS;}gr$vY?SgTMp"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="`!=a.,9?LimC|B%_S0K9"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="!0o8Bek|hqPL3Zu-tK#d"> <field name="TEXT">Open Windows after Opening: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="GMM1VQrGXw%f~O}]*P-w"> <field name="VAR" id="THWRsZRIb3c~V=f;D?%r">OpenWindows</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
  • Mehrfach Trigger blocken

    blockly
    2
    2
    0 Votes
    2 Posts
    298 Views
    M
    @Ralla66 Vor dem Trigger noch die Variable Zähler auf 0 setzen. Wird aber dann nicht mehr zum Mehrfachtrigger umgebaut, wie unten? Wenn noch RF-Signale kommen werden die natürlich nicht verarbeitet solange Zähler>1 also mindestens 2 Sekunden. Wenn innnerhalb der 2 Sekunden wieder ein Trigger kommt wird der alte timeout gelöscht und der neue wird erstellt. Theoretisch könnte sich dadurch das Ganze zeitlich hinziehen, bis ein neuer Wert verarbeitet werden kann. Somit wären dann keine Werte mehr lesbar, bis mindestens 2 Sekunden kein neuer Wert getriggert wird!
  • Zeitsteuerung Alarmanlage

    6
    1
    0 Votes
    6 Posts
    503 Views
    paul53P
    @Thomas-Braun sagte: Also der Vergleich kann bei Textfeldern und Zahlenwerten angestellt werden? Es sind beides Textfelder (strings). Im Block von @PaulDaRu könnte man auch Variablen einsetzen. @Thomas-Braun sagte in Zeitsteuerung Alarmanlage: Ich versuche immer die bösen 0 Uhr zu umschiffen... Das ist nur bei Astrozeiten erforderlich.
  • ALIAS Variablen als globale Variablen nutzen + schalten?

    blockly
    38
    0 Votes
    38 Posts
    941 Views
    ?
    @paul53 jetzt schaut es gut aus! Erster Test war erfolgreich! Danke :+1: :blush:
  • XML Befehl über Blockly

    15
    0 Votes
    15 Posts
    468 Views
    AlCalzoneA
    @Nereos @liv-in-sky Lasst das sudo weg - sollte für HTTP-Server jenseits Port 80 überhaupt nicht nötig sein. Außerdem: Das Skript muss in einem Ordner liegen, wo der User iobroker Zugriff hat, also z.B. /home/iobroker, nicht im Home-Verzeichnis eines anderen Users. Dann lautet der Befehl einfach python /pfad/zum/skript/auf.py
  • unsubscribe: invalid type of id - boolean

    blockly
    10
    1
    0 Votes
    10 Posts
    2k Views
    A
    Ich habe jetzt nochmal ein ganz einfaches Skript erstellt, um das Verhlaten zu testen. Bisher funktioniert es und wurde nicht mehrfach ausgeführt... [image: 1605006353103-a2955c47-fee7-4027-bcbb-8b6626773c19-grafik.png]
  • Blockly-Rätsel (nur Teile werden ausgeführt)

    blockly
    9
    1
    0 Votes
    9 Posts
    285 Views
    HomoranH
    @Thomas-Braun sagte in Blockly-Rätsel (nur Teile werden ausgeführt): alle vom gleichen Null jepp, werden alle Verzögerungen zur gleichen Zeit gestartet
  • Abstände zwischen mehreren Events berechnen (Blockly)

    Moved blockly
    30
    3
    0 Votes
    30 Posts
    2k Views
    P
    Super, funktioniert wie es soll. Danke euch allen!
  • HTTP Sollwert Lesen und Schreiben an ESPEASY?

    blockly
    10
    2
    0 Votes
    10 Posts
    1k Views
    M
    @Pete0815 Bitte den Code in Codetags setzen: siehe oben </>, Danke.
  • ID Slektor Probleme

    12
    1
    0 Votes
    12 Posts
    737 Views
    D
    @danny_v1 So habs jetzt so wie ich mirs vorgestellt hab. Anzahl Gesamt, Anzahl Gelb, Anzahl Rot, Namen Gelb und Namen Rot. Super Danke schön für die Hilfe!!! Gibts irgendwo eine gute Beschreibung für die Selektoren, ist bei mir zur Zeit nur versuchen und Glück wenns passt.
  • Scrip reagiert nicht auf Zeit

    blockly javascript
    12
    1
    0 Votes
    12 Posts
    441 Views
    Thomas BraunT
    @biker1602 Ja. Die Uhrzeit in Computersystemen ist eminent wichtig. Ohne exakte Zeit geht da nix.
  • Probleme mit smartgarden und Shelly

    26
    3
    0 Votes
    26 Posts
    3k Views
    jpgorganizerJ
    bitte schließt diesen Thread, ich werde die Infos nicht mehr doppelt posten. Wer Probleme mit dem smartgarden Adapter hat, bitte im Thread https://forum.iobroker.net/topic/31289/neuer-adapter-smartgarden-adapter-for-gardena-smart-system/ melden. Danke und Gruß jpgorganizer
  • IDs vom Selector - Kombination functions und rooms

    4
    0 Votes
    4 Posts
    2k Views
    M
    @stsch83 https://www.iobroker.net/docu/index-81.htm?page_id=5809&lang=en Bis zum $Selektor runterscrollen!
  • Intervall stoppt nicht - Kontakte schalten

    7
    1
    0 Votes
    7 Posts
    638 Views
    I
    @paul53 Oh Mann. Ich hatte echt Tomaten auf den Augen. Meine Fantasie-Werte hatte ich zufällig gewählt und bei den 24 Grad liegt ja auch genau die Grenze zum Kühlen im Skript. Ich hatte die ganze Zeit noch alles größer als 24 im Sinn.. Mein anderes Beispiel mit 20 ist und 18 vorherigem Wert ging auch nicht auf wenn man nicht berücksichtigt das der Intervall wärmer initial ja schon läuft und genau deshalb kein neuer Intervall starten soll. --> und hier dürfte auch mein Fehler im Ursprungsskript liegen. Muss ich die Tage noch einmal drauf rumdenken. Nochmals vielen Dank! Mir ist Programmierung zwar kein Fremdwort aber wenn man nicht richtig liest kann es auch nichts werden ;). Eine gute Nacht und vielleicht bis zum nächsten Mal.
  • [Gelöst] Zeitplan funktioniert nicht

    5
    2
    0 Votes
    5 Posts
    450 Views
    Z
    @fastfoot sagte in [Gelöst] Zeitplan funktioniert nicht: @BigChris Der Wizard scheint öfter Probleme zu machen, hier eine Alternative mit einfachem Cron [image: 1595674396195-zeitplan.png] Hallo Ihr Beide, könnt Ihr mir eventuell weiterhelfen bei meinem CRON Problem. Ich möchte mit der Astrofunktion Rollläden steuern. z.B. Mo-Fr. öffnen nach Sonnenaufgang Sa-So öffnen nach Sonnenaufgangende + 1h Ich habe es mit einem Blocklyscript gemacht aber es funzt nicht so richtig. Astro Einstellungen.txt Manche Rollis schalten nach dem schließen wie verrückt (die Aktoren klacken!!!) Würde mich sehr auf Hilfe freuen.
  • Berechnung Wasserhöhe durch Wasserdruck!

    blockly
    11
    0 Votes
    11 Posts
    2k Views
    Maik KrauseM
    Erstmal vielen Dank für die Antworten. Ich denke das wird nicht so einfach :) Habe mal die Daten mitgeschnitten. im oberen Teil der Luftdruck. Der dann doch höchstwahrscheinlich nicht ganz Dicht ist. im unteren Teil die Werte des Wasserstandes. Gemessen mit Ultraschallsensor. Der aber leider nur bis ca.1.8m richtig Funktioniert. [image: 1604768099348-neue-bitmap-3.png] Habe mir jetzt mal noch ein Füllstandssensor bestellt der mir dann 4-20mA ausgibt. Mit dem sollte es dann aber klappen!
  • [gelöst] Fenster auf erkannt Fritz dect 301

    4
    0 Votes
    4 Posts
    1k Views
    W
    Hallo zusammen ich beabsichtige meine Thermostate auf Fritz 301 umzurüsten. Aber ist es immer noch so das es bis zu 15 Minuten dauern kann bis ein Befehl von der Box am Thermostat ausgeführt wir? Das wäre ein KO für das Fritz 301! Möchte Fensterkontake einsetzen. Da muss 1. Der Thermostat sofort reagieren 2. Muss dieser solange zu bleiben bis das Fenster wieder geschlossen wird.
  • Bitte um Hilfe: Push wenn was länger als Zeit x offline ist

    2
    1
    0 Votes
    2 Posts
    377 Views
    AsgothianA
    @freaktech was du möchtest: trigger auf den datenpunkt, wurde geändert stop Intervall set Variable blanket =0 Abfrage ob der DP wahr ist. Wenn nein: — start Intervall 15 Minuten, Darin: erhöhe blanket um 1, wenn blanket > 3 Meldung. Das war’s dann auch. A.

426

Online

32.7k

Users

82.5k

Topics

1.3m

Posts