Skip to content

Blockly

6.6k Topics 79.8k Posts

Hilfe für Skripterstellung mit Blockly

NEWS

  • Mit Blockly CSV exportieren

    4
    0 Votes
    4 Posts
    811 Views
    S
    @simplyclever Ich will das mit Numbers machen. IOBroker läuft bei mir auf einem älteren Mac Mini, da würde ich entweder mit Automator oder AppleScript die Daten einlesen lassen. Einfach den Ordner überwachen lassen, sobald IOBroker da was reingespeichert hat läuft das Skript los und trägt die Daten in das Dokument ein. Ich muss bloß irgendwie die Daten sauber als CSV aus IOBroker raus bekommen. ITTT kenne ich, nur habe ich damit noch nichts gemacht. Mit Google Docs will ich nicht unbedingt anfangen, die wissen schon genug über mich. mfg Special_B
  • Eine Stunde am Tag, aber wie merken? Prüfen?

    4
    1
    0 Votes
    4 Posts
    179 Views
    AsgothianA
    @dave83 Der Ansatz von @liv-in-sky ist gut. Leider Protokolliert der Ansatz die Laufzeit nur. Anbei ein Beispiel welches die Laufzeit protokolliert UND nach 1 Stunde abschaltet, und nur einen State (Die bisher vom Gerät verbrauchte Laufzeit) benötigt. [image: 1673079536989-screenshot-2023-01-07-at-09.18.50.png] Im Spoiler findest du das auch als XML Import. Wichtig ist: Die Bausteine state value, state timestamp und previous timestamp sind identisch - der mit Objekt ID voreingestellte Baustein aus dem Triggerbereich, nur auf die jeweiligen Werte umgestellt. Das Zurücksetzen via Zeitplan habe ich nicht nachgebaut - das brauchst du ggf. auch - zumindest zu anzeigezwecken oder in dem weiter unten beschriebenen Fall. Das Skript funktioniert aber auch ohne diesen Zeitplan. Das Zurücksetzen der gespeicherten Laufzeit findet Statt sobald der Status des Gerätes sich das erste mal am "Folgetag" ändert. Daraus folgt auch das die Berechnete Laufzeit des Gerätes davon abhängt wie lange es am Einschalttag schon Gelaufen ist die Laufzeit des Gerätes dem Ausschalttag zugeordnet wird. Das ist interessant für Fälle wo das Gerät kurz vor Mitternacht eingeschaltet wird. Nebenbei wird das Gerät auch direkt wieder ausgeschaltet sofern es irgendwie eingeschaltet wurde und die Laufzeit bereits erreicht war (extern) Dadurch kann sich die Laufzeit um ein paar ms pro Versuch erhöhen. Wenn das Abschalten nicht gewünscht ist muss der else Zweig beim Vergleich von currentRunTime und MaxRunTime entfallen. In diesem Fall muss extern geprüft werden ob noch Laufzeit verfügbar ist bevor das Gerät eingeschaltet wird - Das erfordert dann wahrscheinlich das Rücksetzen der Laufzeit via Zeitplan um Mitternacht. Spoiler <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="84-fD!=hq}M8k+AJ4S)6">MaxRunTime</variable> <variable id=")nYhOjt[M,SIo@JZ~$ha">CurrentRunTime</variable> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="variables_set" id="G4+ubMXM%eUW||Cgm45?" x="37" y="38"> <field name="VAR" id="84-fD!=hq}M8k+AJ4S)6">MaxRunTime</field> <value name="VALUE"> <block type="math_round" id="_ZZA#{!!SEpQ`%9fBLvr"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="q+XTKZYijqmr_;|+b2Ej"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="]lbrmKh2Y~m0AVq!{V/J"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="tOTh=[C:S/S/tEaQL|^r"> <field name="NUM">1</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="_Q1kCu;#:HKRKd^Q,$)q"> <field name="NUM">3600000</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="on_ext" id="n_q6rDEe0lBqbVoK.?iH"> <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="Evmvh7x,F_w!]M3xoX_A"> <field name="oid">0_userdata.0.example_state</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="q5`0l),%y})*]b;~XXp+"> <field name="NAME">timeout</field> <next> <block type="controls_if" id="#]tB`:V%1xnybmp+Pe{z"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id=":x(oo}C1-7-%[|;Xlk*," inline="false"> <field name="OP">NEQ</field> <value name="A"> <block type="math_modulo" id="%[8_2OktCW~=`j#.L0+z"> <value name="DIVIDEND"> <shadow type="math_number" id="1Keopd=XH9t5ki?;!euu"> <field name="NUM">64</field> </shadow> <block type="on_source" id="b~vNc_.Y[4VO9Vdz@_ME"> <field name="ATTR">state.ts</field> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="8X,sYoXe+;]f+2^+p0Ep"> <field name="NUM">86400000</field> </shadow> </value> </block> </value> <value name="B"> <block type="math_modulo" id="y_sJWO+$U/r]K@{MAV~o"> <value name="DIVIDEND"> <shadow type="math_number" id="+S^V~AkC!TKmX5sJ[[vT"> <field name="NUM">64</field> </shadow> <block type="on_source" id="!F$]n.!OxSg//$k!.X*~"> <field name="ATTR">oldState.ts</field> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="~|$@rjQkBZD+d(q9n!NY"> <field name="NUM">86400000</field> </shadow> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="-eLjMsoBxcOzzc`1ri+G"> <field name="VAR" id=")nYhOjt[M,SIo@JZ~$ha">CurrentRunTime</field> <value name="VALUE"> <block type="get_value" id="=?IBNdc-4Zd=4KRARi$:"> <field name="ATTR">val</field> <field name="OID">select ID</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="variables_set" id=")^CyYvO]oY9$/{=BIH_S"> <field name="VAR" id=")nYhOjt[M,SIo@JZ~$ha">CurrentRunTime</field> <value name="VALUE"> <block type="math_number" id="Qh@!+8GT5b_flmAn?5)j"> <field name="NUM">0</field> </block> </value> <next> <block type="update" id="@8W?v}HmBJe*LghGdpyz"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="o~!k++_E[xW(!~`HVr^5"> <field name="VAR" id=")nYhOjt[M,SIo@JZ~$ha">CurrentRunTime</field> </block> </value> </block> </next> </block> </statement> <next> <block type="controls_if" id="DzH43V#WCKok#hV*IZRZ"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="!.+2/o6BNf%F}g@|h4O~"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="controls_if" id="BC-2y?P9)?|8ltz79?4?"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="%;yejoMnX~xyt9D6Vjlt"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id="8wNSX)#XWR_D~J_Fz5SD"> <field name="VAR" id=")nYhOjt[M,SIo@JZ~$ha">CurrentRunTime</field> </block> </value> <value name="B"> <block type="variables_get" id="1ebj(S24SbVsIC]c?}RS"> <field name="VAR" id="84-fD!=hq}M8k+AJ4S)6">MaxRunTime</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout_variable" id="OJYjtak,1Gfl10q5w]?m"> <field name="NAME">timeout</field> <value name="DELAY_MS"> <shadow type="math_number" id="hbHOWH9M@2RckL].Lq^k"> <field name="NUM">1000</field> </shadow> <block type="math_arithmetic" id="v$JXenIM2f]WT3*ldI,X"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="2Qp097K0|R[:N2#[SpZL"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="(E0F`JYM!4(%er2.A`JD"> <field name="VAR" id="84-fD!=hq}M8k+AJ4S)6">MaxRunTime</field> </block> </value> <value name="B"> <shadow type="math_number" id="X)g`d:`,I6Q2WOvFttxN"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="_Zjb_0}q|}hDU=VT6RhE"> <field name="VAR" id=")nYhOjt[M,SIo@JZ~$ha">CurrentRunTime</field> </block> </value> </block> </value> <statement name="STATEMENT"> <block type="control" id="8N7U0JA#k}[$+)8{/Lv["> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="C9jkT**U{AuOI;e}oi[{"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="control" id="yyygqK1kcH]VkTl~nXB("> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="17gLk35f649C~i|{hgj/"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="update" id="%$D3%/}6iof%dtK?7CDx"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_arithmetic" id="x41UvXU8Al9N5-66vJXp" inline="false"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="#fZnVL03hHR$L[jpn$}E"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="mtscSryz8GzJ3yBq!i]u"> <field name="VAR" id=")nYhOjt[M,SIo@JZ~$ha">CurrentRunTime</field> </block> </value> <value name="B"> <shadow type="math_number" id="{?,linc];S74%/x/A:w$"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="r;^x:N:CVnisA2e5k4K%"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="1oSOVWw1np}-*D7/Lme*"> <field name="NUM">1</field> </shadow> <block type="on_source" id="vrfVZ-v@aQltO:DL5rNp"> <field name="ATTR">state.ts</field> </block> </value> <value name="B"> <shadow type="math_number" id="E[]1XpGB6o;-)zog1kvT"> <field name="NUM">1</field> </shadow> <block type="on_source" id="q:fVd!R3X$#ivd`}~[+;"> <field name="ATTR">oldState.ts</field> </block> </value> </block> </value> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </xml>
  • Täglich einen Wert erfassen

    25
    0 Votes
    25 Posts
    2k Views
    D
    Mit Cron hat es funktioniert. Vielen Dank für eure Hilfe :-)
  • [gelöst]NUKI SmartLock-Prüfung&Schließung in der Nacht z.B.

    24
    0 Votes
    24 Posts
    2k Views
    ?
    @iobroker_anfaenger sagte in [gelöst]NUKI SmartLock-Prüfung&Schließung in der Nacht z.B.: @vazi Hi, danke,jetzt klappt es Das freut mich, wenn ich helfen konnte und wünsche dir viel Spass mit dem NUKI und iobroker. Gruss Vazi
  • Temperatur Tages und Monatsdurchschnitt

    2
    0 Votes
    2 Posts
    377 Views
    paul53P
    @chemieka sagte: Mittelwert bilden. Am Besten gleitend Beispiel @chemieka sagte in Temperatur Tages und Monatsdurchschnitt: Das Ergebnis soll in eine Variable der CCU geschrieben werden. Dann muss anstelle von "aktualisiere" der "steure"-Block verwendet werden.
  • Blockly über Türklingel Garagentor öffnen

    16
    0 Votes
    16 Posts
    1k Views
    Thomas BraunT
    @d3ltoroxp sagte in Blockly über Türklingel Garagentor öffnen: Das meinte ich, so ist dann deine Klingel oder die Tür ab 8 Uhr scharf. Aber nur wenn schon vor 8 Uhr eine Lieferung avisiert ist. Wenn der Status erst danach aktiviert wird dann auch erst ab dann.
  • Anwesenheitsliste erstellen lassen

    4
    2
    0 Votes
    4 Posts
    475 Views
    A
    @paul53 Das sieht ja schon einmal ganz gut aus. Werde es mal so probieren. Gebe dann nochmal Rückmeldung. Vielen Dank Und ja, als Zahl und nicht als String. :) UPDATE: Scheint prima zu klappen bisher. Es ist noch nicht fertig. Paar Dinge will ich noch ändern. Aktuell spuckt das Script zum testen alle 5 Minuten eine Aufgabe aus. So sieht es im Moment aus: [image: 1673019629202-chrome_ws2nbr5zas.jpg] Spoiler <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id=",?Xu?w8h3YG(pN_jaKZz">Aufgaben</variable> <variable id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</variable> <variable id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</variable> <variable id="Jc$I3tA{;pL)@5)SX5|Z">id</variable> <variable id="D]mhPHrwYAB9BqVF578C">anwesend</variable> <variable id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</variable> <variable id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</variable> </variables> <block type="on_ext" id="`8bB6WHwMG}a@IAd}P9A" x="-587" y="637"> <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="Hjo]Kx)l[eN!bqNe?=ts"> <field name="oid">default</field> </shadow> <block type="regex" id="~%|^h8VmkucMbKi~-#t+"> <field name="TEXT">0_userdata.0.jemand_zuhause.*</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="y*Fot:/!7.M(TxuwtYaJ"> <value name="IF0"> <block type="logic_compare" id="l-lZU`kd:VS?V#%qd*2n"> <field name="OP">EQ</field> <value name="A"> <block type="lists_indexOf" id="]lf^]tuzjJ2T3v%wm_w!"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="}sxQ[:2$l+mKMeMAL~X;"> <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field> </block> </value> <value name="FIND"> <block type="on_source" id="W3-nz./+h_[U%sbVB7CN"> <field name="ATTR">id</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="_;yWIrq1/{@)f3G:]bz}"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="lists_setIndex" id="5L,n2u4gG_DamVUJZ`X0"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="variables_get" id="YL4IO@?YO%.5hef=I#VG"> <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field> </block> </value> <value name="TO"> <block type="on_source" id="Jq@OkL9uSY}[uT$Kz,HN"> <field name="ATTR">id</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="schedule" id="$mMEX5M{`2I0t%44=o+{"> <field name="SCHEDULE">0,5,10,15,20,25,30,35,40,45,50,55 * * * *</field> <statement name="STATEMENT"> <block type="variables_set" id="jB5Hlu)zH+G3UH|*:UQb"> <field name="VAR" id=",?Xu?w8h3YG(pN_jaKZz">Aufgaben</field> <value name="VALUE"> <block type="lists_create_with" id="v%gAaV0?t:aI_7k^oW(q"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="fVK]gx6F{?55e}6-l.3o"> <field name="TEXT">darf heute die Spülmaschine ein und ausräumen</field> </block> </value> <value name="ADD1"> <block type="text" id="TCd=rKeFx[6_^z-kX9E}"> <field name="TEXT">darf heute Wäsche wäschen</field> </block> </value> <value name="ADD2"> <block type="text" id="Qd1(sFb0ycU1?%I/,k)F"> <field name="TEXT">darf heute den Tisch abräumen</field> </block> </value> </block> </value> <next> <block type="variables_set" id="4c=JVVc)JGbt`o:95W+-"> <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field> <value name="VALUE"> <block type="selector" id="F*2rPlAepLQn(9Y9^U_H"> <field name="TEXT">0_userdata.0.jemand_zuhause.*</field> </block> </value> <next> <block type="debug" id="G-:5?Nd/(.5f/v/KY8e$"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="Kf-N~*Xr(+.%t)qAB)se"> <field name="TEXT">test</field> </shadow> <block type="text" id="qct/tmk8-mvm5beIL^Mp"> <field name="TEXT">Gleich wird ein neues Opfer gewählt</field> </block> </value> <next> <block type="control" id="pLUq}udCUc=vJN#IW9G4"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Statusmeldung</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="S8?.@oiC*]z[[ve]6oG}"> <field name="TEXT">Gleich wird ein neues Opfer auserwählt</field> </block> </value> <next> <block type="control" id="yE[zWIV/qr$.Y#dwrQJY"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.LetzteAufgabe</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="get_value" id="5kVu[bHWj`0FV0f/poSp"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field> </block> </value> <next> <block type="control" id="mrG(({AG-Y/0~zn|AuJo"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.LetztesUpdate</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="time_get" id="CiH(qptbid{[/^*1DxLN"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">hh:mm</field> </block> </value> <next> <block type="control" id="T,TM[0!0r6se`LA|Ag9("> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="zQq952}QL)05~[CE11X_"> <field name="TEXT">Eine neue Aufgabe wird erstellt!</field> </block> </value> <next> <block type="control" id="D9%Ie`I*.n]f1GZo?PZ["> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Pechvogel</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="K0c-}{C,$Hw3MR8|s+B9"> <field name="TEXT">Kommt gleich</field> </block> </value> <next> <block type="timeouts_wait" id="FoJo8gKr5m{MR]2imV9X"> <field name="DELAY">1</field> <field name="UNIT">min</field> <next> <block type="variables_set" id="/2M~7E~}M~q]ey4ouYs!"> <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field> <value name="VALUE"> <block type="lists_create_with" id="hDX4w}EN2Jf5?_!(vGwK"> <mutation items="0"></mutation> </block> </value> <next> <block type="controls_forEach" id="#3=2m5fs,bC)u![pDZ+p"> <field name="VAR" id="Jc$I3tA{;pL)@5)SX5|Z">id</field> <value name="LIST"> <block type="variables_get" id="e{I^l|?WDn%J+$`+6rUN"> <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field> </block> </value> <statement name="DO"> <block type="controls_if" id="XBo;d98++,b50A0(b}QD"> <value name="IF0"> <block type="get_value_var" id="$Xt~BO!qj_.W*oo?eKsr"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="wXDEr00Vn{R.BI][o`G^"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="bHNaVjH5`x?%d.c,{n`q"> <field name="VAR" id="Jc$I3tA{;pL)@5)SX5|Z">id</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="/)W[*-pWs~v4mNWGF34}"> <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field> <value name="VALUE"> <block type="lists_split" id="LMP)|`x;$|ODmCxf0t%w"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="variables_get" id="SxN`Aw~9#FcnlHvmOLY("> <field name="VAR" id="Jc$I3tA{;pL)@5)SX5|Z">id</field> </block> </value> <value name="DELIM"> <shadow type="text" id="O+Z~C+_.;Yo!!(uza#+U"> <field name="TEXT">.</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="a!#v(qEh17_I1a5FsE;n"> <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field> <value name="VALUE"> <block type="lists_getIndex" id="l8l2Xg?6tF99A23`1^`%"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">LAST</field> <value name="VALUE"> <block type="variables_get" id=";0(?,T+JL!Fk={hXmdWy"> <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field> </block> </value> </block> </value> <next> <block type="lists_setIndex" id="AD/0:`7_?k}$g@^n=Q6R"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="variables_get" id="Jx~S82pS1e(]bicY*h4p"> <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field> </block> </value> <value name="TO"> <block type="variables_get" id="+RF5rIR*xat3W%mt6T@d"> <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field> </block> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> <next> <block type="debug" id="2KM,P9$BFrz?lu9Vs`mF"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="0S?il;W[1W+@)foq)EpY"> <field name="TEXT">test</field> </shadow> <block type="text_join" id=",t_@kIf]H=F=sMV(Ee(*"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="rBgNCn9_QH+]s^7#@;6d"> <field name="TEXT">Teilnehmer: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="wvPI;Scs(4M*sQ^j*(xC"> <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field> </block> </value> </block> </value> <next> <block type="controls_if" id="aK3?8eaYt9U#q9UZdHM5"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="sVcY$zdXfY)95ruuio`/"> <field name="OP">GT</field> <value name="A"> <block type="lists_length" id="Fc}]Zn-s}!HTElRr=Cc%"> <value name="VALUE"> <block type="variables_get" id="5TbR8t~[:P8d3xU+.9wg"> <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="-Ky$Le@s9v5Px0tfskOz"> <field name="NUM">2</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="zc(Zq83|`Kpn2M}=@|9#"> <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field> <value name="VALUE"> <block type="lists_getIndex" id="XG%RqvxRDse^(W]R(P7j"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">RANDOM</field> <value name="VALUE"> <block type="variables_get" id="GK*,F_mCte||(z9o-rq^"> <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field> </block> </value> </block> </value> <next> <block type="variables_set" id="),n8Fkk_,OCM;r5)no)W"> <field name="VAR" id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</field> <value name="VALUE"> <block type="lists_getIndex" id="Xvl|K|Z6dOB$tX#[FxAR"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">RANDOM</field> <value name="VALUE"> <block type="variables_get" id="Y,qe@Rhe1#4t%Uj4ZNEJ"> <field name="VAR" id=",?Xu?w8h3YG(pN_jaKZz">Aufgaben</field> </block> </value> </block> </value> <next> <block type="control" id="UCwqHhRvZi)C%zV.D4L}"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Teilnehmer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_tostring" id="C0=|Lk04Q7;CExnJxaOJ"> <value name="VALUE"> <block type="variables_get" id="6l@;8]XSjJ^HO=P)Pc#s"> <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field> </block> </value> </block> </value> <next> <block type="debug" id="5PELc|^!OF5UZ;-j*|~U"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="$wwuqz~V$VqFwfqA9{Yy"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="Hp:1}1SuU`3R7~5}I1;E"> <field name="TEXT">Pechvogel: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="R`F@#[@%Xa.gmEyDb;%o"> <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field> </block> </value> </block> </value> <next> <block type="control" id="s0d*wwa@bHa~0jX,%k|f"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Pechvogel</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="qFWhs)$1go2?$w3RFzNo"> <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field> </block> </value> <next> <block type="debug" id="o*gYm_/-lJK(7#u7x8e3"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="i=Du-dGO]?((MUvAxF*4"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="laG5#F1Ju9JSm1Py8l4`"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id=";z[2K|,}(~t3jhuML=a,"> <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field> </block> </value> <value name="ADD1"> <block type="text" id="_B@Xz#F@$):H[@3-!dFA"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="variables_get" id="N5y_H[M{wOv_8i}J,hyb"> <field name="VAR" id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</field> </block> </value> </block> </value> <next> <block type="control" id="9z+PsIXRojwS+4uA[$|z"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="MZ}*9b.*_jdmH+dcBfw`"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="o8JKg/d7!ZGH.u8)8usj"> <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field> </block> </value> <value name="ADD1"> <block type="text" id="U0*|,~!el7GdW?1~IZ,H"> <field name="TEXT"> </field> </block> </value> <value name="ADD2"> <block type="variables_get" id="=kYAMKkW=WxbbaKwLbI("> <field name="VAR" id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</field> </block> </value> </block> </value> <next> <block type="debug" id="`jolVPHE8FMaiq:odO2i"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text" id="pbpE-vB3l;kmN=#r9yb,"> <field name="TEXT">Ein neues Opfer wurde auserwählt.</field> </block> </value> <next> <block type="control" id="I{M@5`~0E96;!yMs;JW{"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Statusmeldung</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="C8jn2u1!L=;prVu}6OJw"> <field name="TEXT">Ein neues Opfer wurde auserwählt.</field> </block> </value> <next> <block type="timeouts_wait" id="e?]Mjca[DB:$loJYay=x"> <field name="DELAY">1</field> <field name="UNIT">min</field> <next> <block type="control" id="ob3r/`fU@8iK%@7umHrJ"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Statusmeldung</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="nHWp+Y|D*!3!~Zr8%w1E"> <field name="TEXT">Ich hoffe ihr habt Spaß</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="j:rH;)[}?z=8+cJNy%lA"> <field name="OP">LTE</field> <value name="A"> <block type="lists_length" id="D:A+@uHtN$Kp0+O$]FW)"> <value name="VALUE"> <block type="variables_get" id="c}^O%ql}V=@k;gi)~I5l"> <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="0??En=C%-!^lQL7;K,q6"> <field name="NUM">2</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="eJo(15+}ApC^x|0l|8nH"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Teilnehmer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="k1.@dutHXtepnG/f,#E."> <field name="TEXT">-</field> </block> </value> <next> <block type="control" id="GDO_JByzNKgvGO3)B8Zn"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Pechvogel</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="ND,@H4?1K,R%us!?85i/"> <field name="TEXT">-</field> </block> </value> <next> <block type="control" id="po@r1J%;m([T~3P{h/*r"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.Statusmeldung</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="n/sPm;:EdpQgK}[k6FP5"> <field name="TEXT">Leider gibt es in dieser Runde zu wenige Teilnehmer</field> </block> </value> <next> <block type="control" id="E%C+{Ln;n?c?_6C=jrfV"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="bsKP0Yo7d5`!!jy!Zi#%"> <field name="TEXT">Such dir Freunde</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </xml> Jetzt hatte ich die Idee, dass es 2 Aufgabenlisten geben soll. Eine mit Haushaltsaufgaben und eine mit lustigen Aufgaben. Mal soll eine Spaßaufgabe erscheinen und mal eine Haushaltsaufgabe. Entweder löse ich das mit einem Zeittrigger, dass jeweils ne andere Liste verwendet wird. Oder es darf auch ruhig zufällig entschieden werden. Es wäre dann natürlich super wenn jede Aufgabe auch aus der Liste gestrichen wird, sobald sie am heutigen Tag schon einmal erschienen ist. Hab bisher noch nicht so oft mit Listen gearbeitet. Wie könnte ich das nun realisieren?
  • Kopplung MDT Glastaster mit Shelly RGBW --> Dimmen

    1
    0 Votes
    1 Posts
    253 Views
    No one has replied
  • Mehrere fortlaufende Datenpunkte erzeugen

    4
    1
    0 Votes
    4 Posts
    276 Views
    paul53P
    @manfredh-1 sagte: in Javascript? const path = '0_userdata.0.Strom.Awattar.'; for(let i = 0; i < 24; i++) { let id = path + i + '.Strompreis'; createState(id, 0, {type: 'number', unit: '€/kWh', name: 'Strompreis ab ' + i + ' Uhr'}); }
  • Nachtlicht und Normales Licht

    5
    1
    0 Votes
    5 Posts
    344 Views
    Sebastian RuschitzkaS
    @thomas-braun danke, das hilft mir schonmal weiter. Das mit dem Foto werde ich für die Zukunft beherzigen. Wäre nur noch das Problem, dass ja die erste blockly quasi "pausieren" soll nachdem ich den taster betätigen um das Arbeitslicht zu schalten.
  • Astro Trigger löst nicht aus

    23
    1
    0 Votes
    23 Posts
    2k Views
    N
    Das endergebnis. So funktioniert es und es bleibt jetzt erstmal so und dient mir als Vorlage für einen anderen Flur und einen Innenhof. [image: 1672942526137-de2a4e96-656a-4ca1-b10f-b5b0126e57e5-grafik.png] Habe den Tag in 6 Abschnitte unterteilt mit Werten für Lichtfarbe und Dimmung. Da man bei den Astrofunktionen nicht über den Tageswechsel gehen darf (was ich vorher nicht wusste, daher die Probleme) habe ich dort manuell die Übergangszeiten eingetragen. Siehe erster und letzter Lila Block. Letzte Frage : ganz unten im letzten Block mit Verzögerung, 60 Sek. löschen falls läuft "löschen falls läuft" würde in diesem Fall bedeuten - wenn der Timer herunterzählt und man z.b. nach 20 Sek. erneut durch den Bewegungsmelder läuft, fängt er erneut an, von 60 herunter zu zählen wenn alle Bedingungen FALSE sind. Ist das so richtig ?
  • script: etwas hintereiander in abhängigkeit schalten

    8
    1
    0 Votes
    8 Posts
    188 Views
    liv-in-skyL
    @nordischerjung insgesamt sieht es so aus - nur zum überblick - ist etwas aufwendig - daher die frage, ob wir da nicht schon etwas im iob-universe haben [image: 1672930488396-image-122.png]
  • Richtigen Trigger wählenb

    11
    0 Votes
    11 Posts
    748 Views
    CodierknechtC
    @headder9999 Du könntest die auch optisch etwas auseinander ziehen. Dann sieht man das direkt. Der im Hintergrund generierte JS-Code ändert sich in keinster Weise. Üblicherweise pappen die meisten die aber - so wie bei Dir - aneinander.
  • [ Gelöst ] Kamerabild aufnehmen (speichern)

    19
    1
    0 Votes
    19 Posts
    2k Views
    GlasfaserG
    @iobrokermike sagte in [ Gelöst ] Kamerabild aufnehmen (speichern): Hier die Lösung Der Postbote hat geklingelt ...
  • Gelöst: dynamische strompreise berechnen

    16
    1
    0 Votes
    16 Posts
    2k Views
    crunchipC
    @paul53 sorry mein Fehler, ja in € angegeben, 37,4 ct das wäre allerdings sehr Preiswert
  • Shelly mit BW steuern

    7
    1
    0 Votes
    7 Posts
    225 Views
    B
    @da_woody ich gucke mir das mal an. Danke
  • Suche Blockly für Homematic IP Fenstergriffsensor Gelöst

    4
    0 Votes
    4 Posts
    203 Views
    Horst BöttcherH
    @paul53 jo danke
  • [Shelly] Geräte-Temperaturüberwachung

    1
    0 Votes
    1 Posts
    258 Views
    No one has replied
  • [Gelöst] Blockly Alexa: Eingabe, schalten, Ausgabe

    10
    1
    0 Votes
    10 Posts
    1k Views
    WannseesprinterW
    @paul53 Frohes Neues und vielen Dank für deine Hilfe. Späte Antwort, aber hier die Rückmeldung, dass genau dein Tipp zum Erfolg geführt hat :) So sieht es verfeinert aus für "Tor öffnen" [image: 1672697641141-0e79fdaa-a7d9-4a23-a68a-055fb7e5fa78-grafik.png] Und so für "Tor schließen" [image: 1672697710206-4301b905-8ddf-468d-b4c3-1d8ef41fc36a-grafik.png] Läuft butterweich - auch mit mehreren Alexas in der Bude. Ich kann zwar nicht verhindern, dass min. eine Alexa Dinge sagt, wie "Das weiß ich leider nicht" o.ä., aber wenige Augenblicke danach kommt mein hinterlegtes "Alles klar, ich öffne die Garage..."
  • Blockly auf bestimmte Worte im Text reagieren

    3
    1
    0 Votes
    3 Posts
    345 Views
    A
    @paul53 vielen Dank für Deine schnelle Antwort. Dann müsste es ja so funktionieren: [image: 1672676127638-7bf0eb1c-629b-40cb-a643-b3a757a1551c-image.png]

577

Online

32.8k

Users

82.8k

Topics

1.3m

Posts