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. Blockly
  5. Zufallstext wiedergeben

NEWS

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    10
    1
    196

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.5k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.4k

Zufallstext wiedergeben

Geplant Angeheftet Gesperrt Verschoben Blockly
5 Beiträge 4 Kommentatoren 803 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.
  • K Offline
    K Offline
    KhaosRipper
    schrieb am zuletzt editiert von
    #1

    Hallo Leute,

    ist es möglich mit Blockly auf einfache art und weise einen Zufallstext ausgeben zu lassen?

    z.B. Die Klingel wird betätigt und Alexa sagt "Es hat geklingelt" jetzt möchte ich dass nicht jedes mal "Es hat geklingelt" gesagt wird sondern aus mehreren Sätze per zufall einer ausgesucht wird.

    Hoffe Ihr versteht was ich meine. Ist sowas mit Blockly auf einfache art und weise zu lösen oder wird das komplizierterß

    Danke

    paul53P dslraserD Dr. BakteriusD 3 Antworten Letzte Antwort
    0
    • K KhaosRipper

      Hallo Leute,

      ist es möglich mit Blockly auf einfache art und weise einen Zufallstext ausgeben zu lassen?

      z.B. Die Klingel wird betätigt und Alexa sagt "Es hat geklingelt" jetzt möchte ich dass nicht jedes mal "Es hat geklingelt" gesagt wird sondern aus mehreren Sätze per zufall einer ausgesucht wird.

      Hoffe Ihr versteht was ich meine. Ist sowas mit Blockly auf einfache art und weise zu lösen oder wird das komplizierterß

      Danke

      paul53P Offline
      paul53P Offline
      paul53
      schrieb am zuletzt editiert von
      #2

      @KhaosRipper
      Prinzip:

      Blockly_temp.JPG

      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

      1 Antwort Letzte Antwort
      1
      • K KhaosRipper

        Hallo Leute,

        ist es möglich mit Blockly auf einfache art und weise einen Zufallstext ausgeben zu lassen?

        z.B. Die Klingel wird betätigt und Alexa sagt "Es hat geklingelt" jetzt möchte ich dass nicht jedes mal "Es hat geklingelt" gesagt wird sondern aus mehreren Sätze per zufall einer ausgesucht wird.

        Hoffe Ihr versteht was ich meine. Ist sowas mit Blockly auf einfache art und weise zu lösen oder wird das komplizierterß

        Danke

        dslraserD Offline
        dslraserD Offline
        dslraser
        Forum Testing Most Active
        schrieb am zuletzt editiert von dslraser
        #3

        @KhaosRipper

        Du hast ja schon von @paul53 das richtige bekommen.
        Da ich aber zeitgleich am raussuchen war und auch das Blockly gefunden habe, hier noch was ähnliches. Hier wird zufallsgeneriert Licht unterschiedlich lang geschaltet. Das Blockly habe ich auch hier irgendwo im Forum gefunden. Kann man ganz gut zur Anwesenheitssimmulation nutzen, oder eben für verschiedene Texte umbauen.

        Bildschirmfoto 2019-09-13 um 15.05.38.png

        <xml xmlns="http://www.w3.org/1999/xhtml">
         <variables>
           <variable type="" id="hzy54MUcB;q+eVDWN_g:">TimerAktiv1</variable>
           <variable type="" id="pTtoT34%;7XTFEuGLn/f">TimerAktiv2</variable>
           <variable type="" id="/iB)b``3}l_R=}}4=4A2">TimerAktiv3</variable>
           <variable type="undefined" id="timeout">timeout</variable>
           <variable type="undefined" id="timeout2">timeout2</variable>
           <variable type="" id=")^z0DLi;YgCH4QWO8A6.">valZufall</variable>
           <variable type="undefined" id="timeout3">timeout3</variable>
         </variables>
         <block type="procedures_defnoreturn" id="]aih=G55?HS]7lpb*vSc" x="13" y="13">
           <field name="NAME">ZufallEins</field>
           <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
           <statement name="STACK">
             <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">hue.0.HueBridge.Fernsehlampe_links.on</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" id="hzy54MUcB;q+eVDWN_g:" variabletype="">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">hue.0.HueBridge.Fernsehlampe_links.on</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" id="hzy54MUcB;q+eVDWN_g:" variabletype="">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>
           </statement>
         </block>
         <block type="procedures_defnoreturn" id="j6lr*@jITsr]ms8yhUh0" x="13" y="288">
           <field name="NAME">ZufallZwei</field>
           <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
           <statement name="STACK">
             <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">hue.0.HueBridge.Fernsehlampe_rechts.on</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" id="pTtoT34%;7XTFEuGLn/f" variabletype="">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">hue.0.HueBridge.Fernsehlampe_rechts.on</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" id="pTtoT34%;7XTFEuGLn/f" variabletype="">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>
           </statement>
         </block>
         <block type="procedures_defnoreturn" id=",%sXx)neL(hBuOH~l%%9" x="13" y="563">
           <field name="NAME">ZufallDrei</field>
           <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
           <statement name="STACK">
             <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">hue.0.HueBridge.Deckenlampe.on</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" id="/iB)b``3}l_R=}}4=4A2" variabletype="">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">hue.0.HueBridge.Deckenlampe.on</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" id="/iB)b``3}l_R=}}4=4A2" variabletype="">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>
           </statement>
         </block>
         <block type="variables_set" id="L=H_~o5VJkgoTi5YY.KE" x="13" y="838">
           <field name="VAR" id="hzy54MUcB;q+eVDWN_g:" variabletype="">TimerAktiv1</field>
           <value name="VALUE">
             <block type="logic_boolean" id="T64er+a{R[{{6+Z@@6!!">
               <field name="BOOL">FALSE</field>
             </block>
           </value>
           <next>
             <block type="variables_set" id="+Y.ZBubE:0,Z~~m#zd_i">
               <field name="VAR" id="pTtoT34%;7XTFEuGLn/f" variabletype="">TimerAktiv2</field>
               <value name="VALUE">
                 <block type="logic_boolean" id="s]|Rj?9}`jI*Cml4FQS(">
                   <field name="BOOL">FALSE</field>
                 </block>
               </value>
               <next>
                 <block type="variables_set" id="@;[d)Qzp=M.C#V9E2N,}">
                   <field name="VAR" id="/iB)b``3}l_R=}}4=4A2" variabletype="">TimerAktiv3</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="(ojjvgRwq=qEW~jHwy)n">
                       <field name="BOOL">FALSE</field>
                     </block>
                   </value>
                   <next>
                     <block type="schedule" id="#q]X?XA6,T#oVG0~p2-k">
                       <field name="SCHEDULE">*/2 * * * *</field>
                       <statement name="STATEMENT">
                         <block type="variables_set" id="}.-BM_s!1lz.V*hvU@AY">
                           <field name="VAR" id=")^z0DLi;YgCH4QWO8A6." variabletype="">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="2"></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" id=")^z0DLi;YgCH4QWO8A6." variabletype="">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" id="hzy54MUcB;q+eVDWN_g:" variabletype="">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" id=")^z0DLi;YgCH4QWO8A6." variabletype="">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" id="pTtoT34%;7XTFEuGLn/f" variabletype="">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" id=")^z0DLi;YgCH4QWO8A6." variabletype="">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" id="/iB)b``3}l_R=}}4=4A2" variabletype="">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>
                             </block>
                           </next>
                         </block>
                       </statement>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </next>
         </block>
        </xml>
        

        1 Antwort Letzte Antwort
        0
        • K KhaosRipper

          Hallo Leute,

          ist es möglich mit Blockly auf einfache art und weise einen Zufallstext ausgeben zu lassen?

          z.B. Die Klingel wird betätigt und Alexa sagt "Es hat geklingelt" jetzt möchte ich dass nicht jedes mal "Es hat geklingelt" gesagt wird sondern aus mehreren Sätze per zufall einer ausgesucht wird.

          Hoffe Ihr versteht was ich meine. Ist sowas mit Blockly auf einfache art und weise zu lösen oder wird das komplizierterß

          Danke

          Dr. BakteriusD Online
          Dr. BakteriusD Online
          Dr. Bakterius
          Most Active
          schrieb am zuletzt editiert von
          #4

          @KhaosRipper ich mache das mit einer Liste. Ist einfacher als die bisher gezeigten Möglichkeiten:
          blockly.jpg

          K 1 Antwort Letzte Antwort
          4
          • Dr. BakteriusD Dr. Bakterius

            @KhaosRipper ich mache das mit einer Liste. Ist einfacher als die bisher gezeigten Möglichkeiten:
            blockly.jpg

            K Offline
            K Offline
            KhaosRipper
            schrieb am zuletzt editiert von
            #5

            Super, danke für die ganzen Lösungen. Geht ja doch recht einfach.

            Ich habe mich für das von @Dr-Bakterius entschieden, da es doch am übersichtlichsten und einfachsten ist.

            Danke euch.

            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

            831

            Online

            32.5k

            Benutzer

            81.7k

            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