Skip to content

Blockly

Hilfe für Skripterstellung mit Blockly

6.6k Themen 79.5k Beiträge

NEWS

  • Hilfe beim Geschirrspüler Blockly

    5
    3
    0 Stimmen
    5 Beiträge
    363 Aufrufe
    SlowmanS
    @Albert-K Danke für deine Erfahrung. Dann wird bei mir die letzten 2 Aktionen auch die Pumpe sein, die dort arbeitet.
  • [gelöst]Variabler Timeout möglich ?

    blockly
    10
    0 Stimmen
    10 Beiträge
    804 Aufrufe
    dslraserD
    @Rushmed hier ist auch was https://forum.iobroker.net/post/438242
  • Blockly Abbruch

    blockly
    3
    1
    0 Stimmen
    3 Beiträge
    315 Aufrufe
    R
    @Asgothian Super, danke dir :)... Läuft einwandfrei. Musste lediglich beim letzten "update Object ID with false" noch ein delay setzen, ohne ist das Licht am Ende an geblieben.
  • Blockly Schleife

    6
    1
    0 Stimmen
    6 Beiträge
    739 Aufrufe
    P
    @amg_666 Ich habs jetzt glaub ich einfacher gelöst. 2. Datenpunkt, der true oder false bei einem Wert um 100 schaltet. [image: 1605303055740-bildschirmfoto-2020-11-13-um-22.29.31-resized.png] Morgen wird getestet aber ich bin zuversichtlich. Danke für Eure Hilfe! Lg, Tim
  • Balkontür länger geöffnet

    11
    0 Stimmen
    11 Beiträge
    900 Aufrufe
    SquelshS
    Falls hier jemand in Zukunft das selbe Problem hat: Bei mir hat es geholfen, die temperaturabhängige Fenster-Auf-Erkennung der Thermostate auszuschalten. Das geht in via CCU in den Einstellungen der Homematic IP Thermostate.
  • Änderung des Zeitstempel als Trigger

    2
    2
    0 Stimmen
    2 Beiträge
    253 Aufrufe
    paul53P
    @asraelvudogel Man kann nur auf die Datenpunkt-ID triggern. Damit auf jede Aktualisierung des Zeitstempels getriggert wird, wählt man "wurde aktualisiert". [image: 1605290268822-blockly_temp.jpg]
  • Meldung wenn die Heizung im Gewächshaus ein/ausschaltet

    13
    0 Stimmen
    13 Beiträge
    733 Aufrufe
    S
    @paul53 Ah danke habe es. Klappt, vielen Dank mal wieder paul53, für deine super Hilfe :)
  • Kamerbild beim Klingeln

    9
    0 Stimmen
    9 Beiträge
    908 Aufrufe
    W
    @B4unty danke dir. Teste es mal sobald die Camera dran ist ;-)
  • Telegram inline-keyboard ohne Text2Command

    9
    0 Stimmen
    9 Beiträge
    2k Aufrufe
    J
    @michael_4358 danke dir! Das ist alles in Blockly entstanden, allerdings sind die meisten Funktionen innerhalb des Blocklys direkt JavaScript-Funktionen. Gibt noch ein paar blockly-Funktionen, die werde ich allerdings auch noch zu Javascript umbauen.
  • Source Analytix keine Mathe Rechnung mehr möglich???

    2
    1
    0 Stimmen
    2 Beiträge
    159 Aufrufe
    ?
    Schiebe es mal hoch falls jemand einen Tipp hat....
  • Blockly, für mich nicht verständlich

    blockly monitoring
    5
    1
    0 Stimmen
    5 Beiträge
    960 Aufrufe
    J
    @PatrickFro sagte in Blockly, für mich nicht verständlich: Soweit zum Aufbau. Leider wird das Script trotz allen Bedingungen mehrfach ausgeführt, was ich mir nicht mehr erklären kann. Ein Timeout sollte man auch immer stoppen, sonst laufen da wenn es dumm läuft sehr viel gleichzeitig, was eine Mehrfachausführung zur Folge haben kann. Da Du mit vielen Timeouts arbeitest und keinen stoppst wird es daran liegen. Teste das Script von paul53, das sieht doch im Vergleich zu Deinem sehr übersichtlich aus und der einzige timeout wird auch gestoppt ;)
  • [gelöst] Steckdose nach Inaktivität abschalten

    6
    1
    0 Stimmen
    6 Beiträge
    904 Aufrufe
    I
    Ich habe das Skript noch einmal überarbeitet und um "alter_Wert" ergänzt. So wird der Datenpunkt nicht mit "dummy-Daten" befüllt und mein Logging ist genauer. [image: 1605174992319-86994fca-d740-4a83-a825-6dab60908aa6-grafik.png]
  • Nachfrage Blockly - Einfache Logik

    3
    1
    0 Stimmen
    3 Beiträge
    324 Aufrufe
    M
    @ITCrowd Danke, echt simpel ;-)
  • Schalterstellungen zählen/auswerten

    4
    1
    0 Stimmen
    4 Beiträge
    279 Aufrufe
    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 Stimmen
    4 Beiträge
    566 Aufrufe
    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 Stimmen
    2 Beiträge
    295 Aufrufe
    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 Stimmen
    6 Beiträge
    479 Aufrufe
    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 Stimmen
    38 Beiträge
    937 Aufrufe
    ?
    @paul53 jetzt schaut es gut aus! Erster Test war erfolgreich! Danke :+1: :blush:
  • XML Befehl über Blockly

    15
    0 Stimmen
    15 Beiträge
    468 Aufrufe
    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 Stimmen
    10 Beiträge
    2k Aufrufe
    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]

524

Online

32.7k

Benutzer

82.4k

Themen

1.3m

Beiträge