Alternative Anbindung von Huawei WR

danielrudolf
Beiträge: 10
Registriert: Fr Mär 25, 2022 8:35 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von danielrudolf »

Hab es nun doch noch geschafft. Hab gestern in der Nacht mich noch mit Node-Red auseinandergesetzt. Dort habe ich es geschafft den Wert per Mqtt an die OpenWB zu senden.
aiole
Beiträge: 6958
Registriert: Mo Okt 08, 2018 4:51 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von aiole »

sehr schön - Glückwunsch!
Kannst Du den Flow noch beistellen, dass alle etwas davon haben?
danielrudolf
Beiträge: 10
Registriert: Fr Mär 25, 2022 8:35 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von danielrudolf »

Sehr gerne :)
Ich lasse ihm alle 2 Sekunden die Werte senden. Ein Wert von der Huawei habe ich *-1 gerechnet.

Code: Alles auswählen

[
    {
        "id": "b54d4ffd1e13f824",
        "type": "mqtt out",
        "z": "05ef9b6ff2d2232d",
        "name": "",
        "topic": "openWB/set/pv/8/get/power",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "eca40c603102ca88",
        "x": 920,
        "y": 140,
        "wires": []
    },
    {
        "id": "bce8f1d54263df19",
        "type": "api-current-state",
        "z": "05ef9b6ff2d2232d",
        "name": "Inverter Eingangsleistung",
        "server": "ad5ff102.51ed",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "sensor.inverter_eingangsleistung",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 450,
        "y": 140,
        "wires": [
            [
                "ebd08ea3.75c5f"
            ]
        ]
    },
    {
        "id": "bf88582d62e42d3a",
        "type": "inject",
        "z": "05ef9b6ff2d2232d",
        "name": "",
        "props": [],
        "repeat": "2",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 110,
        "y": 220,
        "wires": [
            [
                "60c9a819108d7648",
                "bce8f1d54263df19",
                "e5ee2bb810b6e5b9",
                "e844d098effc0b56",
                "535076dc94ee8dda",
                "44a4f5ef0c5b567c"
            ]
        ]
    },
    {
        "id": "60c9a819108d7648",
        "type": "api-current-state",
        "z": "05ef9b6ff2d2232d",
        "name": "Inverter Gesamtenergieertrag",
        "server": "ad5ff102.51ed",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "sensor.inverter_gesamtenergieertrag",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 460,
        "y": 200,
        "wires": [
            [
                "5fcffcb276a207e1"
            ]
        ]
    },
    {
        "id": "5fcffcb276a207e1",
        "type": "mqtt out",
        "z": "05ef9b6ff2d2232d",
        "name": "",
        "topic": "openWB/set/pv/8/get/exported",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "eca40c603102ca88",
        "x": 930,
        "y": 200,
        "wires": []
    },
    {
        "id": "ebd08ea3.75c5f",
        "type": "function",
        "z": "05ef9b6ff2d2232d",
        "name": "Berechnung",
        "func": "msg.payload = msg.payload * -1;\nreturn msg;\n",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 670,
        "y": 140,
        "wires": [
            [
                "b54d4ffd1e13f824"
            ]
        ]
    },
    {
        "id": "13caf63d52a250b8",
        "type": "mqtt out",
        "z": "05ef9b6ff2d2232d",
        "name": "",
        "topic": "openWB/set/bat/9/get/soc",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "eca40c603102ca88",
        "x": 920,
        "y": 500,
        "wires": []
    },
    {
        "id": "e5ee2bb810b6e5b9",
        "type": "api-current-state",
        "z": "05ef9b6ff2d2232d",
        "name": "Hausakku SOC",
        "server": "ad5ff102.51ed",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "sensor.battery_batterieladung",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 420,
        "y": 500,
        "wires": [
            [
                "13caf63d52a250b8"
            ]
        ]
    },
    {
        "id": "c224ee54b4dc3f3b",
        "type": "mqtt out",
        "z": "05ef9b6ff2d2232d",
        "name": "",
        "topic": "openWB/set/bat/9/get/power",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "eca40c603102ca88",
        "x": 930,
        "y": 320,
        "wires": []
    },
    {
        "id": "e844d098effc0b56",
        "type": "api-current-state",
        "z": "05ef9b6ff2d2232d",
        "name": "Hausakku Lade-/Entladeleistung",
        "server": "ad5ff102.51ed",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "sensor.battery_lade_entladeleistung",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 470,
        "y": 320,
        "wires": [
            [
                "c224ee54b4dc3f3b"
            ]
        ]
    },
    {
        "id": "535076dc94ee8dda",
        "type": "api-current-state",
        "z": "05ef9b6ff2d2232d",
        "name": "Hausakku Gesamtladung",
        "server": "ad5ff102.51ed",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "sensor.battery_gesamtladung",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 450,
        "y": 380,
        "wires": [
            [
                "7266e2cf59ac1beb"
            ]
        ]
    },
    {
        "id": "7266e2cf59ac1beb",
        "type": "mqtt out",
        "z": "05ef9b6ff2d2232d",
        "name": "",
        "topic": "openWB/set/bat/9/get/imported",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "eca40c603102ca88",
        "x": 930,
        "y": 380,
        "wires": []
    },
    {
        "id": "44a4f5ef0c5b567c",
        "type": "api-current-state",
        "z": "05ef9b6ff2d2232d",
        "name": "Hausakku Gesamtentladung",
        "server": "ad5ff102.51ed",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "sensor.battery_gesamtentladung",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 460,
        "y": 440,
        "wires": [
            [
                "f81c8706e2e7530a"
            ]
        ]
    },
    {
        "id": "f81c8706e2e7530a",
        "type": "mqtt out",
        "z": "05ef9b6ff2d2232d",
        "name": "",
        "topic": "openWB/set/bat/9/get/exported",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "eca40c603102ca88",
        "x": 930,
        "y": 440,
        "wires": []
    },
    {
        "id": "eca40c603102ca88",
        "type": "mqtt-broker",
        "name": "OpenWB2",
        "broker": "192.168.178.3",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "false",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closeRetain": "false",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willRetain": "false",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "ad5ff102.51ed",
        "type": "server",
        "name": "Home Assistant",
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "",
        "connectionDelay": false,
        "cacheJson": false,
        "heartbeat": false,
        "heartbeatInterval": "",
        "statusSeparator": "",
        "enableGlobalContextStore": false
    }
]
Ein Problem habe ich jetzt noch. Warum auch immer berechnet mir nun die OpenWB den Hausverbrauch nicht. Ich glaube das gehört eigentlich in ein anderes Thema. Wo kann der Fehler liegen?
Dateianhänge
IMG_7247.jpeg
(694.86 KiB) Noch nie heruntergeladen
IMG_7248.jpeg
(1.79 MiB) Noch nie heruntergeladen
IMG_7249.jpeg
(1.84 MiB) Noch nie heruntergeladen
tiffman
Beiträge: 48
Registriert: So Mär 17, 2024 5:58 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von tiffman »

