NEWS
[erledigt] Zahl an Serielle senden, wenn es angef. wird.
-
Hallo!
Ich möchte folgendes realisierten:
Wenn über die Serielle der Text "Überschuss?" rein kommt, möchte ich über die Serielle die Zahl 0-9 zurück senden, je nach aktuellem Überschuss. Dass ich aus dem Überschuss die Zahl 0-9 erzeuge funktioniert schon. Aber wie ich diese Zahl dann an die Serielle zurück gebe, habe ich keinen Plan. Ich habe an diese Stelle mal ein Change Node eingefügt, weiß aber nicht so recht, was ich damit anfangen kann. Kann mir bitte jemand auf die Sprünge helfen?[ { "id": "c6d2ee27.55704", "type": "tab", "label": "Flow 1", "disabled": false, "info": "" }, { "id": "22130d0e.04a612", "type": "ioBroker in", "z": "c6d2ee27.55704", "name": "node-red.3.AMIS.Wirkleistung_5min-avg", "topic": "node-red.3.AMIS.Wirkleistung_5min-avg", "payloadType": "value", "onlyack": true, "func": "all", "gap": "", "fireOnStart": "false", "x": 310, "y": 140, "wires": [ [ "5c8464ac.b4dc6c", "c65fbb60.39a348", "9ced4bd2.a3b8c8" ] ] }, { "id": "5c8464ac.b4dc6c", "type": "switch", "z": "c6d2ee27.55704", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "gte", "v": "1500", "vt": "num" }, { "t": "lt", "v": "100", "vt": "str" } ], "checkall": "false", "repair": false, "outputs": 2, "x": 600, "y": 140, "wires": [ [ "f96543d5.3bb3b" ], [ "4f3f1c45.3e3e34" ] ] }, { "id": "f96543d5.3bb3b", "type": "change", "z": "c6d2ee27.55704", "name": "mehr", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "mehr", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 810, "y": 100, "wires": [ [ "6fedd985.adf5d8", "2f9347d6.de35a8" ] ] }, { "id": "4f3f1c45.3e3e34", "type": "change", "z": "c6d2ee27.55704", "name": "weniger", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "weniger", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 820, "y": 140, "wires": [ [ "6fedd985.adf5d8", "2f9347d6.de35a8" ] ] }, { "id": "6fedd985.adf5d8", "type": "serial out", "z": "c6d2ee27.55704", "name": "Arduino_Out", "serial": "716fe4cb.9186dc", "x": 1080, "y": 120, "wires": [] }, { "id": "9107e091.2a6e2", "type": "serial in", "z": "c6d2ee27.55704", "name": "Arduino_In", "serial": "716fe4cb.9186dc", "x": 210, "y": 260, "wires": [ [ "e52bdb45.87f0b8" ] ] }, { "id": "e52bdb45.87f0b8", "type": "switch", "z": "c6d2ee27.55704", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "cont", "v": "Überschuss?", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 390, "y": 260, "wires": [ [ "bbb81ca3.5894e" ] ] }, { "id": "bbb81ca3.5894e", "type": "change", "z": "c6d2ee27.55704", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "Skalierung_0_9", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 260, "wires": [ [ "6fedd985.adf5d8", "8ce790ea.6727c" ] ] }, { "id": "53b296b4.80cd88", "type": "comment", "z": "c6d2ee27.55704", "name": "Regelung im Betrieb", "info": "", "x": 650, "y": 60, "wires": [] }, { "id": "28cdb90.f395f48", "type": "comment", "z": "c6d2ee27.55704", "name": "Start", "info": "", "x": 450, "y": 220, "wires": [] }, { "id": "2f9347d6.de35a8", "type": "debug", "z": "c6d2ee27.55704", "name": "mehr_weniger", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1100, "y": 60, "wires": [] }, { "id": "c65fbb60.39a348", "type": "range", "z": "c6d2ee27.55704", "minin": "0", "maxin": "9000", "minout": "0", "maxout": "9", "action": "scale", "round": true, "property": "payload", "name": "Skalierung_0_9", "x": 580, "y": 180, "wires": [ [ "5f2ee4d7.069abc" ] ] }, { "id": "5f2ee4d7.069abc", "type": "debug", "z": "c6d2ee27.55704", "name": "0_9kW", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 740, "y": 180, "wires": [] }, { "id": "9ced4bd2.a3b8c8", "type": "debug", "z": "c6d2ee27.55704", "name": "5min_avg", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 560, "y": 100, "wires": [] }, { "id": "c16f5107.58bef", "type": "inject", "z": "c6d2ee27.55704", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "2100", "payloadType": "num", "x": 80, "y": 80, "wires": [ [ "9ced4bd2.a3b8c8", "5c8464ac.b4dc6c", "c65fbb60.39a348" ] ] }, { "id": "8ce790ea.6727c", "type": "debug", "z": "c6d2ee27.55704", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 900, "y": 240, "wires": [] }, { "id": "716fe4cb.9186dc", "type": "serial-port", "serialport": "/dev/ttyUSB0", "serialbaud": "9600", "databits": "8", "parity": "none", "stopbits": "1", "waitfor": "", "dtr": "none", "rts": "none", "cts": "none", "dsr": "none", "newline": "1", "bin": "false", "out": "time", "addchar": "", "responsetimeout": "10000" } ] -
Hallo!
Ich möchte folgendes realisierten:
Wenn über die Serielle der Text "Überschuss?" rein kommt, möchte ich über die Serielle die Zahl 0-9 zurück senden, je nach aktuellem Überschuss. Dass ich aus dem Überschuss die Zahl 0-9 erzeuge funktioniert schon. Aber wie ich diese Zahl dann an die Serielle zurück gebe, habe ich keinen Plan. Ich habe an diese Stelle mal ein Change Node eingefügt, weiß aber nicht so recht, was ich damit anfangen kann. Kann mir bitte jemand auf die Sprünge helfen?[ { "id": "c6d2ee27.55704", "type": "tab", "label": "Flow 1", "disabled": false, "info": "" }, { "id": "22130d0e.04a612", "type": "ioBroker in", "z": "c6d2ee27.55704", "name": "node-red.3.AMIS.Wirkleistung_5min-avg", "topic": "node-red.3.AMIS.Wirkleistung_5min-avg", "payloadType": "value", "onlyack": true, "func": "all", "gap": "", "fireOnStart": "false", "x": 310, "y": 140, "wires": [ [ "5c8464ac.b4dc6c", "c65fbb60.39a348", "9ced4bd2.a3b8c8" ] ] }, { "id": "5c8464ac.b4dc6c", "type": "switch", "z": "c6d2ee27.55704", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "gte", "v": "1500", "vt": "num" }, { "t": "lt", "v": "100", "vt": "str" } ], "checkall": "false", "repair": false, "outputs": 2, "x": 600, "y": 140, "wires": [ [ "f96543d5.3bb3b" ], [ "4f3f1c45.3e3e34" ] ] }, { "id": "f96543d5.3bb3b", "type": "change", "z": "c6d2ee27.55704", "name": "mehr", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "mehr", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 810, "y": 100, "wires": [ [ "6fedd985.adf5d8", "2f9347d6.de35a8" ] ] }, { "id": "4f3f1c45.3e3e34", "type": "change", "z": "c6d2ee27.55704", "name": "weniger", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "weniger", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 820, "y": 140, "wires": [ [ "6fedd985.adf5d8", "2f9347d6.de35a8" ] ] }, { "id": "6fedd985.adf5d8", "type": "serial out", "z": "c6d2ee27.55704", "name": "Arduino_Out", "serial": "716fe4cb.9186dc", "x": 1080, "y": 120, "wires": [] }, { "id": "9107e091.2a6e2", "type": "serial in", "z": "c6d2ee27.55704", "name": "Arduino_In", "serial": "716fe4cb.9186dc", "x": 210, "y": 260, "wires": [ [ "e52bdb45.87f0b8" ] ] }, { "id": "e52bdb45.87f0b8", "type": "switch", "z": "c6d2ee27.55704", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "cont", "v": "Überschuss?", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 390, "y": 260, "wires": [ [ "bbb81ca3.5894e" ] ] }, { "id": "bbb81ca3.5894e", "type": "change", "z": "c6d2ee27.55704", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "Skalierung_0_9", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 260, "wires": [ [ "6fedd985.adf5d8", "8ce790ea.6727c" ] ] }, { "id": "53b296b4.80cd88", "type": "comment", "z": "c6d2ee27.55704", "name": "Regelung im Betrieb", "info": "", "x": 650, "y": 60, "wires": [] }, { "id": "28cdb90.f395f48", "type": "comment", "z": "c6d2ee27.55704", "name": "Start", "info": "", "x": 450, "y": 220, "wires": [] }, { "id": "2f9347d6.de35a8", "type": "debug", "z": "c6d2ee27.55704", "name": "mehr_weniger", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1100, "y": 60, "wires": [] }, { "id": "c65fbb60.39a348", "type": "range", "z": "c6d2ee27.55704", "minin": "0", "maxin": "9000", "minout": "0", "maxout": "9", "action": "scale", "round": true, "property": "payload", "name": "Skalierung_0_9", "x": 580, "y": 180, "wires": [ [ "5f2ee4d7.069abc" ] ] }, { "id": "5f2ee4d7.069abc", "type": "debug", "z": "c6d2ee27.55704", "name": "0_9kW", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 740, "y": 180, "wires": [] }, { "id": "9ced4bd2.a3b8c8", "type": "debug", "z": "c6d2ee27.55704", "name": "5min_avg", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 560, "y": 100, "wires": [] }, { "id": "c16f5107.58bef", "type": "inject", "z": "c6d2ee27.55704", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "2100", "payloadType": "num", "x": 80, "y": 80, "wires": [ [ "9ced4bd2.a3b8c8", "5c8464ac.b4dc6c", "c65fbb60.39a348" ] ] }, { "id": "8ce790ea.6727c", "type": "debug", "z": "c6d2ee27.55704", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 900, "y": 240, "wires": [] }, { "id": "716fe4cb.9186dc", "type": "serial-port", "serialport": "/dev/ttyUSB0", "serialbaud": "9600", "databits": "8", "parity": "none", "stopbits": "1", "waitfor": "", "dtr": "none", "rts": "none", "cts": "none", "dsr": "none", "newline": "1", "bin": "false", "out": "time", "addchar": "", "responsetimeout": "10000" } ]
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