@dslraser
Hier mal der Aufbau meiner Gardena Bewässerung.
Ich denke die Blocklys sind nicht perfekt und man könnte noch einiges verbessern. Aber so läuft es bei mir zumindest aktuell einwandfrei
Dieses Script ist für die Automatische Bewässerung: (Einstellbar über iqontrol)
(Der Code ist leider etwas zu lange um zu posten)
Aktuell habe ich leider für jeden Tag den Ablauf wie auf den Bild zu sehen... Bis jetzt habe ich es leider nicht hinbekommen die Tage an denen die Automatik laufen soll in einen Trigger zu packen.
Für die manuelle Steuerung habe ich folgendes Script:
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on_ext" id="bvkW]GrFVx48!J?l4x7X" x="263" y="138">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">true</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="MJqAqB`q+{0DD[+G9?dL">
<field name="oid">0_userdata.0.Bewässerung.Hecken_Bewässerung_starten</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="control" id="=O~iu6p3/-%Z^vG;!%$p">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">smartgarden.0.LOCATION_2827331e-2Dd3f6-2D47b5-2D8542-2De883bd329db9.DEVICE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d.SERVICE_VALVE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d-3A2.duration_value</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_arithmetic" id="C2#nv|=r/jA==9PDK:u/">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="iOzk2_Qsl(|ItVW(IsxB">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="~UD9G)vC!C#*a`MlSp^1">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Bewässerung.Hecken_Bewässerungsdauer_manuell</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="GW/A!|@SJi~Epu}L|nHv">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id="W]6fee%$*96L=tG,4yy-">
<field name="NUM">60</field>
</block>
</value>
</block>
</value>
<next>
<block type="control" id="~c00%AO@_:xP)Rc1RZ?p">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Bewässerung.Hecken_Letzte_Bewässerungsdauer</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="get_value" id="@6xiR);sWudI7XUnDb~1">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Bewässerung.Hecken_Bewässerungsdauer_manuell</field>
</block>
</value>
<next>
<block type="control" id="8n6lzVBr:O,O+WmIZ-CA">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.Bewässerung.Hecken_Letzte_Bewässerungszeit</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="time_get" id="zewflQP8x*nEH03f9Q.1">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">DD.MM.YYYY</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="on_ext" id="k:WzU3*0z7,hA?#?E_iH">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">true</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="QX.RjiKUV0$xv:kh,0@)">
<field name="oid">0_userdata.0.Bewässerung.Hecken_Bewässerung_stoppen</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="control" id="GU@NrGwv`X0bHLZLK/GI">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">smartgarden.0.LOCATION_2827331e-2Dd3f6-2D47b5-2D8542-2De883bd329db9.DEVICE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d.SERVICE_VALVE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d-3A2.duration_value</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="Xl*lu|=AT9HFo^m7sl!O">
<field name="TEXT">STOP_UNTIL_NEXT_TASK</field>
</block>
</value>
</block>
</statement>
<next>
<block type="comment" id="L5=Vj$nYEw}LGv~:oggj">
<field name="COMMENT">Bewässerung bei Regen stoppen</field>
<next>
<block type="on_ext" id="(xq_#K*GZz`Xfj{R2KCS">
<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="?PYD21M)srFhdOvn:x40">
<field name="oid">deconz.0.Sensors.80.water</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="3^IGaT_=I/amjGI6v@0A">
<value name="IF0">
<block type="logic_operation" id="I-QeURJy|NW0$k32Hf@Q" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="g:GQ2Mkqevg:c;~+S.D0">
<field name="OP">NEQ</field>
<value name="A">
<block type="get_value" id="b5Ck8|kSeZ40`BjoEs^1">
<field name="ATTR">val</field>
<field name="OID">smartgarden.0.LOCATION_2827331e-2Dd3f6-2D47b5-2D8542-2De883bd329db9.DEVICE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d.SERVICE_VALVE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d-3A2.activity_value</field>
</block>
</value>
<value name="B">
<block type="text" id="UX%}ar4UoSHqQf3Gq%k]">
<field name="TEXT">CLOSED</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="Qepj/q}?]Q5._@=!zfKC">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="QH!ea?ZeJ?3c~EBXYlN*">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.80.water</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="f?*Xs%?ul0hx%:$:$qG:">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="2SJ)^_?{by[x2WN`clc_">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">smartgarden.0.LOCATION_2827331e-2Dd3f6-2D47b5-2D8542-2De883bd329db9.DEVICE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d.SERVICE_VALVE_92d5006c-2D158c-2D43c9-2D8fbe-2Dc39e5620867d-3A2.duration_value</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="Ln:X^Z.Ok0fFnIU42{.J">
<field name="TEXT">STOP_UNTIL_NEXT_TASK</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>
Und ein paar Datenpunkte hätte ich da auch noch:
Ich hoffe damit kann ich bei der ein oder anderen Idee weiterhelfen