NEWS
CAN-Interface - Warning beim Senden
-
Moin,
ich nutze NodeRed um CAN-Telegramme aus ioBroker zu versenden. Funktionieren tut alles bis jetzt gut. Jedoche wird bei jedem Senden eines Telegrammes eine Warning Meldung ausgegeben. Inhalt dieses Warning ist eigentlich nur das Telegramm.
Habe ich einen Fehler in der Programmierung, oder ist dies als reine Diagnose gedacht. Falls als Diagnose, lässt sich dies Deaktivieren? Der log File ist aktuell überfüllt von diesen Warnings.
Vielen Dank für die Unterstützung,
André
-
Moin zusammen,
entschuldigt bitte meine Unfähigkeit, aber jetzt ;)
hier der log-Eintrag von zwei nodered Warnungen.
node-red.0 2018-12-25 11:48:17.115 warn 25 Dec 11:48:17 - [warn] [cansend:6a6b8abb.ea745c] canid:281,data:J�,dlc:2
node-red.0 2018-12-25 11:48:16.511 warn 25 Dec 11:48:16 - [warn] [cansend:6a6b8abb.ea745c] canid:280,data:,dlc:1
und hier der Code. (Nicht wundern, habe für jedes PDO eine eigene Konvertierung durchgeführt)
[ { "id": "f8bc69fb.a914f8", "type": "tab", "label": "Flow 4", "disabled": false, "info": "" }, { "id": "f209bdbd.27d0c8", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x159", "topic": "javascript.0.CAN_OUT.NodeRed.0x159", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 180, "y": 320, "wires": [ [ "8ab0f1c1.482438" ] ] }, { "id": "8ab0f1c1.482438", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x159", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\nvar msg1;\nmsg1={ payload : [\"0x\"+Integer1.toString(16),\"0x\"+Integer2.toString(16)],\n canid:0x159};\nreturn msg1; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": "1", "noerr": 0, "x": 400, "y": 320, "wires": [ [ "6a6b8abb.ea745c" ] ] }, { "id": "3dc24162.e468de", "type": "debug", "z": "f8bc69fb.a914f8", "name": "", "active": false, "tosidebar": false, "console": false, "tostatus": false, "complete": "true", "x": 622, "y": 260, "wires": [] }, { "id": "6fc8d954.a9e88", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x000", "topic": "javascript.0.CAN_OUT.NodeRed.0x000", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 182, "y": 200, "wires": [ [ "43783877.d65f28" ] ] }, { "id": "43783877.d65f28", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x000", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\n\nvar msg1;\nmsg1={ payload : [\"0x\"+Integer1.toString(16),\"0x\"+Integer2.toString(16)],\n canid:0x001};\nreturn [msg1]; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": 1, "noerr": 0, "x": 402, "y": 200, "wires": [ [ "6a6b8abb.ea745c" ] ] }, { "id": "a37c78c2.64cbd8", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x119", "topic": "javascript.0.CAN_OUT.NodeRed.0x119", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 180, "y": 360, "wires": [ [ "60733b27.4cea3c" ] ] }, { "id": "60733b27.4cea3c", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x119", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\nvar msg1;\nmsg1={ payload : [\"0x\"+Integer1.toString(16),\"0x\"+Integer2.toString(16)],\n canid:0x119};\nreturn msg1; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": "1", "noerr": 0, "x": 400, "y": 360, "wires": [ [ "6a6b8abb.ea745c" ] ] }, { "id": "e78b0578.f1b68", "type": "debug", "z": "f8bc69fb.a914f8", "name": "CAN->ioBroker", "active": false, "tosidebar": false, "console": false, "tostatus": false, "complete": "true", "x": 640, "y": 40, "wires": [] }, { "id": "47d993de.88f114", "type": "candump", "z": "f8bc69fb.a914f8", "name": "candump", "vconfig": "c92f7cae.3042d8", "x": 140, "y": 100, "wires": [ [ "edaa72e8.7c2c98", "bd87995.cb5b068" ] ] }, { "id": "26b1e38b.cc2b94", "type": "ioBroker out", "z": "f8bc69fb.a914f8", "name": "CAN_IN", "topic": "CAN_IN", "ack": "true", "autoCreate": "true", "x": 620, "y": 100, "wires": [] }, { "id": "edaa72e8.7c2c98", "type": "function", "z": "f8bc69fb.a914f8", "name": "toArray", "func": "let myarray = [];\nmyarray.push(\"0x\"+msg.canid.toString(16));\n//myarray.push(msg.canid);\n//myarray.push(\"0x\"+msg.canid.toString(16));\nmyarray.push(Math.round( ((msg.data[0]%256) / 128)-0.499 ));\nmyarray.push(Math.round( ((msg.data[0]%128) / 64)-0.499 ));\nmyarray.push(Math.round( ((msg.data[0]% 64) / 32)-0.499 ));\nmyarray.push(Math.round( ((msg.data[0]% 32) / 16)-0.499 ));\nmyarray.push(Math.round( ((msg.data[0]% 16) / 8)-0.499 ));\nmyarray.push(Math.round( ((msg.data[0]% 8) / 4)-0.499 ));\nmyarray.push(Math.round( ((msg.data[0]% 4) / 2)-0.499 ));\nmyarray.push(Math.round( ((msg.data[0]% 2) / 1)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]%256) / 128)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]%128) / 64)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]% 64) / 32)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]% 32) / 16)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]% 16) / 8)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]% 8) / 4)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]% 4) / 2)-0.499 ));\nmyarray.push(Math.round( ((msg.data[1]% 2) / 1)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]%256) / 128)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]%128) / 64)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]% 64) / 32)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]% 32) / 16)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]% 16) / 8)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]% 8) / 4)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]% 4) / 2)-0.499 ));\nmyarray.push(Math.round( ((msg.data[2]% 2) / 1)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]%256) / 128)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]%128) / 64)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]% 64) / 32)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]% 32) / 16)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]% 16) / 8)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]% 8) / 4)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]% 4) / 2)-0.499 ));\nmyarray.push(Math.round( ((msg.data[3]% 2) / 1)-0.499 ));\n\n\nreturn [{payload: myarray}];\n", "outputs": 1, "noerr": 0, "x": 380, "y": 100, "wires": [ [ "26b1e38b.cc2b94", "e78b0578.f1b68" ] ] }, { "id": "bd87995.cb5b068", "type": "debug", "z": "f8bc69fb.a914f8", "name": "CAN_IN", "active": false, "tosidebar": false, "console": false, "tostatus": false, "complete": "true", "x": 320, "y": 20, "wires": [] }, { "id": "e497f7db.3b9d78", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x118", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\nvar msg1;\nmsg1={ payload : [\"\"],\n canid:0x118};\nreturn msg1; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": "1", "noerr": 0, "x": 400, "y": 400, "wires": [ [ "3dc24162.e468de", "6a6b8abb.ea745c" ] ] }, { "id": "33c05131.65f8ce", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x118", "topic": "javascript.0.CAN_OUT.NodeRed.0x118", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 180, "y": 400, "wires": [ [ "e497f7db.3b9d78", "3dc24162.e468de" ] ] }, { "id": "49290423.6095b4", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x129", "topic": "javascript.0.CAN_OUT.NodeRed.0x129", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 180, "y": 440, "wires": [ [ "37780185.926a7e" ] ] }, { "id": "37780185.926a7e", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x129", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\nvar msg1;\nmsg1={ payload : [\"0x\"+Integer1.toString(16),\"0x\"+Integer2.toString(16)],\n canid:0x129};\nreturn msg1; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": "1", "noerr": 0, "x": 400, "y": 440, "wires": [ [ "6a6b8abb.ea745c" ] ] }, { "id": "e0749421.2fee5", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x128", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\nvar msg1;\nmsg1={ payload : [\"\"],\n canid:0x128};\nreturn msg1; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": "1", "noerr": 0, "x": 400, "y": 480, "wires": [ [ "6a6b8abb.ea745c" ] ] }, { "id": "e37bdf0e.3dc92", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x128", "topic": "javascript.0.CAN_OUT.NodeRed.0x128", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 180, "y": 480, "wires": [ [ "e0749421.2fee5" ] ] }, { "id": "c0994196.2d6088", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x139", "topic": "javascript.0.CAN_OUT.NodeRed.0x139", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 180, "y": 520, "wires": [ [ "9d79b047.f797b8" ] ] }, { "id": "9d79b047.f797b8", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x139", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\nvar msg1;\nmsg1={ payload : [\"0x\"+Integer1.toString(16),\"0x\"+Integer2.toString(16)],\n canid:0x139};\nreturn msg1; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": "1", "noerr": 0, "x": 400, "y": 520, "wires": [ [ "6a6b8abb.ea745c" ] ] }, { "id": "113fb0f1.11fc0f", "type": "function", "z": "f8bc69fb.a914f8", "name": "ID0x138", "func": "var Integer1=msg.payload.val%256;\nvar Integer2=(msg.payload.val-Integer1)/256;\n\n\nvar msg1;\nmsg1={ payload : [\"\"],\n canid:0x138};\nreturn msg1; \n\n/*\nString Hex=Integer.toHexString(Val);\n*/", "outputs": "1", "noerr": 0, "x": 400, "y": 560, "wires": [ [ "6a6b8abb.ea745c" ] ] }, { "id": "9891d73c.120ac8", "type": "ioBroker in", "z": "f8bc69fb.a914f8", "name": "CAN-OUT_0x138", "topic": "javascript.0.CAN_OUT.NodeRed.0x138", "payloadType": "object", "onlyack": "", "func": "all", "gap": "", "x": 180, "y": 560, "wires": [ [ "113fb0f1.11fc0f" ] ] }, { "id": "6a6b8abb.ea745c", "type": "cansend", "z": "f8bc69fb.a914f8", "config": "c92f7cae.3042d8", "canid": "", "payload": "", "x": 620, "y": 320, "wires": [] }, { "id": "c92f7cae.3042d8", "type": "canconfig", "z": "", "channel": "can0", "bitrate": "100000" } ]André
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden