NEWS
Kleine Alarmanlagen Schaltung
-
Hey Ho Leute ich brauche mal wieder Hilfe bei einem Blockly.
Ich würde gerne eine kleine Alarmanlage basteln.
Mit 6 Fenster Sensoren die per Alexa verbunden sind und per Datenpunkt wird die Alarmanlage per alexa ein-aus/geschaltet sprich das Blockly aktiviert um dann den trigger auszulösen das wenn einer der Sensoren true ist soll eine telegram nachricht raus und eine Alarmsirene soll an gehen. die Sirene soll aber dann nur 10 min laufen und die Telegram nachricht soll dann 3 mal gesendet werden.
Ich komme irgendwie nicht weiter. Vielleicht hat ja einer eine gute Idee!<xml xmlns="https://developers.google.com/blockly/xml"> <block type="on_ext" id="@(7^^2tnC$!0BEBP3UL)" x="308" y="-72"> <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="%!8oH@`8qQfEC91oI]^s"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.Alarmanlage_an/aus</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="[^EMOB;4vTauA59s:G9Z"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="Y!U.AU^zu.PPVR6=*e9K"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="|o{h1_KkVD]3H75I1Wt!"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.Alarmanlage_an/aus</field> </block> </value> <value name="B"> <block type="logic_boolean" id="UQk8Y`8~*@n5tYtJk#+O"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Vb](~SaN.RWF)yQ%%67}"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.scriptEnabled.Alexa_Steuerung.Alarmanlage</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="Aq`(G-k3`~qhx$;8|m.l"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="p,cw02{/?=O4^Ccq41jI"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.scriptEnabled.Alexa_Steuerung.Alarmanlage</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="`o{6[A$P]|%r_QyyO[wC"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="{DF~LTM?T?V+8E~c(KTZ"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="8o9Kt=s:qGpg~P7chh?v" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_operation" id="Jf22U,BJs{SK,:7*{4or" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="get_value" id="%XI}54)cOeCIYV5IWaAd"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_badezimmer_trigger</field> </block> </value> <value name="B"> <block type="get_value" id="HQkogd]}zBraO-B;2$~9"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_buero_trigger</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id=")a_A,hiTDWA[H-;0i4lU" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_operation" id="I73uRbEHZ_7YZ#HWag^U" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="get_value" id="`dWh%5rcNU32hlW+gl}Z"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_kueche_trigger</field> </block> </value> <value name="B"> <block type="get_value" id="_sp`Y:;/FM:sVe_g3]%S"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_schlafzimmer_trigger</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="1ffFLNacn;yzW(%:AZ.U" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="get_value" id="o/:{qc217xuI|9])c48y"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_wohnzimmer_trigger</field> </block> </value> <value name="B"> <block type="get_value" id="%$EgP!%Zg~e_=PHaSxz%"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.tuer_sensor_wohnzimmer_trigger</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id=":InUcDYcWFmC8[Ra11tT"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.Aqua_Control.POWER3</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="a1b;T=0nK!AbtR=eaJ$c"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="PHNReWGK^!.OE0tf!wMB"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.Aqua_Control.POWER3</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="%h-p3npZodWronYw6OV("> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </xml>
-
@Aphofis Du triggerst lediglich auf Alarmanlage ein / aus. So kannst du die Anlage zwar schalten, doch um einen Alarm auszulösen, brauchst du einen eigenen Trigger für die Kontakte.
In diesem musst du dann prüfen ob die Alarmanlage scharf ist und falls ja die Sirene ansteuern. Sobald du die Anlage aber unscharf schaltest, sollte die Sirene aber auch aus gehen.
-
@Dr-Bakterius sagte:
um einen Alarm auszulösen, brauchst du einen eigenen Trigger für die Kontakte.
Ja, der Trigger sollte auslösen, wenn ein Fenster "öffnet". Etwa so:
-
@paul53
Das ja mal wiieder gezaubert! werde ich mal testen!!!
Danke -
@paul53
hab das mal getestet, irgendwas hab ich falsch gebaut!
Man kann den Datenpunkt Alarmanlage an/aus nicht einschalten.<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="~42gns1qvls4T]2Gv/p/">Alarmanlage_an</variable> <variable type="timeout" id="timeout">timeout</variable> <variable id="8TXM}c*{]59EXo3_wr,*">timeout</variable> <variable id="3jwA!ZrM0=W-y3.@me`C">count</variable> <variable type="interval" id="Intervall">Intervall</variable> </variables> <block type="on_ext" id="@(7^^2tnC$!0BEBP3UL)" x="-13" y="-138"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="6"></mutation> <field name="CONDITION">gt</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="^fLGq+uP=!S4:QPS%;$,"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_badezimmer_trigger</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="baVj~1Kg@|*WU2u%#U6)"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_buero_trigger</field> </shadow> </value> <value name="OID2"> <shadow type="field_oid" id="ZzsDJ,7:]gw{$F6cVT-l"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_kueche_trigger</field> </shadow> </value> <value name="OID3"> <shadow type="field_oid" id="TWY~%/ha|s=b(n3`y[I/"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_schlafzimmer_trigger</field> </shadow> </value> <value name="OID4"> <shadow type="field_oid" id="tZ3sL*a$fY{e?Pu~6XaW"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.fenster_sensor_wohnzimmer_trigger</field> </shadow> </value> <value name="OID5"> <shadow type="field_oid" id="%!8oH@`8qQfEC91oI]^s"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.tuer_sensor_wohnzimmer_trigger</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="{DF~LTM?T?V+8E~c(KTZ"> <value name="IF0"> <block type="logic_operation" id="$e^RM+N6?^KR@g|.J=+d" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="variables_get" id="T*#O,/w])n%t4rEP{ezz"> <field name="VAR" id="~42gns1qvls4T]2Gv/p/">Alarmanlage_an</field> </block> </value> <value name="B"> <block type="logic_negate" id="d+maHLr2++G$_q~jV{@t"> <value name="BOOL"> <block type="variables_get" id="K%N^([Tl$@Cx?nVj,xP2"> <field name="VAR" id="8TXM}c*{]59EXo3_wr,*">timeout</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="%RN{Tj-6-7t]lKWnudTI"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Aqua_Control.0.Alarm_Sensoren.Alarmanlage_an/aus</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="jOr},MsA@*Rih+sd6f|8"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="timeouts_settimeout" id="sGM%_KwEeqMkBb^!9Dt["> <field name="NAME">timeout</field> <field name="DELAY">10</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="control" id="PHNReWGK^!.OE0tf!wMB"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.Aqua_Control.POWER3</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="%h-p3npZodWronYw6OV("> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="variables_set" id="tL_!DX+EtJkijwrSYoCu"> <field name="VAR" id="3jwA!ZrM0=W-y3.@me`C">count</field> <value name="VALUE"> <block type="math_number" id="#Mb;Cfs*ybJA)vOG)Otg"> <field name="NUM">3</field> </block> </value> <next> <block type="timeouts_setinterval" id=")?_nfX$XeWfejdtM?{@:"> <field name="NAME">Intervall</field> <field name="INTERVAL">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="telegram" id="j?[eYA{1[-k9gF*G%sRm"> <field name="INSTANCE">.0</field> <field name="LOG"></field> <field name="SILENT">FALSE</field> <field name="PARSEMODE">default</field> <value name="MESSAGE"> <shadow type="text" id="a[#sXffT7Kk;2du0_6ge"> <field name="TEXT">Alarmanlage wurde ausgelöst</field> </shadow> </value> <next> <block type="control" id="o`TK2BDhCiRG}5p}@`Oc"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G0913L06031202PA.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="S4g1HiY^qo3zT/)MHzgO"> <field name="TEXT">Alarmanlage wurde ausgelöst,, die polizei wird alamiert</field> </block> </value> <next> <block type="control" id="GW[aYg,@c*qyx{9/}nAu"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090LV0371040175.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="@t}GBZ#u7mPNk*(E~,20"> <field name="TEXT">Alarmanlage wurde ausgelöst,, die polizei wird alamiert</field> </block> </value> <next> <block type="control" id="m1GjZH/,E_(mw[C+l#B8"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090L90965230TAT.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="D!mC;S0]U7G#+rsw,`$]"> <field name="TEXT">Alarmanlage wurde ausgelöst,, die polizei wird alamiert</field> </block> </value> <next> <block type="math_change" id="k0.8$[`[VJF4V[Qm_H#i"> <field name="VAR" id="3jwA!ZrM0=W-y3.@me`C">count</field> <value name="DELTA"> <shadow type="math_number" id=";.XND*yB?At(jFB2WLzp"> <field name="NUM">-1</field> </shadow> </value> <next> <block type="controls_if" id=".bC2{))CNvc1zTSS_UKt"> <value name="IF0"> <block type="logic_compare" id="2rQ]9K`GDqW,+W3I*OmB"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="Q(.hMoHYB(-.[%V)9Ax#"> <field name="VAR" id="3jwA!ZrM0=W-y3.@me`C">count</field> </block> </value> <value name="B"> <block type="math_number" id="^7iVgvpke5T~|4R4/s6^"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_clearinterval" id="{M]%8!f*iqHt(BArC^i@"> <field name="NAME">Intervall</field> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> <block type="on_ext" id="Jq/I$|oPFD[s4t4P1CV#" x="613" y="38"> <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="T:hHw8fSF1[LA`Uhzkb8"> <field name="oid">Aqua_Control.0.Alarm_Sensoren.Alarmanlage_an/aus</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="5l/Q2qMP]By~R+#/YVI("> <field name="VAR" id="~42gns1qvls4T]2Gv/p/">Alarmanlage_an</field> <value name="VALUE"> <block type="on_source" id="RZ=Ug=y:QJoR):jl:|/|"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="controls_if" id="m2Wtk.fEc:o3Inw`^p#b"> <value name="IF0"> <block type="get_value" id="34+)diuQh131r2GV-E.`"> <field name="ATTR">val</field> <field name="OID">Aqua_Control.0.Alarm_Sensoren.Alarmanlage_an/aus</field> </block> </value> <statement name="DO0"> <block type="control" id=":InUcDYcWFmC8[Ra11tT"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Aqua_Control.0.Alarm_Sensoren.Alarmanlage_an/aus</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="a1b;T=0nK!AbtR=eaJ$c"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="timeouts_clearinterval" id="wEMtls$8czoDBv.NRT^1"> <field name="NAME">Intervall</field> <next> <block type="timeouts_cleartimeout" id="v5Mf2Bu3uPA0+8NDGfyN"> <field name="NAME">timeout</field> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </xml>
-
@Aphofis sagte:
Man kann den Datenpunkt Alarmanlage an/aus nicht einschalten.
Antwort:
@Aphofis sagte in Kleine Alarmanlagen Schaltung:per Datenpunkt wird die Alarmanlage per alexa ein-aus/geschaltet
Der Datenpunkt wird im Script auch nur ausgewertet, nicht geschaltet.
-
@paul53 sagte in Kleine Alarmanlagen Schaltung:
@Aphofis sagte:
Man kann den Datenpunkt Alarmanlage an/aus nicht einschalten.
Antwort:
@Aphofis sagte in Kleine Alarmanlagen Schaltung:per Datenpunkt wird die Alarmanlage per alexa ein-aus/geschaltet
Der Datenpunkt wird im Script auch nur ausgewertet, nicht geschaltet.
Dank dir !!!