NEWS
.txt file in Widget darstellen..
-
im oberen bild sollte zeile 13 leer sein - lösch das mal
-
@liv-in-sky Das hatte ich schon probiert. Die Klammern schienen mir zu viel, aber dann kommt das:
14:34:05.835 error javascript.0 (31267) script.js.Testprogramm: SyntaxError: Unexpected token : in JSON at position 2 14:34:05.836 error javascript.0 (31267) at etwas_tun (script.js.Testprogramm:5:22) 14:34:05.836 error javascript.0 (31267) at script.js.Testprogramm:23:7 14:34:05.836 error javascript.0 (31267) at script.js.Testprogramm:28:3
-
exportiere mal dein script und poste es
-
@liv-in-sky ```
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="kf@C)I@H5?Mg//!NjI1(">zeit</variable> <variable id="5a|o%=^(G?nVL*}]$W4w">text</variable> <variable id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</variable> </variables> <block type="procedures_defcustomnoreturn" id="j?7,VR.oK}Vg/ze4avd+" x="113" y="88"> <mutation statements="false"> <arg name="zeit" varid="kf@C)I@H5?Mg//!NjI1("></arg> <arg name="text" varid="5a|o%=^(G?nVL*}]$W4w"></arg> </mutation> <field name="NAME">etwas tun</field> <field name="SCRIPT">bXlqc29uQXJyYXk9SlNPTi5wYXJzZShnZXRTdGF0ZSgiMF91c2VyZGF0YS4wLlZpc3VhbGlzaWVydW5nLlNwcmFjaGxvZyIpLnZhbCk7DQoNCm15anNvbkFycmF5LnB1c2goew0KDQogICAgInplaXQiOnplaXQsDQoNCiAgICAidGV4dCI6IHRleHQNCg0KIH0pDQoNCnNldFN0YXRlKCIwX3VzZXJkYXRhLjAuVmlzdWFsaXNpZXJ1bmcuU3ByYWNobG9nIixKU09OLnN0cmluZ2lmeShteWpzb25BcnJheSkpOw0KDQo=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="variables_set" id="@frIvR$BlW;b0uR.Qqj3" x="63" y="187"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> <value name="VALUE"> <block type="lists_create_with" id="KW[0_$Yjk~~%xadDJ,NX"> <mutation items="0"></mutation> </block> </value> <next> <block type="comment" id="|KE9Kg/1ggEZkRdYDlPQ"> <field name="COMMENT">muss immer wider aufgerufen werden</field> <next> <block type="procedures_callcustomnoreturn" id="EExq}vOtL!*0B6I!C:nr"> <mutation name="etwas tun"> <arg name="zeit"></arg> <arg name="text"></arg> </mutation> <value name="ARG0"> <block type="text" id="aT/dI(HPz:tJ[u^?6FOT"> <field name="TEXT">12:23</field> </block> </value> <value name="ARG1"> <block type="text" id="K{8vzWm|r=x9EXNHWR^G"> <field name="TEXT">erster eintrag</field> </block> </value> <next> <block type="procedures_callcustomnoreturn" id="7~6m_w/]|s1!e4Qbvyx!"> <mutation name="etwas tun"> <arg name="zeit"></arg> <arg name="text"></arg> </mutation> <value name="ARG0"> <block type="text" id="[}#NGTrRpP_J{yeUV?-}"> <field name="TEXT">13:44</field> </block> </value> <value name="ARG1"> <block type="text" id="T2feN=VyPoV0icC_fX#W"> <field name="TEXT">zweiter eintrag</field> </block> </value> <next> <block type="debug" id="X(]`D{lj[!;8*{aKI(B|"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="veRPR75t0gV+j4Kbp^gM"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="t5{_n[-q9DM$KIky*.3}"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
-
es gibt doch schon das
https://forum.iobroker.net/post/742539
ist da auch ein fehler drin
das im spoiler !!!
-
-
@liv-in-sky sagte in .txt file in Widget darstellen..:
<xml xmlns="https://developers.google.com/blockly/xml">
14:51:03.279 error javascript.0 (31267) script.js.Testprogramm: TypeError: myjsonArray.push is not a function 14:51:03.279 error javascript.0 (31267) at etwas_tun2 (script.js.Testprogramm:6:17) 14:51:03.279 error javascript.0 (31267) at script.js.Testprogramm:28:71 14:51:03.280 error javascript.0 (31267) at script.js.Testprogramm:31:3
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="kf@C)I@H5?Mg//!NjI1(">zeit</variable> <variable id="5a|o%=^(G?nVL*}]$W4w">text</variable> <variable id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</variable> </variables> <block type="procedures_defcustomreturn" id="=Qd]f(:V.tQ!:LVLVFEG" x="38" y="38"> <mutation statements="false"> <arg name="zeit" varid="kf@C)I@H5?Mg//!NjI1("></arg> <arg name="text" varid="5a|o%=^(G?nVL*}]$W4w"></arg> </mutation> <field name="NAME">etwas tun2</field> <field name="SCRIPT">DQpteWpzb25BcnJheS5wdXNoKHsNCiAgICAiemVpdCI6emVpdCwNCiAgICAidGV4dCI6IHRleHQNCiAgICANCn0pDQoNCg0KDQoNCg0KcmV0dXJuIEpTT04uc3RyaW5naWZ5KG15anNvbkFycmF5KTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="comment" id="yFL!h.,c,Zp-Dy^Kq,hm" x="-162" y="163"> <field name="COMMENT">beim ersten mal leerer dp</field> <next> <block type="controls_if" id="{/+O6HOy7Ojt}`9A$PX}"> <mutation else="1"></mutation> <value name="IF0"> <block type="text_isEmpty" id="oedr?+DzZQYcMQbkQH8J"> <value name="VALUE"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="get_value" id="tH/||B;9eB]:7_k)30Yk"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="@frIvR$BlW;b0uR.Qqj3"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> <value name="VALUE"> <block type="lists_create_with" id="KW[0_$Yjk~~%xadDJ,NX"> <mutation items="0"></mutation> </block> </value> <next> <block type="control" id="v~m,=)~HcShOSXySqCcJ"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id=";XGxvAYF.bITTA[2E;F5"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="3WG$-TF?jttZ!oCMl;[Y"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> <value name="VALUE"> <block type="convert_json2object" id="8Gyoo;9hjS1t{|tMiE@!"> <value name="VALUE"> <block type="get_value" id="Og=@#7NMHqJZWV!9P^-v"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> </block> </value> </block> </value> </block> </statement> <next> <block type="comment" id="|KE9Kg/1ggEZkRdYDlPQ"> <field name="COMMENT">muss immer wider aufgerufen werden</field> <next> <block type="control" id="S22g2,MIUbP;LUP+i3#5"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="(Nw[G^`{#xaFo%5[%Nj~"> <mutation name="etwas tun2"> <arg name="zeit"></arg> <arg name="text"></arg> </mutation> <value name="ARG0"> <block type="text" id="aT/dI(HPz:tJ[u^?6FOT"> <field name="TEXT">12:23</field> </block> </value> <value name="ARG1"> <block type="text" id="K{8vzWm|r=x9EXNHWR^G"> <field name="TEXT">erster eintrag</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </xml>
-
verstehe ich nicht - bei mir läufts
kann es sein, dass die functionsnamen nicht stimmen - durch das importieren
also etwas tun , etwas tun2,..
-
@liv-in-sky etwas tun 2 entstand nur, weil ich die alten Blöcke noch nicht gelöscht habe...das hat sich aber bei allen Blöcken gleichmässig angepasst. Probiere es gleich noch einmal auf einem "clean sheet"..
-
@joergh warte
-
-
@liv-in-sky
Danke. Die Fehlermeldungen bleiben gleich...15:01:36.571 error javascript.0 (31267) script.js.Testskript: TypeError: myjsonArray.push is not a function 15:01:36.571 error javascript.0 (31267) at jsonErstellen (script.js.Testskript:6:17) 15:01:36.571 error javascript.0 (31267) at script.js.Testskript:28:71 15:01:36.571 error javascript.0 (31267) at script.js.Testskript:31:3
Warum kennt er die Funktion myjsonArray.push nicht mehr?
Anfangs hat er die nicht bemängelt. Vielleicht sollte ich mal den iobroker neu starten? -
@joergh was steht den im dp - hast du die dp überall angeglichen ?
es sind 4 dp änderungen im blockly
-
@liv-in-sky Ja, klar. Das habe ich gesehen.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="1%kx)8[s_nj*5uEEo]CH">zeit</variable> <variable id="_c2[Wd8,N14Er)%1G]!}">text</variable> <variable id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</variable> </variables> <block type="procedures_defcustomreturn" id="=Qd]f(:V.tQ!:LVLVFEG" x="138" y="88"> <mutation statements="false"> <arg name="zeit" varid="1%kx)8[s_nj*5uEEo]CH"></arg> <arg name="text" varid="_c2[Wd8,N14Er)%1G]!}"></arg> </mutation> <field name="NAME">jsonErstellen</field> <field name="SCRIPT">DQpteWpzb25BcnJheS5wdXNoKHsNCiAgICAiemVpdCI6emVpdCwNCiAgICAidGV4dCI6IHRleHQNCiAgICANCn0pDQoNCg0KDQoNCg0KcmV0dXJuIEpTT04uc3RyaW5naWZ5KG15anNvbkFycmF5KTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="comment" id="yFL!h.,c,Zp-Dy^Kq,hm" x="-112" y="163"> <field name="COMMENT">beim ersten mal leerer dp</field> <next> <block type="controls_if" id="{/+O6HOy7Ojt}`9A$PX}"> <mutation else="1"></mutation> <value name="IF0"> <block type="text_isEmpty" id="oedr?+DzZQYcMQbkQH8J"> <value name="VALUE"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="get_value" id="tH/||B;9eB]:7_k)30Yk"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="@frIvR$BlW;b0uR.Qqj3"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> <value name="VALUE"> <block type="lists_create_with" id="KW[0_$Yjk~~%xadDJ,NX"> <mutation items="0"></mutation> </block> </value> <next> <block type="control" id="v~m,=)~HcShOSXySqCcJ"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id=";XGxvAYF.bITTA[2E;F5"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="3WG$-TF?jttZ!oCMl;[Y"> <field name="VAR" id="3x+uiY^LT~Vv|;Rnf~@U">myjsonArray</field> <value name="VALUE"> <block type="convert_json2object" id="8Gyoo;9hjS1t{|tMiE@!"> <value name="VALUE"> <block type="get_value" id="Og=@#7NMHqJZWV!9P^-v"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> </block> </value> </block> </value> </block> </statement> <next> <block type="comment" id="|KE9Kg/1ggEZkRdYDlPQ"> <field name="COMMENT">muss immer wider aufgerufen werden</field> <next> <block type="control" id="S22g2,MIUbP;LUP+i3#5"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Visualisierung.Sprachlog</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="procedures_callcustomreturn" id="(Nw[G^`{#xaFo%5[%Nj~"> <mutation name="jsonErstellen"> <arg name="zeit"></arg> <arg name="text"></arg> </mutation> <value name="ARG0"> <block type="text" id="aT/dI(HPz:tJ[u^?6FOT"> <field name="TEXT">12:23</field> </block> </value> <value name="ARG1"> <block type="text" id="K{8vzWm|r=x9EXNHWR^G"> <field name="TEXT">erster eintrag</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </xml>
Der DP hat sich nicht geändert seit 13:06 Uhr und da hatte ich noch mit meinem anderen Skript was reingeschrieben.
-
@liv-in-sky
Interessant sind die Variablen die er irgendwie erstellt hat: -
habe ich noch nie gesehen - da stimmt was beim import nicht - solltest du als neues sript machen und dieses dnn löschen
-
@liv-in-sky Roger.
-
habe das script von dir genommen und einen dp angelegt - funktioniert
-
@liv-in-sky Mir fällt gerade was ein: Der DP ist nicht leer, da da noch alter Kram drinsteht. Deswegen wird er ja nie als leere Liste erzeugt...könnte das das Problem sein?
-
@joergh ja wäre möglich - einfach reinklicken und alles löschen , was drin steht