Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Parser - Temperatursumme für Ausbringung Rasendünger

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Parser - Temperatursumme für Ausbringung Rasendünger

    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Linedancer last edited by Linedancer

      Hi,
      ich rechne das direkt per Blockly mit meinen eigenen Daten. Die Temperaturen kommen dabei aus dem "Das Wetter" Adapter.
      Hier das Blockly dazu:

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="(szd7z@+_}[pfg9;t}z8">WaermesummeJahr</variable>
         <variable id="*p+kgd%FGcH}Evf_4zAD">Waermesumme</variable>
       </variables>
       <block type="schedule" id="nb6O:Ol~vdm1*OLiv$Ij" x="87" y="13">
         <field name="SCHEDULE">{"time":{"exactTime":true,"start":"23:59"},"period":{"days":1}}</field>
         <statement name="STATEMENT">
           <block type="variables_set" id="CE.xM}HMUgq[hH;w6tz#">
             <field name="VAR" id="(szd7z@+_}[pfg9;t}z8">WaermesummeJahr</field>
             <value name="VALUE">
               <block type="get_value" id="P:4nQPL!1YX;#E/,t]#|">
                 <field name="ATTR">val</field>
                 <field name="OID">0_userdata.0.Wetter.Waermesumme</field>
               </block>
             </value>
             <next>
               <block type="variables_set" id="1]1}{i_+k(cle$%Vs,.[">
                 <field name="VAR" id="*p+kgd%FGcH}Evf_4zAD">Waermesumme</field>
                 <value name="VALUE">
                   <block type="math_arithmetic" id="t4JS5ViHiw31B3J_+EuH">
                     <field name="OP">DIVIDE</field>
                     <value name="A">
                       <shadow type="math_number" id="St9?P3}e%@AR:hpu)=ry">
                         <field name="NUM">1</field>
                       </shadow>
                       <block type="math_arithmetic" id="x((|`-tM+kJr}dDE?e-q">
                         <field name="OP">ADD</field>
                         <value name="A">
                           <shadow type="math_number" id="Q$wshD!)iqe=GaRD|?Y,">
                             <field name="NUM">1</field>
                           </shadow>
                           <block type="get_value" id="{i!4/S8r+n574OG`OUKq">
                             <field name="ATTR">val</field>
                             <field name="OID">daswetter.0.NextDays.Location_1.Day_1.Maximale_Temperatur_value</field>
                           </block>
                         </value>
                         <value name="B">
                           <shadow type="math_number" id="VS_6uKt^HS%}X;oLKmaf">
                             <field name="NUM">1</field>
                           </shadow>
                           <block type="get_value" id="Cdd)3)rB~!3@kxINY:5+">
                             <field name="ATTR">val</field>
                             <field name="OID">daswetter.0.NextDays.Location_1.Day_1.Minimale_Temperatur_value</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <shadow type="math_number" id="C-b%[WMZ$)R!b7sLvI/C">
                         <field name="NUM">2</field>
                       </shadow>
                     </value>
                   </block>
                 </value>
                 <next>
                   <block type="controls_if" id="/Z+`G8(HAit;xuQ{W$kT">
                     <value name="IF0">
                       <block type="logic_compare" id="oA4/tA1P*@k|r6OFT2c$">
                         <field name="OP">GT</field>
                         <value name="A">
                           <block type="variables_get" id="w:zjAKuOX;Za,.;)0-Wb">
                             <field name="VAR" id="*p+kgd%FGcH}Evf_4zAD">Waermesumme</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="iJF,TlT@Gd085Om^Q|qB">
                             <field name="NUM">0</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="controls_if" id="($}xrY%GKN|e;[m{0B9L">
                         <mutation elseif="2"></mutation>
                         <value name="IF0">
                           <block type="logic_compare" id="i.e:uQ%$rjK:]ED?Q=f-">
                             <field name="OP">EQ</field>
                             <value name="A">
                               <block type="time_get" id="^mZ%ArDgJR^j$,g)c-EF">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="true"></mutation>
                                 <field name="OPTION">Mt</field>
                                 <field name="LANGUAGE">de</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="text" id=",~Q5GNYN[mRIt!02W%Yy">
                                 <field name="TEXT">Januar</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO0">
                           <block type="math_change" id="NE~$CS]ZaF79;=cS*c5M">
                             <field name="VAR" id="(szd7z@+_}[pfg9;t}z8">WaermesummeJahr</field>
                             <value name="DELTA">
                               <shadow type="math_number" id="Q7gYzfC/OzZsQ(w4f-Yn">
                                 <field name="NUM">1</field>
                               </shadow>
                               <block type="math_arithmetic" id="r^Mk1X{s4,Xf5AUWlRI#">
                                 <field name="OP">MULTIPLY</field>
                                 <value name="A">
                                   <shadow type="math_number" id="[1dj7UJgwGGf@-2Brg]|">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="variables_get" id="AAP?+Q@|]ihuLPdb%Jbm">
                                     <field name="VAR" id="*p+kgd%FGcH}Evf_4zAD">Waermesumme</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <shadow type="math_number" id="CH=@K^_]#`WIoyXx*G*K">
                                     <field name="NUM">0.5</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </statement>
                         <value name="IF1">
                           <block type="logic_compare" id="xdU]7+I(fR9!7vT^z^#j">
                             <field name="OP">EQ</field>
                             <value name="A">
                               <block type="time_get" id="03v3)B$6Wm(,Cx^cZ*^(">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="true"></mutation>
                                 <field name="OPTION">Mt</field>
                                 <field name="LANGUAGE">de</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="text" id="R.1p60Q:GuH7Yngd;ho~">
                                 <field name="TEXT">Februar</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO1">
                           <block type="math_change" id="Oq{MCrx-wsM)],s]Mc^D">
                             <field name="VAR" id="(szd7z@+_}[pfg9;t}z8">WaermesummeJahr</field>
                             <value name="DELTA">
                               <shadow type="math_number">
                                 <field name="NUM">1</field>
                               </shadow>
                               <block type="math_arithmetic" id="VX)]lo#E+c6k:g~,D*j;">
                                 <field name="OP">MULTIPLY</field>
                                 <value name="A">
                                   <shadow type="math_number">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="variables_get" id="v7JU0pEn!b1fmX:TH8mT">
                                     <field name="VAR" id="*p+kgd%FGcH}Evf_4zAD">Waermesumme</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <shadow type="math_number" id="{Q.[dB:ldR0f4#B=J8Fp">
                                     <field name="NUM">0.75</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </statement>
                         <value name="IF2">
                           <block type="logic_compare" id="-s:$$`c8GnF@Vk!AA.a=">
                             <field name="OP">GT</field>
                             <value name="A">
                               <block type="time_get" id="kY`sffSg9U]rm5T0:WBk">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                 <field name="OPTION">M</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="3jh3=Z?G+u.?j{gW$Z|l">
                                 <field name="NUM">2</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO2">
                           <block type="math_change" id="8)!Lbk4v}GS,oen5+;7N">
                             <field name="VAR" id="(szd7z@+_}[pfg9;t}z8">WaermesummeJahr</field>
                             <value name="DELTA">
                               <shadow type="math_number" id="JqDSo,acEx$%p3!O{jkQ">
                                 <field name="NUM">1</field>
                               </shadow>
                               <block type="variables_get" id="?V!RA2)3`hUW.)87#}h1">
                                 <field name="VAR" id="*p+kgd%FGcH}Evf_4zAD">Waermesumme</field>
                               </block>
                             </value>
                           </block>
                         </statement>
                         <next>
                           <block type="update" id="7`B7I#{644I};S_]kVPj">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">0_userdata.0.Wetter.Waermesumme</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="math_rndfixed" id="7Wzhnn[RAh@Zj%|v,0.+">
                                 <field name="n">1</field>
                                 <value name="x">
                                   <shadow type="math_number" id="T8wW+mWT~^!O2wO^!hyr">
                                     <field name="NUM">3.1234</field>
                                   </shadow>
                                   <block type="variables_get" id="xe3O2[ak][_{t~|*QTBn">
                                     <field name="VAR" id="(szd7z@+_}[pfg9;t}z8">WaermesummeJahr</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </next>
                       </block>
                     </statement>
                     <next>
                       <block type="controls_if" id="n,,ptrB;cQ@}M?D.^uL1">
                         <value name="IF0">
                           <block type="logic_operation" id="g9TET@Bp,gR.[slMFfdi" inline="false">
                             <field name="OP">AND</field>
                             <value name="A">
                               <block type="logic_compare" id="TmcSiSeTIbyxMxvjt=1J">
                                 <field name="OP">GT</field>
                                 <value name="A">
                                   <block type="get_value" id="/}i8@bG*@4]Q}?Cf.-TV">
                                     <field name="ATTR">val</field>
                                     <field name="OID">0_userdata.0.Wetter.Waermesumme</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id=";`.ii6h[7M{oii}N|_q~">
                                     <field name="NUM">200</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_compare" id="6/^r]lc)ug4n4[!uv6:o">
                                 <field name="OP">LT</field>
                                 <value name="A">
                                   <block type="time_get" id="5|#hrg(]sD:84R?,Ty2+">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                     <field name="OPTION">M</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="9aK=zz+92p]?k)Lp]$Jl">
                                     <field name="NUM">4</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO0">
                           <block type="exec" id="HI{fYzGIIkdcR3q4R]rV">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                             <field name="WITH_STATEMENT">FALSE</field>
                             <field name="LOG">warn</field>
                             <value name="COMMAND">
                               <shadow type="text" id=")KS:jMelh@IC(Kn2)f8!">
                                 <field name="TEXT">signal-cli -u +491726731765 send -m "IoBroker lässt Grüßen!" +491726731765</field>
                               </shadow>
                               <block type="text_join" id=";9ySagY7N|{Yh[J`,^8^">
                                 <mutation items="3"></mutation>
                                 <value name="ADD0">
                                   <block type="text" id="dwhL9StzAqjU~YK|b/CU">
                                     <field name="TEXT">signal-cli -u +4915xxxxxxxx send -m "</field>
                                   </block>
                                 </value>
                                 <value name="ADD1">
                                   <block type="text_join" id="BY4wScn^GpL7[MIf:K]s">
                                     <mutation items="3"></mutation>
                                     <value name="ADD0">
                                       <block type="text" id="y*5lHDb]Ugl!)sW@Ei;I">
                                         <field name="TEXT">Die Wärmesumme Nutzgarten hat 200 überschritten</field>
                                       </block>
                                     </value>
                                     <value name="ADD1">
                                       <block type="text_newline" id="aV4*8r$8pdKpa!/F-s:D">
                                         <field name="Type">\n</field>
                                       </block>
                                     </value>
                                     <value name="ADD2">
                                       <block type="text" id="9XW!#68:9a(2}c6_DQK:">
                                         <field name="TEXT">Es ist Zeit mit der Gartenarbeit zu starten</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <value name="ADD2">
                                   <block type="text" id="x#ctUyD8$D19]wPJVTEm">
                                     <field name="TEXT">" +4917xxxxxx</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </statement>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </next>
           </block>
         </statement>
         <next>
           <block type="schedule" id="HEcsFvM)6F1t|ajRJU{f">
             <field name="SCHEDULE">{"time":{"exactTime":true,"start":"00:02"},"period":{"years":1,"yearDate":1,"yearMonth":1}}</field>
             <statement name="STATEMENT">
               <block type="update" id="s!}T`ul7U%HF`@7`*B$A">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                 <field name="OID">0_userdata.0.Wetter.Waermesumme</field>
                 <field name="WITH_DELAY">FALSE</field>
                 <value name="VALUE">
                   <block type="math_number" id=":ky}ct0Wy=V)}6c%]V9e">
                     <field name="NUM">0</field>
                   </block>
                 </value>
               </block>
             </statement>
           </block>
         </next>
       </block>
      </xml>
      

      Bernd 0 1 Reply Last reply Reply Quote 0
      • Bernd 0
        Bernd 0 @Linedancer last edited by

        @linedancer

        Hi Linedancer,
        vielen Dank für dein Script. Das funktioniert aber nur, wenn ich es seit 01.01. hätte laufen lassen, oder?
        Jetzt mitten im Jahr einsteigen wird nicht funktionieren, oder?

        L Homoran 2 Replies Last reply Reply Quote 0
        • L
          Linedancer @Bernd 0 last edited by

          @bernd-0
          Da hast du recht.
          Du kannst natürlich den aktuellen Wert von der Website die du parsen wolltest in den Datenpunkt Waermesumme (den du händisch anlegen musst) reinschreiben, dann zählt das Blockly von diesen Wert weiter.

          1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @Bernd 0 last edited by

            @bernd-0 ich weiß ja nicht wo du wohnst.
            Aber die Suchen nach Grünlandtemperatursumme (oder Teilen davon) brint etliche Seitn, die sich auslesen lassen.
            z.B. für RLP:
            https://www.dlr.rlp.de/Agrarmeteorologie/Landwirtschaft/Ackerbau-Gruenland/Monitoring/Gruenland-Temperatur

            Bernd 0 1 Reply Last reply Reply Quote 0
            • Bernd 0
              Bernd 0 @Homoran last edited by

              @homoran Leider konnte ich keine Seite finden, die für meinen Standort (nähe Nürnberg) mir den Wert anzeigt.

              Homoran 1 Reply Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @Bernd 0 last edited by Homoran

                @bernd-0 sagte in Parser - Temperatursumme für Ausbringung Rasendünger:

                Leider konnte ich keine Seite finden,

                und was ist mit:
                https://www.wetter-by.de/Agrarmeteorologie-BY/Landwirtschaft/Ackerbau/Gruenlandtemperatur
                welcher Ort?

                Bernd 0 1 Reply Last reply Reply Quote 0
                • Bernd 0
                  Bernd 0 @Homoran last edited by

                  @homoran hmm. Scheinbar auch zu blöd zu googlen. 😞 Ort wäre: Röckersbühl

                  Homoran 1 Reply Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @Bernd 0 last edited by Homoran

                    @bernd-0 sagte in Parser - Temperatursumme für Ausbringung Rasendünger:

                    auch zu blöd zu googlen.

                    und ich hab den Mund zu voll genommen - da sind auch keine Daten in plain Text drin 😞
                    ich bleib dran

                    EDIT:
                    Auf der Suche nach der herkunft der Daten bin ich über ein "parser blocking (cross site) Script...." gestolpert.
                    Ich fürchte dass selbst wenn ich da irgendwo die Daten finde du mit dem Parser kein Ergebnis bekommst

                    Bernd 0 1 Reply Last reply Reply Quote 0
                    • Bernd 0
                      Bernd 0 @Homoran last edited by

                      @homoran Vielen Dank, dass du mir helfen willst 🙂

                      T Homoran 2 Replies Last reply Reply Quote 0
                      • T
                        tombox @Bernd 0 last edited by tombox

                        @bernd-0 Also ich nutze
                        https://www.isip.de/isip/servlet/isip-de/entscheidungshilfen/gruenland

                        Wenn man die beste gefunden hat kann ich sie schnell parsen

                        Homoran 1 Reply Last reply Reply Quote 0
                        • Homoran
                          Homoran Global Moderator Administrators @Bernd 0 last edited by

                          @bernd-0 sagte in Parser - Temperatursumme für Ausbringung Rasendünger:

                          @homoran Vielen Dank, dass du mir helfen willst 🙂

                          Hab da was gefunden:
                          Ist nicht ganz an der selben Stelle:
                          https://www.wetter-rosstal.de/statistik.php?typ=tempsum

                          Wärmesumme\s\ss[^;]+;[^>]+>([\d\,]+)

                          Bitte überprüfe noch die die Nutzungsbedingungen der Seite!

                          Bernd 0 1 Reply Last reply Reply Quote 0
                          • Homoran
                            Homoran Global Moderator Administrators @tombox last edited by Homoran

                            @tombox sagte in Parser - Temperatursumme für Ausbringung Rasendünger:

                            @bernd-0 Also ich nutze
                            https://www.isip.de/isip/servlet/isip-de/entscheidungshilfen/gruenland

                            Wenn man die beste gefunden hat kann ich sie schnell parsen

                            ich fand die Seite auch gut, die Station Röckersbühl habe ich da auch gefunden, aber kam nicht an die Daten ran

                            1 Reply Last reply Reply Quote 0
                            • Bernd 0
                              Bernd 0 @Homoran last edited by

                              @homoran said in Parser - Temperatursumme für Ausbringung Rasendünger:

                              Wärmesumme\s\ss[^;]+;[^>]+>([\d,]+)

                              Ich bräuchte nicht die Temperatursumme sondern die Gründlandtemperatur.

                              https://www.wetter-rosstal.de/statistik.php?jahre=&typ2=gruenland&typ=gruenland&end=121&year=0&size=0&diag_typ=2&prozent=0&monthtyp=0&monthtyp2=0#diagramm

                              138dc157-b953-4ed1-bed3-af85b012344a-image.png

                              Homoran 1 Reply Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @Bernd 0 last edited by Homoran

                                @bernd-0 dann nimm die doch 🙂
                                r-Summe\ss[^;]+;[^>]+>([\d\,]+)

                                Typ Zahl mit Komma

                                1 Reply Last reply Reply Quote 0
                                • Bernd 0
                                  Bernd 0 last edited by

                                  Klasse!
                                  Jetzt habe ich sogar zwei Lösungen, welche funktionieren. Sowohl das Blockly-Script von @Linedancer und die Parser Abfrage dank @Homoran.

                                  Vielen Dank!

                                  1 Reply Last reply Reply Quote 0
                                  • Bernd 0
                                    Bernd 0 last edited by

                                    @Homoran
                                    Versuche gerade das regex von dir zu verstehen mit https://regex101.com/ aber so wirklich komme ich nicht dahinter. Schreibt man das regex von Hand oder erhält man das durch Markierung des Textes?

                                    Homoran 1 Reply Last reply Reply Quote 0
                                    • Homoran
                                      Homoran Global Moderator Administrators @Bernd 0 last edited by

                                      @bernd-0 sagte in Parser - Temperatursumme für Ausbringung Rasendünger:

                                      Schreibt man das regex von Hand oder erhält man das durch Markierung des Textes?

                                      das musst du schon von Hand schreiben.

                                      Hier hatte ich das mal etwas näher erklärt
                                      https://forum.iobroker.net/topic/50790/gelöst-parser-und-umlaute/6?_=1644850297611

                                      Bernd 0 1 Reply Last reply Reply Quote 0
                                      • Bernd 0
                                        Bernd 0 @Homoran last edited by

                                        @homoran Super - vielen Dank. Das hat geholfen!

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        Support us

                                        ioBroker
                                        Community Adapters
                                        Donate

                                        839
                                        Online

                                        31.7k
                                        Users

                                        79.8k
                                        Topics

                                        1.3m
                                        Posts

                                        4
                                        21
                                        1183
                                        Loading More Posts
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        Community
                                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                        The ioBroker Community 2014-2023
                                        logo