Skip to content

Blockly

6.6k Topics 79.8k Posts

Hilfe für Skripterstellung mit Blockly

NEWS

  • Dimmen per Rampe

    16
    0 Votes
    16 Posts
    1k Views
    S
    @Nashra
  • Blockly. Thermostatsteuerung mit Datum (Winterbereich)

    blockly
    5
    1
    0 Votes
    5 Posts
    203 Views
    R
    @paul53 Danke für die Mühe
  • Blockly Trigger durch starten

    blockly javascript
    10
    1
    0 Votes
    10 Posts
    1k Views
    bergjetB
    @Asgothian Gibt es eine Erklärung, weshalb dieses Blockly nicht startet? Es sollte alle 2 Stunden von Sonnenuntergang bis Sonnenaufgang laufen. [image: 1609961239536-bildschirmfoto-2021-01-06-um-20.21.20.png] [image: 1609961245762-bildschirmfoto-2021-01-06-um-20.23.02.png]
  • Blockly in Verbindung mit einer "dynamischen" Vari. [gelöst]

    blockly
    30
    3
    0 Votes
    30 Posts
    2k Views
    S
    @Homoran ja und nein :-) Wenn es um die Logik geht einen Alarm beim unterschreiten des Datenpunkt zu bekommen, dann greift genau dieses Blocklyskript. In der Folge der Diskussion ging es um das setzten der "Zahl" für den Datenpunkt "Benzinlimit". Hier kommt text2command zum Einsatz und hat eine eigene Quittungsfunktion (Bestätigungstext). in der ich auf {Objekte} verweisen kann. Als Objekt habe ich hier im Moment noch den Datenpunkt "Benzinlimit" direkt angegeben, könnte aber natürlich auch ein Skript hinterlegen. Das habe ich aber noch nicht gemacht da es mir doch sehr aufwendig erscheint. Immerhin geht es nur um die Anzeige wenn das Limit auf 1.00, 1.10, 1.20, 1.30 steht. :-) PS. Einen Dieselpreis von 0,90 erwarte ich mal auf lange Zeit nicht mehr.
  • String schneiden, aber verschiedene Längen der Strings

    15
    0 Votes
    15 Posts
    914 Views
    Q
    @paul53 sagte in String schneiden, aber verschiedene Längen der Strings: @quorle sagte: Kann man eigentlich nun auch zählen wie viel oben und unten sind in dem Script und in eine variable schreiben? Man kann. Dein Skript ist mit den vielen Schleifen viel zu umständlich. Versuche es mal so: [image: 1609851535491-blockly_temp.jpg] Export <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="V2M7szHj0grpg_E~L6Y:">Liste</variable> <variable id="K@h0-NY5VaI|@t!5/iJh">Wert</variable> <variable id="Fwt*3`3ScyT(qDt?gf(T">ObjectID</variable> <variable id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</variable> <variable id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</variable> <variable id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</variable> <variable id="uraW(G+9^E9Lr!q;.Md?">id</variable> </variables> <block type="procedures_defcustomreturn" id="!t;U0AgoNU@W*^{W;)1~" x="-112" y="-837"> <mutation statements="false"> <arg name="Liste" varid="V2M7szHj0grpg_E~L6Y:"></arg> <arg name="Wert" varid="K@h0-NY5VaI|@t!5/iJh"></arg> </mutation> <field name="NAME">Multisort</field> <field name="SCRIPT">dmFyIFdlcnQgPSBXZXJ0IC0gMTsgCkxpc3RlLnNvcnQoZnVuY3Rpb24oYSwgYil7CiAgICByZXR1cm4gYltXZXJ0XSAtIGFbV2VydF07Cn0pOwpyZXR1cm4gTGlzdGU7</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="on_ext" id="RT3@Kxqxg#w3f=(kzwCu" x="-112" y="-735"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="0)0sp$I1ccfm%4Sde-mT"> <field name="oid">default</field> </shadow> <block type="selector" id=",lvP%A]1J?Mf^@0s2D%["> <field name="TEXT">*_Position(functions=blinds)</field> </block> </value> <statement name="STATEMENT"> <block type="variables_set" id="EaZb.Nmx4%jg9Z;%%B!-"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> <value name="VALUE"> <block type="lists_create_with" id="~_)rel.JNGZRd1wA{I--"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id="Rg09a5devTzI@~mc((BK"> <field name="VAR" id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</field> <value name="VALUE"> <block type="math_number" id="D`W+|xQ}PEab+LYj!B@A"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="v,No$zUXNav[}}JQf,ZZ"> <field name="VAR" id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</field> <value name="VALUE"> <block type="math_number" id="NJT#^AM7euPLck8(G#|:"> <field name="NUM">0</field> </block> </value> <next> <block type="controls_forEach" id="~PaFX`X@5n{TM9K^{Jw6"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> <value name="LIST"> <block type="selector" id="xQ^Q5{h5V@5PLI+YO@i."> <field name="TEXT">*_Position(functions=blinds)</field> </block> </value> <statement name="DO"> <block type="controls_if" id="-3J;6~}7Ac!D}IR`/Dr1"> <value name="IF0"> <block type="get_value_var" id=")kSAuROX6lA-U2N,FJ1Q"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="e+?Z+-m0_DLYGl{zT3ix"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="!fALmmY3PSF+?rGHUXQ,"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="cM#MFD=^jNWob(9vz(~1"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="/265%H+GD.faL*#TGbo?"> <field name="OP">GT</field> <value name="A"> <block type="text_indexOf" id="D7{4xbOR6X[.m+}Gx2Ho"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="Zz2Xzj7TsWbSq@8F2;ov"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> </block> </value> <value name="FIND"> <shadow type="text" id="eWKTwrgb)ipsurHrTf;@"> <field name="TEXT">obere</field> </shadow> </value> </block> </value> <value name="B"> <block type="math_number" id="KV8yK1aY_dsTB2S5#DK{"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="Xm0emo(nJ`lakFJ=fdQ,"> <field name="VAR" id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</field> <value name="DELTA"> <shadow type="math_number" id="Nhv{UJ+eb?8=6gCSRKYF"> <field name="NUM">1</field> </shadow> </value> <next> <block type="lists_setIndex" id="-zUiNM(}BsoQ].Hu.|mx"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="Q0Hct8=ken4m!!W]js)U"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <value name="TO"> <block type="text_join" id="i78-ZD4kMuS4);ga}wX|"> <mutation items="2"></mutation> <value name="ADD0"> <block type="procedures_callcustomreturn" id="2fUjFt9g8rVF/XheoN.x" inline="true"> <mutation name="Name"> <arg name="ObjectID"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="k:Is?gkGPl/=r1X^,k3K"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> </block> </value> </block> </value> <value name="ADD1"> <block type="convert_from_date" id="|0D6ha=gppa[@Eg.-.8s"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation> <field name="OPTION">custom</field> <field name="FORMAT"> TT.MM. SS:mm</field> <value name="VALUE"> <block type="get_value_var" id="ZH.h{PJzN,EeXI-)JVDH"> <field name="ATTR">lc</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="!@Z.|vd8M+75I$7U.crR"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="pb?%cBnC:CV9Pp[xuR!O"> <field name="OP">GT</field> <value name="A"> <block type="text_indexOf" id="3rx0SYiP2)+Y{$eE|7DA"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="gxDL([28Hv_RM:?@9sbj"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> </block> </value> <value name="FIND"> <shadow type="text" id="t9UdlU$/{%nf^#mLYHHu"> <field name="TEXT">untere</field> </shadow> </value> </block> </value> <value name="B"> <block type="math_number" id="i%Dd$:Snq*_lODz73K6)"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="math_change" id="n08y(+kju{gJ#pyG3/W5"> <field name="VAR" id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</field> <value name="DELTA"> <shadow type="math_number" id="U.dCdkI;6zYJkx2A)VaY"> <field name="NUM">1</field> </shadow> </value> <next> <block type="lists_setIndex" id="rfj~2?mWi*xoG|jXMjt|"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="variables_get" id="v/]gQGCApHoHYbKtrJG;"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <value name="TO"> <block type="text_join" id="]e[t+(}_A7^gzs5.U*~q"> <mutation items="2"></mutation> <value name="ADD0"> <block type="procedures_callcustomreturn" id="Hq1-E:q$vJE$IYjVZ,i/" inline="true"> <mutation name="Name"> <arg name="ObjectID"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="S)LfIM+$*JhdbEW;Q~E`"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> </block> </value> </block> </value> <value name="ADD1"> <block type="convert_from_date" id="glk6{Cn7R#cUCDBzx?^o"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation> <field name="OPTION">custom</field> <field name="FORMAT"> TT.MM. SS:mm</field> <value name="VALUE"> <block type="get_value_var" id="NiotF+D`lg(W|88`%Ip`"> <field name="ATTR">lc</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="1{rQ-nXbR/eW{!nTrSHI"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">id</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </statement> <next> <block type="control" id="dI4yke%zrI0vqI$=7|!P"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.test.Test_gemischt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="lists_split" id="l{~(EszGg~`4S_3_-$rn"> <mutation mode="JOIN"></mutation> <field name="MODE">JOIN</field> <value name="INPUT"> <block type="variables_get" id="1Q0Efv^4i*zZNN~`bBg,"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <value name="DELIM"> <shadow type="text" id="K]k6H=9zZXoha?FUPY@P"> <field name="TEXT">, </field> </shadow> </value> </block> </value> <next> <block type="debug" id="~Vo($,geEl2,#rc::T.Z"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="Xd:Vq-I5{mP!=A*aFHlD"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id=":4Hv{U)2~sO03*}{H0MM"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <next> <block type="update" id=":^6h2|*GBzTe.;V()/}2"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6gFUj8w1JZZL_Q.+g?s9"> <field name="VAR" id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</field> </block> </value> <next> <block type="update" id="(AA]_@W4q2P53LIa#ue["> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="#BAAF+DP9=zz2vN`$C-s"> <field name="VAR" id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> <block type="procedures_defcustomreturn" id="]lQM=r`L^2M}s^@n(USH" x="438" y="-687"> <mutation statements="false"> <arg name="ObjectID" varid="Fwt*3`3ScyT(qDt?gf(T"></arg> </mutation> <field name="NAME">Name</field> <field name="SCRIPT">bGV0IG5hbWUgPSBnZXRPYmplY3QoT2JqZWN0SUQpLmNvbW1vbi5uYW1lLnN1YnN0cmluZygxMik7Cm5hbWUgPSBuYW1lLnJlcGxhY2UoJ1N0YXR1cyBvYmVyZSBQb3NpdGlvbicsICdvYmVuJyk7Cm5hbWUgPSBuYW1lLnJlcGxhY2UoJ1N0YXR1cyB1bnRlcmUgUG9zaXRpb24nLCAndW50ZW4nKTsKcmV0dXJuICI8Yj4iK25hbWUrIjwvYj4iOw==</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml> Aktuell sieht das Script so aus: [image: 1609938428942-unbenannt.png] Spoiler <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="Fwt*3`3ScyT(qDt?gf(T">ObjectID</variable> <variable id="V2M7szHj0grpg_E~L6Y:">Liste</variable> <variable id="K@h0-NY5VaI|@t!5/iJh">Wert</variable> <variable id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</variable> <variable id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</variable> <variable id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</variable> <variable id="uraW(G+9^E9Lr!q;.Md?">i</variable> </variables> <block type="procedures_defcustomreturn" id="]lQM=r`L^2M}s^@n(USH" x="-2912" y="-1837"> <mutation statements="false"> <arg name="ObjectID" varid="Fwt*3`3ScyT(qDt?gf(T"></arg> </mutation> <field name="NAME">Name</field> <field name="SCRIPT">Ly9sZXQgbmFtZSA9IGdldE9iamVjdChPYmplY3RJRCkuY29tbW9uLm5hbWU7Ci8vaWYodHlwZW9mIHJvb20gPT0gJ29iamVjdCcpIHJldHVybiByb29tLmRlOwovL3JldHVybiAiPGI+IituYW1lKyI8L2I+IjsKCmxldCBuYW1lID0gZ2V0T2JqZWN0KE9iamVjdElEKS5jb21tb24ubmFtZS5zdWJzdHJpbmcoMTIpOwpuYW1lID0gbmFtZS5yZXBsYWNlKCdTdGF0dXMgb2JlcmUgUG9zaXRpb24nLCAnb2JlbicpOwpuYW1lID0gbmFtZS5yZXBsYWNlKCdTdGF0dXMgdW50ZXJlIFBvc2l0aW9uJywgJ3VudGVuJyk7CnJldHVybiBuYW1lOwovL3JldHVybiAiPGI+IituYW1lKyI8L2I+Ijs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="procedures_defcustomreturn" id="!t;U0AgoNU@W*^{W;)1~" x="-2913" y="-1813"> <mutation statements="false"> <arg name="Liste" varid="V2M7szHj0grpg_E~L6Y:"></arg> <arg name="Wert" varid="K@h0-NY5VaI|@t!5/iJh"></arg> </mutation> <field name="NAME">Multisort</field> <field name="SCRIPT">dmFyIFdlcnQgPSBXZXJ0IC0gMTsgCkxpc3RlLnNvcnQoZnVuY3Rpb24oYSwgYil7CiAgICByZXR1cm4gYltXZXJ0XSAtIGFbV2VydF07Cn0pOwpyZXR1cm4gTGlzdGU7</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="schedule" id="U~V~{$+oNT7G$A}5I|[2" x="-3112" y="-1788"> <field name="SCHEDULE">*/30 * * * * *</field> <statement name="STATEMENT"> <block type="variables_set" id="Y?v56U`~!`AjkFq)^AUg"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> <value name="VALUE"> <block type="lists_create_with" id="-wzs^IFjDKMl(%An7+gz"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id=",-Y7=lO+B.anWY83}edn"> <field name="VAR" id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</field> <value name="VALUE"> <block type="math_number" id="(JCq-EECHqgkeM^tdo%?"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id=";H+x;3L*).EIV==JPBwf"> <field name="VAR" id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</field> <value name="VALUE"> <block type="math_number" id="JcJG(jkodro3Mg.,Sv-C"> <field name="NUM">0</field> </block> </value> <next> <block type="controls_forEach" id="@_hkYw{:7yYk)G9@=xt1"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> <value name="LIST"> <block type="selector" id="9-v`j#^eq;JD#WVY/[|n"> <field name="TEXT">*_Position(functions=blinds)</field> </block> </value> <statement name="DO"> <block type="controls_if" id="Lhima?hHvPo7{@T^l|ag"> <value name="IF0"> <block type="get_value_var" id="xQ1MI17D1QcaqeJ{U/w%"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="6*nMuh:6yH08HyS;a7c("> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="AlJKJHk}X+Oy6t#]_eqs"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="{koFYcYw#o/;BJ`)0HsD"> <field name="OP">GT</field> <value name="A"> <block type="text_indexOf" id="uUJYW;y/e{D.Mjn$zz?:"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="J8wkDI:xb{?gcGq*Dy6?"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> </block> </value> <value name="FIND"> <shadow type="text" id="c_/p.^p2TALt4gUV!goi"> <field name="TEXT">obere</field> </shadow> </value> </block> </value> <value name="B"> <block type="math_number" id="0izo8/VZEkP}g1cEi_Ve"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="SicIt^|pgO5Y?2htQ,?C"> <field name="VAR" id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</field> <value name="DELTA"> <shadow type="math_number" id="hZnXXv;:2t^0k2LG|YKE"> <field name="NUM">1</field> </shadow> </value> <next> <block type="lists_setIndex" id="pHV.zvZ`Ee%MlC$(hJdP"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">FIRST</field> <value name="LIST"> <block type="variables_get" id="!7CetrTsn1Tbb`K?4lCJ"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <value name="TO"> <block type="text_join" id=";7`[nwtLmM9SXh2[VePK"> <mutation items="8"></mutation> <value name="ADD0"> <block type="text" id="cWA1Noz*)a8xs6dU%~j*"> <field name="TEXT">&lt;div class="headline"&gt;&lt;b&gt;Geöffnet&lt;/b&gt;&lt;/div&gt;&lt;table class="table-status"&gt;&lt;tbody&gt;</field> </block> </value> <value name="ADD1"> <block type="text" id="j?`NI/7Gacv}dFN.+$PE"> <field name="TEXT">&lt;tr&gt;&lt;td&gt;&lt;img src="/vis-icontwo/Doors_Windows/window_open.png"&gt;&lt;/td&gt;&lt;td&gt;</field> </block> </value> <value name="ADD2"> <block type="procedures_callcustomreturn" id="NGG)9(G_Mh^`onb!D8$6" inline="true"> <mutation name="Name"> <arg name="ObjectID"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="?wEYH~Kcw}$RqZKZ-l^R"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> </block> </value> </block> </value> <value name="ADD3"> <block type="text" id=",FstDM5*y1X5@,$t;^[k"> <field name="TEXT">&lt;/td&gt;&lt;td&gt;&lt;span class=""&gt;&lt;i&gt;Letzte Änderung:&lt;/i&gt;&lt;br&gt;</field> </block> </value> <value name="ADD4"> <block type="convert_from_date" id="dW)z:)3tr(pVtn,tbes*"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation> <field name="OPTION">custom</field> <field name="FORMAT"> TT.MM. SS:mm</field> <value name="VALUE"> <block type="get_value_var" id="SXt#AcI#UU[?U|Am4TZ7"> <field name="ATTR">lc</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="]^@cW$Fx+kc4JV8{5P^h"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> </block> </value> </block> </value> </block> </value> <value name="ADD5"> <block type="text" id="@n3wTEG3`D{hPv(e[Wr)" disabled="true"> <field name="TEXT">, </field> </block> </value> <value name="ADD6"> <block type="text" id="w]zt{}A*8rLlwGa7H=Ty"> <field name="TEXT"> Uhr&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;</field> </block> </value> <value name="ADD7"> <block type="text" id="D!W$Z|ArD?[_4g8-m6(?"> <field name="TEXT">&lt;/tbody&gt;&lt;/table&gt;</field> </block> </value> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="~*@F)VMBFc(w!$qRg40W"> <field name="OP">GT</field> <value name="A"> <block type="text_indexOf" id=";=Hov;.1y|aV_VH8NEvw"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="+9.NaVs4Mv]3^T1Y]Y.H"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> </block> </value> <value name="FIND"> <shadow type="text" id="C3Kk~CRp]$=n8?lh5?wR"> <field name="TEXT">untere</field> </shadow> </value> </block> </value> <value name="B"> <block type="math_number" id=")FY$sXKUSdJ2(8rRo2AW"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="math_change" id="m^*C+iXK)+re,yVXaTHY"> <field name="VAR" id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</field> <value name="DELTA"> <shadow type="math_number" id="$$u`hOLT3JLU*|y7(p}Z"> <field name="NUM">1</field> </shadow> </value> <next> <block type="lists_setIndex" id="3`7$=NbE`v2%r(f,:g*:"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="variables_get" id="c#*wNZPBGY--wr9o`7Az"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <value name="TO"> <block type="text_join" id="Qu`F-eBRhn@+Xj[oRcoV"> <mutation items="2"></mutation> <value name="ADD0"> <block type="procedures_callcustomreturn" id="w8k]swRCpOEkyK^4-?N(" inline="true"> <mutation name="Name"> <arg name="ObjectID"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id=":2HC17vC@u+{Jv,fFXNx"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> </block> </value> </block> </value> <value name="ADD1"> <block type="convert_from_date" id="^wv-+r!P6U|Gg[fpq2z?"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation> <field name="OPTION">custom</field> <field name="FORMAT"> TT.MM. SS:mm</field> <value name="VALUE"> <block type="get_value_var" id="t$7zQo/6y$=T%lV]k88x"> <field name="ATTR">lc</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="{.cN7YMPgkCC|Fjii0m0"> <field name="VAR" id="uraW(G+9^E9Lr!q;.Md?">i</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </statement> <next> <block type="control" id="U?`nI[_PT#U2_z|@r]Pv"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.test.Test_gemischt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="=!qc*Nnq^As6.HW,*A$~"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <next> <block type="debug" id="icjpi.$VpX37L)?A.WQ/"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="IX;R|uAvIff)MjVN0)fT"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="piB3m/4X{q^6TpYmIJ*#"> <field name="VAR" id="cTIvd#0frb]}?DN^7oUd">Liste-komplett</field> </block> </value> <next> <block type="debug" id="BC#*R9wLmOEh;e#8vFa("> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="2A_6ot|rN~N6s+rd?c(F"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="O.%DK{PYse{%YG+R2-6)"> <field name="TEXT">Anzahl oben: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="tEA*g,2*FlUc?0wQcnBw"> <field name="VAR" id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</field> </block> </value> </block> </value> <next> <block type="debug" id="DnR^zfOH(ejKZb8zR|,`"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="5iA0`]4GwclS!!EC.kuB"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="nIG{95iGc+EjrO/XAg,4"> <field name="TEXT">Anzahl unten: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Pc]1Hm{@)#e_h[4sSJxK"> <field name="VAR" id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</field> </block> </value> </block> </value> <next> <block type="update" id="5b/LFn]8tj/g`IT-roDz" disabled="true"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="Ua04oSkg=sSQ|q)U7B:N"> <field name="VAR" id="W6/l[G~B{Zwv5)Rz4siZ">anzahl_oben</field> </block> </value> <next> <block type="update" id="/e1kI=6y0KpWq+!tm6b^" disabled="true"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="8OHvEo|MR4wLXHMctk!X"> <field name="VAR" id="Sk[;o=!/U_$I6Wr,/;!b">anzahl_unten</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </xml> Wenn ich in der VIS ein HTML nehme und den Datenpunkt eintrage, wird es auch angezeigt. Aber kann man dies eventuell so Sortieren, dass ein Bild angezeigt wird für "geöffnet" und dann neben dem Bild, untereinander die Namen der Offenen Punkte angezeigt wird? Und für geschlossen das selbe?
  • Fenster offen Mitteilung auf mehrere Fenster umsetzten

    3
    1
    0 Votes
    3 Posts
    682 Views
    K
    @IObroker_chris Dein Ansatz ist besser als meiner von heute Morgen. Ich habe jetzt nur das Problem dass Dein Skript nur anläuft wenn das Fenster seinen Zustand wenigstens einmal ändert.
  • Skript nur einmal ausführen pro Einschalten der Steckdose

    4
    1
    0 Votes
    4 Posts
    2k Views
    A
    Nach etlichen Stunden habe ich die Lösung gefunden und diese ist eigentlich auch ziemlich einfach: [image: 1609877694962-licht2.png] Es wird jetzt zusätzlich überprüft, ob der (selbst erstellte) DP "Büro-Licht-an" auf 0 steht. Wenn das der Fall ist, wird das Licht eingeschaltet und "Büro-Licht-an" bekommt den Wert 1. Somit kann das Licht nicht mehr eingeschaltet werden, da die Bedingung "Büro-Licht-an" auf 0 nicht mehr gegeben ist. Diese wird mit dem Ausschalten der Steckdose wieder auf 0 zurückgesetzt. @jensven Nein, an der Steckdose hängt alles was mit dem PC zu tun hat. Die "Lampe" ist eigentlich ein Philips Hue LightStrip+ @paul53 Danke für den Tipp, das mit dem Timeout hat sich jetzt eh erledigt.
  • Bockly Runden auf 1 Nachkommastelle erzwingen, auch bei 0

    blockly
    4
    1
    0 Votes
    4 Posts
    325 Views
    paul53P
    @nik82 sagte: Funktioniert Das Ergebnis ist aber ein String - keine Zahl.
  • Fenster - geöffnete Zeit

    3
    0 Votes
    3 Posts
    210 Views
    S
    @paul53 vielen Dank, damit bekomme ich es hoffentlich hin Stefan
  • blockly eleganter machen

    blockly
    72
    1
    0 Votes
    72 Posts
    7k Views
    David G.D
    @dos1973 Da kann ich dir leider auch nicht weiterhelfen. Hab ja nur die Dinge von weiter oben genommen und noch was HTML beigefügt. Das hatte ich vor 15 Jahren mal in der Schule :-D Wenn man das, was man von da noch im Kopf hat, mit einem Online-HTML-Tabellengenerator vereint bekommt man es gerade noch so hin^^.
  • webseite auslesen und in Datenpunkte darstellen json

    17
    2
    0 Votes
    17 Posts
    2k Views
    GarganoG
    @LukyLuke Hier mal das Script zum Anschauen und evtl. Ausprobieren. Liest jede Minute den Zustand des Tores ein und speichert den Zustand in '0_userdata.0.Tor.Connected' und '0_userdata.0.Tor.Hi' Vorher das npm Module axios in de JS Instanz eintragen [image: 1609850643534-2c383cee-48f7-403c-9b8b-69a909051265-grafik.png] const prefix = '0_userdata.0.'; //'javascript.0.'; // const idTorConnected = prefix+"Tor.Connected"; const idTorHi = prefix+"Tor.Hi"; const creatStateList = [ {name :idTorConnected, type:"boolean", role : "value"}, {name :idTorHi, type:"boolean", role : "value"} ] async function createState (item){ await createStateAsync(item.name, { type: item.type, min: 0, def: 0, role: item.role }); } async function makeStatList() { creatStateList.forEach (function(item) { createState(item); }); } makeStatList(); const axios = require('axios'); const url = 'https://svr39.supla.org/direct/**************/read?format=json'; // mySchedule im JS Editor mit dem Uhrsymbol oben rechts erstellen var mySchedule ='* * * * *'; // jede Minute schedule(mySchedule, getTor); function getTor() { axios.get(url) .then(function (response) { // handle success let tor = response.data; console.log ('JSON '+JSON.stringify(tor)); setState(idTorConnected, tor.connected); setState(idTorHi, tor.hi); }) .catch(function (error) { // handle error console.log(error); }) }
  • [gelöst] Remote Exec Abfragen mit Liste

    blockly
    4
    3
    0 Votes
    4 Posts
    176 Views
    K
    @UncleSam habe ein bisschen rumgetestet. der adapter scheint wirklich gut geeignet zu sein, um die Infos alle abzufragen. Vielen Dank
  • [gelöst] Berechne wieviele Tage seit 1.1.2021 vergangen

    5
    0 Votes
    5 Posts
    800 Views
    2
    @fastfoot Danke , klappt :-)
  • Gelöst: Shelly 2.5 als Kreuzschalter - Hilfe beim Script

    13
    0 Votes
    13 Posts
    5k Views
    J
    @paba42 Ist doch aber richtig, was ich vermute? Du willst doch nur abwechselnd die Relais geschaltet haben? Unter Tasmota ist das einfach "INTERLOCK0 1" in der Konsole und fertig. Die original FW kann eigentlich alles was Tasmota auch kann, somit muss das auch übe die original funktionieren, nur weiß ich hier eben nicht wo und was man da machen muss :)
  • Astro und Cron Trigger funktionieren nicht

    10
    0 Votes
    10 Posts
    818 Views
    bergjetB
    @AndreasW63 sagte in Astro und Cron Trigger funktionieren nicht: und werde berichten Und, funktioniert es denn nun?
  • Anfängerfrage, mehrere "Trigger-Blöcke" in einem Script?

    5
    2
    0 Votes
    5 Posts
    500 Views
    Z
    Vielen DANK euch allen. Werde die Blöcke verteilen, find ich übersichtlicher.
  • [Gelöst]Blockly-Skriptname auslesen

    blockly
    3
    1
    0 Votes
    3 Posts
    275 Views
    DAN78D
    @liv-in-sky hallo und danke. Es funktioniert. [image: 1609673978662-f5ea7c90-5f11-46d4-b52a-f9f617b379af-image.png]
  • [Gelöst]Probleme beim Zählen von Lampen

    blockly
    1
    2
    0 Votes
    1 Posts
    171 Views
    No one has replied
  • Fenster und andere Geräte zählen opt. Alexa Ansagen

    Locked blockly javascript
    1k
    45
    21 Votes
    1k Posts
    437k Views
    dslraserD
    Hier geht es dann weiter wenn es Fragen gibt. https://forum.iobroker.net/post/549501
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    14 Views
    No one has replied

543

Online

32.8k

Users

82.8k

Topics

1.3m

Posts