- ioBroker Community Home
- Deutsch
- Skripten / Logik
- [~gelöst] LOG Meldung mit Blockly Objekt Bausteine
NEWS
[~gelöst] LOG Meldung mit Blockly Objekt Bausteine
-
Hallo zusammen!
Blockly - Objekt Bausteine - "State value to set for "meinObjekt" has to be stringified but received type "object""
Ich habe jetzt eine längere Zeit daran genagt, aber ich steige nicht ganz dahinter.
Wahrscheinlich zu 99,9% bin ich hier der DAU hinterm Bildschirm.
Mir ist die Meldung im LOG nicht klar.
Warum kommt sie zuerst nicht und dann bei dem unteren Abschnitt, wo ich genauso
die Variable = "objekt" mit einem object-typ Inhalt habe (so stelle ich mir das vor als Nicht-Coder)
in einen Datenpunt = "meinObjekt" schreibe/aktualisiere, der als Zustands-Typ "object" hat,
welcher dann ja eh o.a. object-typ laut Variable beim Schreiben erwartet (oder nicht?).Als Debug Log bekomme ich die Ausgaben korrekt.
Nur die Meldung bzgl. "has to be stringified..." erscheint für den Trigger-Abschnitt.
Danke für euren Hinweis, wo hier mein Fehler liegt.
_
_Nachfolgend "Test 2", wo ich den Trigger (unterer Abschnitt mit Fragezeichen" dann ergänzt habe, wo die Meldung im LOG erscheint.
(Im Trigger habe ich ein Bool-DP = einen Lichtschalter zum Triggern / zum testweise Auslösen gemacht, nur als Info)


_
_Nachfolgend "Test 1", wo ich erst nur den oberen Abschnitt aus "Test 2" versucht hatte, wo alles ohne Meldung durchläuft.


_
_Hier noch das Blockly zum "Test 2"
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="h!0vX=7}^Pj)b%}#sK/o">objekt</variable> </variables> <block type="variables_set" id="$tgA2U$ynxt5,:WqltQf" x="988" y="1413"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> <value name="VALUE"> <block type="object_new" id="MDAX4=(M!U=]yZHu%Y(^"> <mutation xmlns="http://www.w3.org/1999/xhtml"> <attribute id="ATTR_0" name="test1"></attribute> <attribute id="ATTR_1" name="test2"></attribute> </mutation> <value name="ATTR_0"> <shadow type="text" id="U=pcvJgcL38_PXgIl`}T"> <field name="TEXT">wert1</field> </shadow> </value> <value name="ATTR_1"> <shadow type="text" id="a/noyo$9DZ6Jl;%,WC,p"> <field name="TEXT">wert2</field> </shadow> </value> </block> </value> <next> <block type="debug" id="Ala#.0:152}SmU*lz5D?"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="v2#TLRvD9[x4ZEsO)P2R"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="update" id="Q_hlClQ9gke)GZS^bimE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="^m5xxZ{.-7?RGvCs*zMH"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="timeouts_wait" id="4T,9|_WX#rrvdHb+:US%" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="debug" id="3VKmNNkflD8)}mj+,0!1"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="2B8CEU7cBGW_ffqWmav?"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> </block> </value> <next> <block type="timeouts_wait" id="Bt:lGxRy3oM7#O=breTm" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="object_set_attr" id="ho!kc.yo`4)x7:$58QZI"> <field name="ATTR">test1</field> <value name="OBJECT"> <block type="variables_get" id="+{w27yBsPS1rQN0@A,rX"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="8qRMb%l!x{#YqVhZpQth"> <field name="TEXT">neuerwert1</field> </shadow> </value> <next> <block type="debug" id="pA^lev:/8{f|f1SG`|jX"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="mVBs.XdT~o?SM{9+lQcG"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="update" id="x=IB9U|#JV8Bwot6O67U"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="ksv@zaq1AAJ7PV92`Z$q"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="timeouts_wait" id="z6SqL+@BNWbvDYVO~Zv4" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="debug" id="9umwB^R+BVV:_h`OS$$F"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="MnpdiPx`7$D3vr.UGYc%"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> </block> </value> <next> <block type="on" id="x{ks[gW*)?1D}+1aF+mh"> <field name="OID">alias.0.Smarthome-Raphael.03-Obergeschoss.02-Zimmer-Raphael.Steckerleiste-04.SET-1</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="hdxFjN2@vZJIP2{0(loV"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="ArUSP!D0RBvE*R+M`;T+"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="object_set_attr" id=";(.RXV!)tcM1KGm^aT+3"> <field name="ATTR">test1</field> <value name="OBJECT"> <block type="variables_get" id="#3b=T[uubi1^e|SojSM?"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="=A:)7!XQa/S,22qAG-|$"> <field name="TEXT">getriggert1</field> </shadow> </value> <next> <block type="update" id="k5Yb2KpwT;g(d:DA+i_K"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="-`iJvdh_!nK}D9{$4^Nn"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="comment" id=")DLpG!BPmL#(1prOY7IW" disabled="true"> <field name="COMMENT">Fehler lt. LOG: State value to set for &#10;"meinObjekt" has to be stringified but &#10;received type "object"</field> <next> <block type="debug" id="P.(o?(j,G`~U^0*R|9^!"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="l~vq`bSDWoLeAzZjL?p;"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="e%L/Z9:$L53B9*xTXxA;"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="object_set_attr" id="kGgnl.X0iVz75xe:MJtd"> <field name="ATTR">test2</field> <value name="OBJECT"> <block type="variables_get" id="BOF_9~%v@`6g%)UO~vo4"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="|Fq+c^/,bzN4x3E5]]#u"> <field name="TEXT">getriggert2</field> </shadow> </value> <next> <block type="update" id="gmOSI+oFm8JQtJ:{*8C)"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6~V~?hi;:q8nNyYZu6|p"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="comment" id="v3~dHkTe+F6jE}JICc/." disabled="true"> <field name="COMMENT">Fehler lt. LOG: State value to set for &#10;"meinObjekt" has to be stringified but &#10;received type "object"</field> <next> <block type="debug" id="~e)j($p8W2HINw#QqSQ5"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="%$Qkrn=nI8T%ZF(+7_lf"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="1C[~{XL8FyTROGy%TI_["> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </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> </xml>Beste Grüße!
io-Broker Neuling 2024 :-)
Bislang jedoch einiges an Beiträgen und Grundlagen eingeflößt, um etwas besser emporzuirren.
-
Hallo zusammen!
Blockly - Objekt Bausteine - "State value to set for "meinObjekt" has to be stringified but received type "object""
Ich habe jetzt eine längere Zeit daran genagt, aber ich steige nicht ganz dahinter.
Wahrscheinlich zu 99,9% bin ich hier der DAU hinterm Bildschirm.
Mir ist die Meldung im LOG nicht klar.
Warum kommt sie zuerst nicht und dann bei dem unteren Abschnitt, wo ich genauso
die Variable = "objekt" mit einem object-typ Inhalt habe (so stelle ich mir das vor als Nicht-Coder)
in einen Datenpunt = "meinObjekt" schreibe/aktualisiere, der als Zustands-Typ "object" hat,
welcher dann ja eh o.a. object-typ laut Variable beim Schreiben erwartet (oder nicht?).Als Debug Log bekomme ich die Ausgaben korrekt.
Nur die Meldung bzgl. "has to be stringified..." erscheint für den Trigger-Abschnitt.
Danke für euren Hinweis, wo hier mein Fehler liegt.
_
_Nachfolgend "Test 2", wo ich den Trigger (unterer Abschnitt mit Fragezeichen" dann ergänzt habe, wo die Meldung im LOG erscheint.
(Im Trigger habe ich ein Bool-DP = einen Lichtschalter zum Triggern / zum testweise Auslösen gemacht, nur als Info)


_
_Nachfolgend "Test 1", wo ich erst nur den oberen Abschnitt aus "Test 2" versucht hatte, wo alles ohne Meldung durchläuft.


_
_Hier noch das Blockly zum "Test 2"
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="h!0vX=7}^Pj)b%}#sK/o">objekt</variable> </variables> <block type="variables_set" id="$tgA2U$ynxt5,:WqltQf" x="988" y="1413"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> <value name="VALUE"> <block type="object_new" id="MDAX4=(M!U=]yZHu%Y(^"> <mutation xmlns="http://www.w3.org/1999/xhtml"> <attribute id="ATTR_0" name="test1"></attribute> <attribute id="ATTR_1" name="test2"></attribute> </mutation> <value name="ATTR_0"> <shadow type="text" id="U=pcvJgcL38_PXgIl`}T"> <field name="TEXT">wert1</field> </shadow> </value> <value name="ATTR_1"> <shadow type="text" id="a/noyo$9DZ6Jl;%,WC,p"> <field name="TEXT">wert2</field> </shadow> </value> </block> </value> <next> <block type="debug" id="Ala#.0:152}SmU*lz5D?"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="v2#TLRvD9[x4ZEsO)P2R"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="update" id="Q_hlClQ9gke)GZS^bimE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="^m5xxZ{.-7?RGvCs*zMH"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="timeouts_wait" id="4T,9|_WX#rrvdHb+:US%" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="debug" id="3VKmNNkflD8)}mj+,0!1"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="2B8CEU7cBGW_ffqWmav?"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> </block> </value> <next> <block type="timeouts_wait" id="Bt:lGxRy3oM7#O=breTm" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="object_set_attr" id="ho!kc.yo`4)x7:$58QZI"> <field name="ATTR">test1</field> <value name="OBJECT"> <block type="variables_get" id="+{w27yBsPS1rQN0@A,rX"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="8qRMb%l!x{#YqVhZpQth"> <field name="TEXT">neuerwert1</field> </shadow> </value> <next> <block type="debug" id="pA^lev:/8{f|f1SG`|jX"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="mVBs.XdT~o?SM{9+lQcG"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="update" id="x=IB9U|#JV8Bwot6O67U"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="ksv@zaq1AAJ7PV92`Z$q"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="timeouts_wait" id="z6SqL+@BNWbvDYVO~Zv4" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="debug" id="9umwB^R+BVV:_h`OS$$F"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="MnpdiPx`7$D3vr.UGYc%"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> </block> </value> <next> <block type="on" id="x{ks[gW*)?1D}+1aF+mh"> <field name="OID">alias.0.Smarthome-Raphael.03-Obergeschoss.02-Zimmer-Raphael.Steckerleiste-04.SET-1</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="hdxFjN2@vZJIP2{0(loV"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="ArUSP!D0RBvE*R+M`;T+"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="object_set_attr" id=";(.RXV!)tcM1KGm^aT+3"> <field name="ATTR">test1</field> <value name="OBJECT"> <block type="variables_get" id="#3b=T[uubi1^e|SojSM?"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="=A:)7!XQa/S,22qAG-|$"> <field name="TEXT">getriggert1</field> </shadow> </value> <next> <block type="update" id="k5Yb2KpwT;g(d:DA+i_K"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="-`iJvdh_!nK}D9{$4^Nn"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="comment" id=")DLpG!BPmL#(1prOY7IW" disabled="true"> <field name="COMMENT">Fehler lt. LOG: State value to set for &#10;"meinObjekt" has to be stringified but &#10;received type "object"</field> <next> <block type="debug" id="P.(o?(j,G`~U^0*R|9^!"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="l~vq`bSDWoLeAzZjL?p;"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="e%L/Z9:$L53B9*xTXxA;"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="object_set_attr" id="kGgnl.X0iVz75xe:MJtd"> <field name="ATTR">test2</field> <value name="OBJECT"> <block type="variables_get" id="BOF_9~%v@`6g%)UO~vo4"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="|Fq+c^/,bzN4x3E5]]#u"> <field name="TEXT">getriggert2</field> </shadow> </value> <next> <block type="update" id="gmOSI+oFm8JQtJ:{*8C)"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6~V~?hi;:q8nNyYZu6|p"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="comment" id="v3~dHkTe+F6jE}JICc/." disabled="true"> <field name="COMMENT">Fehler lt. LOG: State value to set for &#10;"meinObjekt" has to be stringified but &#10;received type "object"</field> <next> <block type="debug" id="~e)j($p8W2HINw#QqSQ5"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="%$Qkrn=nI8T%ZF(+7_lf"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="1C[~{XL8FyTROGy%TI_["> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </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> </xml>- was für ein Datentyp ist der DP in den du das Objekt speichern willst ?
- was passiert wenn du das Objekt beim Scheiben erst in ein JSON umwandelst ?
A.
ioBroker auf RPi4 - Hardware soweit wie möglich via Zigbee.
"Shit don't work" ist keine Fehlermeldung, sondern ein Fluch. -
Hallo zusammen!
Blockly - Objekt Bausteine - "State value to set for "meinObjekt" has to be stringified but received type "object""
Ich habe jetzt eine längere Zeit daran genagt, aber ich steige nicht ganz dahinter.
Wahrscheinlich zu 99,9% bin ich hier der DAU hinterm Bildschirm.
Mir ist die Meldung im LOG nicht klar.
Warum kommt sie zuerst nicht und dann bei dem unteren Abschnitt, wo ich genauso
die Variable = "objekt" mit einem object-typ Inhalt habe (so stelle ich mir das vor als Nicht-Coder)
in einen Datenpunt = "meinObjekt" schreibe/aktualisiere, der als Zustands-Typ "object" hat,
welcher dann ja eh o.a. object-typ laut Variable beim Schreiben erwartet (oder nicht?).Als Debug Log bekomme ich die Ausgaben korrekt.
Nur die Meldung bzgl. "has to be stringified..." erscheint für den Trigger-Abschnitt.
Danke für euren Hinweis, wo hier mein Fehler liegt.
_
_Nachfolgend "Test 2", wo ich den Trigger (unterer Abschnitt mit Fragezeichen" dann ergänzt habe, wo die Meldung im LOG erscheint.
(Im Trigger habe ich ein Bool-DP = einen Lichtschalter zum Triggern / zum testweise Auslösen gemacht, nur als Info)


_
_Nachfolgend "Test 1", wo ich erst nur den oberen Abschnitt aus "Test 2" versucht hatte, wo alles ohne Meldung durchläuft.


_
_Hier noch das Blockly zum "Test 2"
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="h!0vX=7}^Pj)b%}#sK/o">objekt</variable> </variables> <block type="variables_set" id="$tgA2U$ynxt5,:WqltQf" x="988" y="1413"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> <value name="VALUE"> <block type="object_new" id="MDAX4=(M!U=]yZHu%Y(^"> <mutation xmlns="http://www.w3.org/1999/xhtml"> <attribute id="ATTR_0" name="test1"></attribute> <attribute id="ATTR_1" name="test2"></attribute> </mutation> <value name="ATTR_0"> <shadow type="text" id="U=pcvJgcL38_PXgIl`}T"> <field name="TEXT">wert1</field> </shadow> </value> <value name="ATTR_1"> <shadow type="text" id="a/noyo$9DZ6Jl;%,WC,p"> <field name="TEXT">wert2</field> </shadow> </value> </block> </value> <next> <block type="debug" id="Ala#.0:152}SmU*lz5D?"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="v2#TLRvD9[x4ZEsO)P2R"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="update" id="Q_hlClQ9gke)GZS^bimE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="^m5xxZ{.-7?RGvCs*zMH"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="timeouts_wait" id="4T,9|_WX#rrvdHb+:US%" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="debug" id="3VKmNNkflD8)}mj+,0!1"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="2B8CEU7cBGW_ffqWmav?"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> </block> </value> <next> <block type="timeouts_wait" id="Bt:lGxRy3oM7#O=breTm" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="object_set_attr" id="ho!kc.yo`4)x7:$58QZI"> <field name="ATTR">test1</field> <value name="OBJECT"> <block type="variables_get" id="+{w27yBsPS1rQN0@A,rX"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="8qRMb%l!x{#YqVhZpQth"> <field name="TEXT">neuerwert1</field> </shadow> </value> <next> <block type="debug" id="pA^lev:/8{f|f1SG`|jX"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="mVBs.XdT~o?SM{9+lQcG"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="update" id="x=IB9U|#JV8Bwot6O67U"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="ksv@zaq1AAJ7PV92`Z$q"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="timeouts_wait" id="z6SqL+@BNWbvDYVO~Zv4" disabled="true"> <field name="DELAY">5</field> <field name="UNIT">sec</field> <next> <block type="debug" id="9umwB^R+BVV:_h`OS$$F"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="~;.YbS]JpV^=kMN-6$Q:"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="MnpdiPx`7$D3vr.UGYc%"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> </block> </value> <next> <block type="on" id="x{ks[gW*)?1D}+1aF+mh"> <field name="OID">alias.0.Smarthome-Raphael.03-Obergeschoss.02-Zimmer-Raphael.Steckerleiste-04.SET-1</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="hdxFjN2@vZJIP2{0(loV"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="ArUSP!D0RBvE*R+M`;T+"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="object_set_attr" id=";(.RXV!)tcM1KGm^aT+3"> <field name="ATTR">test1</field> <value name="OBJECT"> <block type="variables_get" id="#3b=T[uubi1^e|SojSM?"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="=A:)7!XQa/S,22qAG-|$"> <field name="TEXT">getriggert1</field> </shadow> </value> <next> <block type="update" id="k5Yb2KpwT;g(d:DA+i_K"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="-`iJvdh_!nK}D9{$4^Nn"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="comment" id=")DLpG!BPmL#(1prOY7IW" disabled="true"> <field name="COMMENT">Fehler lt. LOG: State value to set for &#10;"meinObjekt" has to be stringified but &#10;received type "object"</field> <next> <block type="debug" id="P.(o?(j,G`~U^0*R|9^!"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="l~vq`bSDWoLeAzZjL?p;"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="e%L/Z9:$L53B9*xTXxA;"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="object_set_attr" id="kGgnl.X0iVz75xe:MJtd"> <field name="ATTR">test2</field> <value name="OBJECT"> <block type="variables_get" id="BOF_9~%v@`6g%)UO~vo4"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <value name="VALUE"> <shadow type="text" id="|Fq+c^/,bzN4x3E5]]#u"> <field name="TEXT">getriggert2</field> </shadow> </value> <next> <block type="update" id="gmOSI+oFm8JQtJ:{*8C)"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.TEST.z-json.meinObjekt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6~V~?hi;:q8nNyYZu6|p"> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> <next> <block type="comment" id="v3~dHkTe+F6jE}JICc/." disabled="true"> <field name="COMMENT">Fehler lt. LOG: State value to set for &#10;"meinObjekt" has to be stringified but &#10;received type "object"</field> <next> <block type="debug" id="~e)j($p8W2HINw#QqSQ5"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="%$Qkrn=nI8T%ZF(+7_lf"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="1C[~{XL8FyTROGy%TI_["> <field name="VAR" id="h!0vX=7}^Pj)b%}#sK/o">objekt</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </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> </xml>@cyberraph sagte in LOG Meldung mit Blockly Objekt Bausteine:
in einen Datenpunt = "meinObjekt" schreibe/aktualisiere, der als Zustands-Typ "object" hat,
Wenn der Typ wirklich
objectist, kümmert sich der JavaScript-Adpater darum, dass aus dem Objekt JSON wird (und andersrum). Andernfalls musst Du Dich selbst um die Konvertierung von/nach JSON kümmern.🧑🎓 Autor des beliebten ioBroker-Master-Kurses
🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
📚 Meine inoffizielle ioBroker Dokumentation -
@haus-automatisierung
Ja, der Zustandstyp istobject, darum bin ich im Unklaren, warum die stringifie LOG Meldung kommt.Ich dachte ich hätte es korrekt verstanden laut deinen Kurs-Videos.
Jetzt gerade habe ich es nochmal versucht mit dem Blockly, das ich bereits angehängt habe im ersten Post.
Und jetzt ist es witzigerweise so, dass es beim Start des Skripts oder auch beim Refreshen (das ja auch nur ein Stop/Start ist)
die stringifie Meldung im oberen Teil des Blockly entsteht.
Und im unteren Teil nicht, im Trigger Bereich. (wo ich im Start Post gestern meinte, nur dort kommt die Stringifie Meldung).=> Die Stringifie Meldung kommt aber nicht, wenn ich einen PAUSE Block dazwischenlege ? !
Ich hab Bildschirmaufnahmen gemacht zum besseren Verständnis, was ich meine.
Hier der OneDrive Link (da ewas größere Files): Link zu Bildschirmaufnahmen
Hängt es eventuell auch dran, ob eine stringifie Meldung kommt, was vor dem Start des Skripts im Datenpunkt steht?
Beste Grüße!
io-Broker Neuling 2024 :-)
Bislang jedoch einiges an Beiträgen und Grundlagen eingeflößt, um etwas besser emporzuirren.
-
@asgothian
Siehe mein Post oben, wo ich einen OneDrive Link mit Videos zum Sachverhalt anghängt hatte.Habe mich heute nochmal gespielt. OneDrive Link mit 2 Videos inkl. 1 x Test object nach JSON
Habe auch beim
aktualisierendes DPs malObjekt nach JSON (variable)dazwischenghängt.Kommt im LOG verständlicherweise die gelbe Warnung, dass ich einen
stringdamit hinzufügen möcht,
das aber nicht zulässig ist, da der DP einenobjectWert verlangt.Ich glaube ich muss die
stringifieMeldung (ist ja kein Warning oder Fehler Loglevel)
im Log ignorieren. Zumindest das Blocklyskript, das ich für meine Anwendung gemacht hatte,
funktioniert einwandfrei. Bis auf die MeldungstringifieMeldung im Log.Beste Grüße!
io-Broker Neuling 2024 :-)
Bislang jedoch einiges an Beiträgen und Grundlagen eingeflößt, um etwas besser emporzuirren.