Seite 8 von 10

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Di Dez 13, 2022 11:06 pm
von parateam
Ohne deinen Flow genauer anzusehen:

Hast du die Werte mit .toFixed() gerundet?

Hatte das gleiche Problem gehabt. Die Funktion macht einen String, und daher kommt wohl der Fehler.

Habe derzeit keine Rundung und in der Meter Ansicht sprengt gerade die lange Zahl das sichtbare Fenster, aber im Dashboard ist alles ok

Die Auswertung deiner PortalID schau ich mir aber noch an!

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Mi Dez 14, 2022 9:07 am
von Becker
parseFloat zum runden nutzen oder wenn ganzzahlig dann Math.round

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Mi Dez 14, 2022 4:41 pm
von wawibu
aktuell habe ich bei allen Werte mit .toFixed(1) gearbeitet. Die Werte kommen am Raspi auch an und er zeigt mir diese ja auch in dem Device an. Er zeigt sich nur - aus welchem Grund auch immer - nicht auf der Page und auch nicht im VRM Portal an.

Nutze ich den gleichen Zähler mit der TWE script kommen die gleichen Werte am Raspi an, allerdings wird der Zähler dann in der Übersicht und auch im VRM Portal gezeigt.

Daher vermute ich, dass ich irgendwas vergesse um VenusOS zu sagen, dass das der GRID Zähler ist.

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Do Dez 15, 2022 8:33 am
von parateam
Es liegt bestimmt an der toFixed Funktion die eine String draus macht.

Ich bin auf

Math.round(msg.payload * 100) / 100

gewechselt. In diesem Beispiel gibts dann 2 Nachkommastellen.

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Do Dez 15, 2022 12:45 pm
von wawibu
parateam hat geschrieben: Do Dez 15, 2022 8:33 am Es liegt bestimmt an der toFixed Funktion die eine String draus macht.

Ich bin auf

Math.round(msg.payload * 100) / 100

gewechselt. In diesem Beispiel gibts dann 2 Nachkommastellen.
das wars :)
Habe nun auch auf Math.round gewechselt und nun wird es in der Übersicht und auch im Portal angezeigt
SDM630_EVU_Venus_Overview2.PNG
DANKE @parateam

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Do Dez 15, 2022 4:39 pm
von aiole
Kannst Du den abschließenden flows bitte noch einstellen? Danke

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Fr Dez 16, 2022 8:17 pm
von Jacke
Hi zusammen,

ich habe mal eine Frage. mit dem freakent mqtt treiber habe ich mittlerweile eine Temperatur und meinen PV Inverter an den ACout hinzugefügt.
ich versuche allerdings seit geraumer Zeit einen EM24 Mittels Modbus zu emulieren ich finde den EM24 und kann ihn hinzufügen. Allerdings schaffe ich es einfach nicht einen anderen Wert als die Spg. einzufügen.

Code: Alles auswählen

