- Home
- Deutsch
- Skripten / Logik
- Blockly
- Gedanken zur Feinstaubmessung
Gedanken zur Feinstaubmessung
-
Probiere doch mal das hier:
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id="|zrtv-e98n%+)6SmMQGz">Anfang</variable> <variable type="" id="d[?QaF(N/mc|eq/IOy75">Param1</variable> <variable type="" id="%g9ob`$FnQ!zF#~C8Ret">Ende</variable> <variable type="" id="+7xcGWJ647XP265eD.Ll">JSON</variable> <variable type="" id="2DY4,TA7#ra1oA6Bz925">URL</variable> <variable type="" id="IN6AA6TiKW]?_gBN5J!v">SensemapJson</variable> <variable type="" id="kXTaix[lp7nNNGO=Zc+@">result</variable> <variable type="" id="?%Q@y58(tY1cXr7e17Gc">Unit1</variable> <variable type="" id="s@1tudN:J=lhR59TGl{3">Sensor1</variable> <variable type="" id="G7^Cu8s)%C@Yuc,yq:|[">Wert1</variable> <variable type="" id="@hb0FIlN^F6YBg^(y}Pm">Station</variable> <variable type="" id="Dj2Zyap_1N~eP!+x^$`B">Pfad</variable> </variables> <block type="procedures_defnoreturn" id="S0*nkNsu`02K8Z[2=4oC" x="988" y="-987"> <field name="NAME">Sensorwerte_auslesen</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="variables_set" id="c0[adpg`4BA?`19@Z+G/"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id=",Ifp_}FhWon~]!uqsSaz"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="{PSVZc3Mt]U=2EX!8|y."> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id=":QjI.87@s4}se7F`#0~0"> <field name="TEXT">tle":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="ZbM/.4%L?dlr7LC6~d.~"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="Ky}|pA4xEq}19rIH1|wa"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="vm@=7U5{//Z@-VC2!C.r"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="vqIa??-dUtC3tx[?y/%5"> <field name="TEXT">","uni</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="hI7XEC?nQ.ybOxR=pim8"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> <value name="VALUE"> <block type="convert_tostring" id="C*XQ}C]lyC=ai{CU7i5~"> <value name="VALUE"> <block type="text_getSubstring" id="H|t5#|Q,T#H/n$;$dM?["> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="]`@9[9V_f5,bI3dR|Sn9"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="F}dh5=wXD/kE3,CQPb^n"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="C!E[O!zbDhe=|sXd9/u9"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="lBUyeQ}#rN^8ab`lfRDD"> <field name="NUM">6</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="hb{d,FiAoPA=b2u8OHkt"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="FcT4LNed=RL+4CY_t_i]"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="7Pgpj2}emCKVmwM#7OvV"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="c7C2u6X2#UffWFDl=8Gq"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="%wzpiI/a@QQAjXYmlR6j"> <mutation name="besserer Punktekiller"> <arg name="Param1"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id=":MP2_-vmlCh$EopvE$?q"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> </block> </value> </block> </value> <next> <block type="variables_set" id="1#:Sf4T5R@hTztixi3xL"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id="?bbVO}89ok~c1:54AAL*"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="chyaG7ihvA~HWj8QLIw2"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="j.,UtM!x1ax1T7Jhyr2)"> <field name="TEXT">nit":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="FECM,;fW1}3L+?T|MBEt"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="XFb#?n*^L=DiWeAyDo{{"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="hgTcpZGeW^icqqo}$Jmq"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="WnR}(d{It%ar@+MOj=k-"> <field name="TEXT">","sen</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="IBdVHUvt%i|B*_fq+`r%"> <field name="VAR" id="?%Q@y58(tY1cXr7e17Gc" variabletype="">Unit1</field> <value name="VALUE"> <block type="convert_tostring" id="`hyGfP3yD|0SmuaUpL*G"> <value name="VALUE"> <block type="text_getSubstring" id="a~1zAziTK7_2w%lM1em-"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="jksgw1yp+;sLL]N{]SaO"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="g27+8^AN3#=^49*z%hQU"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Qb2-2@20]f`?a`_62ip@"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="HqU`kd0a+jsNd5w_V7Ac"> <field name="NUM">6</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="u2jFPtyVOn]x~D!?x472"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="qqt4kx/8G*[TJ;13,zq!"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="X9/f]q+I_Ceiz|*94f)g"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="33HNy-m9hQ.@x,,06u2["> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id=",MM!^6Knj8Vd-=(k+K%6"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="vN}Uc(edJ(=,SrNFZ!B("> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="/DT!$G}3%:Vyw;F5lUG2"> <field name="TEXT">Type":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="*m4F$b$TO~o}r(O_%,Q;"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="|pR9b1/m3/EvX3*3n%T$"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="2Lsy{l#to~XP]k|b#B{U"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="R3+JJk`.^}P[O9*OVI(;"> <field name="TEXT">","ico</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="zi_JF/7ZG2nnNN6-H+yf"> <field name="VAR" id="s@1tudN:J=lhR59TGl{3" variabletype="">Sensor1</field> <value name="VALUE"> <block type="convert_tostring" id="|#K/cR7hW1x[T^beQU?q"> <value name="VALUE"> <block type="text_getSubstring" id="t_XOX5,2igg(E]UF9.UM"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="Fn@vgJ8o_6bine]:,8|#"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="eE^Cqu7umn2}|%.[A.LY"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="5HyE-}uIls!Ex*nm{C!="> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="RuVFkSl*`pZvj$`yAIza"> <field name="NUM">7</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="m%|25vuw6#q+U+vRb=Os"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="T^GKJa:jKjr(VQeu$:QL"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="$;j=!Awvlt;)!QD#?a.%"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="/0A~_.]v:Ze{tkYo]@NG"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id="y~*$cEVANX`~sMxH%z,f"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="IR!4R-vTG)GyxSR`Lh1V"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="oR*pi7MJ3pLDZro)HR-0"> <field name="TEXT">lue":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="`HCUZb7mgfzPb%99ltI4"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="V;)0%M$DHIf,YgbwpbAl"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="v/i0zZ,Bv~!Exy}A6(MK"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="IPJ~]J49PVN{.SKe2GF*"> <field name="TEXT">","cre</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="Kva1CD*.4l5V*Wt/If@/"> <field name="VAR" id="G7^Cu8s)%C@Yuc,yq:|[" variabletype="">Wert1</field> <value name="VALUE"> <block type="convert_tonumber" id="IKWCBIrOgq,JKY/LZ].x"> <value name="VALUE"> <block type="text_getSubstring" id="eQ#KoXEdco@OXzNKs)RE"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="EE{3EO^M}jC}]p/5?X:r"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="!tUwB)]?kN`cPWI-y#a{"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="9S}$zW[ilGD{xC!_=.xn"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="E5xB:Z5Oy~L#bwV=|]J]"> <field name="NUM">6</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="`xE6xPnslg~DASN$|X:w"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="kmS~#Oql)QWtCi8CE?Yh"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="lE|Ax*`pou)-*3[2ORDY"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="comment" id=":Hmm)PF]TzV!|7Y5YjPP"> <field name="COMMENT">Bei Bedarf den Pfad zum DP hier ändern</field> <next> <block type="variables_set" id="dF3M=]rwX9J.p`nh.:/A"> <field name="VAR" id="Dj2Zyap_1N~eP!+x^$`B" variabletype="">Pfad</field> <value name="VALUE"> <block type="text_join" id="nxFydL,as8ZjY]Bj`V_~"> <mutation items="6"></mutation> <value name="ADD0"> <block type="text" id="fshO^7SBIJLbLFfrXfaJ"> <field name="TEXT">Luftdaten.</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="}kj.bsAvPB1B3s8t-rWs"> <field name="VAR" id="@hb0FIlN^F6YBg^(y}Pm" variabletype="">Station</field> </block> </value> <value name="ADD2"> <block type="text" id="RW29(Xaj-Hn)YQ7yfAZy"> <field name="TEXT">.</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="(@h9,j_+Lmiys64V2$T5"> <field name="VAR" id="s@1tudN:J=lhR59TGl{3" variabletype="">Sensor1</field> </block> </value> <value name="ADD4"> <block type="text" id="8$9r6vcOl,fmK/i@!{4n"> <field name="TEXT">.</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="wZYLDCY.SwgKoOzfaLcQ"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> </block> </value> </block> </value> <next> <block type="procedures_callcustomnoreturn" id="S5!AiF|c[:o;`T.dEJNF"> <mutation name="DP anlegen"></mutation> <next> <block type="control_ex" id="kGx%e^r^h=4G1A%R?IR,"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="Fk{ir@V2=n__3I1-H=(4"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="DOc`Oi;@12kV]HU.A-fA"> <field name="VAR" id="Dj2Zyap_1N~eP!+x^$`B" variabletype="">Pfad</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="V~d6J^rX-y(l28S+gVCO"> <field name="BOOL">TRUE</field> </shadow> <block type="variables_get" id="{4Q[prwGIZkadbq{bLD?"> <field name="VAR" id="G7^Cu8s)%C@Yuc,yq:|[" variabletype="">Wert1</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="b+(_Mj~N(Bj+m^-PiLo?"> <field name="NUM">0</field> </shadow> </value> <next> <block type="variables_set" id="TB3Q#LK[(+U[s1(lti3Z"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="text_getSubstring" id="7#!6#t1#K{_L_7/_=`Hf"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="lT2/5k~:F?*n9ubOJqsg"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="7gES8GK6wo~JH}0k^DwU"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="8qF:R(NqG#h]D/XFC1(B"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="HQA9B#2}g_CaSNxXVV{l"> <field name="NUM">30</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_number" id="o!n;egr4g,m+WsTiuS%x"> <field name="NUM">100000</field> </block> </value> </block> </value> </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> <block type="variables_set" id="FQtuv{|Ya/Ot:jPQ_n7`" x="62" y="-912"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="math_number" id="Kv4sBHn,XC@!]A7I[f(i"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="P4j]IyBxs.:ehO`N#lN."> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="math_number" id="g$70HI]Kt!Q.)tZQK[Pg"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="tIZY3oqO)|P0~/DcO);}"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="text" id="aJ%kCZCrT#wMIt-|-$uJ"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="5WmS{8Gu)!|OLFGxd1*_"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> <value name="VALUE"> <block type="text" id="sk7Oa[r2x[O+}zh]jh;I"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="agz5l]A3M1?R5tjDMM|`"> <field name="VAR" id="?%Q@y58(tY1cXr7e17Gc" variabletype="">Unit1</field> <value name="VALUE"> <block type="text" id=";%v6zGGw8ltr/KfOT9m-"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="@R`~[Kt_N@ZwqJ$q*AYA"> <field name="VAR" id="s@1tudN:J=lhR59TGl{3" variabletype="">Sensor1</field> <value name="VALUE"> <block type="text" id="~OUigK^EGJrnUq1z5pK`"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="L1BTNCNCyf$`cFoeHi^b"> <field name="VAR" id="G7^Cu8s)%C@Yuc,yq:|[" variabletype="">Wert1</field> <value name="VALUE"> <block type="math_number" id="bbN[Tip0g;Q)H`aTIOBS"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="uK/sjNNqX.M=;f:vwWKx"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> <value name="VALUE"> <block type="text" id=":EK7!rwUA9Cr(hS._@?a"> <field name="TEXT">leer</field> </block> </value> <next> <block type="comment" id="SO{1x)9(IrO=t/HzhQ{q"> <field name="COMMENT">StationsID hier eintragen</field> <next> <block type="variables_set" id="yf|Zs$Eg)0-sY-z@UPq%"> <field name="VAR" id="@hb0FIlN^F6YBg^(y}Pm" variabletype="">Station</field> <value name="VALUE"> <block type="text" id="{v/]|(@@$?rt:K?ykRBS"> <field name="TEXT">5dd2e6674ec04e001aa48f9e</field> </block> </value> <next> <block type="variables_set" id="CzeTqycGqM(9}wMTb*:]"> <field name="VAR" id="2DY4,TA7#ra1oA6Bz925" variabletype="">URL</field> <value name="VALUE"> <block type="text_join" id="8dSeeND{w@xNX^TY4@;w"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="eL@Cb!-8FhFK[Hqa#|j="> <field name="TEXT">https://api.opensensemap.org/boxes/</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="!X!CI`e~-Lo8M64061bA"> <field name="VAR" id="@hb0FIlN^F6YBg^(y}Pm" variabletype="">Station</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="schedule" id="B6o]GUG/x9B//xGnKk2E" x="-87" y="-613"> <field name="SCHEDULE">*/10 * * * *</field> <statement name="STATEMENT"> <block type="request" id="p@PZa|FbALxdQG[!5P=P"> <mutation with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="URL"> <shadow type="text" id="R;W-TQbUXG)5Gbz=QPrM"> <field name="TEXT">https://api.opensensemap.org/boxes/5dd2e6674ec04e001aa48f9e</field> </shadow> <block type="variables_get" id="1~Xe85EKFq+2l2a,TIlB"> <field name="VAR" id="2DY4,TA7#ra1oA6Bz925" variabletype="">URL</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="8!8U?^1.~Gs*4QiZGMs?"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> <value name="VALUE"> <block type="variables_get" id="1HyJyj/-EN2D]=M$n.-g"> <field name="VAR" id="kXTaix[lp7nNNGO=Zc+@" variabletype="">result</field> </block> </value> <next> <block type="update" id="{n0Q9R:Qrus}otFtjJJ{"> <mutation delay_input="false"></mutation> <field name="OID">0_userdata.0.Umwelt.Feinstaub_JSON</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="0upL:$#(xjQbDK)Zgt`{"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> </block> </value> <next> <block type="variables_set" id="of$45[(ktxK;VNWg?Pm@"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="variables_get" id="uA@D|=UY6z3KUkJtZI%N"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> </block> </value> <next> <block type="variables_set" id="Y3Q#eQY#t@tsyPP$cASP"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id="R2W04B_qDzPjtc#LBDe/"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="-bRF{~mX@pD^XMwb69)H"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="LH:VbO]s6~=V]x~HqKM#"> <field name="TEXT">tle":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id=".ln4OSn}+rIV8TL*?To5"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="text_getSubstring" id="MJe{?9Q1|u8lxE_epWer"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="w:FhPP}r83^0zJ:JE.KZ"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="q9u?dh1$Q(RA/2HFvdt$"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="0dJX?S6|pWC8Oqg~cABf"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="V7w1T/(|Vphqv}$?8d/o"> <field name="NUM">7</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_number" id="4TCR*ajRjd%Wl-}OKK)~"> <field name="NUM">100000</field> </block> </value> </block> </value> <next> <block type="controls_repeat_ext" id="`Gx_^#EsfD@%Z3?Z5UV?"> <value name="TIMES"> <shadow type="math_number" id="?H;a}JW1J$2HqpPfi]AS"> <field name="NUM">5</field> </shadow> </value> <statement name="DO"> <block type="procedures_callnoreturn" id="BCR/,j`4mC+mgEX];feQ"> <mutation name="Sensorwerte_auslesen"></mutation> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> <block type="procedures_defcustomnoreturn" id="wb~:H(f(:]+}syLMNgvt" x="113" y="-137"> <mutation statements="false"></mutation> <field name="NAME">DP anlegen</field> <field name="SCRIPT">Y3JlYXRlU3RhdGUoUGZhZCwgMCwge3R5cGU6J251bWJlcicsIHVuaXQ6VW5pdDEsIHJlYWQ6dHJ1ZSwgd3JpdGU6ZmFsc2UsIHJvbGU6J3ZhbHVlJ30pOw==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="procedures_defcustomreturn" id="vR$WvEqR.bO)LEm12;J[" x="113" y="-62"> <mutation statements="false"> <arg name="Param1" varid="d[?QaF(N/mc|eq/IOy75"></arg> </mutation> <field name="NAME">besserer Punktekiller</field> <field name="SCRIPT">cmV0dXJuIDA7IFBhcmFtMS5yZXBsYWNlKC9cLlxzPy9nLCAiXyIp</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>
Habe ich mit arg viel ach und Krach und sehr viel fremder Hilfe gebastelt
Errors beim ersten Aufruf sind "normal"
-
@Homoran vielen Dank, klasse, mach ich sofort. Blöde Frage. Sieht jetzt nicht wie ein JS Skript aus. Ist das ein Blockly? Das habe ich bislang noch nicht im Protfolio. Dann werde ich mal den Adapter installieren und schauen, wie ich das reinbekommen kann.
-
@klassisch sagte in Gedanken zur Feinstaubmessung:
Ist das ein Blockly?
Ja - oder glaubst du dass ich js beherrsche
- Neues Skript
- Blockly
- Icon "Blöcke importieren" (4. von rechts - oben rechts über dem Editor)
- Code hineinkopieren und abdrücken
- ID der Station austauschen
- starten
- error abwarten
- nochmal starten
Mist ich habe den Trigger vergessen brauchte ich zum testen nicht - warte ich tausche gleich den Code aus
@klassisch sagte in Gedanken zur Feinstaubmessung:
Dann werde ich mal den Adapter installieren
brauchst du nicht - ist im js-Adapter drin
- Neues Skript
-
Code ausgetauscht!
-
@Homoran Danke, habs parallel auch gerade gefunden, daß es keinen Blockly Adapter gibt. Dann fiel mir diese "lästige" Abfrage bei der Erstellung eines JS Skriptes ein.
Ja und da werden Objekte erstellt
-
Super, jetzt gibt es auch Daten für BME280 und SDS011.
Aber ich glaube, ich habe gerade Kuddelmuddel produziert weil ich irgendwie draufgeklickt habe und dann die Code nochmals importiert habe. Da könnte jetzt was verrutscht sein. Blöde Frage, wie ersetzt man den Code komplett? Also alles Lösche und das Blockly neu anlegen. -
@klassisch sagte in Gedanken zur Feinstaubmessung:
Also alles Lösche und das Blockly neu anlegen
genau - Blockly über den Skript-Explorer löschen
-
Da ist ein neuer Fehler drin!
läuft bei mir auch nicht mehr -
@Homoran Ok. Habe das Skript/Blockly jetzt mal komplett gelöscht, dann die Objekte gelöscht. Blockly neu erstellt udn gestartet.
Objekte werden erstellt, aber noch keine sinnvollen Werte drin.Edit. Bei mir kommt jetzt noch "kannot extract Blockly Code und das Blockly ist weg
-
@klassisch
Genau - bin dem Bug auf der Spur -
@klassisch sagte in Gedanken zur Feinstaubmessung:
Bei mir kommt jetzt noch "kannot extract Blockly Code und das Blockly ist weg
nicht gut
mal js-Adapter restartet?
Blockly läuft wieder:
Bitte ganzen Baum löschen.
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="" id="|zrtv-e98n%+)6SmMQGz">Anfang</variable> <variable type="" id="d[?QaF(N/mc|eq/IOy75">Param1</variable> <variable type="" id="%g9ob`$FnQ!zF#~C8Ret">Ende</variable> <variable type="" id="2DY4,TA7#ra1oA6Bz925">URL</variable> <variable type="" id="+7xcGWJ647XP265eD.Ll">JSON</variable> <variable type="" id="@hb0FIlN^F6YBg^(y}Pm">Station</variable> <variable type="" id="IN6AA6TiKW]?_gBN5J!v">SensemapJson</variable> <variable type="" id="?%Q@y58(tY1cXr7e17Gc">Unit1</variable> <variable type="" id="kXTaix[lp7nNNGO=Zc+@">result</variable> <variable type="" id="s@1tudN:J=lhR59TGl{3">Sensor1</variable> <variable type="" id="G7^Cu8s)%C@Yuc,yq:|[">Wert1</variable> <variable type="" id="Dj2Zyap_1N~eP!+x^$`B">Pfad</variable> </variables> <block type="procedures_defnoreturn" id="S0*nkNsu`02K8Z[2=4oC" x="988" y="-987"> <field name="NAME">Sensorwerte_auslesen</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="variables_set" id="c0[adpg`4BA?`19@Z+G/"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id=",Ifp_}FhWon~]!uqsSaz"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="{PSVZc3Mt]U=2EX!8|y."> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id=":QjI.87@s4}se7F`#0~0"> <field name="TEXT">tle":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="ZbM/.4%L?dlr7LC6~d.~"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="Ky}|pA4xEq}19rIH1|wa"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="vm@=7U5{//Z@-VC2!C.r"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="vqIa??-dUtC3tx[?y/%5"> <field name="TEXT">","uni</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="hI7XEC?nQ.ybOxR=pim8"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> <value name="VALUE"> <block type="convert_tostring" id="C*XQ}C]lyC=ai{CU7i5~"> <value name="VALUE"> <block type="text_getSubstring" id="H|t5#|Q,T#H/n$;$dM?["> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="]`@9[9V_f5,bI3dR|Sn9"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="F}dh5=wXD/kE3,CQPb^n"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="C!E[O!zbDhe=|sXd9/u9"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="lBUyeQ}#rN^8ab`lfRDD"> <field name="NUM">6</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="hb{d,FiAoPA=b2u8OHkt"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="FcT4LNed=RL+4CY_t_i]"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="7Pgpj2}emCKVmwM#7OvV"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="c7C2u6X2#UffWFDl=8Gq"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="%wzpiI/a@QQAjXYmlR6j"> <mutation name="besserer Punktekiller"> <arg name="Param1"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id=":MP2_-vmlCh$EopvE$?q"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> </block> </value> </block> </value> <next> <block type="variables_set" id="1#:Sf4T5R@hTztixi3xL"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id="?bbVO}89ok~c1:54AAL*"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="chyaG7ihvA~HWj8QLIw2"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="j.,UtM!x1ax1T7Jhyr2)"> <field name="TEXT">nit":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="FECM,;fW1}3L+?T|MBEt"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="XFb#?n*^L=DiWeAyDo{{"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="hgTcpZGeW^icqqo}$Jmq"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="WnR}(d{It%ar@+MOj=k-"> <field name="TEXT">","sen</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="IBdVHUvt%i|B*_fq+`r%"> <field name="VAR" id="?%Q@y58(tY1cXr7e17Gc" variabletype="">Unit1</field> <value name="VALUE"> <block type="convert_tostring" id="`hyGfP3yD|0SmuaUpL*G"> <value name="VALUE"> <block type="text_getSubstring" id="a~1zAziTK7_2w%lM1em-"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="jksgw1yp+;sLL]N{]SaO"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="g27+8^AN3#=^49*z%hQU"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Qb2-2@20]f`?a`_62ip@"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="HqU`kd0a+jsNd5w_V7Ac"> <field name="NUM">6</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="u2jFPtyVOn]x~D!?x472"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="qqt4kx/8G*[TJ;13,zq!"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="X9/f]q+I_Ceiz|*94f)g"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="33HNy-m9hQ.@x,,06u2["> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id=",MM!^6Knj8Vd-=(k+K%6"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="vN}Uc(edJ(=,SrNFZ!B("> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="/DT!$G}3%:Vyw;F5lUG2"> <field name="TEXT">Type":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="*m4F$b$TO~o}r(O_%,Q;"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="|pR9b1/m3/EvX3*3n%T$"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="2Lsy{l#to~XP]k|b#B{U"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="R3+JJk`.^}P[O9*OVI(;"> <field name="TEXT">","ico</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="zi_JF/7ZG2nnNN6-H+yf"> <field name="VAR" id="s@1tudN:J=lhR59TGl{3" variabletype="">Sensor1</field> <value name="VALUE"> <block type="convert_tostring" id="|#K/cR7hW1x[T^beQU?q"> <value name="VALUE"> <block type="text_getSubstring" id="t_XOX5,2igg(E]UF9.UM"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="Fn@vgJ8o_6bine]:,8|#"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="eE^Cqu7umn2}|%.[A.LY"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="5HyE-}uIls!Ex*nm{C!="> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="RuVFkSl*`pZvj$`yAIza"> <field name="NUM">7</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="m%|25vuw6#q+U+vRb=Os"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="T^GKJa:jKjr(VQeu$:QL"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="$;j=!Awvlt;)!QD#?a.%"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="/0A~_.]v:Ze{tkYo]@NG"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id="y~*$cEVANX`~sMxH%z,f"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="IR!4R-vTG)GyxSR`Lh1V"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="oR*pi7MJ3pLDZro)HR-0"> <field name="TEXT">lue":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="`HCUZb7mgfzPb%99ltI4"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="text_indexOf" id="V;)0%M$DHIf,YgbwpbAl"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="v/i0zZ,Bv~!Exy}A6(MK"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="IPJ~]J49PVN{.SKe2GF*"> <field name="TEXT">","cre</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="Kva1CD*.4l5V*Wt/If@/"> <field name="VAR" id="G7^Cu8s)%C@Yuc,yq:|[" variabletype="">Wert1</field> <value name="VALUE"> <block type="convert_tonumber" id="IKWCBIrOgq,JKY/LZ].x"> <value name="VALUE"> <block type="text_getSubstring" id="eQ#KoXEdco@OXzNKs)RE"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="EE{3EO^M}jC}]p/5?X:r"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="!tUwB)]?kN`cPWI-y#a{"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="9S}$zW[ilGD{xC!_=.xn"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="E5xB:Z5Oy~L#bwV=|]J]"> <field name="NUM">6</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="`xE6xPnslg~DASN$|X:w"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="kmS~#Oql)QWtCi8CE?Yh"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="lE|Ax*`pou)-*3[2ORDY"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> </block> </value> <next> <block type="comment" id=":Hmm)PF]TzV!|7Y5YjPP"> <field name="COMMENT">Bei Bedarf den Pfad zum DP hier ändern</field> <next> <block type="variables_set" id="dF3M=]rwX9J.p`nh.:/A"> <field name="VAR" id="Dj2Zyap_1N~eP!+x^$`B" variabletype="">Pfad</field> <value name="VALUE"> <block type="text_join" id="nxFydL,as8ZjY]Bj`V_~"> <mutation items="6"></mutation> <value name="ADD0"> <block type="text" id="fshO^7SBIJLbLFfrXfaJ"> <field name="TEXT">Luftdaten.</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="}kj.bsAvPB1B3s8t-rWs"> <field name="VAR" id="@hb0FIlN^F6YBg^(y}Pm" variabletype="">Station</field> </block> </value> <value name="ADD2"> <block type="text" id="RW29(Xaj-Hn)YQ7yfAZy"> <field name="TEXT">.</field> </block> </value> <value name="ADD3"> <block type="variables_get" id="(@h9,j_+Lmiys64V2$T5"> <field name="VAR" id="s@1tudN:J=lhR59TGl{3" variabletype="">Sensor1</field> </block> </value> <value name="ADD4"> <block type="text" id="8$9r6vcOl,fmK/i@!{4n"> <field name="TEXT">.</field> </block> </value> <value name="ADD5"> <block type="variables_get" id="wZYLDCY.SwgKoOzfaLcQ"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> </block> </value> </block> </value> <next> <block type="procedures_callcustomnoreturn" id="S5!AiF|c[:o;`T.dEJNF"> <mutation name="DP anlegen"></mutation> <next> <block type="control_ex" id="kGx%e^r^h=4G1A%R?IR,"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="Fk{ir@V2=n__3I1-H=(4"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="DOc`Oi;@12kV]HU.A-fA"> <field name="VAR" id="Dj2Zyap_1N~eP!+x^$`B" variabletype="">Pfad</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="V~d6J^rX-y(l28S+gVCO"> <field name="BOOL">TRUE</field> </shadow> <block type="variables_get" id="{4Q[prwGIZkadbq{bLD?"> <field name="VAR" id="G7^Cu8s)%C@Yuc,yq:|[" variabletype="">Wert1</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="b+(_Mj~N(Bj+m^-PiLo?"> <field name="NUM">0</field> </shadow> </value> <next> <block type="variables_set" id="TB3Q#LK[(+U[s1(lti3Z"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="text_getSubstring" id="7#!6#t1#K{_L_7/_=`Hf"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="lT2/5k~:F?*n9ubOJqsg"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="7gES8GK6wo~JH}0k^DwU"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="8qF:R(NqG#h]D/XFC1(B"> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> </block> </value> <value name="B"> <shadow type="math_number" id="HQA9B#2}g_CaSNxXVV{l"> <field name="NUM">30</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_number" id="o!n;egr4g,m+WsTiuS%x"> <field name="NUM">100000</field> </block> </value> </block> </value> </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> <block type="variables_set" id="FQtuv{|Ya/Ot:jPQ_n7`" x="62" y="-912"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="math_number" id="Kv4sBHn,XC@!]A7I[f(i"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="P4j]IyBxs.:ehO`N#lN."> <field name="VAR" id="%g9ob`$FnQ!zF#~C8Ret" variabletype="">Ende</field> <value name="VALUE"> <block type="math_number" id="g$70HI]Kt!Q.)tZQK[Pg"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="tIZY3oqO)|P0~/DcO);}"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="text" id="aJ%kCZCrT#wMIt-|-$uJ"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="5WmS{8Gu)!|OLFGxd1*_"> <field name="VAR" id="d[?QaF(N/mc|eq/IOy75" variabletype="">Param1</field> <value name="VALUE"> <block type="text" id="sk7Oa[r2x[O+}zh]jh;I"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="agz5l]A3M1?R5tjDMM|`"> <field name="VAR" id="?%Q@y58(tY1cXr7e17Gc" variabletype="">Unit1</field> <value name="VALUE"> <block type="text" id=";%v6zGGw8ltr/KfOT9m-"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="@R`~[Kt_N@ZwqJ$q*AYA"> <field name="VAR" id="s@1tudN:J=lhR59TGl{3" variabletype="">Sensor1</field> <value name="VALUE"> <block type="text" id="~OUigK^EGJrnUq1z5pK`"> <field name="TEXT">leer</field> </block> </value> <next> <block type="variables_set" id="L1BTNCNCyf$`cFoeHi^b"> <field name="VAR" id="G7^Cu8s)%C@Yuc,yq:|[" variabletype="">Wert1</field> <value name="VALUE"> <block type="math_number" id="bbN[Tip0g;Q)H`aTIOBS"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="uK/sjNNqX.M=;f:vwWKx"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> <value name="VALUE"> <block type="text" id=":EK7!rwUA9Cr(hS._@?a"> <field name="TEXT">leer</field> </block> </value> <next> <block type="comment" id="SO{1x)9(IrO=t/HzhQ{q"> <field name="COMMENT">StationsID hier eintragen</field> <next> <block type="variables_set" id="yf|Zs$Eg)0-sY-z@UPq%"> <field name="VAR" id="@hb0FIlN^F6YBg^(y}Pm" variabletype="">Station</field> <value name="VALUE"> <block type="text" id="{v/]|(@@$?rt:K?ykRBS"> <field name="TEXT">5dd2e6674ec04e001aa48f9e</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="schedule" id="B6o]GUG/x9B//xGnKk2E" x="-87" y="-613"> <field name="SCHEDULE">*/10 * * * *</field> <statement name="STATEMENT"> <block type="variables_set" id="CzeTqycGqM(9}wMTb*:]"> <field name="VAR" id="2DY4,TA7#ra1oA6Bz925" variabletype="">URL</field> <value name="VALUE"> <block type="text_join" id="8dSeeND{w@xNX^TY4@;w"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="eL@Cb!-8FhFK[Hqa#|j="> <field name="TEXT">https://api.opensensemap.org/boxes/</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="!X!CI`e~-Lo8M64061bA"> <field name="VAR" id="@hb0FIlN^F6YBg^(y}Pm" variabletype="">Station</field> </block> </value> </block> </value> <next> <block type="request" id="p@PZa|FbALxdQG[!5P=P"> <mutation with_statement="true"></mutation> <field name="WITH_STATEMENT">TRUE</field> <field name="LOG"></field> <value name="URL"> <shadow type="text" id="R;W-TQbUXG)5Gbz=QPrM"> <field name="TEXT">https://api.opensensemap.org/boxes/5dd2e6674ec04e001aa48f9e</field> </shadow> <block type="variables_get" id="1~Xe85EKFq+2l2a,TIlB"> <field name="VAR" id="2DY4,TA7#ra1oA6Bz925" variabletype="">URL</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="8!8U?^1.~Gs*4QiZGMs?"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> <value name="VALUE"> <block type="variables_get" id="1HyJyj/-EN2D]=M$n.-g"> <field name="VAR" id="kXTaix[lp7nNNGO=Zc+@" variabletype="">result</field> </block> </value> <next> <block type="update" id="{n0Q9R:Qrus}otFtjJJ{"> <mutation delay_input="false"></mutation> <field name="OID">0_userdata.0.Umwelt.Feinstaub_JSON</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="0upL:$#(xjQbDK)Zgt`{"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> </block> </value> <next> <block type="variables_set" id="of$45[(ktxK;VNWg?Pm@"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="variables_get" id="uA@D|=UY6z3KUkJtZI%N"> <field name="VAR" id="IN6AA6TiKW]?_gBN5J!v" variabletype="">SensemapJson</field> </block> </value> <next> <block type="variables_set" id="Y3Q#eQY#t@tsyPP$cASP"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> <value name="VALUE"> <block type="text_indexOf" id="R2W04B_qDzPjtc#LBDe/"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="-bRF{~mX@pD^XMwb69)H"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="FIND"> <shadow type="text" id="LH:VbO]s6~=V]x~HqKM#"> <field name="TEXT">tle":"</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id=".ln4OSn}+rIV8TL*?To5"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> <value name="VALUE"> <block type="text_getSubstring" id="MJe{?9Q1|u8lxE_epWer"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="STRING"> <block type="variables_get" id="w:FhPP}r83^0zJ:JE.KZ"> <field name="VAR" id="+7xcGWJ647XP265eD.Ll" variabletype="">JSON</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="q9u?dh1$Q(RA/2HFvdt$"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="uYdt.$Ve!GC|WDs/^5]u"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="0dJX?S6|pWC8Oqg~cABf"> <field name="VAR" id="|zrtv-e98n%+)6SmMQGz" variabletype="">Anfang</field> </block> </value> <value name="B"> <shadow type="math_number" id="V7w1T/(|Vphqv}$?8d/o"> <field name="NUM">7</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_number" id="4TCR*ajRjd%Wl-}OKK)~"> <field name="NUM">100000</field> </block> </value> </block> </value> <next> <block type="controls_repeat_ext" id="`Gx_^#EsfD@%Z3?Z5UV?"> <value name="TIMES"> <shadow type="math_number" id="?H;a}JW1J$2HqpPfi]AS"> <field name="NUM">5</field> </shadow> </value> <statement name="DO"> <block type="procedures_callnoreturn" id="BCR/,j`4mC+mgEX];feQ"> <mutation name="Sensorwerte_auslesen"></mutation> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> <block type="procedures_defcustomnoreturn" id="wb~:H(f(:]+}syLMNgvt" x="113" y="-137"> <mutation statements="false"></mutation> <field name="NAME">DP anlegen</field> <field name="SCRIPT">Y3JlYXRlU3RhdGUoUGZhZCwgMCwge3R5cGU6J251bWJlcicsIHVuaXQ6VW5pdDEsIHJlYWQ6dHJ1ZSwgd3JpdGU6ZmFsc2UsIHJvbGU6J3ZhbHVlJ30pOw==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="procedures_defcustomreturn" id="vR$WvEqR.bO)LEm12;J[" x="113" y="-62"> <mutation statements="false"> <arg name="Param1" varid="d[?QaF(N/mc|eq/IOy75"></arg> </mutation> <field name="NAME">besserer Punktekiller</field> <field name="SCRIPT">cmV0dXJuIFBhcmFtMS5yZXBsYWNlKC9cLlxzPy9nLCAiXyIp</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>
Trigger ist auf 10 Minuten eingestellt. Sollte also nach dem zweiten Zyklus passen
-
@klassisch sagte in Gedanken zur Feinstaubmessung:
Bei mir kommt jetzt noch "kannot extract Blockly Code und das Blockly ist weg
Habe nochmal danach gesucht um dir helfen zu können.
Die Posts dazu sind aber von Dezember 18!
Das Problem sollte längst erledigt sein:
https://forum.iobroker.net/topic/17495/cannot-extract-blockly-code -
@Homoran sagte in Gedanken zur Feinstaubmessung:
Habe jetzt wieder alles geputzt und neu importiert. Es wurden bisher aber noch keine Objekte erzeugt
-
@Homoran So, Browsercache etc . Jetzt sind Objekte da. Aber noch keine Werte. Dann mal abwarten.
-
@klassisch
Da müssten entsprechende Fehlermeldungen im log sein wie cannot found.Das dämliche asynchrone javascript.
Der will die Daten eintragen, aber die States sind noch nicht da.
Ab der nächsten Runde muss es klappen -
@Homoran
Frohes Neues Jahr
ich wollte nur sagen, bei mir funktioniert dein Blockly -
@Homoran Ja, Hut ab!
-
Schön dass es auch bei anderen Stationen klappt
Dann hat sich die Arbeit ja gelohnt und ich kann weiter tüftelnWerde versuchen den Luftdruck noch in hPa (aka mbar) zu wandeln.
Da reicht doch Integer, oder braucht es da so viele Nachkommastellen? -
@Homoran Für diese Auswertung brauchen wir keine Nachkommastellen. Bei meiner Tank-Füllstandsmessung sieht das anders aus.
Habe jetzt mal eine andere Stationsnummer eingetragen. Irgendeine. Habe die Objekte der alten nicht gelöscht. Es wird jetzt für die neue Station KEIN Objekt generiert. Ist das so gewollt?
-
@klassisch sagte in Gedanken zur Feinstaubmessung:
Ist das so gewollt?
nein!
An den Usecase zweier Stationen habe ich aber beim schreiben auch gar nicht gedacht.
muss ich auch mal sehenAber das braucht auch nochmal 10 Minuten
@klassisch sagte in Gedanken zur Feinstaubmessung:
brauchen wir keine Nachkommastellen.
läuft bei mir schon mit einer Nachkommastelle - der Wert passt - nur die alte Einheit ist noch da - da habe ich jetzt auch was geändert - dazu muss dann aber zumindest der eine DP gelöscht werden