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. [Vorlage] Flexible Pin-Eingabe mit Blockly

NEWS

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

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.2k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.4k

[Vorlage] Flexible Pin-Eingabe mit Blockly

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
blocklytemplate
72 Beiträge 16 Kommentatoren 18.1k Aufrufe 7 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.
  • SmarthomeMFS Offline
    SmarthomeMFS Offline
    SmarthomeMF
    schrieb am zuletzt editiert von
    #20

    Hallo

    Habe das genau mal so gemacht wie beschrieben.

    Aber wenn ich das Script starte kommt in Log ein error!

    ! <xml 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml">
    ! <block id=".M/Q%KRmxbXWc2P9~MO" type="comment" x="-87" y="162"><field name="COMMENT">Einmalige Initialisierung bei Programmstart</field>
    ! <next><block id="tjP%K@i{#i,h1Dyax-gY" type="procedures_callnoreturn"><mutation name="Initialisierung"></mutation>
    ! <next><block id="?bXfiCYH0h;wOsNVLQT1" type="comment"><field name="COMMENT">Hier beginnt das Triggern</field>
    ! <next><block id="Ox)}[Fr#C.VldaJS5L^k" type="comment"><field name="COMMENT">Beliebig erweiterbar</field>
    ! <next><block id="7r*}c).]GtkEH)FR.:s." type="on_ext"><mutation items="3"></mutation>
    ! <field name="CONDITION">true</field>
    ! <value name="OID0"><shadow id="qW*M98DOf90FmZ?BT;~" type="field_oid"><field name="oid">javascript.0.Pincode_1</field></shadow></value> ! <value name="OID1"><shadow id="db.g;R[uTi-M|khCqfC" type="field_oid"><field name="oid">javascript.0.Pincode_2</field></shadow></value>
    ! <value name="OID2"><shadow id="xXI+u{uUm0V4mOYK!n]j" type="field_oid"><field name="oid">javascript.0.Pincode_3</field></shadow></value>
    ! <statement name="STATEMENT"><block id="Yg;,[I7Ex=?rcz#y?kj%" type="comment"><field name="COMMENT">Timer für zu lange Eingabepause stoppen</field>
    ! <next><block id="#p8Sw}HSQK?cYiU:YHiK" type="timeouts_cleartimeout"><field name="NAME">timeout</field>
    ! <next><block id="?pNSp?WhqKPHT/B_pJo:" type="comment"><field name="COMMENT">Nur ausführen wenn Eingabe nicht geblockt</field>
    ! <next><block id="dn-O]h-kTj)k:Hx)Xkz" type="controls_if"><value name="IF0"><block id="aahnsRO!(k,8K;ftiGcN" type="logic_compare"><field name="OP">NEQ</field> ! <value name="A"><block id="~1[*:7k/oGI/ZT1ie-F5" type="variables_get"><field name="VAR">AnzahlVersuche</field></block></value> ! <value name="B"><block id="9EtqToNOpvma_:nUc:I3" type="variables_get"><field name="VAR">maxVersuche</field></block></value></block></value> ! <statement name="DO0"><block id="53won3Q~KRaZW)3F6
    [" type="controls_if"><mutation elseif="2"></mutation>
    ! <value name="IF0"><block id="=Vuh)csdD]A:f+;xaY0c" type="logic_compare"><field name="OP">EQ</field>
    ! <value name="A"><block id="73#D/?hW=+je)pXEOH]" type="get_value"><field name="ATTR">val</field>
    ! <field name="OID">javascript.0.Pincode_1</field></block></value>
    ! <value name="B"><block id="-nBqftYopC%u~4,0#S:J" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value>
    ! <statement name="DO0"><block id="iDWo7Ppf@/PIDOC3,nQg" type="comment"><field name="COMMENT">Die Eingabe an Funktion übergeben</field>
    ! <next><block id="9ND8^RRRst6JTr1aF:P" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation>
    ! <value name="ARG0"><block id=";{hUhJ|FuWgRnG+Vx/" type="text"><field name="TEXT">1</field></block></value></block></next></block></statement>
    ! <value name="IF1"><block id="7OCP}UF3YaQ|gs=RDFy" type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="NHZ%eeYxhwr?#M_(BhP/" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_2</field></block></value> ! <value name="B"><block id="*2NWW1B~r6Z2E}P%j2wg" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO1"><block id="TUEyn}|x(z36g?T63y*_" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="]Rf6@?xK
    gplLyQ-bQP" type="text"><field name="TEXT">2</field></block></value></block></statement>
    ! <value name="IF2"><block id="8oUmv2o%~@wjdNn_2bB}" type="logic_compare"><field name="OP">EQ</field>
    ! <value name="A"><block id="D5^##Kxmy;bo1B=Nj_?" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_3</field></block></value> ! <value name="B"><block id="=+FvloDpnlxoQhQt]biY" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO2"><block id="?}Q)OGY}05Ms(#R@Kycz" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id=";dy%FKdEuIq;eorrIp|h" type="text"><field name="TEXT">3</field></block></value></block></statement></block></statement></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block> ! <block id="O)q*?M8Hfa5)/}O6ZsZ7" type="procedures_defnoreturn" x="563" y="163"><field name="NAME">Initialisierung</field> ! <comment pinned="false" h="80" w="160">Bei Programmstart Werte vorgeben.</comment> ! <statement name="STACK"><block id="?L69j3%sRmc}([5G2X60" type="variables_set"><field name="VAR">AnzahlVersuche</field> ! <value name="VALUE"><block id="t]h/PX7feEalP-;RDq
    " type="math_number"><field name="NUM">0</field></block></value>
    ! <next><block id="wMeGQPHU)@|vwaJP%iqr" type="variables_set"><field name="VAR">tempCode</field>
    ! <value name="VALUE"></value>
    ! <next><block id="UZqDvMtW0LHk96L^T8z" type="comment"><field name="COMMENT">Maximale Fehlversuche festlegen</field>
    ! <next><block id="e663[k*hSCd%o
    ?sd(XA" type="variables_set"><field name="VAR">maxVersuche</field>
    ! <value name="VALUE"><block id="{OjuYXvX(;:=T.oag~a#" type="math_number"><field name="NUM">3</field></block></value>
    ! <next><block id="K(:;y-gihBx_:{%kJ~Oo" type="comment"><field name="COMMENT">Länge der Codes festlegen</field>
    ! <next><block id="BGt@+4h!d)Kco3]{,)V" type="variables_set"><field name="VAR">maxCodeLaenge</field> ! <value name="VALUE"><block id="|Wm^i:C~o0Bp7;,-yy" type="math_number"><field name="NUM">3</field></block></value> ! <next><block id="ZgOwwPRCnNLM~@tR?DhB" type="comment"><field name="COMMENT">Liste der Codes</field> ! <next><block id="Kp%9#vKhE4,}vS;@yW_0" type="comment"><field name="COMMENT">Beliebig erweiterbar. Auf Länge achten!</field> ! <next><block id=";~}[HtK6:wa8W/1,]j2a" type="variables_set"><field name="VAR">CodeAbwesend</field> ! <value name="VALUE"><block id="/%k9:KVHUC2RVgH.:^v5" type="text"><field name="TEXT">321</field></block></value> ! <next><block id="~g%5m:PVJO18)ZuFgT%Y" type="variables_set"><field name="VAR">CodeAnwesend</field> ! <value name="VALUE"><block id=";ut1,j-D,_I[Y-ibyD-" type="text"><field name="TEXT">123</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block>
    ! <block id="t@lDFN#V:FHO31zeMUSV" type="procedures_defnoreturn" x="-87" y="838"><mutation><arg name="TastenWert"></arg></mutation>
    ! <field name="NAME">getCode</field>
    ! <comment pinned="false" h="80" w="160">Code pruefen</comment>
    ! <statement name="STACK"><block id="@0sNv=W?MJzk622W]Q4" type="text_append"><field name="VAR">tempCode</field> ! <value name="TEXT"><shadow id="6q^nqw|R(+L0{n_l/Gc4" type="text"></shadow> ! <block id="LWMvwI0w|bcPvg-n5gGg" type="variables_get"><field name="VAR">TastenWert</field></block></value> ! <next><block id="vjr3FKb9Vi*y+77wJTx," type="debug"><field name="Severity">log</field> ! <value name="TEXT"><shadow id=".0O)AP~8_Z_^cA%~Y=0o" type="text"></shadow> ! <block id=")*fGp8U0U/F=Wcs;KY/|" type="text_join"><mutation items="2"></mutation> ! <value name="ADD0"><block id=").fVwr0of^0wi[*+UipI" type="text"><field name="TEXT">*****Eingabe -></field></block></value> ! <value name="ADD1"><block id="Cw9-Bo9Tle36/K]UpAeB" type="variables_get"><field name="VAR">tempCode</field></block></value></block></value> ! <next><block id="n5A{||l/F/:ozsHSOg4^" type="controls_if"><mutation elseif="2"></mutation> ! <value name="IF0"><block id="T=]omffKe6S+(UpU:6" type="logic_compare"><field name="OP">GT</field>
    ! <value name="A"><block id=";Xk,nZX;Io@ax2OT=s73" type="text_length"><value name="VALUE"><shadow id="RGYf*(-7S#_3L-Ww7];" type="text"><field name="TEXT">abc</field></shadow> ! <block id="gapi+DOc_=Fi})6b*l7}" type="variables_get"><field name="VAR">tempCode</field></block></value></block></value> ! <value name="B"><block id="j9RTTC,C]+Q)EY2SD}i" type="variables_get"><field name="VAR">maxCodeLaenge</field></block></value></block></value>
    ! <statement name="DO0"><block id="|Tgo8I~X04G[v8TB8v3" type="comment"><field name="COMMENT">Zuviele Eingaben</field> ! <next><block id="+lM8)EE*fCon1X0.Dw=" type="comment"><field name="COMMENT">Eingabe löschen und Versuche hochzählen</field>
    ! <next><block id="sRw2Xy,4}LO3T4q.5yM" type="debug"><field name="Severity">log</field>
    ! <value name="TEXT"><shadow id="+cYZRRJa1z=6hGhTLdam" type="text"><field name="TEXT">Zuviele Zeichen</field></shadow></value>
    ! <next><block id="%D8buHC|kCUU1/KVJB[2" type="variables_set"><field name="VAR">tempCode</field>
    ! <value name="VALUE"></value>
    ! <next><block id="T/]?rq:p![ebfuT~k+i/" type="procedures_callnoreturn"><mutation name="chkVersuche"></mutation></block></next></block></next></block></next></block></next></block></statement>
    ! <value name="IF1"><block id="lDJ@;/jzBi=HTRV]yYn," type="logic_compare"><field name="OP">EQ</field>
    ! <value name="A"><block id="v]-iY2]3a;Ir}hU9sM" type="variables_get"><field name="VAR">tempCode</field></block></value>
    ! <value name="B"><block id="FXw/|._t2rtHCxgNR}N{" type="variables_get"><field name="VAR">CodeAnwesend</field></block></value></block></value>
    ! <statement name="DO1"><block id="l(HPe4p~ikj;pvhZJME," type="comment"><field name="COMMENT">Eingabe korrekt</field>
    ! <next><block id="r36-dG%vP|-NxY(}BSJe" type="comment"><field name="COMMENT">zu Testzwecke eine Lampe</field>
    ! <next><block id="w+5Ue0Hm9)4.e]{AO?{N" type="control"><mutation delay_input="false"></mutation>
    ! <field name="OID">hue.0.Philips_hue.Hue_Deckenlampe_Büro_EG.on</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <next><block id="U;M412@-[mW58w:2/pDZ" type="debug"><field name="Severity">log</field>
    ! <value name="TEXT"><shadow id="/6PKtIv;_asj~zH1YFWm" type="text"><field name="TEXT">*Anwesen aktivieren</field></shadow></value>
    ! <next><block id="JsF#tPrlP((e*D(PKz;" type="variables_set"><field name="VAR">AnzahlVersuche</field> ! <value name="VALUE"><block id="_#wsFg(JuzNqSyCO63UI" type="math_number"><field name="NUM">0</field></block></value></block></next></block></next></block></next></block></next></block></statement> ! <value name="IF2"><block id="2vFBpg|}LmWTUqhvSPq" type="logic_compare"><field name="OP">EQ</field>
    ! <value name="A"><block id="h{5A9tIJ[J}[xMy_7AAS" type="variables_get"><field name="VAR">tempCode</field></block></value>
    ! <value name="B"><block id="P@212xQ;qQPEGyj%ZrM" type="variables_get"><field name="VAR">CodeAbwesend</field></block></value></block></value>
    ! <statement name="DO2"><block id="I#o7zi#/?,2ybu:rbslY" type="comment"><field name="COMMENT">Eingabe korrekt</field>
    ! <next><block id="gbMt
    _LDG5GlZ=~5q;Cp" type="debug"><field name="Severity">log</field>
    ! <value name="TEXT"><shadow id="ZGUOVYnw5W!20VGJXQ};" type="text"><field name="TEXT">*Abwesend aktivieren</field></shadow></value>
    ! <next><block id="hK5#^tb~)E9Bgr
    GFnxt" type="variables_set"><field name="VAR">AnzahlVersuche</field>
    ! <value name="VALUE"><block id="kZ^Vqv6TF3HNE3Pral(2" type="math_number"><field name="NUM">0</field></block></value></block></next></block></next></block></statement>
    ! <next><block id=")]FG}!jqa@!^@C404zD" type="timeouts_settimeout"><field name="NAME">timeout</field>
    ! <field name="DELAY">5000</field>
    ! <field name="UNIT">ms</field>
    ! <statement name="STATEMENT"><block id="@87rub
    L(JD2dLo|Aef" type="comment"><field name="COMMENT">Wenn in 5 Sek. keine weitere Eingabe erfolgt</field> ! <next><block id="/6Z(,/]_}ZhyadfHIgZ5" type="comment"><field name="COMMENT">dann Eingabe löschen und Versuche hochzählen</field> ! <next><block id="a3yX(4)M(27nSsHd.d-_" type="variables_set"><field name="VAR">tempCode</field> ! <value name="VALUE"></value> ! <next><block id="Uqe6b9wNj]Sp(Zb#o#X" type="procedures_callnoreturn"><mutation name="chkVersuche"></mutation></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></statement></block>
    ! <block id="c,ULx]X]~F-z^(
    +{6vr" type="procedures_defnoreturn" x="-62" y="1763"><field name="NAME">chkVersuche</field>
    ! <comment pinned="false" h="80" w="160">Fehlerhafte Eingaben zählen und Eingabe sperren wenn maxVersuche erreicht.</comment>
    ! <statement name="STACK"><block id="+bbjB}N7U3vkk:@%?[V" type="math_change"><field name="VAR">AnzahlVersuche</field> ! <value name="DELTA"><shadow id="P!Tq!OVi/*(ehXZb]uC8" type="math_number"><field name="NUM">1</field></shadow></value> ! <next><block id="V6AzqIh:%+F@oh[M-IQ{" type="controls_if"><value name="IF0"><block id="!CYyilZ1svbcZ]Yf=BXd" type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="@Zmti,3QUsDg5gTF6tjC" type="variables_get"><field name="VAR">AnzahlVersuche</field></block></value> ! <value name="B"><block id="x=cs)@yt;A6[ua*T5FE|" type="variables_get"><field name="VAR">maxVersuche</field></block></value></block></value> ! <statement name="DO0"><block id="[d~Z|qEH+C4%5%A*xBTT" type="debug"><field name="Severity">log</field> ! <value name="TEXT"><shadow id="v.9ViGY:H4?EbA+fzjKV" type="text"><field name="TEXT">*****Eingabe gesperrt*****</field></shadow></value> ! <next><block id="(l|4)g2/(/@5-swvVF@2" type="timeouts_settimeout"><field name="NAME">sperren</field> ! <field name="DELAY">10000</field> ! <field name="UNIT">ms</field> ! <statement name="STATEMENT"><block id="U22mj9gD,9P)FU@4%{K~" type="comment"><field name="COMMENT">Nach 10 Sek. wieder frei</field> ! <next><block id="d)*rJF_51+C|Z3NMW9N+" type="variables_set"><field name="VAR">AnzahlVersuche</field> ! <value name="VALUE"><block id="^)c6!p[y)V0zk(9oMl16" type="math_number"><field name="NUM">0</field></block></value> ! <next><block id="SOZMoZ)Os7:]]y=T3yE" type="debug"><field name="Severity">log</field>
    ! <value name="TEXT"><shadow id="5.ubt?0E+m)aiIY`J``U" type="text"><field name="TEXT">Eingabe entsperrt</field></shadow></value></block></next></block></next></block></statement></block></next></block></statement></block></next></block></statement></block></xml>
    was habe ich übersehen?

    Habe die Datenpunkte alle angelegt und mit den Tastern eingebunden….

    eine Lampe zum Ansteuern habe ich im Blockly auch hinzugefügt...
    4668_unbenannt13.png
    4668_unbenannt14.png

    Max

    ioBroker auf einem NUC ,16GB RAM, 120GB SSD) mit Proxmox
    Cloud Pro, iot, Alexa, Sonos, sonoff, Fronius, Harmony, Doorbird, Shelly, Hue, Loxone, Mihome, …

    1 Antwort Letzte Antwort
    0
    • rantanplanR Offline
      rantanplanR Offline
      rantanplan
      schrieb am zuletzt editiert von
      #21

      Moin,

      Mein Fehler. Hatte ich versäumt zu erwähnen.

      In dem Steuere Baustein muss noch der "Wert" rein mit dem Deine Tür geöffnet wird.

      Ist das "wahr/true"? Findest Du unter "Logik"

      Ist das 0/1 als Zahl? Findest Du unter Mathematik.

      Ist das irgendein Text? Findest Du unter "Text"

      Grüße

      Rantanplan

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

      1 Antwort Letzte Antwort
      0
      • SmarthomeMFS Offline
        SmarthomeMFS Offline
        SmarthomeMF
        schrieb am zuletzt editiert von
        #22

        @rantanplan:

        Mein Fehler. Hatte ich versäumt zu erwähnen. `
        kein Problem….

        habe ich gemacht

        wahr bei Anwesend und unwahr bei Abwesend!

        Im Log kommt kein Fehler mehr.....

        aber es tut sich auch nicht mehr weiter wenn ich die Taster 123 oder 321 betätige.

        irgendwo habe ich noch gemurkst!!
        4668_unbenannt17.png
        4668_unbenannt16.png
        4668_unbenannt15.png

        Max

        ioBroker auf einem NUC ,16GB RAM, 120GB SSD) mit Proxmox
        Cloud Pro, iot, Alexa, Sonos, sonoff, Fronius, Harmony, Doorbird, Shelly, Hue, Loxone, Mihome, …

        1 Antwort Letzte Antwort
        0
        • rantanplanR Offline
          rantanplanR Offline
          rantanplan
          schrieb am zuletzt editiert von
          #23

          Irgendwo habe ich gelesen, dass die HUE über den Datenpunkt "Level" gesteuert werden.

          '100' = an '0'=aus

          Kannst Du auch direkt unter "Objekte" testen und dort einen Wert eingeben.

          Rantanplan

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

          1 Antwort Letzte Antwort
          0
          • SmarthomeMFS Offline
            SmarthomeMFS Offline
            SmarthomeMF
            schrieb am zuletzt editiert von
            #24

            @rantanplan:

            Irgendwo habe ich gelesen, dass die HUE über den Datenpunkt "Level" gesteuert werden.'100' = an '0'=aus `
            nein der Datenpunkt Level ist der Dimmer….

            und das on ist der Datenpunkt für an und aus...

            habe ich bei den dem andern View auch so eingestellt.

            Nun habe ich eine einfache Lampe genommen die sicher nur ein Datenpunkt hat.

            Aber das selbe spiel ...es tut sich nichts....

            Da habe ich noch irgendwo ein murks drin?

            ich weiß nicht wo!

            Max

            ioBroker auf einem NUC ,16GB RAM, 120GB SSD) mit Proxmox
            Cloud Pro, iot, Alexa, Sonos, sonoff, Fronius, Harmony, Doorbird, Shelly, Hue, Loxone, Mihome, …

            1 Antwort Letzte Antwort
            0
            • SmarthomeMFS Offline
              SmarthomeMFS Offline
              SmarthomeMF
              schrieb am zuletzt editiert von
              #25

              habe gerade noch gesehen das die Java Datenpunkte rot sind!

              ist das so richtig?
              4668_unbenannt21.png

              Max

              ioBroker auf einem NUC ,16GB RAM, 120GB SSD) mit Proxmox
              Cloud Pro, iot, Alexa, Sonos, sonoff, Fronius, Harmony, Doorbird, Shelly, Hue, Loxone, Mihome, …

              1 Antwort Letzte Antwort
              0
              • DutchmanD Offline
                DutchmanD Offline
                Dutchman
                Developer Most Active Administrators
                schrieb am zuletzt editiert von
                #26

                Ja, sie werden gesteuert aber nicht von einem Gateway bestätigt darum bleiben sie rot

                –-----------------------

                Send from mobile device

                Das schöne ios hat Auto Korrektur zum k****

                Wer Schreibfehler findet darf sie behalten oder auf eBay verkaufen, mindest Umsatz 10% für die community

                1 Antwort Letzte Antwort
                0
                • rantanplanR Offline
                  rantanplanR Offline
                  rantanplan
                  schrieb am zuletzt editiert von
                  #27

                  Was hast Du für ein Widget genommen.

                  Bei meinem ist "Taster" Funktion wichtig!

                  Du kannst auch einen Export von Deinem Stand hier reinsetzen.

                  Dann kann ich mal drüber schauen.

                  Rantanplan

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

                  1 Antwort Letzte Antwort
                  0
                  • SmarthomeMFS Offline
                    SmarthomeMFS Offline
                    SmarthomeMF
                    schrieb am zuletzt editiert von
                    #28

                    @rantanplan:

                    Was hast Du für ein Widget genommen.Bei meinem ist "Taster" Funktion wichtig! `
                    das ist doch ein Taster?

                    ! [{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Pincode_1","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"1","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"1","views":["Klima"],"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"412px","top":"387px","width":"50px","height":"50px","z-index":"3","opacity":""},"widgetSet":"jqui"}]
                    mein Script

                    ! <xml 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml">
                    ! <block id=".M/Q%KRmxbXWc2P9~MO" type="comment" x="-87" y="162"><field name="COMMENT">Einmalige Initialisierung bei Programmstart</field>
                    ! <next><block id="tjP%K@i{#i,h1Dyax-gY" type="procedures_callnoreturn"><mutation name="Initialisierung"></mutation>
                    ! <next><block id="?bXfiCYH0h;wOsNVLQT1" type="comment"><field name="COMMENT">Hier beginnt das Triggern</field>
                    ! <next><block id="Ox)}[Fr#C.VldaJS5L^k" type="comment"><field name="COMMENT">Beliebig erweiterbar</field>
                    ! <next><block id="7r*}c).]GtkEH)FR.:s." type="on_ext"><mutation items="3"></mutation>
                    ! <field name="CONDITION">true</field>
                    ! <value name="OID0"><shadow id="qW*M98DOf90FmZ?BT;~" type="field_oid"><field name="oid">javascript.0.Pincode_1</field></shadow></value> ! <value name="OID1"><shadow id="db.g;R[uTi-M|khCqfC" type="field_oid"><field name="oid">javascript.0.Pincode_2</field></shadow></value>
                    ! <value name="OID2"><shadow id="xXI+u{uUm0V4mOYK!n]j" type="field_oid"><field name="oid">javascript.0.Pincode_3</field></shadow></value>
                    ! <statement name="STATEMENT"><block id="Yg;,[I7Ex=?rcz#y?kj%" type="comment"><field name="COMMENT">Timer für zu lange Eingabepause stoppen</field>
                    ! <next><block id="#p8Sw}HSQK?cYiU:YHiK" type="timeouts_cleartimeout"><field name="NAME">timeout</field>
                    ! <next><block id="?pNSp?WhqKPHT/B_pJo:" type="comment"><field name="COMMENT">Nur ausführen wenn Eingabe nicht geblockt</field>
                    ! <next><block id="dn-O]h-kTj)k:Hx)Xkz" type="controls_if"><value name="IF0"><block id="aahnsRO!(k,8K;ftiGcN" type="logic_compare"><field name="OP">NEQ</field> ! <value name="A"><block id="~1[*:7k/oGI/ZT1ie-F5" type="variables_get"><field name="VAR">AnzahlVersuche</field></block></value> ! <value name="B"><block id="9EtqToNOpvma_:nUc:I3" type="variables_get"><field name="VAR">maxVersuche</field></block></value></block></value> ! <statement name="DO0"><block id="53won3Q~KRaZW)3F6
                    [" type="controls_if"><mutation elseif="2"></mutation>
                    ! <value name="IF0"><block id="=Vuh)csdD]A:f+;xaY0c" type="logic_compare"><field name="OP">EQ</field>
                    ! <value name="A"><block id="73#D/?hW=+je)pXEOH]" type="get_value"><field name="ATTR">val</field>
                    ! <field name="OID">javascript.0.Pincode_1</field></block></value>
                    ! <value name="B"><block id="-nBqftYopC%u~4,0#S:J" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value>
                    ! <statement name="DO0"><block id="iDWo7Ppf@/PIDOC3,nQg" type="comment"><field name="COMMENT">Die Eingabe an Funktion übergeben</field>
                    ! <next><block id="9ND8^RRRst6JTr1aF:P" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation>
                    ! <value name="ARG0"><block id=";{hUhJ|FuWgRnG+Vx/" type="text"><field name="TEXT">1</field></block></value></block></next></block></statement>
                    ! <value name="IF1"><block id="7OCP}UF3YaQ|gs=RDFy" type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="NHZ%eeYxhwr?#M_(BhP/" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_2</field></block></value> ! <value name="B"><block id="*2NWW1B~r6Z2E}P%j2wg" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO1"><block id="TUEyn}|x(z36g?T63y*_" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="]Rf6@?xK
                    gplLyQ-bQP" type="text"><field name="TEXT">2</field></block></value></block></statement>
                    ! <value name="IF2"><block id="8oUmv2o%~@wjdNn_2bB}" type="logic_compare"><field name="OP">EQ</field>
                    ! <value name="A"><block id="D5^##Kxmy;bo1B=Nj_?" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_3</field></block></value> ! <value name="B"><block id="=+FvloDpnlxoQhQt]biY" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO2"><block id="?}Q)OGY}05Ms(#R@Kycz" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id=";dy%FKdEuIq;eorrIp|h" type="text"><field name="TEXT">3</field></block></value></block></statement></block></statement></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block> ! <block id="O)q*?M8Hfa5)/}O6ZsZ7" type="procedures_defnoreturn" x="563" y="163"><field name="NAME">Initialisierung</field> ! <comment pinned="false" h="80" w="160">Bei Programmstart Werte vorgeben.</comment> ! <statement name="STACK"><block id="?L69j3%sRmc}([5G2X60" type="variables_set"><field name="VAR">AnzahlVersuche</field> ! <value name="VALUE"><block id="t]h/PX7feEalP-;RDq
                    " type="math_number"><field name="NUM">0</field></block></value>
                    ! <next><block id="wMeGQPHU)@|vwaJP%iqr" type="variables_set"><field name="VAR">tempCode</field>
                    ! <value name="VALUE"></value>
                    ! <next><block id="UZqDvMtW0LHk96L^T8z" type="comment"><field name="COMMENT">Maximale Fehlversuche festlegen</field>
                    ! <next><block id="e663[k*hSCd%o
                    ?sd(XA" type="variables_set"><field name="VAR">maxVersuche</field>
                    ! <value name="VALUE"><block id="{OjuYXvX(;:=T.oag~a#" type="math_number"><field name="NUM">3</field></block></value>
                    ! <next><block id="K(:;y-gihBx_:{%kJ~Oo" type="comment"><field name="COMMENT">Länge der Codes festlegen</field>
                    ! <next><block id="BGt@+4h!d)Kco3]{,)V" type="variables_set"><field name="VAR">maxCodeLaenge</field> ! <value name="VALUE"><block id="|Wm^i:C~o0Bp7;,-yy" type="math_number"><field name="NUM">3</field></block></value> ! <next><block id="ZgOwwPRCnNLM~@tR?DhB" type="comment"><field name="COMMENT">Liste der Codes</field> ! <next><block id="Kp%9#vKhE4,}vS;@yW_0" type="comment"><field name="COMMENT">Beliebig erweiterbar. Auf Länge achten!</field> ! <next><block id=";~}[HtK6:wa8W/1,]j2a" type="variables_set"><field name="VAR">CodeAbwesend</field> ! <value name="VALUE"><block id="/%k9:KVHUC2RVgH.:^v5" type="text"><field name="TEXT">321</field></block></value> ! <next><block id="~g%5m:PVJO18)ZuFgT%Y" type="variables_set"><field name="VAR">CodeAnwesend</field> ! <value name="VALUE"><block id=";ut1,j-D,_I[Y-ibyD-" type="text"><field name="TEXT">123</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block>
                    ! <block id="t@lDFN#V:FHO31zeMUSV" type="procedures_defnoreturn" x="-87" y="838"><mutation><arg name="TastenWert"></arg></mutation>
                    ! <field name="NAME">getCode</field>
                    ! <comment pinned="false" h="80" w="160">Code pruefen</comment>
                    ! <statement name="STACK"><block id="@0sNv=W?MJzk622W]Q4" type="text_append"><field name="VAR">tempCode</field> ! <value name="TEXT"><shadow id="6q^nqw|R(+L0{n_l/Gc4" type="text"></shadow> ! <block id="LWMvwI0w|bcPvg-n5gGg" type="variables_get"><field name="VAR">TastenWert</field></block></value> ! <next><block id="vjr3FKb9Vi*y+77wJTx," type="debug"><field name="Severity">log</field> ! <value name="TEXT"><shadow id=".0O)AP~8_Z_^cA%~Y=0o" type="text"></shadow> ! <block id=")*fGp8U0U/F=Wcs;KY/|" type="text_join"><mutation items="2"></mutation> ! <value name="ADD0"><block id=").fVwr0of^0wi[*+UipI" type="text"><field name="TEXT">*****Eingabe -></field></block></value> ! <value name="ADD1"><block id="Cw9-Bo9Tle36/K]UpAeB" type="variables_get"><field name="VAR">tempCode</field></block></value></block></value> ! <next><block id="n5A{||l/F/:ozsHSOg4^" type="controls_if"><mutation elseif="2"></mutation> ! <value name="IF0"><block id="T=]omffKe6S+(UpU:6" type="logic_compare"><field name="OP">GT</field>
                    ! <value name="A"><block id=";Xk,nZX;Io@ax2OT=s73" type="text_length"><value name="VALUE"><shadow id="RGYf*(-7S#_3L-Ww7];" type="text"><field name="TEXT">abc</field></shadow> ! <block id="gapi+DOc_=Fi})6b*l7}" type="variables_get"><field name="VAR">tempCode</field></block></value></block></value> ! <value name="B"><block id="j9RTTC,C]+Q)EY2SD}i" type="variables_get"><field name="VAR">maxCodeLaenge</field></block></value></block></value>
                    ! <statement name="DO0"><block id="|Tgo8I~X04G[v8TB8v3" type="comment"><field name="COMMENT">Zuviele Eingaben</field> ! <next><block id="+lM8)EE*fCon1X0.Dw=" type="comment"><field name="COMMENT">Eingabe löschen und Versuche hochzählen</field>
                    ! <next><block id="sRw2Xy,4}LO3T4q.5yM" type="debug"><field name="Severity">log</field>
                    ! <value name="TEXT"><shadow id="+cYZRRJa1z=6hGhTLdam" type="text"><field name="TEXT">Zuviele Zeichen</field></shadow></value>
                    ! <next><block id="%D8buHC|kCUU1/KVJB[2" type="variables_set"><field name="VAR">tempCode</field>
                    ! <value name="VALUE"></value>
                    ! <next><block id="T/]?rq:p![ebfuT~k+i/" type="procedures_callnoreturn"><mutation name="chkVersuche"></mutation></block></next></block></next></block></next></block></next></block></statement>
                    ! <value name="IF1"><block id="lDJ@;/jzBi=HTRV]yYn," type="logic_compare"><field name="OP">EQ</field>
                    ! <value name="A"><block id="v]-iY2]3a;Ir}hU9sM" type="variables_get"><field name="VAR">tempCode</field></block></value>
                    ! <value name="B"><block id="FXw/|._t2rtHCxgNR}N{" type="variables_get"><field name="VAR">CodeAnwesend</field></block></value></block></value>
                    ! <statement name="DO1"><block id="l(HPe4p~ikj;pvhZJME," type="comment"><field name="COMMENT">Eingabe korrekt</field>
                    ! <next><block id="r36-dG%vP|-NxY(}BSJe" type="comment"><field name="COMMENT">zu Testzwecke eine Lampe</field>
                    ! <next><block id="w+5Ue0Hm9)4.e]{AO?{N" type="control"><mutation delay_input="false"></mutation>
                    ! <field name="OID">loxone.0.106025b4-0366-867b-ffff30a51ce1037c.active</field>
                    ! <field name="WITH_DELAY">FALSE</field>
                    ! <value name="VALUE"><block id="?o{d0{(q(JH@KVVn!eT4" type="logic_boolean"><field name="BOOL">TRUE</field></block></value>
                    ! <next><block id="U;M412@-[mW58w:2/pDZ" type="debug"><field name="Severity">log</field>
                    ! <value name="TEXT"><shadow id="/6PKtIv;_asj~zH1YFWm" type="text"><field name="TEXT">*Anwesen aktivieren</field></shadow></value>
                    ! <next><block id="JsF`#tPrlP((e
                    D(PKz;" type="variables_set"><field name="VAR">AnzahlVersuche</field>
                    ! <value name="VALUE"><block id="
                    #wsFg(JuzNqSyCO63UI" type="math_number"><field name="NUM">0</field></block></value></block></next></block></next></block></next></block></next></block></statement>
                    ! <value name="IF2"><block id="2vFBpg|}LmWTU`qhvSPq" type="logic_compare"><field name="OP">EQ</field>
                    ! <value name="A"><block id="h{5A9tIJ[J}[xMy_7AAS" type="variables_get"><field name="VAR">tempCode</field></block></value>
                    ! <value name="B"><block id="P@212xQ;qQPEGyj%ZrM" type="variables_get"><field name="VAR">CodeAbwesend</field></block></value></block></value>
                    ! <statement name="DO2"><block id="I#o7zi#/?,2ybu:rbslY" type="comment"><field name="COMMENT">Eingabe korrekt</field>
                    ! <next><block id="%|Zm?a]{rh2`TKA~yCBn" type="control"><mutation delay_input="false"></mutation>
                    ! <field name="OID">loxone.0.106025b4-0366-867b-ffff30a51ce1037c.active</field>
                    ! <field name="WITH_DELAY">FALSE</field>
                    ! <value name="VALUE"><block id="vv%{:%]V2g}V94TF.w#s" type="logic_boolean"><field name="BOOL">FALSE</field></block></value>
                    ! <next><block id="gbMt
                    LDG5GlZ=~5q;Cp" type="debug"><field name="Severity">log</field>
                    ! <value name="TEXT"><shadow id="ZGUOVYnw5W!20VGJXQ};" type="text"><field name="TEXT">*Abwesend aktivieren</field></shadow></value>
                    ! <next><block id="hK5#^tb~)E9BgrGFnxt" type="variables_set"><field name="VAR">AnzahlVersuche</field>
                    ! <value name="VALUE"><block id="kZ^Vqv6TF3HNE3Pral(2" type="math_number"><field name="NUM">0</field></block></value></block></next></block></next></block></next></block></statement>
                    ! <next><block id="
                    )]FG}!jqa@!^@C404zD" type="timeouts_settimeout"><field name="NAME">timeout</field>
                    ! <field name="DELAY">5000</field>
                    ! <field name="UNIT">ms</field>
                    ! <statement name="STATEMENT"><block id="@87rub*L(JD2dLo|`Aef" type="comment"><field name="COMMENT">Wenn in 5 Sek. keine weitere Eingabe erfolgt</field>
                    ! <next><block id="/6Z(,/]
                    }ZhyadfHIgZ5" type="comment"><field name="COMMENT">dann Eingabe löschen und Versuche hochzählen</field>
                    ! <next><block id="a3yX(4)M(27nSsHd.d-" type="variables_set"><field name="VAR">tempCode</field>
                    ! <value name="VALUE"></value>
                    ! <next><block id="Uq`e6b9wNj]Sp(Zb#o#X" type="procedures_callnoreturn"><mutation name="chkVersuche"></mutation></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></statement></block>
                    ! <block id="c,ULx]X]~F-z^(
                    +{6vr" type="procedures_defnoreturn" x="-62" y="1763"><field name="NAME">chkVersuche</field>
                    ! <comment pinned="false" h="80" w="160">Fehlerhafte Eingaben zählen und Eingabe sperren wenn maxVersuche erreicht.</comment>
                    ! <statement name="STACK"><block id="+bbjB`}N7U3vkk:@%?[V" type="math_change"><field name="VAR">AnzahlVersuche</field>
                    ! <value name="DELTA"><shadow id="P!Tq!OVi/(ehXZb]uC8" type="math_number"><field name="NUM">1</field></shadow></value>
                    ! <next><block id="V6AzqIh:%+F@oh[M-IQ{" type="controls_if"><value name="IF0"><block id="!CYyilZ1svbcZ]Yf=BXd" type="logic_compare"><field name="OP">EQ</field>
                    ! <value name="A"><block id="@Zmti,3QUsDg5gTF6tjC" type="variables_get"><field name="VAR">AnzahlVersuche</field></block></value>
                    ! <value name="B"><block id="x=cs)@yt;A6[ua
                    T5FE|" type="variables_get"><field name="VAR">maxVersuche</field></block></value></block></value>
                    ! <statement name="DO0"><block id="[d~Z|qEH+C4%5%A*xBTT" type="debug"><field name="Severity">log</field>
                    ! <value name="TEXT"><shadow id="v.9ViGY:H4?EbA+fzjKV" type="text"><field name="TEXT">Eingabe gesperrt</field></shadow></value>
                    ! <next><block id="(l|4)g2/(/@5-swvVF@2" type="timeouts_settimeout"><field name="NAME">sperren</field>
                    ! <field name="DELAY">10000</field>
                    ! <field name="UNIT">ms</field>
                    ! <statement name="STATEMENT"><block id="U22mj9gD,9P)FU@4%{K~" type="comment"><field name="COMMENT">Nach 10 Sek. wieder frei</field>
                    ! <next><block id="d)*rJF_51+C|Z3NMW9N+" type="variables_set"><field name="VAR">AnzahlVersuche</field>
                    ! <value name="VALUE"><block id="^)c6!p[y)V0zk(9oMl16" type="math_number"><field name="NUM">0</field></block></value>
                    ! <next><block id="SO`ZMoZ)Os7:]]y=T3yE" type="debug"><field name="Severity">log</field>
                    ! <value name="TEXT"><shadow id="5.ubt?0E+m)aiIY`J``U" type="text"><field name="TEXT">Eingabe entsperrt</field></shadow></value></block></next></block></next></block></statement></block></next></block></statement></block></next></block></statement></block></xml>

                    Max

                    ioBroker auf einem NUC ,16GB RAM, 120GB SSD) mit Proxmox
                    Cloud Pro, iot, Alexa, Sonos, sonoff, Fronius, Harmony, Doorbird, Shelly, Hue, Loxone, Mihome, …

                    1 Antwort Letzte Antwort
                    0
                    • rantanplanR Offline
                      rantanplanR Offline
                      rantanplan
                      schrieb am zuletzt editiert von
                      #29

                      @SmarthomeMF:

                      das ist doch ein Taster? `
                      Nein.

                      Die Variablen werden als "boolsche" Variablen behandelt.

                      Diese kennen nur den Zustand wahr/unwahr true/false.

                      Du braucht also ein Widget das boolsche Werte verarbeiten kann.

                      Nimm mal meines zum Testen.

                      Dieses liefern beim drücken "wahr" und geht dann automatisch wieder auf "unwahr". (Taster-Funktion)

                      Wenn Du Dir den Trigger anschaust, der die Variablen triggert, siehst Du das der auf "wahr" reagiert.

                      Rantanplan

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

                      1 Antwort Letzte Antwort
                      0
                      • SmarthomeMFS Offline
                        SmarthomeMFS Offline
                        SmarthomeMF
                        schrieb am zuletzt editiert von
                        #30

                        Juhu habe es geschafft!

                        Nun auch schon mir 0-9 und einem Code mit 4 Stellen.

                        ! <xml 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml">
                        ! <block id=".M/Q%KRmxbXWc2P9~MO" type="comment" x="-87" y="162"><field name="COMMENT">Einmalige Initialisierung bei Programmstart</field>
                        ! <next><block id="tjP%K@i{#i,h1Dyax-gY" type="procedures_callnoreturn"><mutation name="Initialisierung"></mutation>
                        ! <next><block id="?bXfiCYH0h;wOsNVLQT1" type="comment"><field name="COMMENT">Hier beginnt das Triggern</field>
                        ! <next><block id="Ox)}[Fr#C.VldaJS5L^k" type="comment"><field name="COMMENT">Beliebig erweiterbar</field>
                        ! <next><block id="7r*}c).]GtkEH)FR.:s." type="on_ext"><mutation items="10"></mutation>
                        ! <field name="CONDITION">ne</field>
                        ! <value name="OID0"><shadow id="qWM98DOf90FmZ?BT;~" type="field_oid"><field name="oid">javascript.0.Pincode_1</field></shadow></value> ! <value name="OID1"><shadow id="db.g;R[uTi-M|khCqfC" type="field_oid"><field name="oid">javascript.0.Pincode_2</field></shadow></value>
                        ! <value name="OID2"><shadow id="xXI+u{uUm0V4mOYK!n]j" type="field_oid"><field name="oid">javascript.0.Pincode_3</field></shadow></value>
                        ! <value name="OID3"><shadow id="L/.+Co%HVmPx|6[dkKDf" type="field_oid"><field name="oid">javascript.0.Pincode_4</field></shadow></value>
                        ! <value name="OID4"><shadow id="<EMAIL email=" yvdua@j5e.v"="">YVdua@J5e.V_U-U26+?x" type="field_oid">
                        ! <field name="oid">javascript.0.Pincode_5</field></shadow></value>
                        ! <value name="OID5"><shadow id="3p-_6#@zV#xSNcEo/hbt" type="field_oid"><field name="oid">javascript.0.Pincode_6</field></shadow></value>
                        ! <value name="OID6"><shadow id="[XON[zsvmV^USlAkKTMv" type="field_oid"><field name="oid">javascript.0.Pincode_7</field></shadow></value>
                        ! <value name="OID7"><shadow id="%{._9]MXCKmMWiwrYR}w" type="field_oid"><field name="oid">javascript.0.Pincode_8</field></shadow></value>
                        ! <value name="OID8"><shadow id="ME,JB!1D%xbAV}6ir2wG" type="field_oid"><field name="oid">javascript.0.Pincode_9</field></shadow></value>
                        ! <value name="OID9"><shadow id="raHa
                        UG!:Q]~4]zEv1,#" type="field_oid"><field name="oid">javascript.0.Pincode_0</field></shadow></value>
                        ! <statement name="STATEMENT"><block id="Yg;,[I7Ex=?rcz#y?kj%" type="comment"><field name="COMMENT">Timer für zu lange Eingabepause stoppen</field>
                        ! <next><block id="#p8Sw}HSQK?cYiU:YHiK" type="timeouts_cleartimeout"><field name="NAME">timeout</field>
                        ! <next><block id="?pNSp?WhqKPHT/B_pJo:" type="comment"><field name="COMMENT">Nur ausführen wenn Eingabe nicht geblockt</field>
                        ! <next><block id="dn-O]h-kTj)k:Hx)Xkz" type="controls_if"><value name="IF0"><block id="aahnsRO!(k,8K;ftiGcN" type="logic_compare"><field name="OP">NEQ</field> ! <value name="A"><block id="~1[*:7k/oGI/ZT1ie-F5" type="variables_get"><field name="VAR">AnzahlVersuche</field></block></value> ! <value name="B"><block id="9EtqToNOpvma_:nUc:I3" type="variables_get"><field name="VAR">maxVersuche</field></block></value></block></value> ! <statement name="DO0"><block id="53won3Q~KRaZW)3F6
                        [" type="controls_if"><mutation elseif="9"></mutation>
                        ! <value name="IF0"><block id="=Vuh)csdD]A:f+;xaY0c" type="logic_compare"><field name="OP">EQ</field>
                        ! <value name="A"><block id="73#D/?hW=+je)pXEOH]" type="get_value"><field name="ATTR">val</field>
                        ! <field name="OID">javascript.0.Pincode_1</field></block></value>
                        ! <value name="B"><block id="-nBqftYopC%u~4,0#S:J" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value>
                        ! <statement name="DO0"><block id="iDWo7Ppf@/PIDOC3,nQg" type="comment"><field name="COMMENT">Die Eingabe an Funktion übergeben</field>
                        ! <next><block id="9ND8^RRRst6JTr1aF:P" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation>
                        ! <value name="ARG0"><block id=";{hUhJ|FuWgRnG+Vx/" type="text"><field name="TEXT">1</field></block></value></block></next></block></statement>
                        ! <value name="IF1"><block id="7OCP}UF3YaQ|gs=RDFy" type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="NHZ%eeYxhwr?#M_(BhP/" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_2</field></block></value> ! <value name="B"><block id="*2NWW1B~r6Z2E}P%j2wg" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO1"><block id="TUEyn}|x(z36g?T63y*_" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="]Rf6@?xK
                        gplLyQ-bQP" type="text"><field name="TEXT">2</field></block></value></block></statement>
                        ! <value name="IF2"><block id="8oUmv2o%~@wjdNn_2bB}" type="logic_compare"><field name="OP">EQ</field>
                        ! <value name="A"><block id="D5^##Kxmy;bo1B=Nj_?" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_3</field></block></value> ! <value name="B"><block id="=+FvloDpnlxoQhQt]biY" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO2"><block id="?}Q)OGY}05Ms(#R@Kycz" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id=";dy%FKdEuIq;eorrIp|h" type="text"><field name="TEXT">3</field></block></value></block></statement> ! <value name="IF3"><block id="M!?}5Rn_=mj^E0ioez~" type="logic_compare"><field name="OP">EQ</field>
                        ! <value name="A"><block id="NFZ;PRG#QasQLeFww|v6" type="get_value"><field name="ATTR">val</field>
                        ! <field name="OID">javascript.0.Pincode_4</field></block></value>
                        ! <value name="B"><block id="U/qSY2iu]_uz|AIY;cA" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO3"><block id="G8i%d,3Hk8Lb6pdBrmS=" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="5L75L}7L;|+}rmrp~ed" type="text"><field name="TEXT">4</field></block></value></block></statement>
                        ! <value name="IF4"><block id="gGdjrCEvp4|F-9!_c+0" type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="x+N2@@K^{v%b#d9D3A*C" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_5</field></block></value> ! <value name="B"><block id="e5HB-~R%#;:(zua1A#:q" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO4"><block id="|/1B/2TwZ]sg^_fCkpF[" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="ijb/fyL}D^0].JEH9]-P" type="text"><field name="TEXT">5</field></block></value></block></statement> ! <value name="IF5"><block id="@h**sD7_;Ec|/{~=VcOx" type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id=",9]o#s/huPstS?,abr|a" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_6</field></block></value> ! <value name="B"><block id="m8U*gfnHC7age(*^FvFt" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO5"><block id="}7YRsjFgISkt2DLczOWQ" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="7GbS.fw03D#3Rk9dkG-I" type="text"><field name="TEXT">6</field></block></value></block></statement> ! <value name="IF6"><block id="V4Lo]/iv6ty6Uke?gMq." type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="grF#N7VRzA68b^W*R3~_" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_7</field></block></value> ! <value name="B"><block id="/p@#.M-G]zLevwG*RKMZ" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO6"><block id="1i/}iJlM;R_tsRR:E?(=" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id=",(#40YoQ1@mn[1/l,~2Q" type="text"><field name="TEXT">7</field></block></value></block></statement> ! <value name="IF7"><block id="./Ve:V9!LTku5eXmHq9" type="logic_compare"><field name="OP">EQ</field>
                        ! <value name="A"><block id="i1pJ/%w0K^p+JY,sHsq" type="get_value"><field name="ATTR">val</field>
                        ! <field name="OID">javascript.0.Pincode_8</field></block></value>
                        ! <value name="B"><block id="8tl;BxmxF6vkQBHqPx8S" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value>
                        ! <statement name="DO7"><block id="mbo1trmU+,m{,32Eur-" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation>
                        ! <value name="ARG0"><block id="l/{bo.d],VOB8]NKMM-;" type="text"><field name="TEXT">8</field></block></value></block></statement>
                        ! <value name="IF8"><block id="31vz^KGQys?cG5xLnor3" type="logic_compare"><field name="OP">EQ</field>
                        ! <value name="A"><block id="N=#YNd-l)Y7+{Hs-j7x|" type="get_value"><field name="ATTR">val</field>
                        ! <field name="OID">javascript.0.Pincode_9</field></block></value>
                        ! <value name="B"><block id="0/iv=^V158w=pO:L#aW" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO8"><block id="=2@z*Bg2jZ}Q4)dL(kL[" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="sA}=(*-aW(N3*9}=8Y!M" type="text"><field name="TEXT">9</field></block></value></block></statement> ! <value name="IF9"><block id="Bac{;rIP^+Ucy8w@{M@d" type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="!JKJ(g0-UnF?h;.5owZk" type="get_value"><field name="ATTR">val</field> ! <field name="OID">javascript.0.Pincode_0</field></block></value> ! <value name="B"><block id="L;tI%~Oa{Zb|e=m_sXIf" type="logic_boolean"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO9"><block id="XL)%L_.!5pO%6*%j%s1g" type="procedures_callnoreturn" inline="true"><mutation name="getCode"><arg name="TastenWert"></arg></mutation> ! <value name="ARG0"><block id="Eb,viCwOsMo=Qu_Nk(;S" type="text"><field name="TEXT">0</field></block></value></block></statement></block></statement></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block> ! <block id="O)q*?M8Hfa5)/}O6ZsZ7" type="procedures_defnoreturn" x="563" y="163"><field name="NAME">Initialisierung</field> ! <comment pinned="false" h="80" w="160">Bei Programmstart Werte vorgeben.</comment> ! <statement name="STACK"><block id="?L69j3%sRmc}([5G2X60" type="variables_set"><field name="VAR">AnzahlVersuche</field> ! <value name="VALUE"><block id="t]h/PX7feEalP-;RDq
                        " type="math_number"><field name="NUM">0</field></block></value>
                        ! <next><block id="wMeGQPHU)@|vwaJP%iqr" type="variables_set"><field name="VAR">tempCode</field>
                        ! <value name="VALUE"></value>
                        ! <next><block id="_UZqDvMtW0LHk96L^T8z" type="comment"><field name="COMMENT">Maximale Fehlversuche festlegen</field>
                        ! <next><block id="e663[k
                        hSCd%o
                        ?sd(XA" type="variables_set"><field name="VAR">maxVersuche</field>
                        ! <value name="VALUE"><block id="{OjuYXvX(;:=T.oag~a#" type="math_number"><field name="NUM">3</field></block></value>
                        ! <next><block id="K(:;y-gihBx_:{%kJ~Oo" type="comment"><field name="COMMENT">Länge der Codes festlegen</field>
                        ! <next><block id="BGt@+4h!d)Kco3]{,)V" type="variables_set"><field name="VAR">maxCodeLaenge</field> ! <value name="VALUE"><block id="|Wm^i:C~o0Bp7;,-yy" type="math_number"><field name="NUM">4</field></block></value> ! <next><block id="ZgOwwPRCnNLM~@tR?DhB" type="comment"><field name="COMMENT">Liste der Codes</field> ! <next><block id="|9)F(1-)Murz[PAg@Pcz" type="comment"><field name="COMMENT">Beliebig erweiterbar. Auf Länge achten!</field> ! <next><block id=";~}[HtK6:wa8W/1,]j2a" type="variables_set"><field name="VAR">CodeAnwesend</field> ! <value name="VALUE"><block id="/%k9:KVHUC2RVgH.:^v5" type="text"><field name="TEXT">9713</field></block></value> ! <next><block id=";{0Vr(56Uhr:z8Cziv*C" type="variables_set"><field name="VAR">CodeAbwesend</field> ! <value name="VALUE"><block id="^di=V@V!cAe+WZiLfuL%" type="text"><field name="TEXT">9713</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block> ! <block id="t@lDFN#V:FHO31zeMUSV" type="procedures_defnoreturn" x="563" y="512"><mutation><arg name="TastenWert"></arg></mutation> ! <field name="NAME">getCode</field> ! <comment pinned="false" h="80" w="160">Code pruefen</comment> ! <statement name="STACK"><block id="@0sNv=W?MJzk622W]Q4" type="text_append"><field name="VAR">tempCode</field>
                        ! <value name="TEXT"><shadow id="6q^nqw|R(+L0{n_l/Gc4" type="text"></shadow>
                        ! <block id="LWMvwI0w|bcPvg-n5gGg" type="variables_get"><field name="VAR">TastenWert</field></block></value>
                        ! <next><block id="vjr3FKb9Viy+77wJTx," type="debug"><field name="Severity">log</field>
                        ! <value name="TEXT"><shadow id=".0O)AP~8_Z_^cA%~Y=0o" type="text"></shadow>
                        ! <block id=")fGp8U0U/F=Wcs;KY/|" type="text_join"><mutation items="2"></mutation>
                        ! <value name="ADD0"><block id=").fVwr0of^0wi[
                        +UipI" type="text"><field name="TEXT">*****Eingabe -></field></block></value>
                        ! <value name="ADD1"><block id="Cw9-Bo9Tle36/K]UpAeB" type="variables_get"><field name="VAR">tempCode</field></block></value></block></value>
                        ! <next><block id="n5A{||l/F/:ozsHSOg4^" type="controls_if"><mutation elseif="1"></mutation>
                        ! <value name="IF0"><block id="T=]omffKe6S+_(UpU:6" type="logic_compare"><field name="OP">GT</field> ! <value name="A"><block id=";Xk,nZX;Io@ax2OT=s73" type="text_length"><value name="VALUE"><shadow id="RGYf
                        (-7S#3L-Ww7];" type="text"><field name="TEXT">abc</field></shadow>
                        ! <block id="gapi+DOc
                        =Fi})6bl7}" type="variables_get"><field name="VAR">tempCode</field></block></value></block></value>
                        ! <value name="B"><block id="j9RTTC,C]+Q)EY2SD}i" type="variables_get"><field name="VAR">maxCodeLaenge</field></block></value></block></value> ! <statement name="DO0"><block id="|Tgo8I~X04G[v8TB8v3" type="comment"><field name="COMMENT">Zuviele Eingaben</field>
                        ! <next><block id="+lM8)EE
                        fCon1X0.Dw=" type="comment"><field name="COMMENT">Eingabe löschen und Versuche hochzählen</field> ! <next><block id="sRw2Xy,4}LO3T4q.5*yM" type="debug"><field name="Severity">log</field> ! <value name="TEXT"><shadow id="+cYZRRJa1z=6hGhTLdam" type="text"><field name="TEXT">*****Zuviele Zeichen*****</field></shadow></value> ! <next><block id="%D8buHC|kCUU1/KVJB[2" type="variables_set"><field name="VAR">tempCode</field> ! <value name="VALUE"></value> ! <next><block id="T/]?rq:p![ebfuT~k+i/" type="procedures_callnoreturn"><mutation name="chkVersuche"></mutation></block></next></block></next></block></next></block></next></block></statement> ! <value name="IF1"><block id="lDJ@;/jzBi=HTRV]yYn," type="logic_compare"><field name="OP">EQ</field> ! <value name="A"><block id="*v]-iY2]3*a;Ir}hU9sM" type="variables_get"><field name="VAR">tempCode</field></block></value> ! <value name="B"><block id="FXw/|._t2rtHCxgNR}N{" type="variables_get"><field name="VAR">CodeAnwesend</field></block></value></block></value> ! <statement name="DO1"><block id="l(HPe4p~ikj;pvhZJME," type="comment"><field name="COMMENT">Eingabe korrekt</field> ! <next><block id="]W5;w=NCr|pS0Jvri@V" type="comment"><field name="COMMENT">Nur zu Testzwecke eine Lammpe</field>
                        ! <next><block id="Olmp]xYgxshJxPjihu}Z" type="control"><mutation delay_input="false"></mutation>
                        ! <field name="OID">hue.0.Philips_hue.Hue_Deckenlampe_Büro_EG.on</field>
                        ! <field name="WITH_DELAY">FALSE</field>
                        ! <value name="VALUE"><block id="X~@e]v}!oR]GJo%+3Z5^" type="logic_boolean"><field name="BOOL">TRUE</field></block></value>
                        ! <next><block id="U;M412@-[mW58w:2/pDZ" type="debug"><field name="Severity">log</field>
                        ! <value name="TEXT"><shadow id="/6PKtIv;asj~zH1YFWm" type="text"><field name="TEXT">*Tür öffnet</field></shadow></value>
                        ! <next><block id="JsF#tPrlP((e*D(PKz;" type="variables_set"><field name="VAR">AnzahlVersuche</field> ! <value name="VALUE"><block id="_#wsFg(JuzNqSyCO63UI" type="math_number"><field name="NUM">0</field></block></value></block></next></block></next></block></next></block></next></block></statement> ! <next><block id="*)]FG}!jqa@!^@C404zD" type="timeouts_settimeout"><field name="NAME">timeout</field> ! <field name="DELAY">6000</field> ! <field name="UNIT">ms</field> ! <statement name="STATEMENT"><block id="@87rub*L(JD2dLo|Aef" type="comment"><field name="COMMENT">Wenn in 5 Sek. keine weitere Eingabe erfolgt</field>
                        ! <next><block id="/6Z(,/]
                        }ZhyadfHIgZ5" type="comment"><field name="COMMENT">dann Eingabe löschen und Versuche hochzählen</field>
                        ! <next><block id="a3yX(4)M(27nSsHd.d-_" type="variables_set"><field name="VAR">tempCode</field>
                        ! <value name="VALUE"></value>
                        ! <next><block id="Uqe6b9wNj]Sp(Zb#o#X" type="procedures_callnoreturn"><mutation name="chkVersuche"></mutation></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></statement></block> ! <block id="c,ULx]X]~F-z^(_+{6vr" type="procedures_defnoreturn" x="587" y="1263"><field name="NAME">chkVersuche</field> ! <comment pinned="false" h="80" w="160">Fehlerhafte Eingaben zählen und Eingabe sperren wenn maxVersuche erreicht.</comment> ! <statement name="STACK"><block id="+bbjB}N7U3vkk:@%?[V" type="math_change"><field name="VAR">AnzahlVersuche</field>
                        ! <value name="DELTA"><shadow id="P!Tq!OVi/(ehXZb]uC8" type="math_number"><field name="NUM">1</field></shadow></value>
                        ! <next><block id="V6AzqIh:%+F@oh[M-IQ{" type="controls_if"><value name="IF0"><block id="!CYyilZ1svbcZ]Yf=BXd" type="logic_compare"><field name="OP">EQ</field>
                        ! <value name="A"><block id="@Zmti,3QUsDg5gTF6tjC" type="variables_get"><field name="VAR">AnzahlVersuche</field></block></value>
                        ! <value name="B"><block id="x=cs)@yt;A6[ua
                        T5FE|" type="variables_get"><field name="VAR">maxVersuche</field></block></value></block></value>
                        ! <statement name="DO0"><block id="[d~Z|qEH+C4%5%A*xBTT" type="debug"><field name="Severity">log</field>
                        ! <value name="TEXT"><shadow id="v.9ViGY:H4?EbA+fzjKV" type="text"><field name="TEXT">Eingabe gesperrt</field></shadow></value>
                        ! <next><block id="(l|4)g2/(/@5-swvVF@2" type="timeouts_settimeout"><field name="NAME">sperren</field>
                        ! <field name="DELAY">10000</field>
                        ! <field name="UNIT">ms</field>
                        ! <statement name="STATEMENT"><block id="U22mj9gD,9P)FU@4%{K~" type="comment"><field name="COMMENT">Nach 10 Sek. wieder frei</field>
                        ! <next><block id="d)*rJF_51+C|Z3NMW9N+" type="variables_set"><field name="VAR">AnzahlVersuche</field>
                        ! <value name="VALUE"><block id="^)c6!p[y)V0zk(9oMl16" type="math_number"><field name="NUM">0</field></block></value>
                        ! <next><block id="SO`ZMoZ)Os7:]]y=T3yE" type="debug"><field name="Severity">log</field>
                        ! <value name="TEXT"><shadow id="5.ubt?0E+m)aiIY`J``U" type="text"><field name="TEXT">Eingabe entsperrt</field></shadow></value></block></next></block></next></block></statement></block></next></block></statement></block></next></block></statement></block></xml>
                        Danke für die Hilfe…....

                        Nun möchte ich noch wenn ich in der Kamera View den Button für die Tür öffne drücke, das er ins Pin View wechseln das ich den Pin eingeben kann....

                        Wenn der Pin dann richtig ist wieder zurück in die Haupt View.

                        Ich habe schon angefangen finde aber nicht wie ich den Befehl gebe ins andere View zu wechseln.

                        ! <xml 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml">
                        ! <block id="P0;or`fynD*oh9qpioYl" type="create" x="113" y="12"><field name="NAME">tuer oeffnen</field></block>
                        ! <block id="+5d@8}ZsB(hWUMU4#/%;" type="on_ext" x="63" y="187"><mutation items="1"></mutation>
                        ! <field name="CONDITION">ne</field>
                        ! <value name="OID0"><shadow id="88E~}]{jIb@HO;#:+Ml" type="field_oid"><field name="oid">javascript.0.tuer oeffnen</field></shadow></value>
                        ! <statement name="STATEMENT"><block id=",
                        (H6;7WwZ!nltRPQ34t" type="toggle"><mutation delay_input="false"></mutation>
                        ! <field name="OID">vis.0.control.command</field>
                        ! <field name="WITH_DELAY">FALSE</field></block></statement></block></xml>

                        Was ich auch noch gerne hätte ist das ich die debug ausgabe im Feld über dem Tastenfeld angezeigt wird.
                        4668_unbenannt12.png
                        4668_k640_unbenannt11.jpg

                        Max

                        ioBroker auf einem NUC ,16GB RAM, 120GB SSD) mit Proxmox
                        Cloud Pro, iot, Alexa, Sonos, sonoff, Fronius, Harmony, Doorbird, Shelly, Hue, Loxone, Mihome, …

                        1 Antwort Letzte Antwort
                        0
                        • rantanplanR Offline
                          rantanplanR Offline
                          rantanplan
                          schrieb am zuletzt editiert von
                          #31

                          @SmarthomeMF:

                          Juhu habe es geschafft!

                          Nun auch schon mir 0-9 und einem Code mit 4 Stellen.

                          ….

                          Was ich auch noch gerne hätte ist das ich die debug ausgabe im Feld über dem Tastenfeld angezeigt wird. `
                          Prima!

                          Dann musst Du Dir einen weiteren Datenpunkt anlegen.

                          steuere "Datenpunkt" mit "Meine Ausgabe".

                          Dann den Datenpunkt in VIS darstellen.

                          Zum Thema View-Wechsel mache bitte einen neuen Thread auf.

                          Sonst gibt es bei diesem hier, ein zu großes Durcheinander.

                          Tipp für den Betreff: [Frage] View-Wechsel mit Blockly

                          Damit machst Du die richtigen Helfer aufmerksam und andere Blockly User finden den Thread dann auch.

                          Grüße

                          Rantanplan

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

                          1 Antwort Letzte Antwort
                          0
                          • SmarthomeMFS Offline
                            SmarthomeMFS Offline
                            SmarthomeMF
                            schrieb am zuletzt editiert von
                            #32

                            @rantanplan:

                            Dann musst Du Dir einen weiteren Datenpunkt anlegen.steuere "Datenpunkt" mit "Meine Ausgabe".Dann den Datenpunkt in VIS darstellen. `
                            Das geht mir zu schnell…

                            Datenpunkt anlegen OK...

                            Datenpunkt Lautet "Meine Ausgabe"

                            den im Ausgabefeld im VIS einbinden....

                            Aber wie bekomme ich das dann hin das die debug Ausgabe dann das Angezeigt wird?

                            Max

                            ioBroker auf einem NUC ,16GB RAM, 120GB SSD) mit Proxmox
                            Cloud Pro, iot, Alexa, Sonos, sonoff, Fronius, Harmony, Doorbird, Shelly, Hue, Loxone, Mihome, …

                            1 Antwort Letzte Antwort
                            0
                            • rantanplanR Offline
                              rantanplanR Offline
                              rantanplan
                              schrieb am zuletzt editiert von
                              #33

                              @SmarthomeMF:

                              Aber wie bekomme ich das dann hin das die debug Ausgabe dann das Angezeigt wird? `
                              Die Ausgabe vom Debug-Baustein kannst Du nicht in VIS ausgeben.

                              Die ist nur zur Info/Kontrolle ob ein Blockly funktioniert.

                              Den Text von Deiner Meldung, musst Du über den "steuere" Baustein in Deinen Datenpunkt schreiben.
                              147_beispiel.png

                              Grüße

                              Rantanplan

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

                              1 Antwort Letzte Antwort
                              0
                              • X Offline
                                X Offline
                                xADDRx
                                schrieb am zuletzt editiert von
                                #34

                                Hallo zusammen,

                                erstmal vielen Dank für die tollen Vorlagen. Ich bin dabei meine Alarmanlage so zu programmieren, dass wenn der Alarm ausgelöst wurde, dann eine Pinabfrage im neuen Fenster erscheint. SObald der Pin eingeben wurde soll es dann wieder zurück zum letzten View. Soweit habe ich es realisieren können.

                                Problem ist nur, dass die Eingabe vom Pin nicht richtig funktioniert. Oft bleibt einer der Pins aktiviert(siehe Foto) und ich muss es antippen um dann von vorne anzufangen… Auch habe ich keine Möglichkeit gefunden, den Pin mit einer Taste dann zu bestätigen. Hat jemand andere Widgets für die Pin Eingabe benutzt, die dann auch wirklich zurückspringen?
                                3372_pin.jpg
                                3372_pin2.jpg

                                Sonos, Intel Nuc, Iobroker Pro, Proxmox, IPad Air (Wand), Vis, Xiaomi, Devolo, Bose, Philips Hue, Instar, Synology

                                1 Antwort Letzte Antwort
                                0
                                • rantanplanR Offline
                                  rantanplanR Offline
                                  rantanplan
                                  schrieb am zuletzt editiert von
                                  #35

                                  @xADDRx:

                                  Problem ist nur, dass die Eingabe vom Pin nicht richtig funktioniert. Oft bleibt einer der Pins aktiviert(siehe Foto) und ich muss es antippen um dann von vorne anzufangen… Auch habe ich keine Möglichkeit gefunden, den Pin mit einer Taste dann zu bestätigen. Hat jemand andere Widgets für die Pin Eingabe benutzt, die dann auch wirklich zurückspringen? `
                                  Mit den von mir vorgeschlagenen Widgets funktioniert es bei mir.

                                  Alternativ könnte man in dem Blockly den Wert von dem Datenpunkt wieder auf "unwahr" setzen.

                                  Wenn ich etwas Zeit finde erweitere ich die Vorlage mal.

                                  Grüße

                                  Rantanplan

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

                                  1 Antwort Letzte Antwort
                                  0
                                  • X Offline
                                    X Offline
                                    xADDRx
                                    schrieb am zuletzt editiert von
                                    #36

                                    Das ist nett danke. Hast du denn hier ein Export vom view bzw. Widget , die du benutzt?

                                    Sonos, Intel Nuc, Iobroker Pro, Proxmox, IPad Air (Wand), Vis, Xiaomi, Devolo, Bose, Philips Hue, Instar, Synology

                                    1 Antwort Letzte Antwort
                                    0
                                    • rantanplanR Offline
                                      rantanplanR Offline
                                      rantanplan
                                      schrieb am zuletzt editiert von
                                      #37

                                      Hallo xADDRx

                                      Hier ist das Widget

                                      ! > [{"tpl":"tplHqButton","data":{"g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","oid":"javascript.0.Pincode_1","min":"false","max":"true","iconName":"/icons-mfd-png/edit_numeric_1.png","btIconWidth":"56","offsetAuto":true,"leftOffset":"15","topOffset":"55","pushButton":false,"caption":"","captionOn":"","g_leftRight":true,"timeAsInterval":"true","infoLeftFontSize":"0","infoFontRightSize":"0","infoLeftPaddingLeft":"0","infoLeftPaddingRight":"0","infoRightPaddingRight":"0","descriptionLeft":"bolTaste01","g_styles":false,"signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"471px","top":"38px","width":"64px","height":"64px"},"widgetSet":"hqwidgets"}]

                                      Dieses Icon habe ich da hinterlegt.
                                      147_beispiel.png

                                      Da ich noch nicht abschätzen kann, wann ich wieder an eine neue PinCode Version komme, hier eine schnelle Lösung.

                                      Diese Funktion in Dein PinBlockly importieren.
                                      147_beispiel_2.png

                                      Dann den Funktionsaufruf am Ende der Tastenauswertung setzen.

                                      (Den ID Baustein findest Du unter Trigger)
                                      147_beispiel_3.png

                                      Hier der Export der Funktion.

                                      ! <xml xmlns="http://www.w3.org/1999/xhtml"><block type="procedures_defnoreturn" id="|fQd%l8A#uQGYJ#)AyaI" x="613" y="87"><mutation><arg name="IDvonObjekt"></arg></mutation> <field name="NAME">setFalse</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"><block type="control_ex" id="{gkuIu^_cuG@3:qZuORo"><field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"><shadow type="field_oid" id="E})6=AV][{.:IAZP)H7W"><field name="oid">Object ID</field></shadow> <block type="variables_get" id="i_Kmgn{!~j?xba%sy,fB"><field name="VAR">IDvonObjekt</field></block></value> <value name="VALUE"><shadow type="logic_boolean" id="UmRgg49GE*,tlBLMxAyK"><field name="BOOL">FALSE</field></shadow></value> <value name="DELAY_MS"><shadow type="math_number" id=",CHw(xo)]KFe/;3/xU7g"><field name="NUM">200</field></shadow></value> <next><block type="debug" id="a`/VmsClx`+.[!{3U09c"><field name="Severity">log</field> <value name="TEXT"><shadow type="text" id="=l.N9z;Ev9B=z0:!)_91"><field name="TEXT">***********</field></shadow></value></block></next></block></statement></block></xml> !

                                      Grüße

                                      Rantanplan

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

                                      1 Antwort Letzte Antwort
                                      0
                                      • X Offline
                                        X Offline
                                        xADDRx
                                        schrieb am zuletzt editiert von
                                        #38

                                        Hallo rantanplan,

                                        vielen Dank für die schnelle Hilfe.

                                        Merkwürdigerweise wird bei mir die Funktion "setfalse mit" unter Trigger nicht angezeigt???

                                        Gruß

                                        ben

                                        Sonos, Intel Nuc, Iobroker Pro, Proxmox, IPad Air (Wand), Vis, Xiaomi, Devolo, Bose, Philips Hue, Instar, Synology

                                        1 Antwort Letzte Antwort
                                        0
                                        • rantanplanR Offline
                                          rantanplanR Offline
                                          rantanplan
                                          schrieb am zuletzt editiert von
                                          #39

                                          @xADDRx:

                                          Merkwürdigerweise wird bei mir die Funktion "setfalse mit" unter Trigger nicht angezeigt??? `

                                          Das ist ja auch eine erstellte Funktion. Schau mal unter Funktionen.

                                          Grüße

                                          Rantanplan

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

                                          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

                                          661

                                          Online

                                          32.4k

                                          Benutzer

                                          81.5k

                                          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