@liv-in-sky Nachtrag: Es ist übrigens egal ob POST oder GET. Funktioniert beides....
NEWS
Martin Schlender
@Martin Schlender
Best posts made by Martin Schlender
-
RE: HTTP-POST an iot z.B. von Tasker
-
RE: [Gelöst] Hilfe bei einem Alarm-Skript mit Philips Hue
@dslraser
Läuft jetzt übrigens sauber.
Ich hab noch einen Entprellschutz eingebaut. Hier nochmal das ganze Skript:
Hier noch als Code- falls es jemand importieren möchte
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="U5.$,t%X.6s:B4Yyrb[Z">entpreller</variable> <variable id="g2b_R?!{iII*]!ro)pvC">lampeFarbig</variable> <variable id="y$^bQ|_(n+h:iKVR@Av;">lampeWeiss</variable> <variable id="w7(0;y3wv9,{;oLFd+PD">Flur_Farbe</variable> <variable id="rdqHQjqd;^!tM~ot_x5=">Schlafzimmer_farbe</variable> <variable id="_8=#p+0oRs*o0VMOR[S}">Esstisch</variable> <variable id="st;Wc@b(bBKTgmhU4$S+">Arbeitszimmer</variable> <variable id="sERjw_EiX1$ntlna~R|$">Küche</variable> <variable id="ou@(X$d$Bn(c4?XL#/vT">Bad</variable> <variable id="/ULLH+!lG{MW7JlL$4Ed">Klo</variable> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on_ext" id="_na!2-.V1E=Vwd(QQEh!" x="38" y="-187"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">true</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="%D]0[Nj/(?QU:L^4Yr-"> <field name="oid">0_userdata.0.Alarm</field> </shadow> </value> <statement name="STATEMENT"> <block type="debug" id=";#HT*NY%VGQsS%C0y(qg"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="/!Gp1b]mJQL2Pkgz@Em4"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="dbMdyDr6tJ_Ah:;ncA{["> <field name="VAR" id="U5.$,t%X.6s:B4Yyrb[Z">entpreller</field> </block> </value> <next> <block type="controls_if" id="|@!Io;ePU;EL9D/xBI)D"> <value name="IF0"> <block type="logic_negate" id="Mc`)3JTQhLL3Q@5Y`;Ka"> <value name="BOOL"> <block type="variables_get" id="D*{z{9/{]AXU070u|~J`"> <field name="VAR" id="U5.$,t%X.6s:B4Yyrb[Z">entpreller</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="eV2nz=S+o0Qh#knfX(VX"> <field name="VAR" id="g2b_R?!{iII*]!ro)pvC">lampeFarbig</field> <value name="VALUE"> <block type="text" id=",MNNK6^4)h,395+hnn#"> <field name="TEXT">{"level":100, "hue":0, "sat":254, "alert":"lselect", "transitiontime":0}</field> </block> </value> <next> <block type="variables_set" id=".#K%7_CXWjU3Qown1Gac"> <field name="VAR" id="y$^bQ|_(n+h:iKVR@Av;">lampeWeiss</field> <value name="VALUE"> <block type="text" id="wZaUk.-e1^6Y^7}o@oKq"> <field name="TEXT">{"level":100, "ct":6410, "alert":"lselect", "transitiontime":0}</field> </block> </value> <next> <block type="variables_set" id="rc0(]W@/s-,80r(MSd[T"> <field name="VAR" id="U5.$,t%X.6s:B4Yyrb[Z">entpreller</field> <value name="VALUE"> <block type="logic_boolean" id="3G1m.@Rz;+/~_Ia]$dyU"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="comment" id="U2TLkyjix39CYC;h_#)"> <field name="COMMENT">Alten Zustand speichern</field> <next> <block type="variables_set" id="JSh#M2]R-=+=Ilabu1#W"> <field name="VAR" id="w7(0;y3wv9,{;oLFd+PD">Flur_Farbe</field> <value name="VALUE"> <block type="text_join" id="5JMlZ5#p?K_miTW0%b/"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="-bgNJM7V7-ijy4weJxPP"> <field name="TEXT">{"level":</field> </block> </value> <value name="ADD1"> <block type="get_value" id="^d1!LCT8^d!76j6YE^CT"> <field name="ATTR">val</field> <field name="OID">hue.0.Flur_Lampe_farbig.level</field> </block> </value> <value name="ADD2"> <block type="text" id="a45R36kJ_]Cow)H4_gW"> <field name="TEXT">,"hue":</field> </block> </value> <value name="ADD3"> <block type="get_value" id="q@W(^YTY#/=2;qHZle)X"> <field name="ATTR">val</field> <field name="OID">hue.0.Flur_Lampe_farbig.hue</field> </block> </value> <value name="ADD4"> <block type="text" id="H@tM2t+d@D(L/@2|cP/"> <field name="TEXT">,"sat":</field> </block> </value> <value name="ADD5"> <block type="get_value" id="wi{WaS95nx]r{v:ilOX"> <field name="ATTR">val</field> <field name="OID">hue.0.Flur_Lampe_farbig.sat</field> </block> </value> <value name="ADD6"> <block type="text" id="0di1b!%j8COWfdC7MOm"> <field name="TEXT">,"alert":"none", "transitiontime":10}</field> </block> </value> </block> </value> <next> <block type="debug" id="HXdsk`r}In/?|K}W=z%^"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="l?(TLGqL3yX3`*%=oRC)"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="1?+-U}x;-N^;90b)Zgh~"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="=;*b%7#3@9|amP*/T$Vg"> <field name="TEXT">Flur:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="FG;i!RCP.fXxCiB-B3Wi"> <field name="VAR" id="w7(0;y3wv9,{;oLFd+PD">Flur_Farbe</field> </block> </value> </block> </value> <next> <block type="variables_set" id="lJh/d(W|[W*KoFD)snIN"> <field name="VAR" id="rdqHQjqd;^!tM~ot_x5=">Schlafzimmer_farbe</field> <value name="VALUE"> <block type="text_join" id="~!Oli^J7{jDk]krV@pFP"> <mutation items="7"></mutation> <value name="ADD0"> <block type="text" id="*kE0`|Q6O4@uydBZRj|V"> <field name="TEXT">{"level":</field> </block> </value> <value name="ADD1"> <block type="get_value" id="r*zY7+K8X$TFm6BDBhJ2"> <field name="ATTR">val</field> <field name="OID">hue.0.Schlafzimmer_Lampe_farbig.level</field> </block> </value> <value name="ADD2"> <block type="text" id="%GB=kZf3?d^;Q@()_]FA"> <field name="TEXT">,"hue":</field> </block> </value> <value name="ADD3"> <block type="get_value" id="C8rHncmuP0l[4*ij+]$g"> <field name="ATTR">val</field> <field name="OID">hue.0.Schlafzimmer_Lampe_farbig.hue</field> </block> </value> <value name="ADD4"> <block type="text" id="I$_rcEdHz1s{JL=E5jAO"> <field name="TEXT">,"sat":</field> </block> </value> <value name="ADD5"> <block type="get_value" id="q.Cg$=DL$i0A4$4H7BuM"> <field name="ATTR">val</field> <field name="OID">hue.0.Schlafzimmer_Lampe_farbig.sat</field> </block> </value> <value name="ADD6"> <block type="text" id="~fqkBm8L|o`8R4$`*(tT"> <field name="TEXT">,"alert":"none", "transitiontime":10}</field> </block> </value> </block> </value> <next> <block type="debug" id="K9c.Sj0;8=b$%{P!l[YI"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id=",wR$7Gl|?XehT=^tS$ga"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="pZ41}5OabRQc?B78z;f;"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="/YzH)k%ydSTiL`Cdm+;8"> <field name="TEXT">Schlafzimmer:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="y-qYsttx+!pw[:R_Vc*C"> <field name="VAR" id="rdqHQjqd;^!tM~ot_x5=">Schlafzimmer_farbe</field> </block> </value> </block> </value> <next> <block type="variables_set" id=",9pJwmR%-i$bWen=GxXH"> <field name="VAR" id="_8=#p+0oRs*o0VMOR[S}">Esstisch</field> <value name="VALUE"> <block type="text_join" id="MXz.X40N4I(%jv,SfIBP"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id="yWSynemubp.lH1CjC|/j"> <field name="TEXT">{"level":</field> </block> </value> <value name="ADD1"> <block type="get_value" id="_:VqD|5C5YK3W0#y^OQ}"> <field name="ATTR">val</field> <field name="OID">hue.0.Esstisch_Aurelle_.level</field> </block> </value> <value name="ADD2"> <block type="text" id="5?)sC`F)yA`LkBb~wIy5"> <field name="TEXT">,"ct":</field> </block> </value> <value name="ADD3"> <block type="get_value" id="KdG~,1X!c#![j!J}#It0"> <field name="ATTR">val</field> <field name="OID">hue.0.Esstisch_Aurelle_.ct</field> </block> </value> <value name="ADD4"> <block type="text" id="N#~4=$v-c1F|O@VaJ1E+"> <field name="TEXT">,"alert":"none", "transitiontime":10}</field> </block> </value> </block> </value> <next> <block type="debug" id="F0H|Q_Jy0JN8,N+;8R?*"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="FTE:@/Ywv=(sDF@6F({0"> <field name="TEXT">test</field> </shadow> <block type="text_join" id=".$v-3SpEt^HL[4iJ*Vz]"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="ov)a)+XEUFO*(et9@%d`"> <field name="TEXT">Esstisch:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="A}:s_$NGs+On:iID7K(U"> <field name="VAR" id="_8=#p+0oRs*o0VMOR[S}">Esstisch</field> </block> </value> </block> </value> <next> <block type="variables_set" id="Q|PEjtcWDFys|*|pfM~r"> <field name="VAR" id="st;Wc@b(bBKTgmhU4$S+">Arbeitszimmer</field> <value name="VALUE"> <block type="text_join" id="~lU^sox9UUatQr9MAmwK"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="DVZ[aq5*Q@!m*9nOSC8Z"> <field name="TEXT">{"level":</field> </block> </value> <value name="ADD1"> <block type="get_value" id="Z]`f,n/_vm4Unv^xjJFr"> <field name="ATTR">val</field> <field name="OID">hue.0.Arbeitszimmer.level</field> </block> </value> <value name="ADD2"> <block type="text" id=";K!Z#AD;MvC,[7Hh*IYc"> <field name="TEXT">,"alert":"none", "transitiontime":10}</field> </block> </value> </block> </value> <next> <block type="debug" id="`a(heH+fkVjzlXD|Uo!9"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="]E/raH+/z7t7hbh/geSY"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="AO2;=L;zH5r}Fi~075rI"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="CyN#1iK0+d7kDD9w)~R^"> <field name="TEXT">Arbeitszimmer:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="11tf4UWBfqqFeFIlgz`r"> <field name="VAR" id="st;Wc@b(bBKTgmhU4$S+">Arbeitszimmer</field> </block> </value> </block> </value> <next> <block type="variables_set" id="8P=yPIEC^NqGc|ILZ.h}"> <field name="VAR" id="sERjw_EiX1$ntlna~R|$">Küche</field> <value name="VALUE"> <block type="text_join" id="Y*!LrKk~a#)W@fKqgpd:"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="7R}pM}ExI!A`MEr5xL`V"> <field name="TEXT">{"level":</field> </block> </value> <value name="ADD1"> <block type="get_value" id="jT.)D1d2Fx~R2J:4Rmwt"> <field name="ATTR">val</field> <field name="OID">hue.0.Küche.level</field> </block> </value> <value name="ADD2"> <block type="text" id="(I*2KW`.H:G0r_*gB:}!"> <field name="TEXT">,"alert":"none", "transitiontime":10}</field> </block> </value> </block> </value> <next> <block type="debug" id="(rGXk{^e+F)e$}nnE,vp"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="FG.IIsqxMyd|PKOL2cfT"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="|+5HcT1`H%Bja#N3YzAS"> <field name="TEXT">Küche:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Dw55]4+O8#.NzM%AY8wt"> <field name="VAR" id="sERjw_EiX1$ntlna~R|$">Küche</field> </block> </value> </block> </value> <next> <block type="variables_set" id="H-sLd0Uuht`Tky)Ir5=5"> <field name="VAR" id="ou@(X$d$Bn(c4?XL#/vT">Bad</field> <value name="VALUE"> <block type="text_join" id="sq{(zj26:okAm.[tr0P_"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id="G-{Ch,}JoM_BWC`I2fj$"> <field name="TEXT">{"level":</field> </block> </value> <value name="ADD1"> <block type="get_value" id="aCK.Xet;-`_k]S.3xmsa"> <field name="ATTR">val</field> <field name="OID">hue.0.Bad.level</field> </block> </value> <value name="ADD2"> <block type="text" id="xg75(*/IpmL@=xE|)*5b"> <field name="TEXT">,"ct":</field> </block> </value> <value name="ADD3"> <block type="get_value" id="KYwmY:kG;*SL~MN]tL{B"> <field name="ATTR">val</field> <field name="OID">hue.0.Bad.ct</field> </block> </value> <value name="ADD4"> <block type="text" id="@WE%TtKuhR2u0T%*}0kE"> <field name="TEXT">,"alert":"none", "transitiontime":10}</field> </block> </value> </block> </value> <next> <block type="debug" id="b/]o8$9F^T?1p6=bx;Bz"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="~=pjD(HOab4fA~:anN=u"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="eI|NWIM@48T?sJyS:@$f"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="*6doJXy1?eSa{xk.Z#2/"> <field name="TEXT">Bad:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="xj:,=9GS52.g;F!Z*$Vv"> <field name="VAR" id="ou@(X$d$Bn(c4?XL#/vT">Bad</field> </block> </value> </block> </value> <next> <block type="variables_set" id="_YbV]^iYT=Yl[uo*5+PE"> <field name="VAR" id="/ULLH+!lG{MW7JlL$4Ed">Klo</field> <value name="VALUE"> <block type="text_join" id="5^liS^s_#|3VYk[,$*c`"> <mutation items="5"></mutation> <value name="ADD0"> <block type="text" id="R_^.SL|aL2Ir~B)tLtn#"> <field name="TEXT">{"level":</field> </block> </value> <value name="ADD1"> <block type="get_value" id="7la#P=XW]?(`hS1^5n{d"> <field name="ATTR">val</field> <field name="OID">hue.0.Toilette.level</field> </block> </value> <value name="ADD2"> <block type="text" id="djlmTA`LK6uc*GHgm/L1"> <field name="TEXT">,"ct":</field> </block> </value> <value name="ADD3"> <block type="get_value" id="uznL5q!3@}KeU(dDj0.)"> <field name="ATTR">val</field> <field name="OID">hue.0.Toilette.ct</field> </block> </value> <value name="ADD4"> <block type="text" id="3+kzRCVMY~9H+.xNX`|b"> <field name="TEXT">,"alert":"none", "transitiontime":10}</field> </block> </value> </block> </value> <next> <block type="debug" id="L~HW(,sAam{wuvpYG$yR"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="jXu/4/0WNuI6cXz4{OGj"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="jgb-.|]/T37Aa,l4G2ZR"> <field name="TEXT">Klo:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="O^2OGy$:bLD|FG=S`dD["> <field name="VAR" id="/ULLH+!lG{MW7JlL$4Ed">Klo</field> </block> </value> </block> </value> <next> <block type="comment" id="J8sC7YP2ao}Z_P7DN3,#"> <field name="COMMENT">Alarm starten</field> <next> <block type="control" id="EtMjm5X93)jJEYLz]Nzd"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Flur_Lampe_farbig.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="ngn}]},?Md%P|OSygBYc"> <field name="VAR" id="g2b_R?!{iII*]!ro)pvC">lampeFarbig</field> </block> </value> <next> <block type="control" id="vm#C=#w-w:Fv3,$=ug1y"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Schlafzimmer_Lampe_farbig.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="s3Eo/pTJs)e;4q{;Ggd$"> <field name="VAR" id="g2b_R?!{iII*]!ro)pvC">lampeFarbig</field> </block> </value> <next> <block type="control" id="#;r@L!faz||AGY0z%j^A"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Esstisch_Aurelle_.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="pJ)tVHtE`{.BIlS/,wwc"> <field name="VAR" id="y$^bQ|_(n+h:iKVR@Av;">lampeWeiss</field> </block> </value> <next> <block type="control" id="QpYX;|lADt==s0/#Q/YV"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Arbeitszimmer.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="_HD9]%4mTtPZiYUAo?Ij"> <field name="VAR" id="y$^bQ|_(n+h:iKVR@Av;">lampeWeiss</field> </block> </value> <next> <block type="control" id="[jO:nLpJP^/nb_p4pu!X"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Küche.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="a0ZceIX%gHp@~6.}Nkjv"> <field name="VAR" id="y$^bQ|_(n+h:iKVR@Av;">lampeWeiss</field> </block> </value> <next> <block type="control" id="d]ifo(DTyTgm{iVj|tYs"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Bad.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="%ACF1i8X$z(M[XJW(fYo"> <field name="VAR" id="y$^bQ|_(n+h:iKVR@Av;">lampeWeiss</field> </block> </value> <next> <block type="control" id="q#a!g]=+lWNL-}wy{-/-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Toilette.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="=#8N/x;9DGZc.4IZ9DHn"> <field name="VAR" id="y$^bQ|_(n+h:iKVR@Av;">lampeWeiss</field> </block> </value> <next> <block type="comment" id="Md5rJ_wh,vh-YeVEf_7L"> <field name="COMMENT">Alarm beenden</field> <next> <block type="comment" id="JtQ%M(AxA4*%JgiAlp?l"> <field name="COMMENT">Alten Zustand wiederherstellen</field> <next> <block type="timeouts_settimeout" id="Ft#CxWl=aL97Eq/1At(."> <field name="NAME">timeout</field> <field name="DELAY">10</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="+f@3jf3-S)##iv,qIgug"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Flur_Lampe_farbig.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="vQc+7P~B7!YMf=0ytWKl"> <field name="VAR" id="w7(0;y3wv9,{;oLFd+PD">Flur_Farbe</field> </block> </value> <next> <block type="control" id="#kyyb%s=cKL?wp+y`i_4"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Schlafzimmer_Lampe_farbig.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id=")d3TX4LrwO(0w.[0qGxB"> <field name="VAR" id="rdqHQjqd;^!tM~ot_x5=">Schlafzimmer_farbe</field> </block> </value> <next> <block type="control" id=";GP;TD1fH*J8(gb(/G}Q"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Esstisch_Aurelle_.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="CL|x^;|P}qq_Y:%ad=?6"> <field name="VAR" id="_8=#p+0oRs*o0VMOR[S}">Esstisch</field> </block> </value> <next> <block type="control" id="teI3spq)ir^)AH2,)JX)"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Arbeitszimmer.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="D+hBTVY;otbuOZG4dMEG"> <field name="VAR" id="st;Wc@b(bBKTgmhU4$S+">Arbeitszimmer</field> </block> </value> <next> <block type="control" id="nAFMRC$EX(;Ga%!Y!QWX"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Küche.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="Ijas|Nw]VHNmI(07U!}%"> <field name="VAR" id="sERjw_EiX1$ntlna~R|$">Küche</field> </block> </value> <next> <block type="control" id="z)+Z`~nH,z[`[/otMG.y"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Bad.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="E8FmhF%|k/tR{AFP[H(`"> <field name="VAR" id="ou@(X$d$Bn(c4?XL#/vT">Bad</field> </block> </value> <next> <block type="control" id="?srk`0e|LUof_kDWd%!_"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">hue.0.Toilette.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="IEr:x5;$?m{PZ$0cwi/0"> <field name="VAR" id="/ULLH+!lG{MW7JlL$4Ed">Klo</field> </block> </value> <next> <block type="variables_set" id="xN@_j}7,g]15h[Zzr3xi"> <field name="VAR" id="U5.$,t%X.6s:B4Yyrb[Z">entpreller</field> <value name="VALUE"> <block type="logic_boolean" id="b9RGb+}Izy/5_qo0k3bL"> <field name="BOOL">FALSE</field> </block> </value> </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> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </xml>
-
RE: Farben im Admin bei iot
@dslraser Auf dem Handy auch mit Chrome sieht es normal aus. Scheint an Chrome Windows zu liegen. Danke für den Tipp. Ich versuche einen anderen Browser.
Danke für den Tipp -
RE: Ermitteln des Ordners eines Datenpunktes
@dslraser Au ja - stimmt. Light.Dimmer gibt´s auch noch. Das war mir nicht aufgefallen. Aber man könnte auch einfach nach light.* filtern
-
RE: IDs vom Selektor $ - wie kann man die Objekte aktualisieren
@AlCalzone achso - ich dachte Du meinst den Cache vom Alexa Adapter. Aber Du meinst den Cache vom Javascript/Admin Adapter?
Latest posts made by Martin Schlender
-
RE: Probleme im jeelink Adapter
@stefande Schande über mich
Nochmal näher geprüft unter besserem Licht. Einer der Kontakte war oxidiert (Batterie wohl leicht ausgelaufen). Nix was ein Glasfaserstift nicht heilen könnte. tut wieder -
RE: Probleme im jeelink Adapter
@stefande Merci das war der nötige Hinweis.
Eben einen Sensor versucht der aktuell sendet und Batterie raus und wieder reingemacht.
Da kommt dann die Meldung im Debug Log. Dumm von mir - da scheint wohl der Sensor die Hufe hochgerissen zu haben und man verdächtigt dann gleich den Adapter
Danke
Martin -
Probleme im jeelink Adapter
Moin,
der jeelink Adapter läuft seit Jahren sehr zuverlässig. Es war jetzt mal wieder soweit, dass ich bei einem Temperatursensor die Batterie wechseln mußte und der Sensor erhält dadurch ja eine neue ID.
Früher war es immer so, dass im Debug Log von jeelink eine Meldung kam: ID not defined
oder so ähnlich und man von dort die ID übernehmen konnte. Das ist jetzt leider nicht mehr der Fall.
Ich hab den Adapter auch mal auf "Alles/silly" gestellt und trotzdem kommt die ID nicht mehr mit.
Habt Ihr ne Idee?Danke und Gruß
Martin -
RE: Google Home/Assistant ioBroker einrichten/nutzen
@pepsi1183 sagte in Google Home/Assistant ioBroker einrichten/nutzen:
@martin-schlender
Ok, werde ich mal versuchen, aber bekomme ich da % Werte hin?Wird dann wohl eher als Grad ankommen
-
RE: Google Home/Assistant ioBroker einrichten/nutzen
@pepsi1183 vermutlich musst du ihn als Thermostat tarnen.
-
RE: POST Request an Pushcut
@ticaki aaaalso - so einfach scheint es nicht zu klappen.
Ich hab schon die beiden überflüssigen "," entfernt (innerhalb von headers nach dem Content-Type und nach bode: strBody.
Aber es funktioniert trotzdem noch nicht und der Fehler ist nicht gerade sprechend:const axios = require('axios'); const strBody = '{"token":"xxxxxx","user":"yyyyyy","title":"' + strTitle + '","text":"' + strText + '" ,"subtext":"' + strSubtext + '"}'; log('body: ' + strBody); let strErg; try { const result = await axios( { timeout: 5000, method: 'POST', headers: { 'Content-Type': 'application/json' }, url: 'https://api.pushover.net/1/glances.json', body: strBody } ); log('body:' + result.data); setState('0_userdata.0.PostRequest',body,true); } catch(error) { log(JSON.stringify(error.toJSON())); } return '';
Hier der Fehler:
{ "message": "Request failed with status code 400", "name": "AxiosError", "stack": "AxiosError: Request failed with status code 400\n at settle (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/adapters/http.js:570:11)\n at IncomingMessage.emit (node:events:526:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1359:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "adapter": [ "xhr", "http" ], "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 5000, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": {}, "headers": { "Accept": "application/json, text/plain, */*", "Content-Type": "application/json", "User-Agent": "axios/1.4.0", "Accept-Encoding": "gzip, compress, deflate, br" }, "method": "post", "url": "https://api.pushover.net/1/glances.json", "body": "{\"token\":\"xxxx\",\"user\":\"yyyy\",\"title\":\"12.9 °C\",\"text\":\"12.9\" ,\"subtext\":\"17:25\"}" }, "code": "ERR_BAD_REQUEST", "status": 400 }
-
RE: POST Request an Pushcut
Vielen Dank @ticaki für die Mühe. Ich probiere es - wobei ich es mittlerweile anders gelöst habe
Und zwar hab ich einen setState eingebaut und der wartet genauso wie der log() auch bis das Ergebnis da ist.
Ich schreibe mir die Antwort also in einen State und ein anderes Skript wacht darüber und meldet bei entsprechender Antwort an mich dass was nicht stimmt. Hat den Vorteil dass das auch gut nachvollziehbar ist und man nicht im Log suchen muß.@oliverio sagte in POST Request an Pushcut:
jaja async stellt einem immer wieder diese fallen
Ja das ist wirklich gemein- vor allem da ich vorher noch nicht mit JS programmiert habe
-
RE: POST Request an Pushcut
ich glaub jetzt weiß ich warum das so ist. Hab mich eben gewundert warum im Log immer erst die undefined kommen. Der Request ist noch nicht abgeschlossen und das Script läuft weiter und gibt nix zurück. Muß da warten....
-
RE: POST Request an Pushcut
Das völlig verrückte ist, wenn ich den unteren Teil so umbaue:
log('body:' + body); return body; } } ); return strErg;
steht im Log:
body:{"status":1,"request":"2a0edda9-9e13-47bc-8541-43982263f8ae"}
und der Rückgabewert im Blockly ist undefined. Kapier ich einfach nicht -
RE: POST Request an Pushcut
@mickym sagte in POST Request an Pushcut:
@martin-schlender Dann mach halt das return strErg nicht ganz unten hin, sondern in Zeile 24 als direkt unter log
Auch schon versucht. Geht auch nicht. Sehr spannend. Wenn ich da einen return body mache ist das Ergebnis undefined