NEWS
VIS-2 Alarm-Adapter - Pincode
-
Hallo zusammen,
hat schon jemand für den Alarm-Adapter eine PIN-Abfrage zum deaktivieren in der VIS-2 mit passendem Skript erstellt. Ich finde in den Anleitungen immer nur den Bezug zur alten VIS.Gruß
Holger -
Hallo zusammen,
hat schon jemand für den Alarm-Adapter eine PIN-Abfrage zum deaktivieren in der VIS-2 mit passendem Skript erstellt. Ich finde in den Anleitungen immer nur den Bezug zur alten VIS.Gruß
Holgerhat schon jemand für den Alarm-Adapter eine PIN-Abfrage zum deaktivieren in der VIS-2 mit passendem Skript erstellt.
Ich hab das grad an VIS-2 angepasst.

View Seite zum import:
Datenpunkte:

Blockly für das das Keypad, an den Stellen wo als PinCode '0000' steht mußt du halt durch deine Pin ersetzten und die Datenpunkte gegebenenfalls anpassen!
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="hXu+lYX(|pz/fNl/|#I0">PinCode</variable> <variable id=")+)_JW/YSN%[gQk@XDZa">eingaben</variable> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="control" id="JtLi.OfCSQ]^:esU`)+q" x="38" y="-87"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl3</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="/__xd2zMak!=/1nvY`:d"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="J]rIg,$JN,#7QMQ;!q9X"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl4</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="fr%xLJ[rzsP_jc):vLyf"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="Iw(rj_lg*,5}m7h1,`J9"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="$,rRL=kZ=vO-SQcRUlu4"> <field name="TEXT">Code</field> </block> </value> <next> <block type="variables_set" id="Of?-9*Ds0%`,(XkIE1ov"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="QsH)B$vF6zD4!)lbtLou"> <field name="TEXT"></field> </block> </value> <next> <block type="variables_set" id="w|ITmr!m{:mdB-uS@I*9"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="VALUE"> <block type="math_number" id="{wI:zThkaN.O!~sjy*Z6"> <field name="NUM">3</field> </block> </value> <next> <block type="on_ext" id="HJ?3h@g]s4rQ:bUM{L=$"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="U=^6T%6Si|L[^nh|n?+)"> <field name="oid">0_userdata.0.vis.Alarmanlage.Keypad.Zahl1</field> </shadow> </value> <statement name="STATEMENT"> <block type="text_append" id="GP52ZVlw=F1Myixln;!f"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="TEXT"> <shadow type="text" id="ZAE{12/rwE=p4D)/3cJ%"> <field name="TEXT"></field> </shadow> <block type="on_source" id="Gg4m+l)A1Qcv03wQuf]*"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="debug" id="_s;:LlPmx}Ds=l1Q8Xe."> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="8D%6s:-xQ%a:yeCVUPL~"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="8_GWZG}ytStYmA^#Y:os"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> <next> <block type="control" id="qCo_hE7T{++*1z.y+Wue"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="515|`Q!/stg3^J2PcXee"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="on_ext" id="!nIRaNC56LIi`Q_lqqn!"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="=7@sc=Vy^wx*PvQ@}yTx"> <field name="oid">0_userdata.0.vis.Alarmanlage.Keypad.Zahl4</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="=s`=6rgF43T91GqAqK3F"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="%E9~^{CqXgDPzk-Ti8wC"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="?WL]YG0-Ui6,Sc60c}?R"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="ea[FTIp?_Ab%x4CEw*pE"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="AIYc+j]`njo|+_Rm[:^+"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> <value name="B"> <block type="text" id="`|x1+0NhDvggGq.y([lJ"> <field name="TEXT">0000</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id=",%:o)qY08]p#r$ythS]M"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="Itr);=En[kN*MZ3aO1l|"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="B"> <block type="math_number" id="YD.ZD0a1pt{qYb1rI6dI"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="P1IxZ6{6Z}]dLd6U(y[0"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="?n=AG7|JcC*I*x5igITl"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="nR?k1gi`rb;0W}g?])k+"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="`DtB7j`*En)iR5/zp}0N"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="H3x#K@r4|C)5.GPcQW?_"> <field name="TEXT">alarmanlage aktivieren</field> </shadow> </value> <next> <block type="variables_set" id="AkjtE7N9/O/2t`-|2GxU"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="flXu+p5(:]e9Im97*5Ck"> <field name="TEXT"></field> </block> </value> <next> <block type="variables_set" id="V-yT6|{BPw`BikE7|CBg"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="VALUE"> <block type="math_number" id="QixWvm),7Qp1LR|Ev$0V"> <field name="NUM">3</field> </block> </value> <next> <block type="controls_if" id="!igq!030VwcK.8HoAjn4"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="1XJ#?_,OzJeQbR,N)09d"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="BwH~1zw}hBqU=Hdu^lQy"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="+:m!Jx`50aN@$SGm$v2s"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id="5)h{jaHD24Zp2gakX4uq"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="OkI9t*K@hbXrlW!:e@yK"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="7)pB@=[V~%cYHc!e6?/@"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="M.V][IhM.QC7=}PT`ne6"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id="Ax?_-k2+rvQbI2dzh+p)"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id=";?p5Y0GOjzgo8}w+g1XO"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="A:IfOhHv+JrKIw5WA4?A"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id="Y-v~rS?@lmh~E+=|JJcq"> <field name="NUM">3</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="*qU-/Q3=-*M]vl_(,n/E"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alarm.0.use.list</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="UrkB+UOP-_h@Q!bM[!s]"> <field name="NUM">0</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="?WRQ-Y{B9SrvqUPs3v!k"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alarm.0.use.list</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="C?45eY{`uye^thwW^o5g"> <field name="NUM">1</field> </block> </value> </block> </statement> <next> <block type="control" id="Fs/][{k@rqys+XDr^dB_"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="w7FGeDJ^t0q#+:C*hn:}"> <field name="TEXT">Code o.k. </field> </block> </value> <next> <block type="control" id="24M,l6}cxiRMouDsCS5F"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">5</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="z[-2r_^8!5BrLMvYQnY("> <field name="TEXT">Code</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="ryysZ;rET77+KF)|)C?`"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="lQrDbJx4F_/G-Rf:w{sz"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="eu#lTxQ`,z-ll??M2HHv"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="66_#MCB$Wc/W!UL2Y!mU"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> <value name="B"> <block type="text" id="DS[e@|;,k}iU]3`d/nRF"> <field name="TEXT">0000</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="SZ|T?!^/YzjA1}hqIS-#"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="1di,^(9^]my5%x*=v5Fb"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="B"> <block type="math_number" id="*sO(q7Ki`t+wTi?C)Q}/"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="{OcqSUr6eJG+99dKYMud"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id=":}PC?FC:QS6F]8Kf27r)"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="sZIv8!^kVBr$U:QI$(X."> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="J_WThD8#]w)8|^)InLk|"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="a30,p-in`B~T!JNugx;7"> <field name="TEXT"></field> </block> </value> <next> <block type="math_change" id="!/rpmBJZL(dd)Sv`%4._"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="DELTA"> <shadow type="math_number" id="%XHgIs7n+FYB/W7[1~b0"> <field name="NUM">1</field> </shadow> <block type="math_number" id="tSZWBGUk(gM{S{%44~@m"> <field name="NUM">-1</field> </block> </value> <next> <block type="control" id="awPa#9[dK2CK?!8kZ7WB"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="53F_y~Oh$^.ANR?H)AHC"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="udZ]!]oZp:L;{RfVJw!L"> <field name="TEXT">Code falsch noch </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="4Q2SRFmQSAshkaR)Z[19"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="ADD2"> <block type="text" id="|=-3sL0,_*t6):Nob7d3"> <field name="TEXT">eingaben</field> </block> </value> </block> </value> <next> <block type="control" id="+RuvWl?7G1kR9:0hg`#A"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="w.$(G1[B4:noTtw|uaOg"> <field name="TEXT">Code</field> </block> </value> <next> <block type="debug" id="}a);kk2@z{`Dr1;X[Tm="> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="nx,-w}mbH4EhA!+c*b%Z"> <field name="TEXT">PIN ist falsch !</field> </shadow> </value> <next> <block type="controls_if" id="Y4];K1yPmC6efH|u0$-?"> <value name="IF0"> <block type="logic_compare" id="(10}bWOBi!ilGN[(^l)x"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="z588R(5=F0En:C9`.1Z_"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="B"> <block type="math_number" id="`WvSs0JEW1QN)*;sR|CG"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="!jijC^P9LAW]UH2|Ls;r"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">4</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id=",_dZ9CpVNgm#dOY1g2,O"> <field name="TEXT">20 sec warten !</field> </block> </value> <next> <block type="timeouts_cleartimeout" id=".$V4-n^w2ZnM1ll{!QQU"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="Qfxc0|*a$Gbkp^iPzdN!"> <field name="NAME">timeout</field> <field name="DELAY">5</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="=r%j3oy6gr9|}Nw1*;P$"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="Ls3S-?FN~PoHbtfG.|#$"> <field name="TEXT">_ _ _ _</field> </block> </value> <next> <block type="control" id="aB_7aDucQqNBfls/i8qB"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="49hBv0!s$|6^%%hKM+em"> <field name="TEXT">Code</field> </block> </value> <next> <block type="variables_set" id=";L={r{N%SY7,zkjN!7H4"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="VALUE"> <block type="math_number" id="TY45URa)4`IZl3BLQ#B~"> <field name="NUM">3</field> </block> </value> <next> <block type="variables_set" id="]Kn!Y3Iw*hQMr(?+@a!;"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="5f,/WG?Y}Rsw_by6jj%,"> <field name="TEXT"></field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <next> <block type="control" id="Y!t3{,0sRNxKdOrN5vY!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl4</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="math_number" id="7~.l{POOc`AU:X/tcPl:"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="4LW)3Wjo^608;Fo%-sMV"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl1</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">4</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="/1H/{$4|PtRE[2$JSV@o"> <field name="TEXT"></field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="on_ext" id="EHvo|}r`w/vsc%Pu2iXY"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=",{B0Xz0K*j?D|*#PfNn!"> <field name="oid">0_userdata.0.vis.Alarmanlage.Keypad.Zahl3</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="l$%!@M=a(Um))j!54`;L"> <value name="IF0"> <block type="logic_compare" id="YWp3a+bc_Pg5f,SFKp]+"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="UutODW1nb8(QxP::*6G5"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="wGVSWbxM3)*+Y:FA?]V/"> <field name="NUM">1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="zGk;}Uiyu_=.m3$_[#yA"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="qV7}X48)/8RB^$XiSA}_"> <field name="TEXT">Eingabe zurücksetzen</field> </block> </value> <next> <block type="variables_set" id="Dv)CHW*kR_@5Q9jt[!;$"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="usrp$n#u4(+nGw?s!R@c"> <field name="TEXT"></field> </block> </value> <next> <block type="control" id="bs[~N;7!p|RE~u,-Q1BU"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="8d24E)ZEDdOJ~hc2gMZW"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="control" id="^Li/yqE|AZTA|:O4$w[z"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl3</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="math_number" id="=6#gi)LIROMQ;2,tnU@C"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="logic_operation" id="t@l$2kmU0{YNBGCH/zLA" x="488" y="438"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="{{^x*:o.@4wlX{Y:oQhW"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=")o%FZt4VgSZmdoQgaD]A"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id=")Fya79)e@x$e0w0SV6gy"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </xml> -
hat schon jemand für den Alarm-Adapter eine PIN-Abfrage zum deaktivieren in der VIS-2 mit passendem Skript erstellt.
Ich hab das grad an VIS-2 angepasst.