[
    {
        "id": "3a20b3d0040bdb1b",
        "type": "tab",
        "label": "EVU EM24 Emulation",
        "disabled": true,
        "info": "",
        "env": []
    },
    {
        "id": "d2a9e3e19f0dd474",
        "type": "modbus-server",
        "z": "3a20b3d0040bdb1b",
        "name": "EVU EM24.2",
        "logEnabled": true,
        "hostname": "0.0.0.0",
        "serverPort": "502",
        "responseDelay": 100,
        "delayUnit": "ms",
        "coilsBufferSize": "50000",
        "holdingBufferSize": "50000",
        "inputBufferSize": "50000",
        "discreteBufferSize": "50000",
        "showErrors": true,
        "x": 130,
        "y": 160,
        "wires": [
            [],
            [],
            [],
            [],
            []
        ]
    },
    {
        "id": "7dfa2632252c4c26",
        "type": "inject",
        "z": "3a20b3d0040bdb1b",
        "name": "ini 1s",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": "1",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 390,
        "y": 180,
        "wires": [
            [
                "3af35c581ed82771"
            ]
        ]
    },
    {
        "id": "604922c7e555347a",
        "type": "comment",
        "z": "3a20b3d0040bdb1b",
        "name": "EVU EM24 initialisieren",
        "info": "",
        "x": 400,
        "y": 40,
        "wires": []
    },
    {
        "id": "a678c07349a72706",
        "type": "comment",
        "z": "3a20b3d0040bdb1b",
        "name": "Server Modbus EVU EM24",
        "info": "",
        "x": 130,
        "y": 40,
        "wires": []
    },
    {
        "id": "67202cf7960c1ede",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "Identification code",
        "showStatusActivities": true,
        "showErrors": true,
        "unitid": "1",
        "dataType": "HoldingRegister",
        "adr": "0x000B",
        "quantity": "1",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 790,
        "y": 80,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "2c4205773cc99ea0",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "HW Version",
        "showStatusActivities": true,
        "showErrors": true,
        "unitid": "1",
        "dataType": "HoldingRegister",
        "adr": "777",
        "quantity": "1",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 770,
        "y": 120,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "30cd2bfe0e24eb06",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "FW Version",
        "showStatusActivities": true,
        "showErrors": true,
        "unitid": "1",
        "dataType": "HoldingRegister",
        "adr": "0x0304",
        "quantity": "1",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 770,
        "y": 160,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "900eea5f378f09b5",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "Measuring system",
        "showStatusActivities": true,
        "showErrors": true,
        "unitid": "1",
        "dataType": "HoldingRegister",
        "adr": "0x1002",
        "quantity": "1",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 790,
        "y": 200,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "222b09570e8bd9c5",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "Serial number",
        "showStatusActivities": true,
        "showErrors": true,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x5000",
        "quantity": "7",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 780,
        "y": 240,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "fc849d6366c34d7c",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "Front selector status",
        "showStatusActivities": true,
        "showErrors": true,
        "unitid": "1",
        "dataType": "HoldingRegister",
        "adr": "0xA100",
        "quantity": "1",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 800,
        "y": 280,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "d54419e336e7d8b8",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "A L3",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0010",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 870,
        "y": 700,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "3af35c581ed82771",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "EM24 ini",
        "func": "var data1 = { payload: 1648 };\nvar data2 = { payload: 0x101E };\nvar data3 = { payload: 4 };\nvar data4 = { payload: [16975, 19525, 22895, 17750, 21871, 17741, 12852]};\nvar data5 = { payload: 0x1 };\nvar data6 = { paload: 7 }\nreturn [data1, data2, data3, data4, data5, data6];\n\n\n\n\n",
        "outputs": 6,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 520,
        "y": 180,
        "wires": [
            [
                "67202cf7960c1ede"
            ],
            [
                "2c4205773cc99ea0",
                "30cd2bfe0e24eb06"
            ],
            [
                "900eea5f378f09b5"
            ],
            [
                "222b09570e8bd9c5"
            ],
            [
                "fc849d6366c34d7c"
            ],
            [
                "1c52d04d8e717df0"
            ]
        ],
        "info": "B  66 01000010 \nO  79 01001111 16975\n\nL  76 01001100\nE  69 01000101 19525\n\nY  89 01011001\no 111 01101111 22895\n\nE  69 01000101\nV  86 01010110 17750\n\nU  85 01010101\no 111 01101111 21871\n\nE  69 01000101\nM  77 01001101 17741\n\n2  50 00110010\n4  52 00110100 12852"
    },
    {
        "id": "1c52d04d8e717df0",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "Type of application",
        "showStatusActivities": true,
        "showErrors": true,
        "unitid": "1",
        "dataType": "MCoils",
        "adr": "0xA000",
        "quantity": "1",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 790,
        "y": 320,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "3aaa3aca84d9243f",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "V L2-N",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0002",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 880,
        "y": 460,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "1044d24ed9be7477",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('volts2',msg.payload);\nvar volts=new Int32Array(2);\nvolts[0] = msg.payload * 10;\nmsg={};\nmsg.payload=volts;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 460,
        "wires": [
            [
                "3aaa3aca84d9243f"
            ]
        ]
    },
    {
        "id": "bb6b52ed19065d3f",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "V L3-N",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0004",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 880,
        "y": 500,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "b61f278b68113545",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('volts3',msg.payload);\nvar volts=new Int32Array(2);\nvolts[0] = msg.payload * 10;\nmsg={};\nmsg.payload=volts;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 500,
        "wires": [
            [
                "bb6b52ed19065d3f",
                "93999f3badfeac6b"
            ]
        ]
    },
    {
        "id": "e45f449b44ad3abe",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "V L1-N",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0000",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 880,
        "y": 420,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "af4eeab3f821c36b",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('volts1',msg.payload);\nvar volts=new Int32Array(2);\nvolts[0] = msg.payload * 10;\nmsg={};\nmsg.payload=volts;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 420,
        "wires": [
            [
                "e45f449b44ad3abe"
            ]
        ]
    },
    {
        "id": "a93662e1d87f724b",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "A L2",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x000E",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 870,
        "y": 620,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "be4875a9cc911108",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('amps2', msg.payload);\nvar volts = flow.get('volts2');\nvar amps = new Int32Array(2);\namps[0] = msg.payload / volts * 1000;\nif (amps[0] < 0) {\n    amps[0] = 65535 + amps[0];\n    amps[1] = 65535;\n}\nmsg = {};\nmsg.payload = amps;\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 620,
        "wires": [
            [
                "a93662e1d87f724b"
            ]
        ]
    },
    {
        "id": "5f9033530232bf2c",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "A L1",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x000C",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 870,
        "y": 540,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "a06c7584644c9cc2",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('amps1', msg.payload);\nvar volts = flow.get('volts1');\nvar amps = new Int32Array(2);\namps[0] = msg.payload / volts * 1000;\nif (amps[0] < 0 ) {\n    amps[0] = 65535 + amps[0];\n    amps[1] = 65535;\n}\nmsg={};\nmsg.payload=amps;\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 540,
        "wires": [
            [
                "5f9033530232bf2c"
            ]
        ]
    },
    {
        "id": "2ab6b34f1a911e41",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('amps3', msg.payload);\nvar volts = flow.get('volts3');\nvar amps = new Int32Array(2);\namps[0] = msg.payload / volts * 1000;\nif (amps[0] < 0) {\n    amps[0] = 65535 + amps[0];\n    amps[1] = 65535;\n}\nmsg = {};\nmsg.payload = amps;\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 700,
        "wires": [
            [
                "d54419e336e7d8b8"
            ]
        ]
    },
    {
        "id": "81689b76dd53c306",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "W SUM",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0028",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 880,
        "y": 820,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "a2d5c510cf1ba14a",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "var watts = new Int32Array(2);\nwatts[0] = msg.payload * 10;\nif (watts[0] < 0) {\n    watts[0] = 65535 + watts[0];\n    watts[1] = 65535;\n}\nmsg = { payload: watts };\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 820,
        "wires": [
            [
                "81689b76dd53c306"
            ]
        ]
    },
    {
        "id": "534aea5ecf029397",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "d": true,
        "name": "Hz",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "HoldingRegister",
        "adr": "0x0033",
        "quantity": "1",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 870,
        "y": 860,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "c8e04051ff3fbe7d",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "var twatts = new Int32Array(2);\nvar valor = (parseInt(msg.payload * 10)).toString(2).padStart(32, '0');\ntwatts[0] = parseInt(valor.substring(16, 32), 2);\ntwatts[1] = parseInt(valor.substring(0, 16), 2);\nmsg = {};\nmsg.payload = twatts;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 1000,
        "wires": [
            [
                "3c22fa51ea3d90ba"
            ]
        ]
    },
    {
        "id": "33c06c5e16888f78",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "var valor = (parseInt(msg.payload * 10)).toString(2).padStart(32, '0');\nvar twatts = new Int32Array(2);\ntwatts[0] = parseInt(valor.substring(16, 32), 2);\ntwatts[1] = parseInt(valor.substring(0, 16), 2);\nmsg = {};\nmsg.payload = twatts;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 1040,
        "wires": [
            [
                "0fe164a21a220b77"
            ]
        ]
    },
    {
        "id": "3c22fa51ea3d90ba",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "d": true,
        "name": "KWh(+) TOT",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0034",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 890,
        "y": 1000,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "0fe164a21a220b77",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "d": true,
        "name": "KWh(-) TOT",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x004E",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 890,
        "y": 1040,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "92a7a25b27631812",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "W L1",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0012",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 870,
        "y": 580,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "d97e952ba0802507",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('watts1',msg.payload);\nvar watts=new Int32Array(2);\nwatts[0]=msg.payload * 10;\nif (watts[0] < 0 ) {\n    watts[0] = 65535 + watts[0];\n    watts[1] = 65535;\n}\nmsg={};\nmsg.payload=watts;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 580,
        "wires": [
            [
                "92a7a25b27631812"
            ]
        ]
    },
    {
        "id": "5f665686d3b345fb",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "W L2",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0014",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 870,
        "y": 660,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "6fc3d4e81ea93fb5",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('watts2',msg.payload);\nvar watts=new Int32Array(2);\nwatts[0]=msg.payload * 10;\nif (watts[0] < 0 ) {\n    watts[0] = 65535 + watts[0];\n    watts[1] = 65535;\n}\nmsg={};\nmsg.payload=watts;\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 660,
        "wires": [
            [
                "5f665686d3b345fb"
            ]
        ]
    },
    {
        "id": "ade406f9d63af2f3",
        "type": "modbus-write",
        "z": "3a20b3d0040bdb1b",
        "name": "W L3",
        "showStatusActivities": true,
        "showErrors": false,
        "unitid": "1",
        "dataType": "MHoldingRegisters",
        "adr": "0x0016",
        "quantity": "2",
        "server": "5ddc8b25ceb731bc",
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 870,
        "y": 740,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "e0c25c052bbe38b4",
        "type": "function",
        "z": "3a20b3d0040bdb1b",
        "name": "Set",
        "func": "flow.set('watts3',msg.payload);\nvar watts=new Int32Array(2);\nwatts[0]=msg.payload * 10;\nif (watts[0] < 0 ) {\n    watts[0] = 65535 + watts[0];\n    watts[1] = 65535;\n}\nmsg={};\nmsg.payload=watts;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 740,
        "wires": [
            [
                "ade406f9d63af2f3"
            ]
        ]
    },
    {
        "id": "28e42d615a944124",
        "type": "comment",
        "z": "3a20b3d0040bdb1b",
        "name": "SDM72 auslesen, Daten bearbeiten, auf EM24 schreiben",
        "info": "",
        "x": 230,
        "y": 380,
        "wires": []
    },
    {
        "id": "93999f3badfeac6b",
        "type": "debug",
        "z": "3a20b3d0040bdb1b",
        "name": "debug 6",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 880,
        "y": 360,
        "wires": []
    },
    {
        "id": "d82d4d4fb35465a6",
        "type": "inject",
        "z": "3a20b3d0040bdb1b",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "4",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 350,
        "y": 420,
        "wires": [
            [
                "1044d24ed9be7477",
                "a06c7584644c9cc2",
                "d97e952ba0802507",
                "be4875a9cc911108",
                "6fc3d4e81ea93fb5",
                "33c06c5e16888f78",
                "b61f278b68113545"
            ]
        ]
    },
    {
        "id": "b4fa06a9e41c0bc5",
        "type": "inject",
        "z": "3a20b3d0040bdb1b",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "4",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "50",
        "payloadType": "num",
        "x": 350,
        "y": 860,
        "wires": [
            [
                "534aea5ecf029397"
            ]
        ]
    },
    {
        "id": "3b381a88495e1561",
        "type": "ioBroker in",
        "z": "3a20b3d0040bdb1b",
        "name": "Aquarium Voltage L1",
        "topic": "sonoff.0.Aquarium_Power.ENERGY_Voltage",
        "payloadType": "value",
        "onlyack": "",
        "func": "all",
        "gap": "",
        "fireOnStart": "true",
        "outFormat": "MQTT",
        "x": 270,
        "y": 500,
        "wires": [
            [
                "af4eeab3f821c36b"
            ]
        ]
    },
    {
        "id": "ee2128ef40173cb0",
        "type": "ioBroker in",
        "z": "3a20b3d0040bdb1b",
        "name": "Aquarium Voltage L1",
        "topic": "sonoff.0.Aquarium_Power.ENERGY_Current",
        "payloadType": "value",
        "onlyack": "",
        "func": "all",
        "gap": "",
        "fireOnStart": "true",
        "outFormat": "MQTT",
        "x": 290,
        "y": 700,
        "wires": [
            [
                "2ab6b34f1a911e41"
            ]
        ]
    },
    {
        "id": "d8dffab038c2eacb",
        "type": "ioBroker in",
        "z": "3a20b3d0040bdb1b",
        "name": "Aquarium Power L1",
        "topic": "sonoff.0.Aquarium_Power.ENERGY_Power",
        "payloadType": "value",
        "onlyack": "",
        "func": "all",
        "gap": "",
        "fireOnStart": "true",
        "outFormat": "MQTT",
        "x": 290,
        "y": 740,
        "wires": [
            [
                "e0c25c052bbe38b4",
                "a2d5c510cf1ba14a"
            ]
        ]
    },
    {
        "id": "34127f850c0b38ad",
        "type": "ioBroker in",
        "z": "3a20b3d0040bdb1b",
        "name": "Aquarium Power L1",
        "topic": "sonoff.0.Aquarium_Power.ENERGY_Total",
        "payloadType": "value",
        "onlyack": "",
        "func": "all",
        "gap": "",
        "fireOnStart": "true",
        "outFormat": "MQTT",
        "x": 390,
        "y": 1000,
        "wires": [
            [
                "c8e04051ff3fbe7d"
            ]
        ]
    },
    {
        "id": "5ddc8b25ceb731bc",
        "type": "modbus-client",
        "name": "EM24 EVU",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": true,
        "queueLogEnabled": true,
        "failureLogEnabled": false,
        "tcpHost": "127.0.0.1",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": 1,
        "commandDelay": 1,
        "clientTimeout": 1000,
        "reconnectOnTimeout": true,
        "reconnectTimeout": 2000,
        "parallelUnitIdsAllowed": true
    }
]
Mittels des Mqtt treibers kann ich ja nur einen Grid Meter hinzufügen, oder?
Ich dachte ich könnte spezifische AC Lasten hinzufügen z.b die Klimanlagen.
Gruß Nils

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Sa Dez 17, 2022 11:05 am
von wawibu
aiole hat geschrieben: Do Dez 15, 2022 4:39 pm Kannst Du den abschließenden flows bitte noch einstellen? Danke
klar :)

