NEWS

[gelöst] [blockly] Minimal- uund Maximaltemperatur ermitteln


  • Hallo zusammen,

    ich habe einen HM-Temperatursensor und möchte mit diesem die minimale und die maxinmale Temperatur der letzten 24 Stunden anzeigen lassen.

    Erst hatte ich gehofft, daß das der History Adapter vielleicht macht. Leider fehlt mir jegliche Idee, wie das das -am liebsten mit blockly- bewerkstelligen könnte. Daten loggen, max/min in eine Variable schreiben, nach 24 Stunden alles auf Anfang setzen und neu beginnen? Gibt es vielleicht einen völlig anderen Ansatz, den ich nicht sehe?

    Für Anregungen und Hilfe schonmal ein DANKE!

    Grüße Andreas


  • Hallo Andreas,

    ich habe das so gelöst, um 0.00 Uhr wird Min/Max auf den aktuellen Wert gesetzt. Vielleicht hilft das weiter. 1522_aufnahme1.png


  • @schmuh:

    Hallo Andreas,

    ich habe das so gelöst, um 0.00 Uhr wird Min/Max auf den aktuellen Wert gesetzt. Vielleicht hilft das weiter.Aufnahme1.png `

    Hallo Werner,

    vielen Dank. Kannst Du mir den blockly import noch geben? Da kann ich das für mich mal anpassen.

    Nach welchem Zeitintervall gilt der nächste Maximalwert als solcher? Also, wenn es diese Nacht -3°C war und nächste Nacht -1°C. Wie ist dann sichergestellt, daß mir am morgen die -1°C angezeigt werden und nicht das "Allzeittief". Macht das der Cronjob am Anfang?

    Grüße Andreas


  • Hi Andreas,

    richtig, der Cronjob setzt um 0.00 Uhr einfach die aktuellen Werte.

    Hier der Export:

    ! <xml 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml">
    ! <block type="create" id="z+m?D{=V@~5s#c4*!uOu" x="-637" y="-437"><field name="NAME">javascript.0.MaxMin.DayMaxTempOut</field>
    ! <statement name="STATEMENT"><block type="update" id="OBSo]a_/Ns7F5TK,kKI" disabled="true"><mutation delay_input="false"></mutation>
    ! <field name="OID">javascript.0.MaxMin.DayMaxTempOut</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <value name="VALUE"><block type="get_value" id=":aPNVl/Q|IlcEB9yg;Hv"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value></block></statement>
    ! <next><block type="create" id=",etTlWi)u3DJg+Z%_SGq"><field name="NAME">javascript.0.MaxMin.DayMinTempOut</field>
    ! <statement name="STATEMENT"><block type="update" id="/%%@)!R|L!zxLC)+DSrn" disabled="true"><mutation delay_input="false"></mutation>
    ! <field name="OID">javascript.0.MaxMin.DayMinTempOut</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <value name="VALUE"><block type="get_value" id="Oc4.|5s7rjd#gMl#5O"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value></block></statement> ! <next><block type="create" id="QxoRU/W0D*=Alkn%P!#H"><field name="NAME">javascript.0.MaxMin.DayMaxHumOut</field> ! <statement name="STATEMENT"><block type="update" id="z2=Q34xwj/lBAZ![D#~(" disabled="true"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxHumOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id=")o.}2}Q(QsNk8FqpAtnN"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value></block></statement> ! <next><block type="create" id="FxIN,8P{wPWFPWr-5kpy"><field name="NAME">javascript.0.MaxMin.DayMinHumOut</field> ! <statement name="STATEMENT"><block type="update" id=":C_]yZ4]{BEbd6%5|k" disabled="true"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMinHumOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="]K]~dKEL(nsQWb9t//vE"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value></block></statement> ! <next><block type="create" id="5nIuy55q]62P0Y#:!K%Q"><field name="NAME">javascript.0.MaxMin.DayMaxTempIn</field> ! <statement name="STATEMENT"><block type="update" id="Ea:1K3bbPE*GP}ovrYbJ" disabled="true"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxTempIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="D7]x7GGp]iQQX|zzp+Il"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value></block></statement> ! <next><block type="create" id="L.1IhEUS(c9OXk70!dmU"><field name="NAME">javascript.0.MaxMin.DayMinTempIn</field> ! <statement name="STATEMENT"><block type="update" id="}^M7r~(s)SUkF~.=_Dx5" disabled="true"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMinTempIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="{U969mlX}s5((:IPLk?K"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value></block></statement> ! <next><block type="create" id="A/BeiLtkx)2Qql(s?"><field name="NAME">javascript.0.MaxMin.DayMaxHumIn</field> ! <statement name="STATEMENT"><block type="update" id="WV(rcB]t-@ie?i8zCi]%" disabled="true"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxHumIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="7gHSzp}K(zPE62#GPW:"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value></block></statement>
    ! <next><block type="create" id="OEh_jEsATU:4aZ4OOd4H"><field name="NAME">javascript.0.MaxMin.DayMinHumIn</field>
    ! <statement name="STATEMENT"><block type="update" id="BEbgJm6-bth1MyGjLVCm" disabled="true"><mutation delay_input="false"></mutation>
    ! <field name="OID">javascript.0.MaxMin.DayMinHumIn</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <value name="VALUE"><block type="get_value" id="tG|!Vc@U7qQFLw^EeLdd"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value></block></statement>
    ! <next><block type="schedule" id="IrZ|d(sWDD-YHKHT3iS"><field name="SCHEDULE">0 0 * * *</field> ! <statement name="STATEMENT"><block type="update" id="FcS~%t@0@Oh.k+fr,lNR"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxTempOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="k)NhicjB+,p)76^okG02"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value> ! <next><block type="update" id="l+lI+;+PgYH4Qi15.b~A"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMinTempOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="/Id:lh)z7DbwwXDfB?"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value> ! <next><block type="update" id="GoB2.WqD%ZF_?S5K6rCq"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxHumOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="_ZLUpQF.o54PEY{jaK|7"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value> ! <next><block type="update" id="kwa-P:,tR)?|lzAG]h@u"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMinHumOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id=")yjV4ryb;V0wnUCx.8xy"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value> ! <next><block type="update" id="L%hh3)?;6)#9rAU4lGN2"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxTempIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="#,-0C7S1cf7JYuWR,tG["><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value> ! <next><block type="update" id=":CK~t7Ie|DL:(FYWLoa"><mutation delay_input="false"></mutation>
    ! <field name="OID">javascript.0.MaxMin.DayMinTempIn</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <value name="VALUE"><block type="get_value" id="0j(_ZudF.:r+sK9!T?O"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value> ! <next><block type="update" id="1!NaqJcxd!zcn2|wXnrr"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxHumIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="GUK*(P@/![2oy?vCh:{"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value>
    ! <next><block type="update" id="L^8(Ck@ljHFxQ;TIes3"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMinHumIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="3H)#.YcTX}OBrNjQ0a4O"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement> ! <next><block type="on_ext" id="xzo)QzV@n/^C7_5_0oh#"><mutation items="1"></mutation> ! <field name="CONDITION">any</field> ! <value name="OID0"><shadow type="field_oid" id="{h1)#bSfb[iBkaC;s0Z"><field name="oid">rflink.0.rawData</field></shadow></value>
    ! <statement name="STATEMENT"><block type="controls_if" id="|{_X!:C^UJF0NF]Kc4/"><value name="IF0"><block type="logic_compare" id="r4*E}3jIS4gLJXM3b1uK"><field name="OP">GT</field> ! <value name="A"><block type="get_value" id=":LrgI]rERHOz]uL0EUTQ"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value> ! <value name="B"><block type="get_value" id="9:[X|k6;Zhn6V,x]zMSB"><field name="ATTR">val</field> ! <field name="OID">javascript.0.MaxMin.DayMaxTempOut</field></block></value></block></value> ! <statement name="DO0"><block type="update" id="d_*h3rFd#b89I(~57tgj"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxTempOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="Yr*!3+A74DcgOV!mX?lA"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value></block></statement> ! <next><block type="controls_if" id="YO@0F@!|L*0dNC!CB?U"><value name="IF0"><block type="logic_compare" id="d6MS%5)l08+R^V}8!MZw"><field name="OP">LT</field>
    ! <value name="A"><block type="get_value" id="Mh;p#sMUah4hh6Q_hDa"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value> ! <value name="B"><block type="get_value" id="v8l]p{U]^Wm:(6*;a|Wz"><field name="ATTR">val</field> ! <field name="OID">javascript.0.MaxMin.DayMinTempOut</field></block></value></block></value> ! <statement name="DO0"><block type="update" id="@s]Q]NC_%a^.b%XzRq=/"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMinTempOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="g(-(Qfv}PHse[N2m}d)U"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.TEMP</field></block></value></block></statement> ! <next><block type="controls_if" id="nM[3jpEPUrE(@EgvP6/E"><value name="IF0"><block type="logic_compare" id="r/VY;c7#kHbA*kX#-Q)D"><field name="OP">GT</field> ! <value name="A"><block type="get_value" id="=eZeAj]^UtTmhU|=V8.-"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value> ! <value name="B"><block type="get_value" id="zVN{:F9FOlfv+z.8+^tv"><field name="ATTR">val</field> ! <field name="OID">javascript.0.MaxMin.DayMaxHumOut</field></block></value></block></value> ! <statement name="DO0"><block type="update" id="IiImyB83#PeC7;G3;Q6*"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxHumOut</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="*;tF~8nUJbw4PnTOvIfL"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value></block></statement> ! <next><block type="controls_if" id="n}``acz.S?%BgQQX!FR/"><value name="IF0"><block type="logic_compare" id="jU8PyHBn:8*4bMj,A5Fg"><field name="OP">LT</field> ! <value name="A"><block type="get_value" id="G52*Rzgcra]:{RWdF6#"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value>
    ! <value name="B"><block type="get_value" id="NTg{W:KpnE?N3_P_S(PN"><field name="ATTR">val</field>
    ! <field name="OID">javascript.0.MaxMin.DayMinHumOut</field></block></value></block></value>
    ! <statement name="DO0"><block type="update" id="|kYAA:~TZ2/RH(#pL4Kd"><mutation delay_input="false"></mutation>
    ! <field name="OID">javascript.0.MaxMin.DayMinHumOut</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <value name="VALUE"><block type="get_value" id="4
    ^dn4se9RvfI^CT:9D)"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_1.HUM</field></block></value></block></statement>
    ! <next><block type="controls_if" id="^p6@.Roi=N%bM-0I:Dv9"><value name="IF0"><block type="logic_compare" id="-Kdhh;:I)OZkc71)sETg"><field name="OP">GT</field>
    ! <value name="A"><block type="get_value" id="3tuR?U0OLjHjH%kNXuSR"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value>
    ! <value name="B"><block type="get_value" id="SL%1Na:cLmja%{Tkp39"><field name="ATTR">val</field> ! <field name="OID">javascript.0.MaxMin.DayMaxTempIn</field></block></value></block></value> ! <statement name="DO0"><block type="update" id="u/%=?8NIJ,qx^OQF=Wj]"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxTempIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="XH2F}gPZj{b,Byr9If,C"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value></block></statement> ! <next><block type="controls_if" id="YzeMSs~@;{F[URn5Gqrs"><value name="IF0"><block type="logic_compare" id="t%U%i]*5aD2L%^WKDEj"><field name="OP">LT</field>
    ! <value name="A"><block type="get_value" id="ny5ZeWtfv4]{3]u@GY}"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value> ! <value name="B"><block type="get_value" id="@/kcvz(@bbZyBZU74fX("><field name="ATTR">val</field> ! <field name="OID">javascript.0.MaxMin.DayMinTempIn</field></block></value></block></value> ! <statement name="DO0"><block type="update" id="/g{^SDc}+Ua%T+XNxun"><mutation delay_input="false"></mutation>
    ! <field name="OID">javascript.0.MaxMin.DayMinTempIn</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <value name="VALUE"><block type="get_value" id="731P8D{r5LRjCX@VTnM:"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.TEMP</field></block></value></block></statement>
    ! <next><block type="controls_if" id="6kKo]?|nOKS}iByp%!^b"><value name="IF0"><block type="logic_compare" id="kkfpSTygJO_fh@WkF#6G"><field name="OP">GT</field>
    ! <value name="A"><block type="get_value" id="DOZr|jVmXE{F%S(,X}w"><field name="ATTR">val</field> ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value> ! <value name="B"><block type="get_value" id="T3o8m5Ibd5W8Z%zjFelo"><field name="ATTR">val</field> ! <field name="OID">javascript.0.MaxMin.DayMaxHumIn</field></block></value></block></value> ! <statement name="DO0"><block type="update" id="X0SA9p{#owCJ|Z_+4_CU"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.MaxMin.DayMaxHumIn</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="get_value" id="-xV2;gcbbQUj3a5+_kB"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value></block></statement>
    ! <next><block type="controls_if" id="AA7H#?/%o++L2e;hA82("><value name="IF0"><block type="logic_compare" id="=|lw!L)qmOHlICNK5JQZ"><field name="OP">LT</field>
    ! <value name="A"><block type="get_value" id="@^5l7lOBLod(StJ#+iC*"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value>
    ! <value name="B"><block type="get_value" id="!`U]Opz^ud=8lZBR-SWQ"><field name="ATTR">val</field>
    ! <field name="OID">javascript.0.MaxMin.DayMinHumIn</field></block></value></block></value>
    ! <statement name="DO0"><block type="update" id="D9AdFJ?iN7O5L/2%FePQ"><mutation delay_input="false"></mutation>
    ! <field name="OID">javascript.0.MaxMin.DayMinHumIn</field>
    ! <field name="WITH_DELAY">FALSE</field>
    ! <value name="VALUE"><block type="get_value" id="H/,)#SQsdk18yxqL76s)"><field name="ATTR">val</field>
    ! <field name="OID">rflink.0.channels.InoValley_2.HUM</field></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></xml>

    Der Export ist hier etwas umfangreicher, da zwei Sensoren abgefragt werden.

Suggested Topics

1.8k
Online

38.3k
Users

43.7k
Topics

611.0k
Posts