Vielen Dank für diesen tollen Thread und insbesondere an @alex für die Lösung und die Erklärungen per Video etc.
Eine Frage zur Wahl des RPi:
Spricht etwas dagegen, statt des Zero W den Zero 2 W zu nehmen? Er kostet nicht mehr, verbraucht idle nicht mehr Strom, hat aber einen leistungsstärkeren Prozessor und damit noch Reserve für eventuelle andere Anwendungen.
ran
Beiträge: 1
Registriert: Do Apr 25, 2024 4:38 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von ran »

Die Anbindung meiner beiden Huawei-Wechselrichter mit zwei "Huawei - OpenWB MQTT Bridges" funktioniert soweit.

Allerdings tritt das seltsame Phänomen auf, dass die MQTT-Verbindung zum 2. Wechselrichter, welcher "nur" ein Wechselrichter ist immer abbricht und erst bei einem Neustart wieder aktuelle Daten an die OpenWB liefert.

Hat jemand ähnliches beobachtet?

Ich habe mittlerweile sämtliche Kombinationen durch:

- Haken bei "Das hier ist ein weiterer Wechselrichter ohne Speicher und EVU" - noch schnellerer Verbindungsabbruch
- Normale Verbindung - tägl. min. 2 bis 3 Neustarts notwendig
- Separate MQTT-Anbindung an die OpenWB unter den "Geräte und Komponenten"-Einstellungen - keine Verbesserung