Anbei der flow so wie er aktuell bei mir arbeitet
NodeRed_Flow_SDM630_EVU.json.txt
(29.62 KiB) 235-mal heruntergeladen

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: Sa Dez 17, 2022 11:06 am
von aiole
Danke!

Re: Sich den EM24 sparen! Virtuelles EM24 LAN mit EVU-Kit

Verfasst: So Jan 15, 2023 1:43 pm
von Andi
Hallo zusammen,

das klingt alles sehr spannend hier, ich spiele auch mit dem Gedanken einen Victron MP2 48/5000 mit einem Speicher anzuschaffen.

Würde mir gerne den EM24 auch sparen, da ich ein Smartmeter habe dessen Daten ich in allen möglichen Formen (KNX, Modbus, MQTT) zur Verfügung stellen könnte.

Mit NodeRed hab ich noch nie gearbeitet (und würde es wenn es irgendwie geht auch vermeiden), daher würde ich gerne die Daten einfach per Modbus oder MQTT an den Victron senden, aber ich finde im Moment nirgendwo auf welche MQTT Topics oder Modbus Register ich schreiben müsste, Umrechnungen von Formaten etc. kann ich auch über eigene Logiken realisieren.

Ein RasPi mit VenusOS habe ich erfolgreich am Laufen, MQTT und Modbus sind aktiviert, nur ich rätsel gerade wie ich nun die Smartmeterdaten in das VenusOS bekomme. Und: Geht das überhaupt ohne einen Multiplus angeschlossen zu haben? Ich kann da ohne angeschlossene Hardware wohl wenig im VenusOS konfigurieren.

Vielen Dank!