****So Leute habe jetzt mein erstes und sehr großes Script fertig.
Es werden meine 230v Magnetventile über Sonoff(Tasmota)_4ch gesteuert
Abfrage von YR.NO.Wetter und Berechnung vom Punktesystem.
Abgefragt wird
Regen heut und morgen
Luftdruck heut und morgen
Temperatur heut und morgen
Die Abfrage vom Wetterdienst habe ich im Netz gefunden. Kann aber nicht mehr sagen wo.
Wenn der Ersteller das liest bedanke ich mich noch mal bei Ihm für die tolle Vorarbeit.
Script läuft und tut auch genau das, was es soll.
Vielleicht braucht ja noch einer eine Vorlage um es zu verfeinern.
Bitte alle Scripts zu einen Script zusammen kopieren
immer ein nächste Zeile
das Script fängt immer links an****
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="schedule" id="LIU@O9=5kX8F}`;:w}Xb" x="2513" y="4612"><field name="SCHEDULE">0 8,18 * * *</field>
<statement name="STATEMENT"><block type="comment" id="usFyjv-RtO{kxa^m=gwI"><field name="COMMENT">erst mal alle Ventile aus</field>
<next><block type="comment" id="flK|mgnMq!dc[qBfT8_!"><field name="COMMENT">sonst schaft es die Pumpe nicht</field>
<next><block type="control" id="0jI%SjL=4?(BrnNO{Y@P"><mutation delay_input="true"></mutation>
<field name="OID">sonoff.0.Sonoff_Rasen_1-4.POWER3</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">1000</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="VALUE"><block type="logic_boolean" id="F9vGql?[Es4SrXWWi3_O"><field name="BOOL">FALSE</field></block></value>
<next><block type="control" id="]GL8a./YWH|:K(Mc2Dob"><mutation delay_input="true"></mutation>
<field name="OID">sonoff.0.Sonoff_Rasen_5-8.POWER1</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">1000</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="VALUE"><block type="logic_boolean" id="gWVNn`Ysc~_K;(vL{7~n"><field name="BOOL">FALSE</field></block></value>
<next><block type="control" id="`Lx:3/d#PB8WgN3Vqd6H"><mutation delay_input="true"></mutation>
<field name="OID">sonoff.0.Sonoff_Rasen_5-8.POWER2</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">1000</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="VALUE"><block type="logic_boolean" id="w=W,MXGk|[JwUfsT=`Ly"><field name="BOOL">FALSE</field></block></value>
<next><block type="control" id="}Z^Bpx.LM/rZZI,ncI*A"><mutation delay_input="true"></mutation>
<field name="OID">sonoff.0.Sonoff_Rasen_1-4.POWER1</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">1000</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="VALUE"><block type="logic_boolean" id="?|`J3sJh{zY^0q%5jY|w"><field name="BOOL">FALSE</field></block></value>
<next><block type="control" id="k7uOPT`W6U9Cw0:yG[ok"><mutation delay_input="true"></mutation>
<field name="OID">sonoff.0.Sonoff_Rasen_5-8.POWER3</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">1000</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="VALUE"><block type="logic_boolean" id=",QkE%q00q~mxiR3p0#QL"><field name="BOOL">FALSE</field></block></value>
<next><block type="comment" id="vYIf8~sX6#y3E5L+t;[:"><field name="COMMENT">Hier die Bewässerungs Zeit rein</field>
<next><block type="comment" id="XUx%^|P0mJB~/6Jb-I*c"><field name="COMMENT">in Minuten für den trockensten Tag</field>
<next><block type="comment" id="f4K~}hg~;g,(3u+fJ!M="><field name="COMMENT">also bei 100% Bewässerung</field>
<next><block type="variables_set" id="OeHwHOb7[t2d1/{w?Ymi"><field name="VAR">Regner hinten Haus</field>
<value name="VALUE"><block type="math_number" id=";8%)`[`k(hT!JWpl%PG)"><field name="NUM">20</field></block></value>
<next><block type="variables_set" id="j91*bawRst/-ekw)2zJ{"><field name="VAR">Regner neben Haus</field>
<value name="VALUE"><block type="math_number" id="v9W@Tn:z6lXw*bR}xm!!"><field name="NUM">6</field></block></value>
<next><block type="variables_set" id="=x=AJ^=LBMP.]j|Z*N%-"><field name="VAR">Regner vorne Grube</field>
<value name="VALUE"><block type="math_number" id="/FQ)k*Dm?#.B[);Ic!v="><field name="NUM">4</field></block></value>
<next><block type="variables_set" id="DSc8,vk;b5}6[_-u+(h-"><field name="VAR">Regner vorm Haus</field>
<value name="VALUE"><block type="math_number" id="tMd..nGW~kn_yG[)zMQp"><field name="NUM">10</field></block></value>
<next><block type="comment" id="~w_6sDIe~.LrUm0!i;Y("><field name="COMMENT">Wetterdaten Regen abfragen für heute</field>
<next><block type="comment" id="t%AYw8}2r8?cH-:QvS@e"><field name="COMMENT">abfrage Wetterdienst</field>
<next><block type="variables_set" id=".v/~-5M]6.dUX=SH`e|-"><field name="VAR">Sprengen Pulse</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="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="convert_tonumber" id="#{j.!w906B1dsKJ{%9@y"><value name="VALUE"><block type="get_value" id="y:)sf*e*kIhMgewLG/+T"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day0.precipitation</field></block></value></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 Pulse</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 Pulse</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="convert_tonumber" id="vg*T(!UoYxhe)m+/vR^T"><value name="VALUE"><block type="get_value" id="(b81O;+NuvD0yvGjO2}u"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day0.precipitation</field></block></value></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 Pulse</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 Pulse</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="comment" id="bK_i=75i2ERy1`VE+PB@"><field name="COMMENT">Wetterdaten Regen abfragen für morgen</field>
<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="convert_tonumber" id="56pFeyg:QU_=(|lA5+U:"><value name="VALUE"><block type="get_value" id="SFd/V4r6g+/*d=!J)M(e"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day1.precipitation</field></block></value></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 Pulse</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 Pulse</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="convert_tonumber" id="#~-ej)T8F|kJ*(5hg`gY"><value name="VALUE"><block type="get_value" id="eC.iYpIPA~*W*P:pu!h]"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day1.precipitation</field></block></value></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 Pulse</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 Pulse</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="comment" id="*H`hd:N0Ev/}DO?Ua95D"><field name="COMMENT">Wetterdaten Temperatur abfragen für heute</field>
<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="convert_tonumber" id="O9VKzhVadh]_{F*9ni9X"><value name="VALUE"><block type="get_value" id="Gq0{:U4Kvb4`YtUH[Rvt"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day0.temperatureActual</field></block></value></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 Pulse</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 Pulse</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="convert_tonumber" id="v6jkU0Cz9zElDdt#EaWx"><value name="VALUE"><block type="get_value" id="n-t+~=;lclKV:gwq?vyd"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day0.temperatureActual</field></block></value></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 Pulse</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 Pulse</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="comment" id="Xz?Xb~(U`#KBL7Qg7mPd"><field name="COMMENT">Wetterdaten Temperatur abfragen für morgen</field>
<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="convert_tonumber" id="kNaTCr!A!@+au@|Hn1yf"><value name="VALUE"><block type="get_value" id="Iclmx=qBeM2v7o3`Utg:"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day1.temperatureMax</field></block></value></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 Pulse</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 Pulse</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="convert_tonumber" id="kK%P^`4E(S-}4Y6^;_{."><value name="VALUE"><block type="get_value" id="fpWC8]lc@JPgU/H2AFW?"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day1.temperatureMax</field></block></value></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 Pulse</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 Pulse</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="comment" id="%!;OZ*)c:A7wDgoPClX0"><field name="COMMENT">Wetterdaten Luftdruck abfragen für heute und morgen</field>
<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="convert_tonumber" id="9YF~p^IV#n3S=QFNt]f~"><value name="VALUE"><block type="get_value" id="fV9xaBMMm;`@XC4X#FzF"><field name="ATTR">val</field>
<field name="OID">yr.0.forecast.day0.pressure</field></block></value></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 Pulse</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 Pulse</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="convert_tonumber" id="Jw_D#pB3DliC6+Y62Ocs"><value name="VALUE"><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></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 Pulse</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 Pulse</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="comment" id="_]0Ohn)-B;?9x8`Y;BQl"><field name="COMMENT">errechnete Punkte zu %</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="convert_tonumber" id="~h;7f3;tsO%z=5ZkxVbP"><value name="VALUE"><block type="variables_get" id="=ur+oPsEDDr;Gdq-Yko2"><field name="VAR">Sprengen Pulse</field></block></value></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">Spreng Prozente</field>
<value name="VALUE"><block type="math_number" id="wy2LZ@yQA|+X1?eW~UA_"><field name="NUM">100</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="convert_tonumber" id="CZ9#Y~2riSv.6{|krj)/"><value name="VALUE"><block type="variables_get" id="mra9ovq|m:ud=,god`r`"><field name="VAR">Sprengen Pulse</field></block></value></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"></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></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></next></block></statement></block></xml>