NEWS
Garagenlichtschaltung
-
Hi, mein Problem gestaltet sich für mich etwas komplizierter...vielleicht habt Ihr ja eine Lösung!? (Ich bin nicht so der Typ "Programmierer" und noch relativ frisch im IOBroker...)
Meine Garage ist von zwei Punkten/durch 2 Türen und dem eigentlichen Garagentor zugänglich. Damit jedes Mal wenn einer dieser Türen geöffnet wird ein LIcht in der Garage für 4 Minuten einschaltet habe ich die Türen mit XIAOMI Türkontakten versehen die -bei Auslösung- eine Lampe in der Garage anschalten. Diese steuere ich über einen Shelly-Adapter. Soweit so gut, aber:
-
Problem 1: wie kann ich dem Script definieren, dass sich die Zeitschleife von 4Minuten jedes mal wieder zurücksetzt wenn eine jeweils andere Tür zur Garage geöffnet wird. Ich bekomme das irgendwie nicht hin über Variablen zu definieren..
-
Problem 2: bei Bedarf habe ich noch eine IKEA Schalter via Deconz/Phoscon so eingestellt, dass das LIcht in der Garage auf Dauerlicht gestellt wird und auch ein öffnen der entsprechenden Türen NICHT den "Countdown" einläutet. Tatsächlich sieht es bei mir so aus, dass das Dauerlicht nur so lange aktiv ist wie keine der genannten Türen geöffnet wird.
Hier mein Skript, ich bin für jeden Tip dankbar!:
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</variable>
</variables>
<block type="comment" id="D?5.S?cmd(c8curf|T;T" x="287" y="-638">
<field name="COMMENT">Variable für Dauerlicht Garage</field>
<next>
<block type="variables_set" id="$ggU{k~^3_02Jq#Z;d-"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> <value name="VALUE"> <block type="logic_boolean" id="8J7v,wsGoivqBzK6aQ7F"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="0QQ~6hYHe=EoHh%y=]">
<field name="COMMENT">Schaltung über Trädfri Remote und Deconz</field>
<next>
<block type="on" id="yHNL#uTAt7AvxHzF5u1"> <field name="OID">deconz.0.sensors.588e81fffe2ce430.buttonevent</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="H=64g_8GK+|X/OLR0|E">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_operation" id="b-^n=(a)x_!U{8;:4v1">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="1IzpP(1+zD}2gBjGs9">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="!NWr}j1C;/ywE~,}y}L+">
<field name="ATTR">val</field>
<field name="OID">deconz.0.sensors.588e81fffe2ce430.buttonevent</field>
</block>
</value>
<value name="B">
<block type="math_number" id="zwX!QtUfb}HJ?rR?lk3=">
<field name="NUM">4002</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="tgW6%[y#Z4(I{xf:zRh">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id=")VYI8{nJEH0~OVcML_9j">
<field name="ATTR">val</field>
<field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="=B7@k~T|59%kBwo@uu"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="@.A=0!Br)qA%u@_dbtdF"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="F2DFv6KPkMygkBJ1ALkT"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="^!qdg{OXs:Jqed=-;gxd"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.lights.7cb03eaa0a0a2864.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="dBS6|k}X~cv@P|~ia!;;"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="variables_set" id="FhN@QIF!$oe.wAk?FC"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> <value name="VALUE"> <block type="logic_boolean" id="_3eDPk~:,|}8$[o9)P10"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="f:U?wBT4PAIo1CrWhWa4"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="Sb!t..OTpBQdgfW~H([a"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="n2J?1wj]+|3u|~2|~FbM"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="}~5BqCW2Mt%XoH.Z/YTB"> <field name="TEXT">Dauerlicht in Garage eingeschaltet auf den Wert: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="6DD*,c$MSZVc%h2dY%eB"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="Gh5$Qa~@7xbSW72$Rk]_"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="fCm4,]NcrVf~3:WEjgZW"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="AZbY1@t}=KP|wK(QTb"> <field name="ATTR">val</field> <field name="OID">deconz.0.sensors.588e81fffe2ce430.buttonevent</field> </block> </value> <value name="B"> <block type="math_number" id="@vG4:zz^pYipBx+ZAD=8"> <field name="NUM">5002</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="6K$!PvR2VGx!gD{{RW3m"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="OAj]+vg2y(Hb:#2j+8QQ"> <field name="ATTR">val</field> <field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field> </block> </value> <value name="B"> <block type="logic_boolean" id="VX$ehYB$9v2AyL[wt]1E"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="XmNBC6(Aml$v2FEvHzFV"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="~(B2zlJg+8h5z4o5OHd7"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="M4nG0xzIFI@3yXDXNCoZ"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.lights.7cb03eaa0a0a2864.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="jU;{wZ}=,389S?:CuDKz"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="variables_set" id="~BF-OhVhg*ZMy@DhpP;?"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> <value name="VALUE"> <block type="logic_boolean" id="tjgMvm1Pu{6%m)vCS#(_"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="ZVM%u|(|0?!Vd.UvVzuW"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="/]0.ew4u.]#-M;vA/">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="FwC%!nB -
-
Hi, mein Problem gestaltet sich für mich etwas komplizierter...vielleicht habt Ihr ja eine Lösung!? (Ich bin nicht so der Typ "Programmierer" und noch relativ frisch im IOBroker...)
Meine Garage ist von zwei Punkten/durch 2 Türen und dem eigentlichen Garagentor zugänglich. Damit jedes Mal wenn einer dieser Türen geöffnet wird ein LIcht in der Garage für 4 Minuten einschaltet habe ich die Türen mit XIAOMI Türkontakten versehen die -bei Auslösung- eine Lampe in der Garage anschalten. Diese steuere ich über einen Shelly-Adapter. Soweit so gut, aber:
-
Problem 1: wie kann ich dem Script definieren, dass sich die Zeitschleife von 4Minuten jedes mal wieder zurücksetzt wenn eine jeweils andere Tür zur Garage geöffnet wird. Ich bekomme das irgendwie nicht hin über Variablen zu definieren..
-
Problem 2: bei Bedarf habe ich noch eine IKEA Schalter via Deconz/Phoscon so eingestellt, dass das LIcht in der Garage auf Dauerlicht gestellt wird und auch ein öffnen der entsprechenden Türen NICHT den "Countdown" einläutet. Tatsächlich sieht es bei mir so aus, dass das Dauerlicht nur so lange aktiv ist wie keine der genannten Türen geöffnet wird.
Hier mein Skript, ich bin für jeden Tip dankbar!:
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</variable>
</variables>
<block type="comment" id="D?5.S?cmd(c8curf|T;T" x="287" y="-638">
<field name="COMMENT">Variable für Dauerlicht Garage</field>
<next>
<block type="variables_set" id="$ggU{k~^3_02Jq#Z;d-"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> <value name="VALUE"> <block type="logic_boolean" id="8J7v,wsGoivqBzK6aQ7F"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="comment" id="0QQ~6hYHe=EoHh%y=]">
<field name="COMMENT">Schaltung über Trädfri Remote und Deconz</field>
<next>
<block type="on" id="yHNL#uTAt7AvxHzF5u1"> <field name="OID">deconz.0.sensors.588e81fffe2ce430.buttonevent</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="H=64g_8GK+|X/OLR0|E">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_operation" id="b-^n=(a)x_!U{8;:4v1">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="1IzpP(1+zD}2gBjGs9">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="!NWr}j1C;/ywE~,}y}L+">
<field name="ATTR">val</field>
<field name="OID">deconz.0.sensors.588e81fffe2ce430.buttonevent</field>
</block>
</value>
<value name="B">
<block type="math_number" id="zwX!QtUfb}HJ?rR?lk3=">
<field name="NUM">4002</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="tgW6%[y#Z4(I{xf:zRh">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id=")VYI8{nJEH0~OVcML_9j">
<field name="ATTR">val</field>
<field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="=B7@k~T|59%kBwo@uu"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="@.A=0!Br)qA%u@_dbtdF"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="F2DFv6KPkMygkBJ1ALkT"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="^!qdg{OXs:Jqed=-;gxd"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.lights.7cb03eaa0a0a2864.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="dBS6|k}X~cv@P|~ia!;;"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="variables_set" id="FhN@QIF!$oe.wAk?FC"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> <value name="VALUE"> <block type="logic_boolean" id="_3eDPk~:,|}8$[o9)P10"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="debug" id="f:U?wBT4PAIo1CrWhWa4"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="Sb!t..OTpBQdgfW~H([a"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="n2J?1wj]+|3u|~2|~FbM"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="}~5BqCW2Mt%XoH.Z/YTB"> <field name="TEXT">Dauerlicht in Garage eingeschaltet auf den Wert: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="6DD*,c$MSZVc%h2dY%eB"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="Gh5$Qa~@7xbSW72$Rk]_"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="fCm4,]NcrVf~3:WEjgZW"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="AZbY1@t}=KP|wK(QTb"> <field name="ATTR">val</field> <field name="OID">deconz.0.sensors.588e81fffe2ce430.buttonevent</field> </block> </value> <value name="B"> <block type="math_number" id="@vG4:zz^pYipBx+ZAD=8"> <field name="NUM">5002</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="6K$!PvR2VGx!gD{{RW3m"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="OAj]+vg2y(Hb:#2j+8QQ"> <field name="ATTR">val</field> <field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field> </block> </value> <value name="B"> <block type="logic_boolean" id="VX$ehYB$9v2AyL[wt]1E"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="XmNBC6(Aml$v2FEvHzFV"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">shelly.0.SHSW-1#10D8B8#1.Relay0.Switch</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="~(B2zlJg+8h5z4o5OHd7"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="M4nG0xzIFI@3yXDXNCoZ"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">deconz.0.lights.7cb03eaa0a0a2864.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="jU;{wZ}=,389S?:CuDKz"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="variables_set" id="~BF-OhVhg*ZMy@DhpP;?"> <field name="VAR" id="6QGMz#D%[Pk%s~@o0hBt">Dauerlicht</field> <value name="VALUE"> <block type="logic_boolean" id="tjgMvm1Pu{6%m)vCS#(_"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="debug" id="ZVM%u|(|0?!Vd.UvVzuW"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="/]0.ew4u.]#-M;vA/">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="FwC%!nB -
-
@paul53 : Danke...ich werde es mal schnellstmöglich testen und mich dann "im nächsten Jahr" dazu melden!

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
