Projekt vollautomatischer Rasensprenger (Blockly)

  • Mein Ziel ist eine vollautomatische Steuerung für den Rasensprenger. Es soll aus Wetterdaten entschieden werden ob und wenn ja wie lange gesprengt wird. Ich nutze dazu Yr.no. Leider habe ich gestern festgestellt, dass es den ganzen Vormittag geregnet hat und trotzdem "Forecast of precipitation level for today (rain/snow)" mit 0mm angezeigt wurde. Blöde. Es war also abends noch alles nass und er hätte sprengen wollen. Die Wetterbeschreibung wäre hier besser, wird aber schwierig auszuwerten, da Text. Gibts eine Liste mit möglichen Ansagen? Dann kann man eine wenn-dann-Kette aufbauen. Ansonsten fliessen die Temperaturen, Niederschlagswerte und Luftdruck jeweils von HEUTE und MORGEN in die Berechnung ein. Es werden Sprengerzeiten von 1 bis 120min erzeugt, wobei alles unter 30min ignoriert wird. Ob ich noch eine Obergrenze einbaue werde ich sehen.

    Einige Probleme wäre ich mit einem Bodenfeuchtesensor los. Vielleicht baue ich noch einen ein. Mein Ziel ist aber eher: wenig Hardware, viel Intelligenz.

    Die Zeitberechnung steht so weit. Wie praxisnah die Werte sind, wird sich erst später zeigen und Korrekturen sind sicher nötig.

    Dann soll z.B. der Rasensprenger eingeschaltet werden. Dazu wird 1Std. vor Sonnenuntergang die Einschaltzdauer neu berechnet, per Telegram geschickt (Kontrolle) und der Sprengerstart angekündigt. Bei Sonnenuntergang wird gestartet wenn:

    -Die berechnete Zeit über 30min liegt, (Klappt)

    -mehrere Bewegungsmelder bestätigen, dass seit 10min niemand im Garten war (klappt)

    Was noch nicht klappt, sind dynamische Zeiten. Also falls der Rasen noch nicht freigegeben ist, soll das Script warten bis Freigegeben und dann die errechnete Zeit eingeschaltet sein. Falls tatsächlich die ganze Nacht durchgefeiert wird, soll ab Sonnenaufgang die ganze Sache beendet und ignoriert werden. Ich vermisse in Blockly irgendwas wie "Wait until <irgendwas>" oder die Möglichkeit Variablen in die Verzögerung des "Steuere"-Befehls zu setzen. Sicher gibts einen Workaround. Kann mir wer helfen?

    Ich habe im Moment 3 Scripte:

    -Überwachung Bewegungsmelder: Setzt einen Datenpunkt auf Wahr oder Unwar, je nachdem 10min lang die Bewegungsmelder nicht angeschlagen haben.

    -Sprengzeitberechnung: wird 10min vor Sonnenuntergang gestartet und berechnet die Länge der Einschaltzeit, legt diese in Datenpunkt ab.

    -Rasensprenger: (noch nicht fertig) soll falls "Einschaltzeit" über 30min ab Sonnenuntergang gucken, ob Rasen frei, ggf warten. Dann einschalten und nach Ablauf der Zeit aus dem Datenpunkt ausschalten. Falls während des Sprengens jemand den Rasen betritt wird das ignoriert: selbst schuld!

    schimmer-media.de/index.php?attachment/3361/Moin!

    2 Mal editiert, zuletzt von Matahalii (12. Juli 2018 um 11:39)

  • So. Nach nächtelangem Gefummel hab ich nun eine Version die (zufriedenstellend) funktioniert.

    Sie Besteht aus 4 Scripten.

    Nr1 errechnet um ca. 14:00 aus den Wetterdaten von (heute) und (morgen) die Dauer die gesprengt werden soll. Dabei werden zuerst nach einem Punktesystem die Wetterdaten wie Temperatur, Luftdruck und Niederschlag bewertet und danach in eine Zeit in Minuten übersetzt. Dieser Wert (zwischen 0min und 90min) wird in einem Datenpunkt abgelegt und die vorgesehene Zeit per Telegram verschickt.

    Spoiler anzeigen

    <xml xmlns="http://www.w3.org/1999/xhtml">

    <block type="schedule" id="LIU@O9=5kX8F}`;:w}Xb" x="137" y="112">

    <field name="SCHEDULE">13 14 * * *</field>

    <statement name="STATEMENT">

    <block type="variables_set" id=".v/~-5M]6.dUX=SH`e|-">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_number" id="x+wk|Rxe3Ic1D*x/g_[P">

    <field name="NUM">0</field>

    </block>

    </value>

    <next>

    <block type="comment" id="~w_6sDIe~.LrUm0!i;Y(">

    <field name="COMMENT">Wetterdaten abfragen</field>

    <next>

    <block type="controls_if" id="IZSA=(D,[q;2c24_-;E#">

    <value name="IF0">

    <block type="logic_compare" id="F~2CqU-j66c,GgL]={m;">

    <field name="OP">LT</field>

    <value name="A">

    <block type="get_value" id="y:)sf*e*kIhMgewLG/+T">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day0.precipitation_level</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="cV*E!E7%m:.u-zb(xf%!">

    <field name="NUM">0.5</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="1q2wS~O^B`_}l=.`)obx">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="VYqr:Y=``ECx89Ybq1gY">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="QMy@}jb+a8^l_ssC[uRJ">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="]DE1We_]HA~TEwVdh2ij">

    <field name="NUM">2</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="+`p6?FoS|-Yj~e:fQN8}">

    <value name="IF0">

    <block type="logic_compare" id="9@q7?!V`o+Sn5M`zm[+M">

    <field name="OP">LT</field>

    <value name="A">

    <block type="get_value" id="(b81O;+NuvD0yvGjO2}u">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day0.precipitation_level</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="T-+zt]H1oC,QNm[OQ/|O">

    <field name="NUM">0.2</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="P-LnYb;qe8U*@_Jk/9oZ">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="}Zp[i[Rs`.aYeD)aI?Fp">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="6I}2vjA18,4.Bc@;DHvc">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="Ig;[:+,E^z8A2j}OQD!c">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="u=qk(;CmtwDxdTyQP#W5">

    <value name="IF0">

    <block type="logic_compare" id="U_6/j#31v0m|nLYH!CU(">

    <field name="OP">LT</field>

    <value name="A">

    <block type="get_value" id="w]m-)mq/({g,HF]vJ{O,">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day1.precipitation_level</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="FjWU}]j;juM^/{eZod+P">

    <field name="NUM">0.5</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="Ei9cCA`D_cDl#JyqHwy2">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="s64oZ%S`OgFnCJzsJs*%">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="=5g_(CRc6,/-v3uoUTzr">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="D:sO@F,Z?3s3{jh4pUe(">

    <field name="NUM">2</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="/ii#j4T7RJzpW2jGQ-%G">

    <value name="IF0">

    <block type="logic_compare" id="O|K#BqlZWNDh^0n#V*_a">

    <field name="OP">LT</field>

    <value name="A">

    <block type="get_value" id="+*5NH5ngV@fR0EiliX5C">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day1.precipitation_level</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="s_)i7b}LE}+d0jR@O~1;">

    <field name="NUM">0.2</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="-thxk._aRn{DCKm|kXHk">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="D4l*DrL|dF~L[1DZd94G">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="DUj*W`pwLp4SE361!3iP">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="[D5.n#K_)?+r#e}g:ggL">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="cp`*.g!f1`CG?Ecp4]+V">

    <value name="IF0">

    <block type="logic_compare" id="/OZ~}sU78:4C^0o#0OAo">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="Gq0{:U4Kvb4`YtUH[Rvt">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day0.temperature_max</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="T[vSNHJU@(-OzTzr`.jl">

    <field name="NUM">18</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="+{vS6|AyjbTRO78JC*QI">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="8sHv]W|]k-CaG!;(^4Eg">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="a3M~|?OZbkc2c.YGYV,^">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="oHr;rJi|h:iEDVao%`?!">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="+2@D(55`T5p6LHheJ{Q1">

    <value name="IF0">

    <block type="logic_compare" id="XEK/]Of.{K.E(IGo?tA]">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="n-t+~=;lclKV:gwq?vyd">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day0.temperature_max</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="ODyuD,`S})?59:]:V.JR">

    <field name="NUM">22</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="2z.tC85mT8MC;r.5l0uh">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="gHb3DL[Obcw{C.so@i*i">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="RY_O~f~_.B0l.;h7emxF">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="M^1fj.6BY5L|.Fep,Ro8">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="]*S}H=E1Eq^}Yc%,0Lkl">

    <value name="IF0">

    <block type="logic_compare" id="ALYqPQR0jM+M{=D6D9L|">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="Iclmx=qBeM2v7o3`Utg:">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day1.temperature_max</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="^,I`/T#@2JfEng.vZP05">

    <field name="NUM">18</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="owU}sB!j43r@r(y%CwI%">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="?r=%sj0a}ux@8H)+_(`q">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="NN.Jr2+u|U_.^|i3WJfH">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="Rr#VQm,5rG0ksPowoO=?">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="L#3s{3#rU1o*!%MG9ePy">

    <value name="IF0">

    <block type="logic_compare" id="/OEPGW^zTuCxt3=F}J=Z">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="fpWC8]lc@JPgU/H2AFW?">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day1.temperature_max</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="U1sH=6C6(:qElmWM@v]u">

    <field name="NUM">22</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="Khd+2T[s){wL4gCUUkVm">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="ptCg(MplgnRE]8:1kPBV">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="yvk;XAR1;%R}JnHac_Cg">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="81R2Zt%n0#hYMPgPBC}{">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="2O=x0ih)`8!PhMvFaD.2">

    <value name="IF0">

    <block type="logic_compare" id="@?iga,yJ7z#z|p`Wu4Bp">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="fV9xaBMMm;`@XC4X#FzF">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day0.pressure</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="6h?./--)h2[f6nI7Ajw/">

    <field name="NUM">1010</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id=".#FF=0lej2u15[I4J7zf">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="PvapIAlkmg?Nx9IX:UO_">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="x%So_f3v^,h+5:oM}N#S">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="OlEx]N#=JG:Qi,2QZSsc">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="0Tko?jmO7+Xh{E9mG}4z">

    <value name="IF0">

    <block type="logic_compare" id="|iV,C3lPc8g:%1b#5cM(">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="7E{@#WAQ+/vP7D|v@R!=">

    <field name="ATTR">val</field>

    <field name="OID">yr.0.forecast.day1.pressure</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="MS/X,p(SkeDY@(}`._sw">

    <field name="NUM">1010</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="`Uye8V@hnS;9A%BLraU~">

    <field name="VAR">Sprengen_Ja</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="HD!]NE*WqP0o.2{ryal*">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="E,I.z2f*YxvwxKOeZ.8K">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="3Y+hTY6bRfH?{vK6);[Y">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="Cz,1bDaoEfc^9q~ZMz%7">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="S#=w:n9oXjLrP6rqFqx%">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="comment" id=":u2]ei(Ia9OGy/cH?wrj">

    <field name="COMMENT">Sprengzeit bestimmen</field>

    <next>

    <block type="controls_if" id="9,Yux3T`8+wOBgqEu]z6">

    <mutation elseif="3" else="1"></mutation>

    <value name="IF0">

    <block type="logic_compare" id="=+?M+{PDV;@l#LI7qQ}m">

    <field name="OP">GT</field>

    <value name="A">

    <block type="variables_get" id="=ur+oPsEDDr;Gdq-Yko2">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="]-4!l%tuDEAK#/BX!d_i">

    <field name="NUM">10</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id=";xTkJ/ODI.QQw_haDYUd">

    <field name="VAR">Sprengzeit</field>

    <value name="VALUE">

    <block type="math_number" id="wy2LZ@yQA|+X1?eW~UA_">

    <field name="NUM">90</field>

    </block>

    </value>

    </block>

    </statement>

    <value name="IF1">

    <block type="logic_compare" id="rtZlo^j+]TL@HpDrZB;x">

    <field name="OP">GT</field>

    <value name="A">

    <block type="variables_get" id="mra9ovq|m:ud=,god`r`">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="QM!(i%gr7HDGZP(~J?Wx">

    <field name="NUM">9</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO1">

    <block type="variables_set" id="[kIP4YfPPQxiPuJ3HWgQ">

    <field name="VAR">Sprengzeit</field>

    <value name="VALUE">

    <block type="math_number" id="HGI`:)vWoP7UXo1b/NE[">

    <field name="NUM">70</field>

    </block>

    </value>

    </block>

    </statement>

    <value name="IF2">

    <block type="logic_compare" id="_Wd|V)Lksm;O5D*XW/dd">

    <field name="OP">GT</field>

    <value name="A">

    <block type="variables_get" id="{a^nGU#A5]J)X)u{^cxU">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="G^Z7Gy-u7V[Wiv#`+=IL">

    <field name="NUM">8</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO2">

    <block type="variables_set" id="fUxRzHsomCLFJrocJ|l`">

    <field name="VAR">Sprengzeit</field>

    <value name="VALUE">

    <block type="math_number" id="Obt1rZnXsY5?a3f3W7}D">

    <field name="NUM">50</field>

    </block>

    </value>

    </block>

    </statement>

    <value name="IF3">

    <block type="logic_compare" id="T|;FuQo)amevlUM7`7x?">

    <field name="OP">GT</field>

    <value name="A">

    <block type="variables_get" id="=+X+^YR:-BPhQR2(viS[">

    <field name="VAR">Sprengen_Ja</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="E^C_!D[kDRW{~luxJPB)">

    <field name="NUM">8</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO3">

    <block type="variables_set" id="KJiZsh[09azxD{=cYQ*:">

    <field name="VAR">Sprengzeit</field>

    <value name="VALUE">

    <block type="math_number" id="Q5`xb)?@W1N?0Ev6qUzg">

    <field name="NUM">30</field>

    </block>

    </value>

    </block>

    </statement>

    <statement name="ELSE">

    <block type="variables_set" id="7V;Xrr%y;3:m}xxUFmh5">

    <field name="VAR">Sprengzeit</field>

    <value name="VALUE">

    <block type="math_number" id="#%POy*ZJ%3~Krjf!;`0C">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="comment" id="hl2hJ]}(V-5H0f|iu%m=">

    <field name="COMMENT">Sprengzeit ablegen und Nachricht</field>

    <next>

    <block type="control" id=".nl.`I(6u4M)UQl5XtF/">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprengdauer</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">1000</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="variables_get" id="g%|7[1nh?w;#No*:)|,p">

    <field name="VAR">Sprengzeit</field>

    </block>

    </value>

    <next>

    <block type="controls_if" id="ywM9vNgU^4pb(4ACu(gG">

    <value name="IF0">

    <block type="logic_compare" id="1%sD#)1Lx=#`U^oD*L;U">

    <field name="OP">GT</field>

    <value name="A">

    <block type="variables_get" id="%tc{ol,{}`6S)0g=(Cpv">

    <field name="VAR">Sprengzeit</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="6`?.95@t@DYVU;YDct*s">

    <field name="NUM">29</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="telegram" id="Fv7YVX-(ATwfr8h);j?H">

    <field name="INSTANCE"></field>

    <field name="LOG"></field>

    <value name="MESSAGE">

    <shadow type="text" id="NP-}pXH_GD{e]p9RTnB~">

    <field name="TEXT">text</field>

    </shadow>

    <block type="text_join" id="5dVYx{oUP4]O?T}:5/_o">

    <mutation items="3"></mutation>

    <value name="ADD0">

    <block type="text" id="EafA2SS-Ddpg*@IjBb==">

    <field name="TEXT">Spreng-Dauer für heute: </field>

    </block>

    </value>

    <value name="ADD1">

    <block type="variables_get" id="B,(ST[rr94f*Rom}{8a/">

    <field name="VAR">Sprengzeit</field>

    </block>

    </value>

    <value name="ADD2">

    <block type="text" id="GLXy+s/P9%2oP7BTq,.Z">

    <field name="TEXT">min.</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </statement>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </statement>

    </block>

    </xml>

    Ganz schön lang aber macht nix.

    Nr2 wird ein paar minuten später aktiv und berechnet mit einem Korrekturwert die Einschaltdauer nochmals. Das habe ich gemacht um Anpassungen zentral vornehmen zu können.

    Des weiteren wird hier nun die vorgesehene Startzeit festgelegt und zwar zer Zufallszahl zwischen 20:00 und 21:30. Zufällig einerseits weils nicht so langweilig ist und andererseits damit sich Nachbarn und mögliche Einbrecher nicht an feste Zeiten gewöhnen.

    Das Ergebnis wird wieder in einem Datenpunkt gespeichert und mir per Telegram geschickt.

    Spoiler anzeigen

    <xml xmlns="http://www.w3.org/1999/xhtml">

    <block type="schedule" id="dFiNTdlVkmzR@7|XGDVl" x="213" y="63">

    <field name="SCHEDULE">16 14 * * *</field>

    <statement name="STATEMENT">

    <block type="comment" id="v%2jS^015d14jw%}nGB,">

    <field name="COMMENT">Testweise wird GartenX geschaltet</field>

    <next>

    <block type="comment" id="-,DL9X_k*Jgky?7butX;">

    <field name="COMMENT">Testweise 1/15 sprengzeit</field>

    <next>

    <block type="variables_set" id="7Og4lEMKU%nrHuefOQGU">

    <field name="VAR">Sp_dauer</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="sC-lP9jjvhLNrZMd-AnW">

    <field name="OP">MULTIPLY</field>

    <value name="A">

    <shadow type="math_number" id="7J4ao+masE_q:N8h`G*`">

    <field name="NUM">1</field>

    </shadow>

    <block type="get_value" id="XfJ1ixVZos4?xR.wFrc/">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprengdauer</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="6JOaugisk@=|uZvU!]a[">

    <field name="NUM">0.9</field>

    </shadow>

    </value>

    </block>

    </value>

    <next>

    <block type="variables_set" id="S?9K^J[^WYhH|5Bg*hR3">

    <field name="VAR">Sp_dauer</field>

    <value name="VALUE">

    <block type="math_round" id="iOOA=cxC}L)%kx3]ge4o">

    <field name="OP">ROUNDUP</field>

    <value name="NUM">

    <shadow type="math_number" id="mK-rAU,V~cwH~;-qK[vr">

    <field name="NUM">3.1</field>

    </shadow>

    <block type="variables_get" id="d[}jPhCc5,pZyjXuNm+i">

    <field name="VAR">Sp_dauer</field>

    </block>

    </value>

    </block>

    </value>

    <next>

    <block type="variables_set" id="Bs7{(AElddzEu*lI,+Vx">

    <field name="VAR">Startzeit</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="tgPb6g,|ru2O?(nzpS3A">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="`R3:(!a_b?PC#g*e*|N.">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_number" id="_+xZkEh=_wv3_^t~W[5C">

    <field name="NUM">1200</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="I-ZOlQJOR^an,tEcb~[Z">

    <field name="NUM">1</field>

    </shadow>

    <block type="math_random_int" id="@NEu)z:Jn3#e|Rp}WBNJ">

    <value name="FROM">

    <shadow type="math_number" id="=J_KFfBJzMAFs[5~yWQ/">

    <field name="NUM">1</field>

    </shadow>

    </value>

    <value name="TO">

    <shadow type="math_number" id="/Q7|xr6=28P3rFqt+oCG">

    <field name="NUM">90</field>

    </shadow>

    </value>

    </block>

    </value>

    </block>

    </value>

    <next>

    <block type="variables_set" id="7dUu0x?;@;)e:jP(F2[_">

    <field name="VAR">StartStunde</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="I+do}ExbLr;hAF9fVX5M">

    <field name="OP">DIVIDE</field>

    <value name="A">

    <shadow type="math_number" id="y:D|0SJc{[_^TIqr.@,{">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="IFZ*X`!nk@7`ndNIk}Sy">

    <field name="VAR">Startzeit</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="j-29HB%d8[1:t/)b)1l8">

    <field name="NUM">60</field>

    </shadow>

    </value>

    </block>

    </value>

    <next>

    <block type="variables_set" id="X`C3g/Jc/7ghJE`f?SEk">

    <field name="VAR">StartStunde</field>

    <value name="VALUE">

    <block type="math_round" id="4DGJ%G_;an-9WDm%TreU">

    <field name="OP">ROUNDDOWN</field>

    <value name="NUM">

    <shadow type="math_number" id="PWK{W_wb5[m-yo?RSU%|">

    <field name="NUM">3.1</field>

    </shadow>

    <block type="variables_get" id="emZJ[mi*TA_a5Hn9l[+g">

    <field name="VAR">StartStunde</field>

    </block>

    </value>

    </block>

    </value>

    <next>

    <block type="telegram" id="!Y4KWcc^9|k;;%T2(Cb/">

    <field name="INSTANCE"></field>

    <field name="LOG"></field>

    <value name="MESSAGE">

    <shadow type="text" id="RjZH+)=*#.V3?OmjSbkz">

    <field name="TEXT">text</field>

    </shadow>

    <block type="text_join" id="|fJi3|;F!c5W:tnW*HNU">

    <mutation items="5"></mutation>

    <value name="ADD0">

    <block type="text" id="P0)vr~eWN@T{3?(;22CI">

    <field name="TEXT">Planmäßiger Sprengerstart heute: </field>

    </block>

    </value>

    <value name="ADD1">

    <block type="variables_get" id="0XE1sy}`NBEkD{07Y{u5">

    <field name="VAR">StartStunde</field>

    </block>

    </value>

    <value name="ADD2">

    <block type="text" id="g./yhQwF;`yndcJSe^xc">

    <field name="TEXT">: </field>

    </block>

    </value>

    <value name="ADD3">

    <block type="math_modulo" id="eHz4e[Owe%fd,t^b8tI}">

    <value name="DIVIDEND">

    <shadow type="math_number" id="@H!1cRq7.I0!nhBQh4kl">

    <field name="NUM">64</field>

    </shadow>

    <block type="variables_get" id="acp=/}6u1a+=iUp3hEI}">

    <field name="VAR">Startzeit</field>

    </block>

    </value>

    <value name="DIVISOR">

    <shadow type="math_number" id="K86hI#D|Yz?V1J3rMlUM">

    <field name="NUM">60</field>

    </shadow>

    </value>

    </block>

    </value>

    <value name="ADD4">

    <block type="text" id="74IZ|b@FQ-MybXI7ZEB`">

    <field name="TEXT">Uhr</field>

    </block>

    </value>

    </block>

    </value>

    <next>

    <block type="control" id=")()uMm4XvsGEsMIj(H#E">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprengdauer</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">430</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="variables_get" id="Z~uM/)+T^4V2MEx@uuWY">

    <field name="VAR">Sp_dauer</field>

    </block>

    </value>

    <next>

    <block type="control" id="h*K]BCAl}@)]@v0w[b~;">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprenger_Startzeit</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">720</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="variables_get" id="14QtxWvfNZAT(a~a{%qZ">

    <field name="VAR">Startzeit</field>

    </block>

    </value>

    <next>

    <block type="controls_if" id="Y7!c[9=q2|,~Ly!C(gp=">

    <value name="IF0">

    <block type="logic_compare" id="yJ_Y}tP1a!z:QBP;@sOP">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="Nrf?!]83-thPmH#/rVyF">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.SprengerBlocker</field>

    </block>

    </value>

    <value name="B">

    <block type="logic_boolean" id="86|gIG7wUA+SDy}+z1ae">

    <field name="BOOL">TRUE</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="telegram" id="z-w-UFfwvdWr|NP]atrA">

    <field name="INSTANCE"></field>

    <field name="LOG"></field>

    <value name="MESSAGE">

    <shadow type="text" id="2/R,RGN4/r9b}ms2^G=3">

    <field name="TEXT">text</field>

    </shadow>

    <block type="text" id=")zR.yx|q!?_y+,kwnF5_">

    <field name="TEXT">Rasensprenger geblockt, fällt heute aus. Bitte nachträglich entsperren.</field>

    </block>

    </value>

    </block>

    </statement>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </statement>

    </block>

    </xml>

    Nun zu Nr3. Weil ich es nicht geschafft habe, einen Trigger mit variablen Zeiten anzulegen, startet dieses ab 20:00 in 3-min-Abständen und guckt, ob die Startzeit erreicht ist. Falls Sprengdauer >0, Falls IR-Sensor frei, falls Sprengerblocker unwahr wird der Rasensprenger gestartet. Anhand der Sprengdauer aus dem Datenpunkt wird gleich noch eine Abschaltzeit in einen anderen Datenpunkt geschrieben. Gleichzeitig wird bei Erfolgtem Start die Einschaltzeit auf 0 gesetzt. Falls Sprengerblocker gesetzt oder Sprengzeit =0 wird nichts gemacht und die ganze Sache beendet. Falls IR-Sensor Aktivität meldet, wird die Einschaltzeit um einige Minuten verschoben und das Spiel beginnt von vorne. Telegram-Nachrichten je nach Situation.

    Spoiler anzeigen

    <xml xmlns="http://www.w3.org/1999/xhtml">

    <block type="schedule" id="x8TF37/tc[sX|~S;hXid" x="162" y="62">

    <field name="SCHEDULE">*/3 20-23 * * *</field>

    <statement name="STATEMENT">

    <block type="controls_if" id="/j|?FqaLc2EJs(GHbv.5">

    <value name="IF0">

    <block type="logic_compare" id="AaFN{3@b{RJ9U#LfDbjX">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="xZ(stU30%|ti;NL2]i5M">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprengdauer</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="Ubt7qKf}x7?F0Krz{E}w">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="controls_if" id="Ljn5FZm%{LVSh6!4yFg2">

    <value name="IF0">

    <block type="logic_compare" id="c[08pBvz|^Q_Q}#q[h/2">

    <field name="OP">GT</field>

    <value name="A">

    <block type="time_get" id="yY#yA5MO5}w_b4M3d-r!">

    <mutation format="false" language="false"></mutation>

    <field name="OPTION">mid</field>

    </block>

    </value>

    <value name="B">

    <block type="get_value" id="BW{O!wP.PE*Ziv*+q*{6">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprenger_Startzeit</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="controls_if" id=")p*Llz6t3,g:8AdISxZ`">

    <value name="IF0">

    <block type="logic_compare" id="3+:JG}}N#YQO_Bue%6!}">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="H`Q`@e|k8xNI1]wZ|F0=">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprenger_Startzeit</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="%{;WwabogjU+*eqC@9Mw">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="controls_if" id="H243_9ID}W%5=b~-kS3|">

    <mutation else="1"></mutation>

    <value name="IF0">

    <block type="logic_compare" id="Aep7qyH*G=JC%zmD}EF=">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id=",ZIp)u]3SAdaw_=p|fU`">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprengersensor</field>

    </block>

    </value>

    <value name="B">

    <block type="logic_boolean" id="I2:o#TCJFjp+j9Uzqt1m">

    <field name="BOOL">FALSE</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="control" id=".Uzm%](0X*o=@ED**P0l">

    <mutation delay_input="true"></mutation>

    <field name="OID">sonoff.0.Sprengerventil.POWER1</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">460</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="logic_boolean" id="p+I9GZmUCqqZ{z~|~p;s">

    <field name="BOOL">TRUE</field>

    </block>

    </value>

    <next>

    <block type="telegram" id="lwB0p~U3=kE(U-nnA|]G">

    <field name="INSTANCE"></field>

    <field name="LOG"></field>

    <value name="MESSAGE">

    <shadow type="text" id="%5G:sNYmTO^QqAIGU-Yn">

    <field name="TEXT">Sprenger(test) planmäßig eingeschaltet</field>

    </shadow>

    </value>

    <next>

    <block type="variables_set" id="{l#SNWS!q^.aiJ`XxkMI">

    <field name="VAR">Sprengerstopp</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="1F/sqFx#u,r58r@89qO}">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="j%PbpYuq{}2Ok9G`8X*F">

    <field name="NUM">1</field>

    </shadow>

    <block type="time_get" id=";@OCpQXBHnLy99Vqc5LQ">

    <mutation format="false" language="false"></mutation>

    <field name="OPTION">mid</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="BlD3CdVvQ1iL(ocq#pJ4">

    <field name="NUM">1</field>

    </shadow>

    <block type="get_value" id="_-f;DbsLTGfV@)H#iz5.">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprengdauer</field>

    </block>

    </value>

    </block>

    </value>

    <next>

    <block type="controls_if" id="@|y61i?k.u%3*=/V+bBy">

    <value name="IF0">

    <block type="logic_compare" id="/7zZk079B(^I6Co0PG[)">

    <field name="OP">GT</field>

    <value name="A">

    <block type="variables_get" id=".^=/PdlTV_UZbn704Ys]">

    <field name="VAR">Sprengerstopp</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="5L-wU0_FKPCy!b~)Bl6*">

    <field name="NUM">1440</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="rhu,{mdN:^RJ%5n~~2hM">

    <field name="VAR">Sprengerstopp</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="l~t/+o,C~Mq_w_cybTSF">

    <field name="OP">MINUS</field>

    <value name="A">

    <shadow type="math_number" id="qMofF?zg*tLB=t7.B/~k">

    <field name="NUM">1</field>

    </shadow>

    <block type="variables_get" id="n-AHU/qIi-V_k#tj}O+C">

    <field name="VAR">Sprengerstopp</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="OJ=rK{URSZ_m1PWycaY!">

    <field name="NUM">1440</field>

    </shadow>

    </value>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="controls_if" id="0z.t6f@o04}O}UaWK7Qy">

    <value name="IF0">

    <block type="logic_compare" id="^+9=:K895M|}*^+8)x`!">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="variables_get" id="fIvDN{uj1em@djT:VlRN">

    <field name="VAR">Sprengerstopp</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="ET~8ty]y|^~=?j^25n%{">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="variables_set" id="Uhd{N_e(SM26|)T^y`3;">

    <field name="VAR">Sprengerstopp</field>

    <value name="VALUE">

    <block type="math_number" id="Nx0:%Qt/itpQEi=3-Z=5">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </statement>

    <next>

    <block type="control" id="kgJ)pMc?O7igkots/CD~">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprenger_Stoppzeit</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">700</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="variables_get" id="If,KXl*SzZFO.j-AEIb`">

    <field name="VAR">Sprengerstopp</field>

    </block>

    </value>

    <next>

    <block type="control" id="w35e=,{iJU[E#3.Tkw]t">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprenger_Startzeit</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">200</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="math_number" id="x@,#x/UcZ6RPOU%PnFRU">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </statement>

    <statement name="ELSE">

    <block type="telegram" id="B{1/5,.YYpy6Ir#|1-Ri">

    <field name="INSTANCE"></field>

    <field name="LOG"></field>

    <value name="MESSAGE">

    <shadow type="text" id="6?L4NZlBy^_AVYsE}d;E">

    <field name="TEXT">Sprenger(test) verschoben um einige minuten</field>

    </shadow>

    </value>

    <next>

    <block type="control" id="RS)i?Kg4IziGaB}_1TsT">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprenger_Startzeit</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">700</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="math_arithmetic" id="Yn1v4XYc.BtO?;qijLRV">

    <field name="OP">ADD</field>

    <value name="A">

    <shadow type="math_number" id="XC@gyI*v7h`4uR(msY@0">

    <field name="NUM">1</field>

    </shadow>

    <block type="get_value" id="!%|YF:C)S|7d)pBHJo81">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprenger_Startzeit</field>

    </block>

    </value>

    <value name="B">

    <shadow type="math_number" id="f#.gVEgj{+K_Pfj(25Td">

    <field name="NUM">4</field>

    </shadow>

    </value>

    </block>

    </value>

    </block>

    </next>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </xml>

    Script Nr4 arbeitet nach dem gleichen Prinzip für die Ausschaltzeit.

    wenn die >0 und überschritten ist, wird der Sprenger ausgeschaltet.

    Es werden noch die Stoppzeit und Sprengdauer auf 0 gesetzt. Telegram inclusive.

    Spoiler anzeigen

    <xml xmlns="http://www.w3.org/1999/xhtml">

    <block type="schedule" id="oDu63CQG`pOAk#n,D^`_" x="187" y="162">

    <field name="SCHEDULE">*/4 * * * *</field>

    <statement name="STATEMENT">

    <block type="controls_if" id=")p*Llz6t3,g:8AdISxZ`">

    <value name="IF0">

    <block type="logic_compare" id="3+:JG}}N#YQO_Bue%6!}">

    <field name="OP">GT</field>

    <value name="A">

    <block type="get_value" id="H`Q`@e|k8xNI1]wZ|F0=">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprenger_Stoppzeit</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="%{;WwabogjU+*eqC@9Mw">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="controls_if" id="0V_%zs#Y~iV43s.Cr_8Q">

    <value name="IF0">

    <block type="logic_compare" id="el@Tya(f.eLN#0CHc.zF">

    <field name="OP">LT</field>

    <value name="A">

    <block type="get_value" id="`sDzzQ#]BoBwC%e:[lQf">

    <field name="ATTR">val</field>

    <field name="OID">admin.0.Sprenger_Stoppzeit</field>

    </block>

    </value>

    <value name="B">

    <block type="time_get" id="Qig06*;lxM(Yfpz6w{q_">

    <mutation format="false" language="false"></mutation>

    <field name="OPTION">mid</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="control" id="nDt^?GjXB[#j3JRTTD*l">

    <mutation delay_input="true"></mutation>

    <field name="OID">sonoff.0.Sprengerventil.POWER1</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">470</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="logic_boolean" id="nD.e1YwS;Xy*+.oDV6R_">

    <field name="BOOL">FALSE</field>

    </block>

    </value>

    <next>

    <block type="telegram" id="[=Jvk81p-XnthyKFvq,k">

    <field name="INSTANCE"></field>

    <field name="LOG"></field>

    <value name="MESSAGE">

    <shadow type="text" id="d.kBrut;upwG7utv`a1n">

    <field name="TEXT">Sprenger(test) planmäßig ausgeschaltet</field>

    </shadow>

    </value>

    <next>

    <block type="control" id="U_y-U1ZvxpO.M:NWO7NZ">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprenger_Stoppzeit</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">620</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="math_number" id="YK`*%L*{Q@9CoUF@-KG*">

    <field name="NUM">0</field>

    </block>

    </value>

    <next>

    <block type="control" id="?{[#4qWmdEvBSuixywC?">

    <mutation delay_input="true"></mutation>

    <field name="OID">admin.0.Sprengdauer</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">840</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="math_number" id="`cC`U}SB=9qiUq]Z,Nn1">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </next>

    </block>

    </next>

    </block>

    </next>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </xml>

    Der SprengerBlocker ist ein Datenwert, den ich z.B. per Telegram-Buttons setzen kann, wenn ich aus irgendeinem Grund nicht will dass heute gesprengt wird.

  • Matahalii,

    Zu erst mal cooles Projekt.
    Die Auswertung ob und wie lang es bewässern soll - einfach nur cool.

    Jetzt nur meine Frage: wie steuerst du das ganze dann an? Also was hast du dran hängen, dass die Bewässerung-Anlage geht ?

    Mit freundlichen Grüßen und ein sichere SmartHome

    PlayDiver

  • Danke, danke. Zuerst mal: So cool ist die Berechnung noch nicht. Seit dem das Wetter nicht mehr auf Dauersonne und 35°C ist zeigt sich, dass eigentlich zu viel bzw zu oft gesprengt wird. Leider sagt Yr.No auch wenn mehrere kurze Schauer waren oder sein werden oft Niederschlag 0mm an. Ich werde den Wettertext noch mit in die Berechnung einbauen.

    Meine Gartenpumpe ist druckgesteuert, also automatisch. Die Rasensprenger hatte ich vorher schon als festverlegte Versenkregner verbaut. "Schaltbar" über ein Absperrventil. Ich habe ein billiges Magnetventil dahinter und nun den Hahn in der Saison immer offen. Leider hab ich gepennt und ein 12v-Magnetventil gekauft. Daher hab ich ein altes 12V Steckernetzteil vom Gehäuse befreit, welches vom Sonoff Basic geschaltet wird. Basic und Netzteil sind in einer formschönen Abzweigdose auf einem Stab in ca 80cm Höhe gesetzt. Einerseits wegen dem Empfang und andererseits weil da noch ein Bewegungsmelder mit dran soll. Um die freiliegende Spule und die Anschlüsse des Magnetventils hab ich eine kleine Abzweigdose herumgefummelt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!