Der erste Raspberry Pi Zero der mit dem Master-WR verbunden ist läuft stabil und liefert ständig sämtliche Daten: WR, Luna, EVU

Alternativ könnte man auch den 2. WR mit den Huawei-Einstellungen der OpenWB einbinden, allerdings gibt es dann wieder die bekannten Abfrageprobleme.
tiffman
Beiträge: 48
Registriert: So Mär 17, 2024 5:58 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von tiffman »

Ich habe jetzt bei mir die Alex-Metzger-Lösung umgesetzt, doch sie funktioniert noch nicht ganz. Meine Situation: Ein Detail zur Verbindung der Alex-Metzger-Lösung mit dem WLAN des WR: Ich habe hier das WLAN-Kennwort eingegeben - nicht das WiFi-Konfigurationskennwort der FusionSolar (die beiden Kennwörter sind unterschiedlich).

Woran kann es noch liegen?
aiole
Beiträge: 6958
Registriert: Mo Okt 08, 2018 4:51 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von aiole »

Bridge bei Alex Lösung? Braucht es das wirklich?

Der Zero setzt WLAN-Huawei auf dein LAN um. In openWB werden alle Energiesystem-Module (Zähler, PV, Speicher) als MQTT-Gerät/Komponenten angelegt und die dort vergebenen ID's (findest du in der zugehörigen Komponente) müssen in Alex' Software eingetragen werden. Ich hoffe, ich liege da richtig, da ich Alex' Lösung selbst noch nicht praktiziert habe.
tiffman
Beiträge: 48
Registriert: So Mär 17, 2024 5:58 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von tiffman »

aiole hat geschrieben: So Mai 12, 2024 4:55 pm Bridge bei Alex Lösung? Braucht es das wirklich?
Die Frage verstehe ich nicht ganz. Von Bridge habe ich doch gar nichts geschrieben. Die Lösung von Alex Metzger heißt allerdings Bridge (daher der Dateiname im Screenshot).
aiole hat geschrieben: So Mai 12, 2024 4:55 pm Der Zero setzt WLAN-Huawei auf dein LAN um. In openWB werden alle Energiesystem-Module (Zähler, PV, Speicher) als MQTT-Gerät/Komponenten angelegt und die dort vergebenen ID's (findest du in der zugehörigen Komponente) müssen in Alex' Software eingetragen werden. Ich hoffe, ich liege da richtig, da ich Alex' Lösung selbst noch nicht praktiziert habe.
Genau so habe ich es gemacht. Streng nach Anleitung. Siehe Screenshots.
Pendragon
Beiträge: 114
Registriert: Di Jan 30, 2024 5:43 pm

Re: Alternative Anbindung von Huawei WR

Beitrag von Pendragon »

Wenn du dich mit dem dongle verbinden willst dann darfst du nicht das Netz des Wechselrichters verwenden sondern muss dich mit deinem normalen WLAN verbinden
openWB series 2 custom 1/3 Umschaltung 22kW & RFID
16kWp mit Huawei Sun2000-12KTL
Opel Corsa-e mit 46kWh
Datenfluss: Datenabfrage via Solaranzeige.de (alle 20s), Verarbeitung mit Edomi und direkte Weiterleitung via MQTT
Antworten