View Seite zum import:
Datenpunkte:

Blockly für das das Keypad, an den Stellen wo als PinCode '0000' steht mußt du halt durch deine Pin ersetzten und die Datenpunkte gegebenenfalls anpassen!
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="hXu+lYX(|pz/fNl/|#I0">PinCode</variable> <variable id=")+)_JW/YSN%[gQk@XDZa">eingaben</variable> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="control" id="JtLi.OfCSQ]^:esU`)+q" x="38" y="-87"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl3</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="/__xd2zMak!=/1nvY`:d"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="J]rIg,$JN,#7QMQ;!q9X"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl4</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="fr%xLJ[rzsP_jc):vLyf"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="Iw(rj_lg*,5}m7h1,`J9"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="$,rRL=kZ=vO-SQcRUlu4"> <field name="TEXT">Code</field> </block> </value> <next> <block type="variables_set" id="Of?-9*Ds0%`,(XkIE1ov"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="QsH)B$vF6zD4!)lbtLou"> <field name="TEXT"></field> </block> </value> <next> <block type="variables_set" id="w|ITmr!m{:mdB-uS@I*9"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="VALUE"> <block type="math_number" id="{wI:zThkaN.O!~sjy*Z6"> <field name="NUM">3</field> </block> </value> <next> <block type="on_ext" id="HJ?3h@g]s4rQ:bUM{L=$"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="U=^6T%6Si|L[^nh|n?+)"> <field name="oid">0_userdata.0.vis.Alarmanlage.Keypad.Zahl1</field> </shadow> </value> <statement name="STATEMENT"> <block type="text_append" id="GP52ZVlw=F1Myixln;!f"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="TEXT"> <shadow type="text" id="ZAE{12/rwE=p4D)/3cJ%"> <field name="TEXT"></field> </shadow> <block type="on_source" id="Gg4m+l)A1Qcv03wQuf]*"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="debug" id="_s;:LlPmx}Ds=l1Q8Xe."> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="8D%6s:-xQ%a:yeCVUPL~"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="8_GWZG}ytStYmA^#Y:os"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> <next> <block type="control" id="qCo_hE7T{++*1z.y+Wue"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="515|`Q!/stg3^J2PcXee"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="on_ext" id="!nIRaNC56LIi`Q_lqqn!"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="=7@sc=Vy^wx*PvQ@}yTx"> <field name="oid">0_userdata.0.vis.Alarmanlage.Keypad.Zahl4</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="=s`=6rgF43T91GqAqK3F"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="%E9~^{CqXgDPzk-Ti8wC"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="?WL]YG0-Ui6,Sc60c}?R"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="ea[FTIp?_Ab%x4CEw*pE"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="AIYc+j]`njo|+_Rm[:^+"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> <value name="B"> <block type="text" id="`|x1+0NhDvggGq.y([lJ"> <field name="TEXT">0000</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id=",%:o)qY08]p#r$ythS]M"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="Itr);=En[kN*MZ3aO1l|"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="B"> <block type="math_number" id="YD.ZD0a1pt{qYb1rI6dI"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="P1IxZ6{6Z}]dLd6U(y[0"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="?n=AG7|JcC*I*x5igITl"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="nR?k1gi`rb;0W}g?])k+"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="debug" id="`DtB7j`*En)iR5/zp}0N"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="H3x#K@r4|C)5.GPcQW?_"> <field name="TEXT">alarmanlage aktivieren</field> </shadow> </value> <next> <block type="variables_set" id="AkjtE7N9/O/2t`-|2GxU"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="flXu+p5(:]e9Im97*5Ck"> <field name="TEXT"></field> </block> </value> <next> <block type="variables_set" id="V-yT6|{BPw`BikE7|CBg"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="VALUE"> <block type="math_number" id="QixWvm),7Qp1LR|Ev$0V"> <field name="NUM">3</field> </block> </value> <next> <block type="controls_if" id="!igq!030VwcK.8HoAjn4"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="1XJ#?_,OzJeQbR,N)09d"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="BwH~1zw}hBqU=Hdu^lQy"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="+:m!Jx`50aN@$SGm$v2s"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id="5)h{jaHD24Zp2gakX4uq"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="OkI9t*K@hbXrlW!:e@yK"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="7)pB@=[V~%cYHc!e6?/@"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="M.V][IhM.QC7=}PT`ne6"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id="Ax?_-k2+rvQbI2dzh+p)"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id=";?p5Y0GOjzgo8}w+g1XO"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="A:IfOhHv+JrKIw5WA4?A"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id="Y-v~rS?@lmh~E+=|JJcq"> <field name="NUM">3</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="*qU-/Q3=-*M]vl_(,n/E"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alarm.0.use.list</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="UrkB+UOP-_h@Q!bM[!s]"> <field name="NUM">0</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="?WRQ-Y{B9SrvqUPs3v!k"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alarm.0.use.list</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="C?45eY{`uye^thwW^o5g"> <field name="NUM">1</field> </block> </value> </block> </statement> <next> <block type="control" id="Fs/][{k@rqys+XDr^dB_"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="w7FGeDJ^t0q#+:C*hn:}"> <field name="TEXT">Code o.k. </field> </block> </value> <next> <block type="control" id="24M,l6}cxiRMouDsCS5F"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">5</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="z[-2r_^8!5BrLMvYQnY("> <field name="TEXT">Code</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="ryysZ;rET77+KF)|)C?`"> <field name="OP">AND</field> <value name="A"> <block type="logic_operation" id="lQrDbJx4F_/G-Rf:w{sz"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="eu#lTxQ`,z-ll??M2HHv"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="66_#MCB$Wc/W!UL2Y!mU"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> <value name="B"> <block type="text" id="DS[e@|;,k}iU]3`d/nRF"> <field name="TEXT">0000</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="SZ|T?!^/YzjA1}hqIS-#"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id="1di,^(9^]my5%x*=v5Fb"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="B"> <block type="math_number" id="*sO(q7Ki`t+wTi?C)Q}/"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="{OcqSUr6eJG+99dKYMud"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id=":}PC?FC:QS6F]8Kf27r)"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="sZIv8!^kVBr$U:QI$(X."> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="J_WThD8#]w)8|^)InLk|"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="a30,p-in`B~T!JNugx;7"> <field name="TEXT"></field> </block> </value> <next> <block type="math_change" id="!/rpmBJZL(dd)Sv`%4._"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="DELTA"> <shadow type="math_number" id="%XHgIs7n+FYB/W7[1~b0"> <field name="NUM">1</field> </shadow> <block type="math_number" id="tSZWBGUk(gM{S{%44~@m"> <field name="NUM">-1</field> </block> </value> <next> <block type="control" id="awPa#9[dK2CK?!8kZ7WB"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="53F_y~Oh$^.ANR?H)AHC"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="udZ]!]oZp:L;{RfVJw!L"> <field name="TEXT">Code falsch noch </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="4Q2SRFmQSAshkaR)Z[19"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="ADD2"> <block type="text" id="|=-3sL0,_*t6):Nob7d3"> <field name="TEXT">eingaben</field> </block> </value> </block> </value> <next> <block type="control" id="+RuvWl?7G1kR9:0hg`#A"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="w.$(G1[B4:noTtw|uaOg"> <field name="TEXT">Code</field> </block> </value> <next> <block type="debug" id="}a);kk2@z{`Dr1;X[Tm="> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="nx,-w}mbH4EhA!+c*b%Z"> <field name="TEXT">PIN ist falsch !</field> </shadow> </value> <next> <block type="controls_if" id="Y4];K1yPmC6efH|u0$-?"> <value name="IF0"> <block type="logic_compare" id="(10}bWOBi!ilGN[(^l)x"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="z588R(5=F0En:C9`.1Z_"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> </block> </value> <value name="B"> <block type="math_number" id="`WvSs0JEW1QN)*;sR|CG"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="!jijC^P9LAW]UH2|Ls;r"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">4</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id=",_dZ9CpVNgm#dOY1g2,O"> <field name="TEXT">20 sec warten !</field> </block> </value> <next> <block type="timeouts_cleartimeout" id=".$V4-n^w2ZnM1ll{!QQU"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="Qfxc0|*a$Gbkp^iPzdN!"> <field name="NAME">timeout</field> <field name="DELAY">5</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="=r%j3oy6gr9|}Nw1*;P$"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="Ls3S-?FN~PoHbtfG.|#$"> <field name="TEXT">_ _ _ _</field> </block> </value> <next> <block type="control" id="aB_7aDucQqNBfls/i8qB"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="49hBv0!s$|6^%%hKM+em"> <field name="TEXT">Code</field> </block> </value> <next> <block type="variables_set" id=";L={r{N%SY7,zkjN!7H4"> <field name="VAR" id=")+)_JW/YSN%[gQk@XDZa">eingaben</field> <value name="VALUE"> <block type="math_number" id="TY45URa)4`IZl3BLQ#B~"> <field name="NUM">3</field> </block> </value> <next> <block type="variables_set" id="]Kn!Y3Iw*hQMr(?+@a!;"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="5f,/WG?Y}Rsw_by6jj%,"> <field name="TEXT"></field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <next> <block type="control" id="Y!t3{,0sRNxKdOrN5vY!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl4</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="math_number" id="7~.l{POOc`AU:X/tcPl:"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="4LW)3Wjo^608;Fo%-sMV"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl1</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">4</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="/1H/{$4|PtRE[2$JSV@o"> <field name="TEXT"></field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="on_ext" id="EHvo|}r`w/vsc%Pu2iXY"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=",{B0Xz0K*j?D|*#PfNn!"> <field name="oid">0_userdata.0.vis.Alarmanlage.Keypad.Zahl3</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="l$%!@M=a(Um))j!54`;L"> <value name="IF0"> <block type="logic_compare" id="YWp3a+bc_Pg5f,SFKp]+"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="UutODW1nb8(QxP::*6G5"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="wGVSWbxM3)*+Y:FA?]V/"> <field name="NUM">1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="zGk;}Uiyu_=.m3$_[#yA"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="qV7}X48)/8RB^$XiSA}_"> <field name="TEXT">Eingabe zurücksetzen</field> </block> </value> <next> <block type="variables_set" id="Dv)CHW*kR_@5Q9jt[!;$"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> <value name="VALUE"> <block type="text" id="usrp$n#u4(+nGw?s!R@c"> <field name="TEXT"></field> </block> </value> <next> <block type="control" id="bs[~N;7!p|RE~u,-Q1BU"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="8d24E)ZEDdOJ~hc2gMZW"> <field name="VAR" id="hXu+lYX(|pz/fNl/|#I0">PinCode</field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="control" id="^Li/yqE|AZTA|:O4$w[z"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.vis.Alarmanlage.Keypad.Zahl3</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="math_number" id="=6#gi)LIROMQ;2,tnU@C"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="logic_operation" id="t@l$2kmU0{YNBGCH/zLA" x="488" y="438"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="{{^x*:o.@4wlX{Y:oQhW"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=")o%FZt4VgSZmdoQgaD]A"> <field name="ATTR">val</field> <field name="OID">alarm.0.use.list</field> </block> </value> <value name="B"> <block type="math_number" id=")Fya79)e@x$e0w0SV6gy"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </xml>Hey, Klasse. Funktioniert super.
Noch eine Frage, kann man die Zahlen in der Codeanzeige auch als "*" darstellen. Damit keiner den Code lesen kann. -
Ich habe das Blockly durch eine KI in ein Javascript umsetzen lassen.
Technische Dokumentation: Automatisches VIS-2 Keypad mit Telegram-Anbindung
Dieses Skript steuert die PIN-Code-Eingabe einer Alarmanlage über das VIS-2-Interface in ioBroker. Es bietet eine automatische Auswertung nach der vierten Ziffer, Maskierung der Eingabe durch Sicherheits-Punkte, einen automatischen Sperrmechanismus bei Falscheingaben sowie eine direkte Alarmierung über Telegram.
- Systemvoraussetzungen & Datenpunkte
Das Skript verwendet standardmäßig vier Datenpunkte innerhalb der ioBroker-Objektstruktur. Alle Zustände werden datentyp-konform verarbeitet.
Datenpunkt-ID Datentyp Funktion / Zuordnung
0_userdata.0.vis.Alarmanlage.Keypad.Zahl1 String Empfängt die gedrückte Ziffer aus dem VIS-2 Keypad Widget.
0_userdata.0.vis.Alarmanlage.Keypad.Zahl2 String Das VIS-Display. Zeigt den Text („Code“), Punkte (••••) oder Statusmeldungen.
0_userdata.0.vis.Alarmanlage.Keypad.Zahl3 Number Löschen-Taste (Del). Setzt die aktuelle Eingabe bei Betätigung zurück.
alarm.0.use.list Number Der Status der ioBroker-Alarmanlage (0 = Deaktiviert, 1 = Aktiviert).
telegram.0 Instanz Telegram-Adapter für den Versand der Status- und Alarmnachrichten.
- Ablaufdiagramm & Funktionslogik
[ Tastendruck in VIS-2 ] ---> Schreibt Ziffer in .Zahl1
|
v
Is Keypad gesperrt?
/
(Ja) / \ (Nein)
v v
[Eingabe blockiert] [Ziffer im RAM anhängen]
[Display: GESPERRT] [Display: Maskierung ••••]
|
v
PIN-Länge 4 erreicht?
|
(Ja) ----+---- (Nein) ---> [Wartet auf nächste Ziffer]
|
v
[ PIN-Prüfung ]
/
(Korrekt) / \ (Falsch)
v v
[Alarmanlage schalten] [Fehlversuch +1]
[Telegram: Deaktiviert] [Telegram: Warnung]
|
v
Fehlversuche >= 3?
|
(Ja) ----+---- (Nein) -> [Zurück auf Standard]
|
v
[ Keypad 5 Min SPERREN ]
[ Display: GESPERRT ]
[ Telegram: KRITISCHER ALARM ]
- Kernfunktionen im Detail
3.1 Sicherheits-Maskierung (Datenschutz)
Die Eingabe der Ziffern erfolgt nicht in einem physischen Datenpunkt. Die Zahlenkette wird ausschließlich im flüchtigen Arbeitsspeicher (RAM) der JavaScript-Variable internerKlartext zwischengespeichert. Für das VIS-Display (Zahl2) wird per .repeat() temporär ein String aus Punkten (•) erzeugt. Ein Ausspähen der PIN über ioBroker-Zustände ist somit unmöglich.
3.2 Automatisches Null-Resetting
Da inventwo-Widgets in VIS-2 den geschriebenen Zustand dauerhaft halten, lauscht das Skript auf jede Aktualisierung (change: "any"). Nach der Ziffern-Registrierung leert das Skript das Eingabefeld Zahl1 sofort wieder aktiv mit einem Leerstring (''). Dadurch wird sichergestellt, dass dieselbe Ziffer (z. B. eine Doppel-3) problemlos direkt hintereinander eingegeben werden kann.
3.3 Automatisches Prüfverfahren
Es ist keine Bestätigungstaste (Enter) erforderlich. Das Skript vergleicht die Länge der Variable internerKlartext mit der vordefinierten PIN-Konstante (ID_WUNSCH_PIN). Sobald die 4. Ziffer registriert ist, wird die Funktion pruefePin() ohne Zeitverzögerung ausgeführt.
3.4 3-Stufen-Sperrmechanismus (Brute-Force-Schutz)
• Versuch 1 & 2: Das Skript lehnt den Code ab, leert den Speicher, zeigt im Display „Falscher Code!“ an und sendet eine Telegram-Warnung mit der aktuellen Versuchsnummer.
• Versuch 3: Das Keypad wechselt in den Zustand istGesperrt = true. Auf dem VIS-Bildschirm erscheint dauerhaft der Text „GESPERRT“. Jegliche weitere Tasteneingabe wird sofort verworfen. Es wird ein kritischer Telegram-Alarm abgesetzt.
• Entsperrung: Ein asynchroner Timeout-Timer (sperrTimer) entsperrt das System nach exakt 5 Minuten (300000 ms) vollautomatisch und setzt den Fehlerzähler zurück. Alternativ hebt ein Skript-Neustart die Sperre sofort auf.
3.5 Manuelles Löschen (Zahl3)
Wird während der Code-Eingabe die Löschen-Taste (Zahl3) betätigt, löscht das Skript die Variable im RAM, zeigt im Display „Eingabe gelöscht“ und springt nach 1,5 Sekunden in den Bereitschaftsmodus („Code“) zurück. Um dem Datentyp gerecht zu werden, wird die Taste danach wieder auf die Zahl 0 gesetzt.
- Parameter-Konfiguration im Quellcode
Die Verhaltensweisen des Skripts können im Kopfbereich der JavaScript-Datei über Konstanten angepasst werden:
• ID_WUNSCH_PIN: Ändere den Wert '0000' in deine gewünschte Zahlenkombination.
• MAX_FEHLVERSUCHE: Bestimmt die Anzahl erlaubter Versuche (Standard: 3).
• SPERR_ZEIT_MS: Sperrdauer in Millisekunden. (Rechenbeispiel für 5 Minuten: 5 * 60 * 1000 = 300000).
- Systemvoraussetzungen & Datenpunkte
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden