Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. [Frage] Blockly zufällig im Zeitbereich

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.2k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.6k

[Frage] Blockly zufällig im Zeitbereich

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
40 Beiträge 6 Kommentatoren 5.6k Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • B Offline
    B Offline
    Belei
    schrieb am zuletzt editiert von
    #12

    @rantanplan:

    @lobomau:

    Gibt es sonst eine Möglichkeit nur mit Blockly einen zufälligen Zeitbereich zu erstellen?

    Ich möchte dass nachts ein Licht 10 mal schaltet, aber jeweils im zufälligen Bereich von 0 bis 5 Minuten. `

    Hallo lobomau

    Nicht direkt. Leider läßt Blockly in vielen Bausteinen keine Variablen zu.

    Aber vom Rücken, durch die Brust ins Auge könnte es gehen.

    Auf die Schnelle fällt mir dazu folgende Möglichkeit ein.

    Blocky Zufall.png

    Der Export:

    ! ````
    <xml xmlns="http://www.w3.org/1999/xhtml"><block type="schedule" id="#q]X?XA6,T#oVG0~p2-k" x="-137" y="-162"><field name="SCHEDULE">/5 * * * * </field>
    <statement name="STATEMENT"><block type="controls_if" id="SPb@1vaoX%#8}Ztk9|.{"><value name="IF0"><block type="logic_compare" id=")|K
    D~LFn0EfiYM^m@Nn"><field name="OP">NEQ</field>
    <value name="A"><block type="variables_get" id="d71W,pX%pJ72;8{kfdS"><field name="VAR">TimerAktiv</field></block></value> <value name="B"><block type="logic_boolean" id="(%,AB0sDN!#y4ic_{VjS"><field name="BOOL">TRUE</field></block></value></block></value> <statement name="DO0"><block type="variables_set" id="}.-BM_s!1lz.V*hvU@AY"><field name="VAR">valZufall</field> <value name="VALUE"><block type="math_random_int" id="3Q/HHpL~EpbBr^HE~1df"><value name="FROM"><shadow type="math_number" id="A.LJ5W.UeBqK(Tl2GvZ"><field name="NUM">1</field></shadow></value>
    <value name="TO"><shadow type="math_number" id="T{/dDJqQ1%YlMESV9(Nv"><field name="NUM">3</field></shadow></value></block></value>
    <next><block type="controls_if" id="kGg5uFcR8[gxXgSzVl5n"><mutation elseif="2"></mutation>
    <value name="IF0"><block type="logic_compare" id="?nV9axQ.ztUS+?mvR:^v"><field name="OP">EQ</field>
    <value name="A"><block type="variables_get" id="eGQClh}yINaaminM]h@M"><field name="VAR">valZufall</field></block></value>
    <value name="B"><block type="math_number" id="w)p6@Kl(M%rZZC2w[fk^"><field name="NUM">1</field></block></value></block></value>
    <statement name="DO0"><block type="procedures_callnoreturn" id="K0BT]GJP:#6Le6RdwqF8"><mutation name="ZufallEins"></mutation></block></statement>
    <value name="IF1"><block type="logic_compare" id="M0[QB+35R8YTEh=5Xge
    "><field name="OP">EQ</field>
    <value name="A"><block type="variables_get" id="(tpMntf[RTlhk6nXF#Xk"><field name="VAR">valZufall</field></block></value>
    <value name="B"><block type="math_number" id="Nc.|J~M;eYEIWS|Q!J;l"><field name="NUM">2</field></block></value></block></value>
    <statement name="DO1"><block type="procedures_callnoreturn" id="W87g2nl8jprwJXB]J[hw"><mutation name="ZufallZwei"></mutation></block></statement>
    <value name="IF2"><block type="logic_compare" id="gj}gnPUy#/5aHdoBnr@"><field name="OP">EQ</field>
    <value name="A"><block type="variables_get" id="leS?FhGaeYN^U_eW=UC@"><field name="VAR">valZufall</field></block></value>
    <value name="B"><block type="math_number" id="L+jsa(J@;}6M8Rr%a}Yd"><field name="NUM">3</field></block></value></block></value>
    <statement name="DO2"><block type="procedures_callnoreturn" id="{;AN3#fKQQ0kBms}=oDy"><mutation name="ZufallDrei"></mutation></block></statement></block></next></block></statement></block></statement></block>
    <block type="procedures_defnoreturn" id="]aih=G55?HS]7lpb
    vSc" x="538" y="-187"><field name="NAME">ZufallEins</field>
    <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
    <statement name="STACK"><block type="debug" id="m(8lX4Y:**J%J^9ti)M"><field name="Severity">log</field> <value name="TEXT"><shadow type="text" id="7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow>
    <block type="variables_get" id="y1Q1BFtS+I+?X!T;vdJ|"><field name="VAR">valZufall</field></block></value>
    <next><block type="comment" id="UD8iI_FNE6Pa0}07og*["><field name="COMMENT">Schalte etwas ein</field>
    <next><block type="variables_set" id="gc%||Eu?4a-GR[lV#V+9"><field name="VAR">TimerAktiv</field>
    <value name="VALUE"><block type="logic_boolean" id=".f:;9;bHuW@Q8uTIM7cx"><field name="BOOL">TRUE</field></block></value>
    <next><block type="timeouts_settimeout" id="KUky=Au9Hf42KvRsaZi"><field name="NAME">timeout</field>
    <field name="DELAY">1000</field>
    <statement name="STATEMENT"><block type="comment" id="!/W#E)^phCi/#d:rZ11M"><field name="COMMENT">Schalte etwas wieder aus</field>
    <next><block type="variables_set" id="45qLb@}f0E5vBYwGUs,H"><field name="VAR">TimerAktiv</field>
    <value name="VALUE"><block type="logic_boolean" id="M69l1/uK.(zT^%3mbA|@"><field name="BOOL">FALSE</field></block></value></block></next></block></statement></block></next></block></next></block></next></block></statement></block>
    <block type="procedures_defnoreturn" id="j6lr
    @jITsr]ms8yhUh0" x="538" y="63"><field name="NAME">ZufallZwei</field>
    <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
    <statement name="STACK"><block type="debug" id="Yj?[d2mz/jUbw6B@}i^w"><field name="Severity">log</field>
    <value name="TEXT"><shadow type="text" id="7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> <block type="variables_get" id=")6F1e[,wecN:0#OxtHo5"><field name="VAR">valZufall</field></block></value> <next><block type="comment" id="(K~gPu|WTF3rn%_]Wu|p"><field name="COMMENT">Schalte etwas ein</field> <next><block type="variables_set" id="{(kXy~N;Z.QRt}vr3I"><field name="VAR">TimerAktiv</field>
    <value name="VALUE"><block type="logic_boolean" id="G6@Xxm=)a-dD[j{I=Yfv"><field name="BOOL">TRUE</field></block></value>
    <next><block type="timeouts_settimeout" id="xefMj,DIwtkW
    2@Phw1Q"><field name="NAME">timeout2</field>
    <field name="DELAY">2000</field>
    <statement name="STATEMENT"><block type="comment" id="A[?425Oyazos+*y8;Y2:"><field name="COMMENT">Schalte etwas wieder aus</field>
    <next><block type="variables_set" id="W,)iWjtj;*J19I8rbs8"><field name="VAR">TimerAktiv</field> <value name="VALUE"><block type="logic_boolean" id="P=PZWs~Sdnb/7A_g1IMp"><field name="BOOL">FALSE</field></block></value></block></next></block></statement></block></next></block></next></block></next></block></statement></block> <block type="procedures_defnoreturn" id=",%sXx)neL(hBuOH~l%%9" x="538" y="313"><field name="NAME">ZufallDrei</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="debug" id="k}),=oVBLM[qL:1,0K=%"><field name="Severity">log</field> <value name="TEXT"><shadow type="text" id="7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow>
    <block type="variables_get" id="zY3NJB^6bk2C?gA/]Qa9"><field name="VAR">valZufall</field></block></value>
    <next><block type="comment" id="|;jKXPh/w,O.!TE~)5y6"><field name="COMMENT">Schalte etwas ein</field>
    <next><block type="variables_set" id="WDYnD=%[7Ot3b94P*cl"><field name="VAR">TimerAktiv</field> <value name="VALUE"><block type="logic_boolean" id="m{t-glCB~U:?~U6VhWvj"><field name="BOOL">TRUE</field></block></value> <next><block type="timeouts_settimeout" id="TX2ufws26#AES|*Hmty"><field name="NAME">timeout3</field>
    <field name="DELAY">3000</field>
    <statement name="STATEMENT"><block type="comment" id=";6|h5I,9xy=NsXaK6Pv{"><field name="COMMENT">Schalte etwas wieder aus</field>
    <next><block type="variables_set" id="q7GtkJVZ!-R+JVdai^K("><field name="VAR">TimerAktiv</field>
    <value name="VALUE"><block type="logic_boolean" id="p!%n^3t8Q}JFG!y8~NPI"><field name="BOOL">FALSE</field></block></value></block></next></block></statement></block></next></block></next></block></next></block></statement></block></xml>

    
    Grüße `  
    

    Für noch mehr Schaltungen füge ich einfach noch mehr Zufallszahlen ein.

    Ich brauche ja für jedes Komado eine Zahl, oder?

    also Lampe 1 an = Zufall 1

    und Lampe 1 aus = Zufall 2

    usw.

    1 Antwort Letzte Antwort
    0
    • rantanplanR Online
      rantanplanR Online
      rantanplan
      schrieb am zuletzt editiert von
      #13

      @Belei:

      Ich brauche ja für jedes Komado eine Zahl, oder?

      also Lampe 1 an = Zufall 1

      und Lampe 1 aus = Zufall 2

      usw. `
      In dem Beispiel wird jeweils ein Timer gestartet. Darin wird das jeweilige Gerät wieder ausgeschaltet (s. Komentare).

      Man kann es aber so machen wie Du es beschreibst.

      Grüße

      Rantanplan

      CCU3 / MS Server 2019(VM) / Scripten mit Blockly

      1 Antwort Letzte Antwort
      0
      • B Offline
        B Offline
        Belei
        schrieb am zuletzt editiert von
        #14

        OK hatte ich auch erst so verstanden aber bei meiner probe, wurde die Lichter nie ausgeschaltet.

        3799_zufall.jpg

        1 Antwort Letzte Antwort
        0
        • rantanplanR Online
          rantanplanR Online
          rantanplan
          schrieb am zuletzt editiert von
          #15

          Du hast ja auch den Aufruf der Funktionen "ZufallEins","ZufallZwei"….. raus genommen.

          Das Ein-,Ausschalten soll in den Funktionen stattfinden.

          Da wo die Kommentare "Schalte etwas ein" und innerhalb der Timer "Schalte etwas aus".

          Grüße

          Rantanplan

          CCU3 / MS Server 2019(VM) / Scripten mit Blockly

          1 Antwort Letzte Antwort
          0
          • B Offline
            B Offline
            Belei
            schrieb am zuletzt editiert von
            #16

            ups, da hab ich wohl was flasch verstanden…

            Also ist der Timer oben Links für den Interwall der Zufallszahlen und die Timeout in den Funktionen sind für die Auschaltzeit.?

            1 Antwort Letzte Antwort
            0
            • rantanplanR Online
              rantanplanR Online
              rantanplan
              schrieb am zuletzt editiert von
              #17

              @Belei:

              Also ist der Timer oben Links für den Interwall der Zufallszahlen und die Timeout in den Funktionen sind für die Auschaltzeit.? `

              "oben LInks" ist kein Timer.

              Oder meinst Du den Trigger?

              Rantanplan

              CCU3 / MS Server 2019(VM) / Scripten mit Blockly

              1 Antwort Letzte Antwort
              0
              • B Offline
                B Offline
                Belei
                schrieb am zuletzt editiert von
                #18

                Ja meinte den Trigger muss die Begriffe besser beachten .

                1 Antwort Letzte Antwort
                0
                • B Offline
                  B Offline
                  Belei
                  schrieb am zuletzt editiert von
                  #19

                  Nur noch mal zum Verständniss:

                  Ich starte den Script und nach Ablauf des Triggers geht der erste Block los, er guckt kein Timer aktiv also Zufallszahl 1-3 an

                  z.B. Funktionsblock 1 wird ausgewählt und Licht angeschaltet für Timeout von XX Minuten. Nach dem auschalten wird der Timer wieder auf unwahr gesetzt und der erste Block startet wieder nach Ablauf des Triggers?

                  Ist es dann nicht so das immer nur 1 Licht leuchtet und nie mal mehrere? Weil es wird ja immer nur nach Ablauf des Timers neugestartet, oder?

                  1 Antwort Letzte Antwort
                  0
                  • rantanplanR Online
                    rantanplanR Online
                    rantanplan
                    schrieb am zuletzt editiert von
                    #20

                    Hallo Belei

                    Das Blockly ist nur ein Beispiel, wie man so etwas lösen könnte.

                    Das ist keine fertige Vorlage oder Anwendung!

                    Wie viele Geräte Du in einer Zufalls-Funktion ein-/ausschaltest liegt in Deinem Ermessen.

                    Du kannst auch für jede Funktion einen eigenen Flag für "TimerAktiv" anlegen.

                    TimerAktivEins, TimerAktivZwei usw. usw.

                    "TimerAktivXXX" soll verhindern, dass ein Timer mehrmals gestartet wird!

                    Grüße

                    Rantanplan

                    CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                    1 Antwort Letzte Antwort
                    0
                    • B Offline
                      B Offline
                      Belei
                      schrieb am zuletzt editiert von
                      #21

                      So? oder klappt das nicht mit den oders?

                      3799_zufall.jpg

                      1 Antwort Letzte Antwort
                      0
                      • rantanplanR Online
                        rantanplanR Online
                        rantanplan
                        schrieb am zuletzt editiert von
                        #22

                        Ne, so wird das nicht klappen.

                        Das Programm wird laufen, aber die Timer können mehrmals gestartet werden.

                        Wenn Du einen Export bereitgestellt hättest, hätte ich Dir das umbauen können.

                        Ich versuche es mal mit Worten.

                        Das äußere "Falls" müsste weg.

                        Setze "valZufall" müsste der erste Block im Trigger werden.

                        Dann jeweils "Falls valZufall = 1

                        mache Falls TimerAktiv1 = unwahr

                        mache ZufallEins

                        sonst Falls valZufall = 2

                        mache Falls TimerAktiv2 = unwahr

                        mache ZufallZwei

                        usw. usw…...

                        Rantanplan

                        CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                        1 Antwort Letzte Antwort
                        0
                        • B Offline
                          B Offline
                          Belei
                          schrieb am zuletzt editiert von
                          #23

                          Wäre super.

                           <xml xmlns="http://www.w3.org/1999/xhtml"><block type="procedures_defnoreturn" id="]aih=G55?HS]7lpb*vSc" x="538" y="-337"><field name="NAME">ZufallEins</field>
                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                              <statement name="STACK"><block type="debug" id="m(8lX4`Y:**J%J^9ti)M"><field name="Severity">log</field>
                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                    <block type="variables_get" id="y1Q1BFtS+I+?X!T;vdJ|"><field name="VAR">valZufall</field></block></value> 
                                  <next><block type="comment" id="UD8iI_FNE6Pa0}07og*["><field name="COMMENT">Schalte etwas ein</field>
                                      <next><block type="control" id="ED=cN8;vC^#@G{/Ar}X9"><mutation delay_input="false"></mutation>
                                          <field name="OID">rflink.0.channels.TriState_2.SWITCH_0</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE"><block type="logic_boolean" id="QbwuRS!E)91vs04SFhcx"><field name="BOOL">TRUE</field></block></value> 
                                          <next><block type="variables_set" id="gc%||Eu?4a-GR[lV#V+9"><field name="VAR">TimerAktiv1</field>
                                              <value name="VALUE"><block type="logic_boolean" id=".f:;9;bHuW@Q8uTIM7cx"><field name="BOOL">TRUE</field></block></value> 
                                              <next><block type="timeouts_settimeout" id="KUky=Au9Hf42KvR*saZi"><field name="NAME">timeout</field>
                                                  <field name="DELAY">4</field>
                                                  <field name="UNIT">min</field>
                                                  <statement name="STATEMENT"><block type="comment" id="!/W#E)^phCi/#d:rZ11M"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                      <next><block type="control" id="J97f}9hq6rb2=*.3;mt5"><mutation delay_input="false"></mutation>
                                                          <field name="OID">rflink.0.channels.TriState_2.SWITCH_0</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="!~cb-+ln/td1zDut0#O!"><field name="BOOL">FALSE</field></block></value> 
                                                          <next><block type="variables_set" id="45qLb@}f0E5vBYwGUs,H"><field name="VAR">TimerAktiv1</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="M69l1/uK.(zT^%3mbA|@"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> 
                            <block type="schedule" id="#q]X?XA6,T#oVG0~p2-k" x="-118" y="-158"><field name="SCHEDULE">*/2 * * * *</field>
                              <statement name="STATEMENT"><block type="controls_if" id="SPb@1vaoX%#8}Ztk9|.{"><value name="IF0"><block type="logic_operation" id="(ui;wwx,m7~KV@=ZeIUK" inline="false"><field name="OP">OR</field>
                                      <value name="A"><block type="logic_compare" id=")|K*D~LFn0EfiYM^m@Nn"><field name="OP">NEQ</field>
                                          <value name="A"><block type="variables_get" id="d71W,pX%p`J72;8{kfdS"><field name="VAR">TimerAktiv1</field></block></value> 
                                          <value name="B"><block type="logic_boolean" id="(%,AB0sDN!#y4ic_{VjS"><field name="BOOL">TRUE</field></block></value></block></value> 
                                      <value name="B"><block type="logic_operation" id="GCxABfmY9)n2`vpps=u-" inline="false"><field name="OP">OR</field>
                                          <value name="A"><block type="logic_compare" id="^m+ouKh|qzf=TbS~_9mR"><field name="OP">NEQ</field>
                                              <value name="A"><block type="variables_get" id="2lHQKNO*mK.%;jMHNz,R"><field name="VAR">TimerAktiv2</field></block></value> 
                                              <value name="B"><block type="logic_boolean" id="*5::xUcUsAP(GD7FbIP7"><field name="BOOL">TRUE</field></block></value></block></value> 
                                          <value name="B"><block type="logic_compare" id="7wfI*kc/lun-#h?#3Kp4"><field name="OP">NEQ</field>
                                              <value name="A"><block type="variables_get" id="eAK,rKQ|x[!;:KUE3;Tq"><field name="VAR">TimerAktiv3</field></block></value> 
                                              <value name="B"><block type="logic_boolean" id="Fc6Bpci,#--yqGe0==Jt"><field name="BOOL">TRUE</field></block></value></block></value></block></value></block></value> 
                                  <statement name="DO0"><block type="variables_set" id="}.-BM_s!1lz.V*hvU@AY"><field name="VAR">valZufall</field>
                                      <value name="VALUE"><block type="math_random_int" id="3Q/HHpL~EpbBr^HE~1df"><value name="FROM"><shadow type="math_number" id="A.LJ5W.UeB`qK(Tl2GvZ"><field name="NUM">1</field></shadow></value> 
                                          <value name="TO"><shadow type="math_number" id="T{/dDJqQ1%YlMESV9(Nv"><field name="NUM">3</field></shadow></value></block></value> 
                                      <next><block type="controls_if" id="kGg5uFcR8[gxXgSzVl5n"><mutation elseif="3"></mutation>
                                          <value name="IF0"><block type="logic_compare" id="?nV9axQ.ztUS+?mvR:^v"><field name="OP">EQ</field>
                                              <value name="A"><block type="variables_get" id="eGQClh}yINaaminM]h@M"><field name="VAR">valZufall</field></block></value> 
                                              <value name="B"><block type="math_number" id="w)p6@Kl(M%rZZC2w[fk^"><field name="NUM">1</field></block></value></block></value> 
                                          <statement name="DO0"><block type="procedures_callnoreturn" id="K0BT]GJP:#6Le6RdwqF8"><mutation name="ZufallEins"></mutation></block></statement> 
                                          <value name="IF1"><block type="logic_compare" id="M0[QB+35R8YTEh=5Xge*"><field name="OP">EQ</field>
                                              <value name="A"><block type="variables_get" id="(tpMntf[RTlhk6nXF#Xk"><field name="VAR">valZufall</field></block></value> 
                                              <value name="B"><block type="math_number" id="Nc.|J~M;eYEIWS|Q!J;l"><field name="NUM">2</field></block></value></block></value> 
                                          <statement name="DO1"><block type="procedures_callnoreturn" id="W87g2nl8jprwJXB]J[hw"><mutation name="ZufallZwei"></mutation></block></statement> 
                                          <value name="IF2"><block type="logic_compare" id="g*j}gnPUy#/5aHdoBnr@"><field name="OP">EQ</field>
                                              <value name="A"><block type="variables_get" id="leS?FhGaeYN^U_eW=UC@"><field name="VAR">valZufall</field></block></value> 
                                              <value name="B"><block type="math_number" id="L+jsa(J@;}6M8Rr%a}Yd"><field name="NUM">3</field></block></value></block></value> 
                                          <statement name="DO2"><block type="procedures_callnoreturn" id="{;AN3#fKQQ0kBms}=oDy"><mutation name="ZufallDrei"></mutation></block></statement> 
                                          <value name="IF3"><block type="logic_compare" id="Kula=B]?Qm,8|hl@Lfw9"><field name="OP">EQ</field>
                                              <value name="A"><block type="variables_get" id=".Jh!eEfh;x(*4U6_axex"><field name="VAR">valZufall</field></block></value> 
                                              <value name="B"><block type="math_number" id="wO2~:2csDCrDbtSo]847"><field name="NUM">4</field></block></value></block></value> 
                                          <statement name="DO3"><block type="procedures_callnoreturn" id="@/vd7WZAX_Z^jPucS.%+"><mutation name="ZufallVier"></mutation></block></statement></block></next></block></statement></block></statement></block> 
                            <block type="procedures_defnoreturn" id="j6lr*@jITsr]ms8yhUh0" x="537" y="-13"><field name="NAME">ZufallZwei</field>
                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                              <statement name="STACK"><block type="debug" id="Yj?[d2mz/jUbw6B@}i^w"><field name="Severity">log</field>
                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                    <block type="variables_get" id=")6F1e[,wecN:0#OxtHo5"><field name="VAR">valZufall</field></block></value> 
                                  <next><block type="comment" id="(K~gPu|WTF3rn%_]Wu|p"><field name="COMMENT">Schalte etwas ein</field>
                                      <next><block type="control" id="hF)HlaS*VSz}`sd3u(K*"><mutation delay_input="false"></mutation>
                                          <field name="OID">rflink.0.channels.TriState_1.SWITCH_0</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE"><block type="logic_boolean" id="VEqZzRpfd`LSx-UGb(Yp"><field name="BOOL">TRUE</field></block></value> 
                                          <next><block type="variables_set" id="{(kXy~N;Z`.QRt}v*r3I"><field name="VAR">TimerAktiv2</field>
                                              <value name="VALUE"><block type="logic_boolean" id="G6@Xxm=)a-dD[j{I=Yfv"><field name="BOOL">TRUE</field></block></value> 
                                              <next><block type="timeouts_settimeout" id="xefMj,DIwtkW*2@Phw1Q"><field name="NAME">timeout2</field>
                                                  <field name="DELAY">3</field>
                                                  <field name="UNIT">min</field>
                                                  <statement name="STATEMENT"><block type="comment" id="A[?425Oyazos+*y8;Y2:"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                      <next><block type="control" id=")u;,dqM7ph}ThmI^d%]_"><mutation delay_input="false"></mutation>
                                                          <field name="OID">rflink.0.channels.TriState_1.SWITCH_0</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="Vk8^EBNG^g8LdOV)VAEU"><field name="BOOL">FALSE</field></block></value> 
                                                          <next><block type="variables_set" id="W,)iWjtj;*J1`9I8rbs8"><field name="VAR">TimerAktiv2</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="P=PZWs~Sdnb/7A_g1IMp"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> 
                            <block type="procedures_defnoreturn" id=",%sXx)neL(hBuOH~l%%9" x="538" y="313"><field name="NAME">ZufallDrei</field>
                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                              <statement name="STACK"><block type="debug" id="k}),=oVBLM[qL:1,0K=%"><field name="Severity">log</field>
                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                    <block type="variables_get" id="zY3NJB^6bk2C?gA/]Qa9"><field name="VAR">valZufall</field></block></value> 
                                  <next><block type="comment" id="|;jKXPh/w,O.!TE~)5y6"><field name="COMMENT">Schalte etwas ein</field>
                                      <next><block type="control" id="m4+CXk,T|or#|aW{.i+T"><mutation delay_input="false"></mutation>
                                          <field name="OID">hm-rpc.0.LEQ0494524.1.STATE</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE"><block type="logic_boolean" id="Q(S#(BE#-.9p9oL,hK5N"><field name="BOOL">TRUE</field></block></value> 
                                          <next><block type="variables_set" id="WDYnD=%[7`Ot3b94P*cl"><field name="VAR">TimerAktiv3</field>
                                              <value name="VALUE"><block type="logic_boolean" id="m{t-glCB~U:?~U6VhWvj"><field name="BOOL">TRUE</field></block></value> 
                                              <next><block type="timeouts_settimeout" id="TX2ufws`26#AES|*Hmty"><field name="NAME">timeout3</field>
                                                  <field name="DELAY">2</field>
                                                  <field name="UNIT">min</field>
                                                  <statement name="STATEMENT"><block type="comment" id=";6|h5I,9xy=NsXaK6Pv{"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                      <next><block type="control" id="!jhRkjpNWwMSGP@^rT2."><mutation delay_input="false"></mutation>
                                                          <field name="OID">hm-rpc.0.LEQ0494524.1.STATE</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="Ejqj;h))SCTnq(A_hjDJ"><field name="BOOL">FALSE</field></block></value> 
                                                          <next><block type="variables_set" id="q7GtkJVZ!-R+JVdai^K("><field name="VAR">TimerAktiv3</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="p!%n^3t8Q}JFG!y8~NPI"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> 
                            <block type="procedures_defnoreturn" id="Do%_Mz5D3j+7_(%A?wk/" disabled="true" x="-12" y="438"><field name="NAME">ZufallVier</field>
                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                              <statement name="STACK"><block type="debug" id="SddePCHNGEv*O5)[L!|L"><field name="Severity">log</field>
                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                    <block type="variables_get" id="UT4Hs.*B(lrwTl%wbB)k"><field name="VAR">valZufall</field></block></value> 
                                  <next><block type="comment" id="3YLO0h:c=8-gQE:yK^UE"><field name="COMMENT">Schalte etwas ein</field>
                                      <next><block type="control" id="3#h:eG@SGDYzq+.PR}-#"><mutation delay_input="false"></mutation>
                                          <field name="OID">rflink.0.channels.TriState_3.SWITCH_0</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE"><block type="logic_boolean" id=":fB4T3=1f;/p~BLGV0Gw"><field name="BOOL">TRUE</field></block></value> 
                                          <next><block type="variables_set" id="J@aYvxZPi`trWAlqpW25"><field name="VAR">TimerAktiv1</field>
                                              <value name="VALUE"><block type="logic_boolean" id="]`2SP#p@h51soMT{%i1q"><field name="BOOL">TRUE</field></block></value> 
                                              <next><block type="timeouts_settimeout" id="ggJ~{/7+?n-Rgwq7%#EQ"><field name="NAME">timeout4</field>
                                                  <field name="DELAY">5</field>
                                                  <field name="UNIT">min</field>
                                                  <statement name="STATEMENT"><block type="comment" id="%vHRMF@eG`;S!9BX6!V-"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                      <next><block type="control" id="R]o7o!C%.3q{`rFY}+=t"><mutation delay_input="false"></mutation>
                                                          <field name="OID">rflink.0.channels.TriState_3.SWITCH_0</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="jm^qvJMwt6Lfc)MQLuF,"><field name="BOOL">FALSE</field></block></value> 
                                                          <next><block type="variables_set" id="P+H2zSavaOy=W@s*t)u?"><field name="VAR">TimerAktiv1</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="%##r%nr.Eg/VQGyd{[6f"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> 
                            <block type="logic_compare" id="7oAh/Wmv*}k2Jb;t;V}U" disabled="true" x="-188" y="462"><field name="OP">NEQ</field>
                              <value name="A"><block type="variables_get" id="umU+ee~y5%..vm%CJy7~"><field name="VAR">TimerAktiv3</field></block></value> 
                              <value name="B"><block type="logic_boolean" id="oA*;4q5PIsP+{LTQ8w7w"><field name="BOOL">TRUE</field></block></value></block></xml> 
                          
                          1 Antwort Letzte Antwort
                          0
                          • rantanplanR Online
                            rantanplanR Online
                            rantanplan
                            schrieb am zuletzt editiert von
                            #24

                            Ganz schön faul ;)

                            Habe noch einen Datenpunkt hinzugefügt "SimulationAktiv".

                            Wenn Du das Script einmal startest wird der Datenpunkt unter "javascript.0" angelegt.

                            Den kannst Du dann über VIS wahr/unwahr schalten.

                            Sonst werden Deine Geräte IMMER alle 2 Minuten geschaltet.

                            Wenn Du weitere "Zufälle" hinzufügst, musst Du auch die Generierung der Zufallszahl anpassen.

                            Wenn Du das zwischen 1 und 3 lässt, wird 4 NIE ausgeführt.

                            Habe ich noch NICHT angepasst. Ein bisschen kannst Du ja auch noch machen :)

                            ! <xml xmlns="http://www.w3.org/1999/xhtml"><block type="procedures_defnoreturn" id="]aih=G55?HS]7lpb*vSc" x="613" y="-337"><field name="NAME">ZufallEins</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="debug" id="m(8lX4`Y:**J%J^9ti)M"><field name="Severity">log</field> <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> <block type="variables_get" id="y1Q1BFtS+I+?X!T;vdJ|"><field name="VAR">valZufall</field></block></value> <next><block type="comment" id="UD8iI_FNE6Pa0}07og*["><field name="COMMENT">Schalte etwas ein</field> <next><block type="control" id="ED=cN8;vC^#@G{/Ar}X9"><mutation delay_input="false"></mutation> <field name="OID">rflink.0.channels.TriState_2.SWITCH_0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="QbwuRS!E)91vs04SFhcx"><field name="BOOL">TRUE</field></block></value> <next><block type="variables_set" id="gc%||Eu?4a-GR[lV#V+9"><field name="VAR">TimerAktiv1</field> <value name="VALUE"><block type="logic_boolean" id=".f:;9;bHuW@Q8uTIM7cx"><field name="BOOL">TRUE</field></block></value> <next><block type="timeouts_settimeout" id="KUky=Au9Hf42KvR*saZi"><field name="NAME">timeout</field> <field name="DELAY">4</field> <field name="UNIT">min</field> <statement name="STATEMENT"><block type="comment" id="!/W#E)^phCi/#d:rZ11M"><field name="COMMENT">Schalte etwas wieder aus</field> <next><block type="control" id="J97f}9hq6rb2=*.3;mt5"><mutation delay_input="false"></mutation> <field name="OID">rflink.0.channels.TriState_2.SWITCH_0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="!~cb-+ln/td1zDut0#O!"><field name="BOOL">FALSE</field></block></value> <next><block type="variables_set" id="45qLb@}f0E5vBYwGUs,H"><field name="VAR">TimerAktiv1</field> <value name="VALUE"><block type="logic_boolean" id="M69l1/uK.(zT^%3mbA|@"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> <block type="create" id="luNmgal2UD@aFdYv,`C`" x="-187" y="-238"><field name="NAME">SimulationAktiv</field> <next><block type="update" id="hA:I]9Ku^t7[x@{7Qi3m"><mutation delay_input="false"></mutation> <field name="OID">javascript.0.SimulationAktiv</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="oIQ|l4%)dx}A]mI[f:k["><field name="BOOL">FALSE</field></block></value></block></next></block> <block type="schedule" id="#q]X?XA6,T#oVG0~p2-k" x="-187" y="-113"><field name="SCHEDULE">*/2 * * * *</field> <statement name="STATEMENT"><block type="controls_if" id="~;[H.[R{e=dWR0!iB2:B"><value name="IF0"><block type="logic_compare" id="u~,(kd8d}xP0WqN1aPwD"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="IDX9-iJ,hn%9WZ7ocwn_"><field name="ATTR">val</field> <field name="OID">javascript.0.SimulationAktiv</field></block></value> <value name="B"><block type="logic_boolean" id="gAU:(7O6x#^1YPjw#.%]"><field name="BOOL">TRUE</field></block></value></block></value> <statement name="DO0"><block type="variables_set" id="}.-BM_s!1lz.V*hvU@AY"><field name="VAR">valZufall</field> <value name="VALUE"><block type="math_random_int" id="3Q/HHpL~EpbBr^HE~1df"><value name="FROM"><shadow type="math_number" id="A.LJ5W.UeB`qK(Tl2GvZ"><field name="NUM">1</field></shadow></value> <value name="TO"><shadow type="math_number" id="T{/dDJqQ1%YlMESV9(Nv"><field name="NUM">3</field></shadow></value></block></value> <next><block type="controls_if" id="kGg5uFcR8[gxXgSzVl5n"><mutation elseif="3"></mutation> <value name="IF0"><block type="logic_operation" id="xjiFi#7YQNI7]`z,33Mu"><field name="OP">AND</field> <value name="A"><block type="logic_compare" id="?nV9axQ.ztUS+?mvR:^v"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="eGQClh}yINaaminM]h@M"><field name="VAR">valZufall</field></block></value> <value name="B"><block type="math_number" id="w)p6@Kl(M%rZZC2w[fk^"><field name="NUM">1</field></block></value></block></value> <value name="B"><block type="logic_compare" id="NzT3W6+2/WT;2uey(k24"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="d71W,pX%p`J72;8{kfdS"><field name="VAR">TimerAktiv1</field></block></value> <value name="B"><block type="logic_boolean" id="(%,AB0sDN!#y4ic_{VjS"><field name="BOOL">FALSE</field></block></value></block></value></block></value> <statement name="DO0"><block type="procedures_callnoreturn" id="K0BT]GJP:#6Le6RdwqF8"><mutation name="ZufallEins"></mutation></block></statement> <value name="IF1"><block type="logic_operation" id="3I.%g:o.nI/5~#DJ.hzt"><field name="OP">AND</field> <value name="A"><block type="logic_compare" id="M0[QB+35R8YTEh=5Xge*"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="(tpMntf[RTlhk6nXF#Xk"><field name="VAR">valZufall</field></block></value> <value name="B"><block type="math_number" id="Nc.|J~M;eYEIWS|Q!J;l"><field name="NUM">2</field></block></value></block></value> <value name="B"><block type="logic_compare" id=")hk;+S;aGF4(LrZFiBGg"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="2lHQKNO*mK.%;jMHNz,R"><field name="VAR">TimerAktiv2</field></block></value> <value name="B"><block type="logic_boolean" id="*5::xUcUsAP(GD7FbIP7"><field name="BOOL">FALSE</field></block></value></block></value></block></value> <statement name="DO1"><block type="procedures_callnoreturn" id="W87g2nl8jprwJXB]J[hw"><mutation name="ZufallZwei"></mutation></block></statement> <value name="IF2"><block type="logic_operation" id="gKdCsn^p71oA=GfsuDQF"><field name="OP">AND</field> <value name="A"><block type="logic_compare" id="g*j}gnPUy#/5aHdoBnr@"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="leS?FhGaeYN^U_eW=UC@"><field name="VAR">valZufall</field></block></value> <value name="B"><block type="math_number" id="L+jsa(J@;}6M8Rr%a}Yd"><field name="NUM">3</field></block></value></block></value> <value name="B"><block type="logic_compare" id="V.0UinW/HOMtzsSO~vfn"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="eAK,rKQ|x[!;:KUE3;Tq"><field name="VAR">TimerAktiv3</field></block></value> <value name="B"><block type="logic_boolean" id="Fc6Bpci,#--yqGe0==Jt"><field name="BOOL">FALSE</field></block></value></block></value></block></value> <statement name="DO2"><block type="procedures_callnoreturn" id="{;AN3#fKQQ0kBms}=oDy"><mutation name="ZufallDrei"></mutation></block></statement> <value name="IF3"><block type="logic_compare" id="Kula=B]?Qm,8|hl@Lfw9"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id=".Jh!eEfh;x(*4U6_axex"><field name="VAR">valZufall</field></block></value> <value name="B"><block type="math_number" id="wO2~:2csDCrDbtSo]847"><field name="NUM">4</field></block></value></block></value> <statement name="DO3"><block type="procedures_callnoreturn" id="@/vd7WZAX_Z^jPucS.%+"><mutation name="ZufallVier"></mutation></block></statement></block></next></block></statement></block></statement></block> <block type="procedures_defnoreturn" id="j6lr*@jITsr]ms8yhUh0" x="613" y="-12"><field name="NAME">ZufallZwei</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="debug" id="Yj?[d2mz/jUbw6B@}i^w"><field name="Severity">log</field> <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> <block type="variables_get" id=")6F1e[,wecN:0#OxtHo5"><field name="VAR">valZufall</field></block></value> <next><block type="comment" id="(K~gPu|WTF3rn%_]Wu|p"><field name="COMMENT">Schalte etwas ein</field> <next><block type="control" id="hF)HlaS*VSz}`sd3u(K*"><mutation delay_input="false"></mutation> <field name="OID">rflink.0.channels.TriState_1.SWITCH_0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="VEqZzRpfd`LSx-UGb(Yp"><field name="BOOL">TRUE</field></block></value> <next><block type="variables_set" id="{(kXy~N;Z`.QRt}v*r3I"><field name="VAR">TimerAktiv2</field> <value name="VALUE"><block type="logic_boolean" id="G6@Xxm=)a-dD[j{I=Yfv"><field name="BOOL">TRUE</field></block></value> <next><block type="timeouts_settimeout" id="xefMj,DIwtkW*2@Phw1Q"><field name="NAME">timeout2</field> <field name="DELAY">3</field> <field name="UNIT">min</field> <statement name="STATEMENT"><block type="comment" id="A[?425Oyazos+*y8;Y2:"><field name="COMMENT">Schalte etwas wieder aus</field> <next><block type="control" id=")u;,dqM7ph}ThmI^d%]_"><mutation delay_input="false"></mutation> <field name="OID">rflink.0.channels.TriState_1.SWITCH_0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="Vk8^EBNG^g8LdOV)VAEU"><field name="BOOL">FALSE</field></block></value> <next><block type="variables_set" id="W,)iWjtj;*J1`9I8rbs8"><field name="VAR">TimerAktiv2</field> <value name="VALUE"><block type="logic_boolean" id="P=PZWs~Sdnb/7A_g1IMp"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> <block type="procedures_defnoreturn" id=",%sXx)neL(hBuOH~l%%9" x="638" y="313"><field name="NAME">ZufallDrei</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="debug" id="k}),=oVBLM[qL:1,0K=%"><field name="Severity">log</field> <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> <block type="variables_get" id="zY3NJB^6bk2C?gA/]Qa9"><field name="VAR">valZufall</field></block></value> <next><block type="comment" id="|;jKXPh/w,O.!TE~)5y6"><field name="COMMENT">Schalte etwas ein</field> <next><block type="control" id="m4+CXk,T|or#|aW{.i+T"><mutation delay_input="false"></mutation> <field name="OID">hm-rpc.0.LEQ0494524.1.STATE</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="Q(S#(BE#-.9p9oL,hK5N"><field name="BOOL">TRUE</field></block></value> <next><block type="variables_set" id="WDYnD=%[7`Ot3b94P*cl"><field name="VAR">TimerAktiv3</field> <value name="VALUE"><block type="logic_boolean" id="m{t-glCB~U:?~U6VhWvj"><field name="BOOL">TRUE</field></block></value> <next><block type="timeouts_settimeout" id="TX2ufws`26#AES|*Hmty"><field name="NAME">timeout3</field> <field name="DELAY">2</field> <field name="UNIT">min</field> <statement name="STATEMENT"><block type="comment" id=";6|h5I,9xy=NsXaK6Pv{"><field name="COMMENT">Schalte etwas wieder aus</field> <next><block type="control" id="!jhRkjpNWwMSGP@^rT2."><mutation delay_input="false"></mutation> <field name="OID">hm-rpc.0.LEQ0494524.1.STATE</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="Ejqj;h))SCTnq(A_hjDJ"><field name="BOOL">FALSE</field></block></value> <next><block type="variables_set" id="q7GtkJVZ!-R+JVdai^K("><field name="VAR">TimerAktiv3</field> <value name="VALUE"><block type="logic_boolean" id="p!%n^3t8Q}JFG!y8~NPI"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> <block type="procedures_defnoreturn" id="Do%_Mz5D3j+7_(%A?wk/" disabled="true" x="-12" y="438"><field name="NAME">ZufallVier</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="debug" id="SddePCHNGEv*O5)[L!|L"><field name="Severity">log</field> <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> <block type="variables_get" id="UT4Hs.*B(lrwTl%wbB)k"><field name="VAR">valZufall</field></block></value> <next><block type="comment" id="3YLO0h:c=8-gQE:yK^UE"><field name="COMMENT">Schalte etwas ein</field> <next><block type="control" id="3#h:eG@SGDYzq+.PR}-#"><mutation delay_input="false"></mutation> <field name="OID">rflink.0.channels.TriState_3.SWITCH_0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id=":fB4T3=1f;/p~BLGV0Gw"><field name="BOOL">TRUE</field></block></value> <next><block type="variables_set" id="J@aYvxZPi`trWAlqpW25"><field name="VAR">TimerAktiv1</field> <value name="VALUE"><block type="logic_boolean" id="]`2SP#p@h51soMT{%i1q"><field name="BOOL">TRUE</field></block></value> <next><block type="timeouts_settimeout" id="ggJ~{/7+?n-Rgwq7%#EQ"><field name="NAME">timeout4</field> <field name="DELAY">5</field> <field name="UNIT">min</field> <statement name="STATEMENT"><block type="comment" id="%vHRMF@eG`;S!9BX6!V-"><field name="COMMENT">Schalte etwas wieder aus</field> <next><block type="control" id="R]o7o!C%.3q{`rFY}+=t"><mutation delay_input="false"></mutation> <field name="OID">rflink.0.channels.TriState_3.SWITCH_0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="jm^qvJMwt6Lfc)MQLuF,"><field name="BOOL">FALSE</field></block></value> <next><block type="variables_set" id="P+H2zSavaOy=W@s*t)u?"><field name="VAR">TimerAktiv1</field> <value name="VALUE"><block type="logic_boolean" id="%##r%nr.Eg/VQGyd{[6f"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> <block type="logic_compare" id="7oAh/Wmv*}k2Jb;t;V}U" disabled="true" x="-188" y="462"><field name="OP">NEQ</field> <value name="A"><block type="variables_get" id="umU+ee~y5%..vm%CJy7~"><field name="VAR">TimerAktiv3</field></block></value> <value name="B"><block type="logic_boolean" id="oA*;4q5PIsP+{LTQ8w7w"><field name="BOOL">TRUE</field></block></value></block></xml> !

                            Rantanplan

                            CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                            1 Antwort Letzte Antwort
                            0
                            • B Offline
                              B Offline
                              Belei
                              schrieb am zuletzt editiert von
                              #25

                              Vielen Dank werde mich morgen damit mal beschäftigen.

                              Ja den 4rten bekomme ich alleine fertig ;)

                              Den Zustand erzeugen und aktualisieren läst man dan drin im Script?

                              1 Antwort Letzte Antwort
                              0
                              • rantanplanR Online
                                rantanplanR Online
                                rantanplan
                                schrieb am zuletzt editiert von
                                #26

                                @Belei:

                                Den Zustand erzeugen und aktualisieren läst man dan drin im Script? `

                                Ein angelegter Datenpunkt wird nicht doppelt angelegt. Kann raus, muss aber nicht.

                                Aktualisieren wird nur beim Scriptstart ausgeführt. Datenpunkt wird also beim Start immer auf unwahr gesetzt.

                                Wenn Du das nicht möchtest, raus damit.

                                Rantanplan

                                CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                                1 Antwort Letzte Antwort
                                0
                                • B Offline
                                  B Offline
                                  Belei
                                  schrieb am zuletzt editiert von
                                  #27

                                  Guten Morgen,

                                  ich habe den Punkt Simulation auf True gesetzt und den Script gestartet.

                                  Mehr als das hier passiert leider nicht?
                                  ` > 09:33:23.691 [info] javascript.0 Start javascript script.js.Test.Skript1

                                  09:33:23.691 [info] javascript.0 script.js.Test.Skript1: schedule(cron=*/2 * * * *)

                                  09:33:23.692 [info] javascript.0 script.js.Test.Skript1: registered 0 subscriptions and 1 schedule

                                  09:34:00.689 [info] javascript.0 script.js.Test.Skript1: getState(id=javascript.0.SimulationAktiv, timerId=19) => {"val":true,"ack":true,"ts":1538724345666,"q":0,"from":"system.adapter.admin.0","lc":1538724050714}

                                  09:36:00.687 [info] javascript.0 script.js.Test.Skript1: getState(id=javascript.0.SimulationAktiv, timerId=19) => {"val":true,"ack":true,"ts":1538724345666,"q":0,"from":"system.adapter.admin.0","lc":1538724050714 `

                                  1 Antwort Letzte Antwort
                                  0
                                  • rantanplanR Online
                                    rantanplanR Online
                                    rantanplan
                                    schrieb am zuletzt editiert von
                                    #28

                                    @Belei:

                                    ich habe den Punkt Simulation auf True gesetzt und den Script gestartet. `

                                    Und das "aktualisiere auf unwahr" beim Script-Start raus genommen?

                                    Wenn nicht, ist sehr kontraproduktiv den Datenpunkt auf "wahr" zu setzen und danach das Script zu starten.

                                    Rantanplan

                                    CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                                    1 Antwort Letzte Antwort
                                    0
                                    • B Offline
                                      B Offline
                                      Belei
                                      schrieb am zuletzt editiert von
                                      #29

                                      Nein den Teil hab ich deaktiviert.

                                      1 Antwort Letzte Antwort
                                      0
                                      • rantanplanR Online
                                        rantanplanR Online
                                        rantanplan
                                        schrieb am zuletzt editiert von
                                        #30

                                        Hmm, zeig mal Dein aktuelles Blockly. (Export)

                                        Rantanplan

                                        CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                                        1 Antwort Letzte Antwort
                                        0
                                        • B Offline
                                          B Offline
                                          Belei
                                          schrieb am zuletzt editiert von
                                          #31
                                           <xml xmlns="http://www.w3.org/1999/xhtml"><block type="procedures_defnoreturn" id="]aih=G55?HS]7lpb*vSc" x="613" y="-337"><field name="NAME">ZufallEins</field>
                                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                              <statement name="STACK"><block type="debug" id="m(8lX4`Y:**J%J^9ti)M"><field name="Severity">log</field>
                                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                                    <block type="variables_get" id="y1Q1BFtS+I+?X!T;vdJ|"><field name="VAR">valZufall</field></block></value> 
                                                  <next><block type="comment" id="UD8iI_FNE6Pa0}07og*["><field name="COMMENT">Schalte etwas ein</field>
                                                      <next><block type="control" id="ED=cN8;vC^#@G{/Ar}X9"><mutation delay_input="false"></mutation>
                                                          <field name="OID">rflink.0.channels.TriState_2.SWITCH_0</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="QbwuRS!E)91vs04SFhcx"><field name="BOOL">TRUE</field></block></value> 
                                                          <next><block type="variables_set" id="gc%||Eu?4a-GR[lV#V+9"><field name="VAR">TimerAktiv1</field>
                                                              <value name="VALUE"><block type="logic_boolean" id=".f:;9;bHuW@Q8uTIM7cx"><field name="BOOL">TRUE</field></block></value> 
                                                              <next><block type="timeouts_settimeout" id="KUky=Au9Hf42KvR*saZi"><field name="NAME">timeout</field>
                                                                  <field name="DELAY">4</field>
                                                                  <field name="UNIT">min</field>
                                                                  <statement name="STATEMENT"><block type="comment" id="!/W#E)^phCi/#d:rZ11M"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                                      <next><block type="control" id="J97f}9hq6rb2=*.3;mt5"><mutation delay_input="false"></mutation>
                                                                          <field name="OID">rflink.0.channels.TriState_2.SWITCH_0</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE"><block type="logic_boolean" id="!~cb-+ln/td1zDut0#O!"><field name="BOOL">FALSE</field></block></value> 
                                                                          <next><block type="variables_set" id="45qLb@}f0E5vBYwGUs,H"><field name="VAR">TimerAktiv1</field>
                                                                              <value name="VALUE"><block type="logic_boolean" id="M69l1/uK.(zT^%3mbA|@"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> 
                                            <block type="create" id="luNmgal2UD@aFdYv,`C`" disabled="true" x="-187" y="-238"><field name="NAME">SimulationAktiv</field>
                                              <next><block type="update" id="hA:I]9Ku^t7[x@{7Qi3m" disabled="true"><mutation delay_input="false"></mutation>
                                                  <field name="OID">javascript.0.SimulationAktiv</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE"><block type="logic_boolean" id="oIQ|l4%)dx}A]mI[f:k["><field name="BOOL">FALSE</field></block></value></block></next></block> 
                                            <block type="schedule" id="#q]X?XA6,T#oVG0~p2-k" x="-187" y="-113"><field name="SCHEDULE">*/2 * * * *</field>
                                              <statement name="STATEMENT"><block type="controls_if" id="~;[H.[R{e=dWR0!iB2:B"><value name="IF0"><block type="logic_compare" id="u~,(kd8d}xP0WqN1aPwD"><field name="OP">EQ</field>
                                                      <value name="A"><block type="get_value" id="IDX9-iJ,hn%9WZ7ocwn_"><field name="ATTR">val</field>
                                                          <field name="OID">javascript.0.SimulationAktiv</field></block></value> 
                                                      <value name="B"><block type="logic_boolean" id="gAU:(7O6x#^1YPjw#.%]"><field name="BOOL">TRUE</field></block></value></block></value> 
                                                  <statement name="DO0"><block type="variables_set" id="}.-BM_s!1lz.V*hvU@AY"><field name="VAR">valZufall</field>
                                                      <value name="VALUE"><block type="math_random_int" id="3Q/HHpL~EpbBr^HE~1df"><value name="FROM"><shadow type="math_number" id="A.LJ5W.UeB`qK(Tl2GvZ"><field name="NUM">1</field></shadow></value> 
                                                          <value name="TO"><shadow type="math_number" id="T{/dDJqQ1%YlMESV9(Nv"><field name="NUM">3</field></shadow></value></block></value> 
                                                      <next><block type="controls_if" id="kGg5uFcR8[gxXgSzVl5n"><mutation elseif="3"></mutation>
                                                          <value name="IF0"><block type="logic_operation" id="xjiFi#7YQNI7]`z,33Mu"><field name="OP">AND</field>
                                                              <value name="A"><block type="logic_compare" id="?nV9axQ.ztUS+?mvR:^v"><field name="OP">EQ</field>
                                                                  <value name="A"><block type="variables_get" id="eGQClh}yINaaminM]h@M"><field name="VAR">valZufall</field></block></value> 
                                                                  <value name="B"><block type="math_number" id="w)p6@Kl(M%rZZC2w[fk^"><field name="NUM">1</field></block></value></block></value> 
                                                              <value name="B"><block type="logic_compare" id="NzT3W6+2/WT;2uey(k24"><field name="OP">EQ</field>
                                                                  <value name="A"><block type="variables_get" id="d71W,pX%p`J72;8{kfdS"><field name="VAR">TimerAktiv1</field></block></value> 
                                                                  <value name="B"><block type="logic_boolean" id="(%,AB0sDN!#y4ic_{VjS"><field name="BOOL">FALSE</field></block></value></block></value></block></value> 
                                                          <statement name="DO0"><block type="procedures_callnoreturn" id="K0BT]GJP:#6Le6RdwqF8"><mutation name="ZufallEins"></mutation></block></statement> 
                                                          <value name="IF1"><block type="logic_operation" id="3I.%g:o.nI/5~#DJ.hzt"><field name="OP">AND</field>
                                                              <value name="A"><block type="logic_compare" id="M0[QB+35R8YTEh=5Xge*"><field name="OP">EQ</field>
                                                                  <value name="A"><block type="variables_get" id="(tpMntf[RTlhk6nXF#Xk"><field name="VAR">valZufall</field></block></value> 
                                                                  <value name="B"><block type="math_number" id="Nc.|J~M;eYEIWS|Q!J;l"><field name="NUM">2</field></block></value></block></value> 
                                                              <value name="B"><block type="logic_compare" id=")hk;+S;aGF4(LrZFiBGg"><field name="OP">EQ</field>
                                                                  <value name="A"><block type="variables_get" id="2lHQKNO*mK.%;jMHNz,R"><field name="VAR">TimerAktiv2</field></block></value> 
                                                                  <value name="B"><block type="logic_boolean" id="*5::xUcUsAP(GD7FbIP7"><field name="BOOL">FALSE</field></block></value></block></value></block></value> 
                                                          <statement name="DO1"><block type="procedures_callnoreturn" id="W87g2nl8jprwJXB]J[hw"><mutation name="ZufallZwei"></mutation></block></statement> 
                                                          <value name="IF2"><block type="logic_operation" id="gKdCsn^p71oA=GfsuDQF"><field name="OP">AND</field>
                                                              <value name="A"><block type="logic_compare" id="g*j}gnPUy#/5aHdoBnr@"><field name="OP">EQ</field>
                                                                  <value name="A"><block type="variables_get" id="leS?FhGaeYN^U_eW=UC@"><field name="VAR">valZufall</field></block></value> 
                                                                  <value name="B"><block type="math_number" id="L+jsa(J@;}6M8Rr%a}Yd"><field name="NUM">3</field></block></value></block></value> 
                                                              <value name="B"><block type="logic_compare" id="V.0UinW/HOMtzsSO~vfn"><field name="OP">EQ</field>
                                                                  <value name="A"><block type="variables_get" id="eAK,rKQ|x[!;:KUE3;Tq"><field name="VAR">TimerAktiv3</field></block></value> 
                                                                  <value name="B"><block type="logic_boolean" id="Fc6Bpci,#--yqGe0==Jt"><field name="BOOL">FALSE</field></block></value></block></value></block></value> 
                                                          <statement name="DO2"><block type="procedures_callnoreturn" id="{;AN3#fKQQ0kBms}=oDy"><mutation name="ZufallDrei"></mutation></block></statement> 
                                                          <value name="IF3"><block type="logic_compare" id="Kula=B]?Qm,8|hl@Lfw9"><field name="OP">EQ</field>
                                                              <value name="A"><block type="variables_get" id=".Jh!eEfh;x(*4U6_axex"><field name="VAR">valZufall</field></block></value> 
                                                              <value name="B"><block type="math_number" id="wO2~:2csDCrDbtSo]847"><field name="NUM">4</field></block></value></block></value> 
                                                          <statement name="DO3"><block type="procedures_callnoreturn" id="@/vd7WZAX_Z^jPucS.%+"><mutation name="ZufallVier"></mutation></block></statement></block></next></block></statement></block></statement></block> 
                                            <block type="procedures_defnoreturn" id="j6lr*@jITsr]ms8yhUh0" x="613" y="-12"><field name="NAME">ZufallZwei</field>
                                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                              <statement name="STACK"><block type="debug" id="Yj?[d2mz/jUbw6B@}i^w"><field name="Severity">log</field>
                                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                                    <block type="variables_get" id=")6F1e[,wecN:0#OxtHo5"><field name="VAR">valZufall</field></block></value> 
                                                  <next><block type="comment" id="(K~gPu|WTF3rn%_]Wu|p"><field name="COMMENT">Schalte etwas ein</field>
                                                      <next><block type="control" id="hF)HlaS*VSz}`sd3u(K*"><mutation delay_input="false"></mutation>
                                                          <field name="OID">rflink.0.channels.TriState_1.SWITCH_0</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="VEqZzRpfd`LSx-UGb(Yp"><field name="BOOL">TRUE</field></block></value> 
                                                          <next><block type="variables_set" id="{(kXy~N;Z`.QRt}v*r3I"><field name="VAR">TimerAktiv2</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="G6@Xxm=)a-dD[j{I=Yfv"><field name="BOOL">TRUE</field></block></value> 
                                                              <next><block type="timeouts_settimeout" id="xefMj,DIwtkW*2@Phw1Q"><field name="NAME">timeout2</field>
                                                                  <field name="DELAY">3</field>
                                                                  <field name="UNIT">min</field>
                                                                  <statement name="STATEMENT"><block type="comment" id="A[?425Oyazos+*y8;Y2:"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                                      <next><block type="control" id=")u;,dqM7ph}ThmI^d%]_"><mutation delay_input="false"></mutation>
                                                                          <field name="OID">rflink.0.channels.TriState_1.SWITCH_0</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE"><block type="logic_boolean" id="Vk8^EBNG^g8LdOV)VAEU"><field name="BOOL">FALSE</field></block></value> 
                                                                          <next><block type="variables_set" id="W,)iWjtj;*J1`9I8rbs8"><field name="VAR">TimerAktiv2</field>
                                                                              <value name="VALUE"><block type="logic_boolean" id="P=PZWs~Sdnb/7A_g1IMp"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> 
                                            <block type="procedures_defnoreturn" id=",%sXx)neL(hBuOH~l%%9" x="638" y="313"><field name="NAME">ZufallDrei</field>
                                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                              <statement name="STACK"><block type="debug" id="k}),=oVBLM[qL:1,0K=%"><field name="Severity">log</field>
                                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                                    <block type="variables_get" id="zY3NJB^6bk2C?gA/]Qa9"><field name="VAR">valZufall</field></block></value> 
                                                  <next><block type="comment" id="|;jKXPh/w,O.!TE~)5y6"><field name="COMMENT">Schalte etwas ein</field>
                                                      <next><block type="control" id="m4+CXk,T|or#|aW{.i+T"><mutation delay_input="false"></mutation>
                                                          <field name="OID">hm-rpc.0.LEQ0494524.1.STATE</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id="Q(S#(BE#-.9p9oL,hK5N"><field name="BOOL">TRUE</field></block></value> 
                                                          <next><block type="variables_set" id="WDYnD=%[7`Ot3b94P*cl"><field name="VAR">TimerAktiv3</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="m{t-glCB~U:?~U6VhWvj"><field name="BOOL">TRUE</field></block></value> 
                                                              <next><block type="timeouts_settimeout" id="TX2ufws`26#AES|*Hmty"><field name="NAME">timeout3</field>
                                                                  <field name="DELAY">2</field>
                                                                  <field name="UNIT">min</field>
                                                                  <statement name="STATEMENT"><block type="comment" id=";6|h5I,9xy=NsXaK6Pv{"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                                      <next><block type="control" id="!jhRkjpNWwMSGP@^rT2."><mutation delay_input="false"></mutation>
                                                                          <field name="OID">hm-rpc.0.LEQ0494524.1.STATE</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE"><block type="logic_boolean" id="Ejqj;h))SCTnq(A_hjDJ"><field name="BOOL">FALSE</field></block></value> 
                                                                          <next><block type="variables_set" id="q7GtkJVZ!-R+JVdai^K("><field name="VAR">TimerAktiv3</field>
                                                                              <value name="VALUE"><block type="logic_boolean" id="p!%n^3t8Q}JFG!y8~NPI"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block> 
                                            <block type="procedures_defnoreturn" id="Do%_Mz5D3j+7_(%A?wk/" disabled="true" x="-12" y="438"><field name="NAME">ZufallVier</field>
                                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                              <statement name="STACK"><block type="debug" id="SddePCHNGEv*O5)[L!|L"><field name="Severity">log</field>
                                                  <value name="TEXT"><shadow type="text" id="`7k{/9%WdRZg%WaMby}Z"><field name="TEXT">5 Min</field></shadow> 
                                                    <block type="variables_get" id="UT4Hs.*B(lrwTl%wbB)k"><field name="VAR">valZufall</field></block></value> 
                                                  <next><block type="comment" id="3YLO0h:c=8-gQE:yK^UE"><field name="COMMENT">Schalte etwas ein</field>
                                                      <next><block type="control" id="3#h:eG@SGDYzq+.PR}-#"><mutation delay_input="false"></mutation>
                                                          <field name="OID">rflink.0.channels.TriState_3.SWITCH_0</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE"><block type="logic_boolean" id=":fB4T3=1f;/p~BLGV0Gw"><field name="BOOL">TRUE</field></block></value> 
                                                          <next><block type="variables_set" id="J@aYvxZPi`trWAlqpW25"><field name="VAR">TimerAktiv1</field>
                                                              <value name="VALUE"><block type="logic_boolean" id="]`2SP#p@h51soMT{%i1q"><field name="BOOL">TRUE</field></block></value> 
                                                              <next><block type="timeouts_settimeout" id="ggJ~{/7+?n-Rgwq7%#EQ"><field name="NAME">timeout4</field>
                                                                  <field name="DELAY">5</field>
                                                                  <field name="UNIT">min</field>
                                                                  <statement name="STATEMENT"><block type="comment" id="%vHRMF@eG`;S!9BX6!V-"><field name="COMMENT">Schalte etwas wieder aus</field>
                                                                      <next><block type="control" id="R]o7o!C%.3q{`rFY}+=t"><mutation delay_input="false"></mutation>
                                                                          <field name="OID">rflink.0.channels.TriState_3.SWITCH_0</field>
                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                          <value name="VALUE"><block type="logic_boolean" id="jm^qvJMwt6Lfc)MQLuF,"><field name="BOOL">FALSE</field></block></value> 
                                                                          <next><block type="variables_set" id="P+H2zSavaOy=W@s*t)u?"><field name="VAR">TimerAktiv1</field>
                                                                              <value name="VALUE"><block type="logic_boolean" id="%##r%nr.Eg/VQGyd{[6f"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block></xml> 
                                          
                                          1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          568

                                          Online

                                          32.7k

                                          Benutzer

                                          82.4k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe