Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. JavaScript
  5. SMA Wechselrichter in ioBroker einbinden

NEWS

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    11
    1
    493

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.7k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.6k

SMA Wechselrichter in ioBroker einbinden

Geplant Angeheftet Gesperrt Verschoben JavaScript
7 Beiträge 4 Kommentatoren 575 Aufrufe 5 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • T Offline
    T Offline
    TripleX
    schrieb am zuletzt editiert von
    #1

    Hallo zusammen,

    Ich würde gerne meinen Wechselrichter von SMA einbinden.
    Habe dazu auch einige Infos im Netz gefunden, die aber alle schon was älter sind und wohl zum Teil auch garnicht mehr stimmen.
    Was wäre denn aktuelll der beste/richtige Weg?

    crunchipC 1 Antwort Letzte Antwort
    0
    • T TripleX

      Hallo zusammen,

      Ich würde gerne meinen Wechselrichter von SMA einbinden.
      Habe dazu auch einige Infos im Netz gefunden, die aber alle schon was älter sind und wohl zum Teil auch garnicht mehr stimmen.
      Was wäre denn aktuelll der beste/richtige Weg?

      crunchipC Offline
      crunchipC Offline
      crunchip
      Forum Testing Most Active
      schrieb am zuletzt editiert von
      #2

      @triplex einfach mal Sma Wechselrichter hier in die Suche eingeben

      umgestiegen von Proxmox auf Unraid

      1 Antwort Letzte Antwort
      0
      • D Offline
        D Offline
        darkiop
        Most Active
        schrieb am zuletzt editiert von
        #3

        Und vor allem sollte bei so einer Frage auch etwas mehr an Details enthalten sein - welchen SMA-WR du im Einsatz hast z.B. ;)

        Für den SUNNY TRIPOWER 10.0 SE verwende ich aktuell folgendes:

        modbus (input)

        _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	cw	isScale
        30203	3	Operation.HealthStt.Ok	Nennleistung im Zustand Ok	W	uint32be	2	1			value			
        30513	3	Metering.TotWhOut Wh	Gesamtertrag in kWh	kWh	uint64be	4	1		x/1000	value			
        30535	3	Metering.DyWhOut	Tagesertrag	kWh	uint32be	2	1		x/1000	value			
        30581	3	Metering.GridMs.TotWhIn	Zählerstand Bezugszähler	kWh	uint32be	2	1		x/1000	value			
        30583	3	Metering.GridMs.TotWhOut	Zählerstand Einspeisezähler	kWh	uint32be	2	1		x/1000	value			
        30769	3	DcMs.Amp_1	DC Strom Eingang (Strang 1)	A	int32be	2	0.001			value			
        30771	3	DcMs.Vol_1	DC Spannung Eingang (Strang 1)	V	int32be	2	0.01			value			
        30773	3	DcMs.Watt_1	DC Leistung Eingang (Strang 1)	W	int32be	2	1		x=(x<0) ? 0:x	value			
        30775	3	GridMs.TotW	Leistung (Eigenverbrauch)	W	int32be	2	1			value			
        30845	3	Bat.ChaStt	Aktueller Batterieladezustand (SoC)	%	int32be	2	1			value			
        30847	3	Bat.Diag.ActlCapacNom	Aktuelle Batteriekapazität	%	uint32be	2	1			value			
        30849	3	Bat.TmpVal	Batterietemperatur	°C	uint32be	2	0.1			value			
        30865	3	Metering.GridMs.TotWIn	Leistung Bezug	W	int32be	2	1			value			
        30867	3	Metering.GridMs.TotWOut	Leistung Einspeisung	W	int32be	2	1			value			
        30955	3	Bat.OpStt	Betriebsstatus der Batterie		uint32be	2	1			value			
        30957	3	DcMs.Amp_2	DC Strom Eingang (Strang 2)	A	int32be	2	0.001			value			
        30959	3	DcMs.Vol_2	DC Spannung Eingang (Strang 2)	V	int32be	2	0.01			value			
        30961	3	DcMs.Watt_2	DC Leistung Eingang (Strang 2)	W	int32be	2	1		x=(x<0) ? 0:x	value			
        31057	3	BatUsDm.Stt	Status Batterienutzungsbereich		uint32be	2	1			value			
        31379	3	Nameplate.CmpBMS.Typ	Batterietyp		uint32be	2	1			value			
        31391	3	Operation.Bat.Health	Batterie-Zustand		uint32be	2	1			value			
        31393	3	BatChrg.CurBatCha	Momentane Batterieladung	W	uint32be	2	1			value			
        31395	3	BatDsch.CurBatDsch	Momentane Batterieentladung	W	uint32be	2	1			value			
        31397	3	BatChrg.BatChrg	Batterieladung	kWh	uint64be	4	1		x/1000	value			
        31401	3	BatDsch.BatDsch	Batterieentladung	kWh	uint64be	4	1		x/1000	value			
        32385	3	Operation.Inverter.Health	Wechselrichter-Zustand		uint32be	2	1			value			
        33003	3	Operation.RunStt	Betriebsstatus		uint32be	2	1			value			
        

        modbus (holding)

        _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	poll	wp	cw	isScale
        40149	3	Wirkleistungvorgabe		W	int32be	2	1	0		level		false	false	false	false
        40151	3	Kommunikation			uint32be	2	1	0		state		false	false	false	false
        40189	3	max Ladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
        40191	3	max Entladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
        40795	3	Maximale Batterieladeleistung		W	uint32be	2	1	0		level		false	false	false	false
        40799	3	Maximale Batterieentladeleistung		W	uint32be	2	1	0		level		false	false	false	false
        

        Die aktuell in W anliegende PV-Leistung hole ich mir aus dem json des Web Frontends des WR:

        const axios = require('axios');
        const https = require('https');
        
        const cron = '*/5 * * * * *';
        
        const logging = false;
        
        const baseUri = 'https://10.3.0.9/dyn/getDashValues.json';
        
        const instanz = 'javascript.' + instance;
        const pfad = '.Strom.Photovoltaik.';
        const idAktuell = instanz + pfad + 'Leistung_aktuell';
        
        async function GetPvGenCounterFromUi() {
            try {
                const response = await axios.post(baseUri, null, { httpsAgent: new https.Agent({ rejectUnauthorized: false }) });
        
                if (response.status === 200) {
                    const resultValueAC = response.data.result["01B8-xxxxxB04"]["6100_0046C200"][9][0].val; // Leistung PV-Erzeugung
                    //const resultValueHome = body.result["01B8-xxxxxB04"]["6100_40263F00"][9][0].val; // Verbrauch Haus
                    //const resultValueAC = body.result["01B8-xxxxxB04"]["6100_00295A00"][9][0].val; // Batterie Entladung (modbus 30955)
        
                    if (typeof resultValueAC !== 'undefined') {
                        setState(idAktuell, resultValueAC, false);
                        if (logging) console.log("PV Erzeugung: " + resultValueAC);
                    }
                }
            } catch (error) {
                console.error(error);
            }
        }
        
        GetPvGenCounterFromUi();
        
        schedule(cron, function () {
            GetPvGenCounterFromUi();
        });
        

        Für die Berechnung der Autarkie läuft nochmal ein kleines Blockly:

        8bb60455-f238-4864-98e9-96cea5336aed-image.png

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable id=")A(,1t?QC+HBec3kpaD:">log_info_text</variable>
            <variable id="DEKENKZ_PW$)6(~vyubz">autarkie</variable>
          </variables>
          <block type="procedures_defnoreturn" id=")7Xc23hxhO);1[Qia]$i" x="13" y="13">
            <mutation>
              <arg name="log_info_text" varid=")A(,1t?QC+HBec3kpaD:"></arg>
            </mutation>
            <field name="NAME">log_info</field>
            <comment pinned="false" h="80" w="160">Debuging - Log Ausgabe</comment>
            <statement name="STACK">
              <block type="debug" id="oVE-wj4=kcL/14Zb`=)h">
                <field name="Severity">log</field>
                <value name="TEXT">
                  <shadow type="text" id="P0)38%YEoA-tS1,cn!L^">
                    <field name="TEXT">test</field>
                  </shadow>
                  <block type="text_join" id="d1s)E+PaZ649rHqE^ron">
                    <mutation items="4"></mutation>
                    <value name="ADD0">
                      <block type="text" id="-+FeT?Md^55hYYP{#n)_">
                        <field name="TEXT">+++ </field>
                      </block>
                    </value>
                    <value name="ADD1">
                      <block type="text" id="`6k);`:%idWaiG8bZ[5L">
                        <field name="TEXT">PV Autarkie Berechnung: </field>
                      </block>
                    </value>
                    <value name="ADD2">
                      <block type="variables_get" id="g:!wcT`1iKXT=n_C~Y`/">
                        <field name="VAR" id=")A(,1t?QC+HBec3kpaD:">log_info_text</field>
                      </block>
                    </value>
                    <value name="ADD3">
                      <block type="text" id="m:{Wlwl%u*`sI%N}Df/K">
                        <field name="TEXT"> +++</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </statement>
          </block>
          <block type="comment" id=",A]yxHxP_?W~iT98PE((" x="13" y="213">
            <field name="COMMENT">Autarkie berechnen:</field>
            <next>
              <block type="on_ext" id="wCeOrIdzh@U0M9j/y2]a">
                <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                <field name="CONDITION">ne</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="6Cp(`|G)vq7f=(_%h)Xm">
                    <field name="oid">default</field>
                  </shadow>
                  <block type="text" id="eH-77(JJc279;TiZeuo6">
                    <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                  </block>
                </value>
                <statement name="STATEMENT">
                  <block type="variables_set" id="FX$w~ckWq^Q?9K#:bLq.">
                    <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                    <value name="VALUE">
                      <block type="math_rndfixed" id="acSDN-J?%wFa/wX]6]Lc" inline="false">
                        <field name="n">1</field>
                        <value name="x">
                          <shadow type="math_number" id="[ov#Fk2wE1PanZsg~4,7">
                            <field name="NUM">3.1234</field>
                          </shadow>
                          <block type="math_arithmetic" id="/mpuXh#j;36m}VhMpgQ_">
                            <field name="OP">MINUS</field>
                            <value name="A">
                              <shadow type="math_number" id="2?:VEYWisK^FF;(fWw2(">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="math_number" id="C}tO4CKdT]#w#q/~{hVm">
                                <field name="NUM">100</field>
                              </block>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="CDzO:J3!PW(JVHi^.-MU">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="math_arithmetic" id="nVb5uo.+[unOkjyF}Yl=">
                                <field name="OP">MULTIPLY</field>
                                <value name="A">
                                  <shadow type="math_number" id="_sfnL[E7*EW:?nv[`v`M">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="=($FR)^2~2K+2TFm+Bpg" inline="false">
                                    <field name="OP">DIVIDE</field>
                                    <value name="A">
                                      <shadow type="math_number" id="l5nTX:u]JGAwCx(d+;M|">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="get_value_var" id=")Gs9Q(1m#,.f3AAhP|}v">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="F^ek.$A$%bzw.BKQ0qyz">
                                            <field name="TEXT">alias.0.energie.bezug</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="rH7+M!;t|RgWZkgm9ds)">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="get_value_var" id="g8?}GY**~]0LL@5b[e+p">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="LwEk=43AG`m=kPFI0!ww">
                                            <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="A.*:)97=N5r,!4:8y]d~">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_number" id="WSCwoh*p0EN~I);6YuF[">
                                    <field name="NUM">100</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="controls_if" id="8uw)s:xN5PsY-DDLHh?D">
                        <mutation else="1"></mutation>
                        <value name="IF0">
                          <block type="logic_compare" id="Vw2[df`2hfxZ2~q`_#qI">
                            <field name="OP">LT</field>
                            <value name="A">
                              <block type="variables_get" id="5Yib_osW2eDUAOabo[/%">
                                <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="^sz`W;3wksx![Gr]7DUw">
                                <field name="NUM">0</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="procedures_callnoreturn" id="]^iRY4ug[B#}0H%TY/?)" inline="true" disabled="true">
                            <mutation name="log_info">
                              <arg name="log_info_text"></arg>
                            </mutation>
                            <value name="ARG0">
                              <block type="text_join" id="*w_zR^6}O,0nhzdBe!Mp">
                                <mutation items="2"></mutation>
                                <value name="ADD0">
                                  <block type="text" id="bc9W1A7uOx2({;=X~u{6">
                                    <field name="TEXT">alias.0.energie.bezug: </field>
                                  </block>
                                </value>
                                <value name="ADD1">
                                  <block type="get_value_var" id="#@oXFv3,}WPEmPxLAjT|">
                                    <field name="ATTR">val</field>
                                    <value name="OID">
                                      <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                        <field name="oid">Object ID</field>
                                      </shadow>
                                      <block type="text" id="FiRE3$h8/+d6GH9CmQ[y">
                                        <field name="TEXT">alias.0.energie.bezug</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="procedures_callnoreturn" id="7v5:+5-Lu;ZV^oT)(XM~" inline="true" disabled="true">
                                <mutation name="log_info">
                                  <arg name="log_info_text"></arg>
                                </mutation>
                                <value name="ARG0">
                                  <block type="text_join" id="o3Gl~c$IXq8V%Qs4d_?`">
                                    <mutation items="2"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id="K2H[B#r):z}@yd8J[.W*">
                                        <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="get_value_var" id="[|}?GpnK0`Ou5xZ2E{IT">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="uy.x]1O?6L3Q:nCi{y04">
                                            <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="$tgFSk=g]{CHUw:H9?D@" inline="true" disabled="true">
                                    <mutation name="log_info">
                                      <arg name="log_info_text"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="text_join" id="HXbnivB+oy%z_f/u^VzD" inline="true">
                                        <mutation items="3"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="/I7iyT73pWM.V_5J13R!">
                                            <field name="TEXT">Autarkie bei </field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="math_number" id="g!}an}KeY/K$[;@z{/V0">
                                            <field name="NUM">0</field>
                                          </block>
                                        </value>
                                        <value name="ADD2">
                                          <block type="text" id="(8bT:?r+~)f?zJ[`TKWs">
                                            <field name="TEXT">%</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="control_ex" id="19@x/as5:4$ODwL)9?F," inline="true">
                                        <field name="TYPE">true</field>
                                        <field name="CLEAR_RUNNING">FALSE</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="z94,:IKfaAi+hulG`Wu!">
                                            <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                          </block>
                                        </value>
                                        <value name="VALUE">
                                          <shadow type="logic_boolean" id="vx:y7b!E_MT.siXV[oRj">
                                            <field name="BOOL">TRUE</field>
                                          </shadow>
                                          <block type="variables_get" id="r7gF$%(~d;Z,;xcXNRXU">
                                            <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                          </block>
                                        </value>
                                        <value name="DELAY_MS">
                                          <shadow type="math_number" id="P`hD;_!mGBuCv%a1F[UO">
                                            <field name="NUM">0</field>
                                          </shadow>
                                          <block type="math_number" id="ltA(/T7~+eE:_1JrBxS[">
                                            <field name="NUM">0</field>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <statement name="ELSE">
                          <block type="procedures_callnoreturn" id="8$xzBS!8VDTx`~xVS1S*" inline="true" disabled="true">
                            <mutation name="log_info">
                              <arg name="log_info_text"></arg>
                            </mutation>
                            <value name="ARG0">
                              <block type="text_join" id="YTVLdrG;xbH?//lE1M^A">
                                <mutation items="2"></mutation>
                                <value name="ADD0">
                                  <block type="text" id="rb^affafd0nCm^mEpHTx">
                                    <field name="TEXT">alias.0.energie.bezug: </field>
                                  </block>
                                </value>
                                <value name="ADD1">
                                  <block type="get_value_var" id=".:TRJAQL%?]o/SDG;KA!">
                                    <field name="ATTR">val</field>
                                    <value name="OID">
                                      <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                        <field name="oid">Object ID</field>
                                      </shadow>
                                      <block type="text" id="31/N!vZ`pn,:i(NQB2II">
                                        <field name="TEXT">alias.0.energie.bezug</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="procedures_callnoreturn" id="nY_UN+k7ME[BKJ/#n*@3" inline="true" disabled="true">
                                <mutation name="log_info">
                                  <arg name="log_info_text"></arg>
                                </mutation>
                                <value name="ARG0">
                                  <block type="text_join" id="t;azLtHymv)6`5)u`P0@">
                                    <mutation items="2"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id="+yhxR|J;S$N/ws$O+OnW">
                                        <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="get_value_var" id="1v1U{lw_*KY,SV3]e1sX">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="rC`x_$(?xAw-M@t($4#a">
                                            <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="|:DU]J}68P]M/WlDsT=l" inline="true" disabled="true">
                                    <mutation name="log_info">
                                      <arg name="log_info_text"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="text_join" id="X0KgmzdH*!3;~yZtX%G*" inline="true">
                                        <mutation items="3"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="A`mHqub}aB2AIh*eT_Gi">
                                            <field name="TEXT">Autarkie bei </field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="variables_get" id="3J-#|+JL.i{cOv)53qc7">
                                            <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                          </block>
                                        </value>
                                        <value name="ADD2">
                                          <block type="text" id="Tg(9;|4+wRq2Iq77MA_N">
                                            <field name="TEXT">%</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="control_ex" id="nalaDY-3bdB2MT6-3B:D" inline="true">
                                        <field name="TYPE">true</field>
                                        <field name="CLEAR_RUNNING">FALSE</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="A=((@JQG%#*bGh2R7%_q">
                                            <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                          </block>
                                        </value>
                                        <value name="VALUE">
                                          <shadow type="logic_boolean" id="=#$OMy,|`/Pw:p^a:9o$">
                                            <field name="BOOL">TRUE</field>
                                          </shadow>
                                          <block type="variables_get" id="~6?u-r71zjp+BV$4Gafs">
                                            <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                          </block>
                                        </value>
                                        <value name="DELAY_MS">
                                          <shadow type="math_number" id="SUeyREm+cm.l4.ZS|_:J">
                                            <field name="NUM">0</field>
                                          </shadow>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </xml>
        

        Proxmox-ioBroker-Redis-HA Doku: https://forum.iobroker.net/topic/47478/dokumentation-einer-proxmox-iobroker-redis-ha-umgebung

        arteckA T 2 Antworten Letzte Antwort
        0
        • D darkiop

          Und vor allem sollte bei so einer Frage auch etwas mehr an Details enthalten sein - welchen SMA-WR du im Einsatz hast z.B. ;)

          Für den SUNNY TRIPOWER 10.0 SE verwende ich aktuell folgendes:

          modbus (input)

          _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	cw	isScale
          30203	3	Operation.HealthStt.Ok	Nennleistung im Zustand Ok	W	uint32be	2	1			value			
          30513	3	Metering.TotWhOut Wh	Gesamtertrag in kWh	kWh	uint64be	4	1		x/1000	value			
          30535	3	Metering.DyWhOut	Tagesertrag	kWh	uint32be	2	1		x/1000	value			
          30581	3	Metering.GridMs.TotWhIn	Zählerstand Bezugszähler	kWh	uint32be	2	1		x/1000	value			
          30583	3	Metering.GridMs.TotWhOut	Zählerstand Einspeisezähler	kWh	uint32be	2	1		x/1000	value			
          30769	3	DcMs.Amp_1	DC Strom Eingang (Strang 1)	A	int32be	2	0.001			value			
          30771	3	DcMs.Vol_1	DC Spannung Eingang (Strang 1)	V	int32be	2	0.01			value			
          30773	3	DcMs.Watt_1	DC Leistung Eingang (Strang 1)	W	int32be	2	1		x=(x<0) ? 0:x	value			
          30775	3	GridMs.TotW	Leistung (Eigenverbrauch)	W	int32be	2	1			value			
          30845	3	Bat.ChaStt	Aktueller Batterieladezustand (SoC)	%	int32be	2	1			value			
          30847	3	Bat.Diag.ActlCapacNom	Aktuelle Batteriekapazität	%	uint32be	2	1			value			
          30849	3	Bat.TmpVal	Batterietemperatur	°C	uint32be	2	0.1			value			
          30865	3	Metering.GridMs.TotWIn	Leistung Bezug	W	int32be	2	1			value			
          30867	3	Metering.GridMs.TotWOut	Leistung Einspeisung	W	int32be	2	1			value			
          30955	3	Bat.OpStt	Betriebsstatus der Batterie		uint32be	2	1			value			
          30957	3	DcMs.Amp_2	DC Strom Eingang (Strang 2)	A	int32be	2	0.001			value			
          30959	3	DcMs.Vol_2	DC Spannung Eingang (Strang 2)	V	int32be	2	0.01			value			
          30961	3	DcMs.Watt_2	DC Leistung Eingang (Strang 2)	W	int32be	2	1		x=(x<0) ? 0:x	value			
          31057	3	BatUsDm.Stt	Status Batterienutzungsbereich		uint32be	2	1			value			
          31379	3	Nameplate.CmpBMS.Typ	Batterietyp		uint32be	2	1			value			
          31391	3	Operation.Bat.Health	Batterie-Zustand		uint32be	2	1			value			
          31393	3	BatChrg.CurBatCha	Momentane Batterieladung	W	uint32be	2	1			value			
          31395	3	BatDsch.CurBatDsch	Momentane Batterieentladung	W	uint32be	2	1			value			
          31397	3	BatChrg.BatChrg	Batterieladung	kWh	uint64be	4	1		x/1000	value			
          31401	3	BatDsch.BatDsch	Batterieentladung	kWh	uint64be	4	1		x/1000	value			
          32385	3	Operation.Inverter.Health	Wechselrichter-Zustand		uint32be	2	1			value			
          33003	3	Operation.RunStt	Betriebsstatus		uint32be	2	1			value			
          

          modbus (holding)

          _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	poll	wp	cw	isScale
          40149	3	Wirkleistungvorgabe		W	int32be	2	1	0		level		false	false	false	false
          40151	3	Kommunikation			uint32be	2	1	0		state		false	false	false	false
          40189	3	max Ladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
          40191	3	max Entladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
          40795	3	Maximale Batterieladeleistung		W	uint32be	2	1	0		level		false	false	false	false
          40799	3	Maximale Batterieentladeleistung		W	uint32be	2	1	0		level		false	false	false	false
          

          Die aktuell in W anliegende PV-Leistung hole ich mir aus dem json des Web Frontends des WR:

          const axios = require('axios');
          const https = require('https');
          
          const cron = '*/5 * * * * *';
          
          const logging = false;
          
          const baseUri = 'https://10.3.0.9/dyn/getDashValues.json';
          
          const instanz = 'javascript.' + instance;
          const pfad = '.Strom.Photovoltaik.';
          const idAktuell = instanz + pfad + 'Leistung_aktuell';
          
          async function GetPvGenCounterFromUi() {
              try {
                  const response = await axios.post(baseUri, null, { httpsAgent: new https.Agent({ rejectUnauthorized: false }) });
          
                  if (response.status === 200) {
                      const resultValueAC = response.data.result["01B8-xxxxxB04"]["6100_0046C200"][9][0].val; // Leistung PV-Erzeugung
                      //const resultValueHome = body.result["01B8-xxxxxB04"]["6100_40263F00"][9][0].val; // Verbrauch Haus
                      //const resultValueAC = body.result["01B8-xxxxxB04"]["6100_00295A00"][9][0].val; // Batterie Entladung (modbus 30955)
          
                      if (typeof resultValueAC !== 'undefined') {
                          setState(idAktuell, resultValueAC, false);
                          if (logging) console.log("PV Erzeugung: " + resultValueAC);
                      }
                  }
              } catch (error) {
                  console.error(error);
              }
          }
          
          GetPvGenCounterFromUi();
          
          schedule(cron, function () {
              GetPvGenCounterFromUi();
          });
          

          Für die Berechnung der Autarkie läuft nochmal ein kleines Blockly:

          8bb60455-f238-4864-98e9-96cea5336aed-image.png

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable id=")A(,1t?QC+HBec3kpaD:">log_info_text</variable>
              <variable id="DEKENKZ_PW$)6(~vyubz">autarkie</variable>
            </variables>
            <block type="procedures_defnoreturn" id=")7Xc23hxhO);1[Qia]$i" x="13" y="13">
              <mutation>
                <arg name="log_info_text" varid=")A(,1t?QC+HBec3kpaD:"></arg>
              </mutation>
              <field name="NAME">log_info</field>
              <comment pinned="false" h="80" w="160">Debuging - Log Ausgabe</comment>
              <statement name="STACK">
                <block type="debug" id="oVE-wj4=kcL/14Zb`=)h">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="P0)38%YEoA-tS1,cn!L^">
                      <field name="TEXT">test</field>
                    </shadow>
                    <block type="text_join" id="d1s)E+PaZ649rHqE^ron">
                      <mutation items="4"></mutation>
                      <value name="ADD0">
                        <block type="text" id="-+FeT?Md^55hYYP{#n)_">
                          <field name="TEXT">+++ </field>
                        </block>
                      </value>
                      <value name="ADD1">
                        <block type="text" id="`6k);`:%idWaiG8bZ[5L">
                          <field name="TEXT">PV Autarkie Berechnung: </field>
                        </block>
                      </value>
                      <value name="ADD2">
                        <block type="variables_get" id="g:!wcT`1iKXT=n_C~Y`/">
                          <field name="VAR" id=")A(,1t?QC+HBec3kpaD:">log_info_text</field>
                        </block>
                      </value>
                      <value name="ADD3">
                        <block type="text" id="m:{Wlwl%u*`sI%N}Df/K">
                          <field name="TEXT"> +++</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </statement>
            </block>
            <block type="comment" id=",A]yxHxP_?W~iT98PE((" x="13" y="213">
              <field name="COMMENT">Autarkie berechnen:</field>
              <next>
                <block type="on_ext" id="wCeOrIdzh@U0M9j/y2]a">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                  <field name="CONDITION">ne</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="6Cp(`|G)vq7f=(_%h)Xm">
                      <field name="oid">default</field>
                    </shadow>
                    <block type="text" id="eH-77(JJc279;TiZeuo6">
                      <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                    </block>
                  </value>
                  <statement name="STATEMENT">
                    <block type="variables_set" id="FX$w~ckWq^Q?9K#:bLq.">
                      <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                      <value name="VALUE">
                        <block type="math_rndfixed" id="acSDN-J?%wFa/wX]6]Lc" inline="false">
                          <field name="n">1</field>
                          <value name="x">
                            <shadow type="math_number" id="[ov#Fk2wE1PanZsg~4,7">
                              <field name="NUM">3.1234</field>
                            </shadow>
                            <block type="math_arithmetic" id="/mpuXh#j;36m}VhMpgQ_">
                              <field name="OP">MINUS</field>
                              <value name="A">
                                <shadow type="math_number" id="2?:VEYWisK^FF;(fWw2(">
                                  <field name="NUM">1</field>
                                </shadow>
                                <block type="math_number" id="C}tO4CKdT]#w#q/~{hVm">
                                  <field name="NUM">100</field>
                                </block>
                              </value>
                              <value name="B">
                                <shadow type="math_number" id="CDzO:J3!PW(JVHi^.-MU">
                                  <field name="NUM">1</field>
                                </shadow>
                                <block type="math_arithmetic" id="nVb5uo.+[unOkjyF}Yl=">
                                  <field name="OP">MULTIPLY</field>
                                  <value name="A">
                                    <shadow type="math_number" id="_sfnL[E7*EW:?nv[`v`M">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="math_arithmetic" id="=($FR)^2~2K+2TFm+Bpg" inline="false">
                                      <field name="OP">DIVIDE</field>
                                      <value name="A">
                                        <shadow type="math_number" id="l5nTX:u]JGAwCx(d+;M|">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="get_value_var" id=")Gs9Q(1m#,.f3AAhP|}v">
                                          <field name="ATTR">val</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="F^ek.$A$%bzw.BKQ0qyz">
                                              <field name="TEXT">alias.0.energie.bezug</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id="rH7+M!;t|RgWZkgm9ds)">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="get_value_var" id="g8?}GY**~]0LL@5b[e+p">
                                          <field name="ATTR">val</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="LwEk=43AG`m=kPFI0!ww">
                                              <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="A.*:)97=N5r,!4:8y]d~">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="math_number" id="WSCwoh*p0EN~I);6YuF[">
                                      <field name="NUM">100</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <next>
                        <block type="controls_if" id="8uw)s:xN5PsY-DDLHh?D">
                          <mutation else="1"></mutation>
                          <value name="IF0">
                            <block type="logic_compare" id="Vw2[df`2hfxZ2~q`_#qI">
                              <field name="OP">LT</field>
                              <value name="A">
                                <block type="variables_get" id="5Yib_osW2eDUAOabo[/%">
                                  <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="^sz`W;3wksx![Gr]7DUw">
                                  <field name="NUM">0</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="procedures_callnoreturn" id="]^iRY4ug[B#}0H%TY/?)" inline="true" disabled="true">
                              <mutation name="log_info">
                                <arg name="log_info_text"></arg>
                              </mutation>
                              <value name="ARG0">
                                <block type="text_join" id="*w_zR^6}O,0nhzdBe!Mp">
                                  <mutation items="2"></mutation>
                                  <value name="ADD0">
                                    <block type="text" id="bc9W1A7uOx2({;=X~u{6">
                                      <field name="TEXT">alias.0.energie.bezug: </field>
                                    </block>
                                  </value>
                                  <value name="ADD1">
                                    <block type="get_value_var" id="#@oXFv3,}WPEmPxLAjT|">
                                      <field name="ATTR">val</field>
                                      <value name="OID">
                                        <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                          <field name="oid">Object ID</field>
                                        </shadow>
                                        <block type="text" id="FiRE3$h8/+d6GH9CmQ[y">
                                          <field name="TEXT">alias.0.energie.bezug</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <next>
                                <block type="procedures_callnoreturn" id="7v5:+5-Lu;ZV^oT)(XM~" inline="true" disabled="true">
                                  <mutation name="log_info">
                                    <arg name="log_info_text"></arg>
                                  </mutation>
                                  <value name="ARG0">
                                    <block type="text_join" id="o3Gl~c$IXq8V%Qs4d_?`">
                                      <mutation items="2"></mutation>
                                      <value name="ADD0">
                                        <block type="text" id="K2H[B#r):z}@yd8J[.W*">
                                          <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                        </block>
                                      </value>
                                      <value name="ADD1">
                                        <block type="get_value_var" id="[|}?GpnK0`Ou5xZ2E{IT">
                                          <field name="ATTR">val</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="uy.x]1O?6L3Q:nCi{y04">
                                              <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="procedures_callnoreturn" id="$tgFSk=g]{CHUw:H9?D@" inline="true" disabled="true">
                                      <mutation name="log_info">
                                        <arg name="log_info_text"></arg>
                                      </mutation>
                                      <value name="ARG0">
                                        <block type="text_join" id="HXbnivB+oy%z_f/u^VzD" inline="true">
                                          <mutation items="3"></mutation>
                                          <value name="ADD0">
                                            <block type="text" id="/I7iyT73pWM.V_5J13R!">
                                              <field name="TEXT">Autarkie bei </field>
                                            </block>
                                          </value>
                                          <value name="ADD1">
                                            <block type="math_number" id="g!}an}KeY/K$[;@z{/V0">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                          <value name="ADD2">
                                            <block type="text" id="(8bT:?r+~)f?zJ[`TKWs">
                                              <field name="TEXT">%</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="control_ex" id="19@x/as5:4$ODwL)9?F," inline="true">
                                          <field name="TYPE">true</field>
                                          <field name="CLEAR_RUNNING">FALSE</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="z94,:IKfaAi+hulG`Wu!">
                                              <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                            </block>
                                          </value>
                                          <value name="VALUE">
                                            <shadow type="logic_boolean" id="vx:y7b!E_MT.siXV[oRj">
                                              <field name="BOOL">TRUE</field>
                                            </shadow>
                                            <block type="variables_get" id="r7gF$%(~d;Z,;xcXNRXU">
                                              <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                            </block>
                                          </value>
                                          <value name="DELAY_MS">
                                            <shadow type="math_number" id="P`hD;_!mGBuCv%a1F[UO">
                                              <field name="NUM">0</field>
                                            </shadow>
                                            <block type="math_number" id="ltA(/T7~+eE:_1JrBxS[">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <statement name="ELSE">
                            <block type="procedures_callnoreturn" id="8$xzBS!8VDTx`~xVS1S*" inline="true" disabled="true">
                              <mutation name="log_info">
                                <arg name="log_info_text"></arg>
                              </mutation>
                              <value name="ARG0">
                                <block type="text_join" id="YTVLdrG;xbH?//lE1M^A">
                                  <mutation items="2"></mutation>
                                  <value name="ADD0">
                                    <block type="text" id="rb^affafd0nCm^mEpHTx">
                                      <field name="TEXT">alias.0.energie.bezug: </field>
                                    </block>
                                  </value>
                                  <value name="ADD1">
                                    <block type="get_value_var" id=".:TRJAQL%?]o/SDG;KA!">
                                      <field name="ATTR">val</field>
                                      <value name="OID">
                                        <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                          <field name="oid">Object ID</field>
                                        </shadow>
                                        <block type="text" id="31/N!vZ`pn,:i(NQB2II">
                                          <field name="TEXT">alias.0.energie.bezug</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <next>
                                <block type="procedures_callnoreturn" id="nY_UN+k7ME[BKJ/#n*@3" inline="true" disabled="true">
                                  <mutation name="log_info">
                                    <arg name="log_info_text"></arg>
                                  </mutation>
                                  <value name="ARG0">
                                    <block type="text_join" id="t;azLtHymv)6`5)u`P0@">
                                      <mutation items="2"></mutation>
                                      <value name="ADD0">
                                        <block type="text" id="+yhxR|J;S$N/ws$O+OnW">
                                          <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                        </block>
                                      </value>
                                      <value name="ADD1">
                                        <block type="get_value_var" id="1v1U{lw_*KY,SV3]e1sX">
                                          <field name="ATTR">val</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="rC`x_$(?xAw-M@t($4#a">
                                              <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="procedures_callnoreturn" id="|:DU]J}68P]M/WlDsT=l" inline="true" disabled="true">
                                      <mutation name="log_info">
                                        <arg name="log_info_text"></arg>
                                      </mutation>
                                      <value name="ARG0">
                                        <block type="text_join" id="X0KgmzdH*!3;~yZtX%G*" inline="true">
                                          <mutation items="3"></mutation>
                                          <value name="ADD0">
                                            <block type="text" id="A`mHqub}aB2AIh*eT_Gi">
                                              <field name="TEXT">Autarkie bei </field>
                                            </block>
                                          </value>
                                          <value name="ADD1">
                                            <block type="variables_get" id="3J-#|+JL.i{cOv)53qc7">
                                              <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                            </block>
                                          </value>
                                          <value name="ADD2">
                                            <block type="text" id="Tg(9;|4+wRq2Iq77MA_N">
                                              <field name="TEXT">%</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="control_ex" id="nalaDY-3bdB2MT6-3B:D" inline="true">
                                          <field name="TYPE">true</field>
                                          <field name="CLEAR_RUNNING">FALSE</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="A=((@JQG%#*bGh2R7%_q">
                                              <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                            </block>
                                          </value>
                                          <value name="VALUE">
                                            <shadow type="logic_boolean" id="=#$OMy,|`/Pw:p^a:9o$">
                                              <field name="BOOL">TRUE</field>
                                            </shadow>
                                            <block type="variables_get" id="~6?u-r71zjp+BV$4Gafs">
                                              <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                            </block>
                                          </value>
                                          <value name="DELAY_MS">
                                            <shadow type="math_number" id="SUeyREm+cm.l4.ZS|_:J">
                                              <field name="NUM">0</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </xml>
          

          arteckA Offline
          arteckA Offline
          arteck
          Developer Most Active
          schrieb am zuletzt editiert von arteck
          #4

          @darkiop
          bei holding

          40189 3 max Ladeleistung BatWR
          40191 3 max Entladeleistung BatWR
          40795 3 Maximale Batterieladeleistung
          40799 3 Maximale Batterieentladeleistung

          kannst du dir die Parameter sparen.. haben ehh keine wirkung

          ich hätte da noch prognosebasiertes Laden und tibber Steuerung
          https://github.com/arteck/SMA_forecast_charging/tree/master/SUNNY_TRIPOWER _10.0_SE

          @TripleX geht das auch geneuer mit dem Wechselrichter von SMA

          zigbee hab ich, zwave auch, nuc's genauso und HA auch

          D 1 Antwort Letzte Antwort
          0
          • D darkiop

            Und vor allem sollte bei so einer Frage auch etwas mehr an Details enthalten sein - welchen SMA-WR du im Einsatz hast z.B. ;)

            Für den SUNNY TRIPOWER 10.0 SE verwende ich aktuell folgendes:

            modbus (input)

            _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	cw	isScale
            30203	3	Operation.HealthStt.Ok	Nennleistung im Zustand Ok	W	uint32be	2	1			value			
            30513	3	Metering.TotWhOut Wh	Gesamtertrag in kWh	kWh	uint64be	4	1		x/1000	value			
            30535	3	Metering.DyWhOut	Tagesertrag	kWh	uint32be	2	1		x/1000	value			
            30581	3	Metering.GridMs.TotWhIn	Zählerstand Bezugszähler	kWh	uint32be	2	1		x/1000	value			
            30583	3	Metering.GridMs.TotWhOut	Zählerstand Einspeisezähler	kWh	uint32be	2	1		x/1000	value			
            30769	3	DcMs.Amp_1	DC Strom Eingang (Strang 1)	A	int32be	2	0.001			value			
            30771	3	DcMs.Vol_1	DC Spannung Eingang (Strang 1)	V	int32be	2	0.01			value			
            30773	3	DcMs.Watt_1	DC Leistung Eingang (Strang 1)	W	int32be	2	1		x=(x<0) ? 0:x	value			
            30775	3	GridMs.TotW	Leistung (Eigenverbrauch)	W	int32be	2	1			value			
            30845	3	Bat.ChaStt	Aktueller Batterieladezustand (SoC)	%	int32be	2	1			value			
            30847	3	Bat.Diag.ActlCapacNom	Aktuelle Batteriekapazität	%	uint32be	2	1			value			
            30849	3	Bat.TmpVal	Batterietemperatur	°C	uint32be	2	0.1			value			
            30865	3	Metering.GridMs.TotWIn	Leistung Bezug	W	int32be	2	1			value			
            30867	3	Metering.GridMs.TotWOut	Leistung Einspeisung	W	int32be	2	1			value			
            30955	3	Bat.OpStt	Betriebsstatus der Batterie		uint32be	2	1			value			
            30957	3	DcMs.Amp_2	DC Strom Eingang (Strang 2)	A	int32be	2	0.001			value			
            30959	3	DcMs.Vol_2	DC Spannung Eingang (Strang 2)	V	int32be	2	0.01			value			
            30961	3	DcMs.Watt_2	DC Leistung Eingang (Strang 2)	W	int32be	2	1		x=(x<0) ? 0:x	value			
            31057	3	BatUsDm.Stt	Status Batterienutzungsbereich		uint32be	2	1			value			
            31379	3	Nameplate.CmpBMS.Typ	Batterietyp		uint32be	2	1			value			
            31391	3	Operation.Bat.Health	Batterie-Zustand		uint32be	2	1			value			
            31393	3	BatChrg.CurBatCha	Momentane Batterieladung	W	uint32be	2	1			value			
            31395	3	BatDsch.CurBatDsch	Momentane Batterieentladung	W	uint32be	2	1			value			
            31397	3	BatChrg.BatChrg	Batterieladung	kWh	uint64be	4	1		x/1000	value			
            31401	3	BatDsch.BatDsch	Batterieentladung	kWh	uint64be	4	1		x/1000	value			
            32385	3	Operation.Inverter.Health	Wechselrichter-Zustand		uint32be	2	1			value			
            33003	3	Operation.RunStt	Betriebsstatus		uint32be	2	1			value			
            

            modbus (holding)

            _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	poll	wp	cw	isScale
            40149	3	Wirkleistungvorgabe		W	int32be	2	1	0		level		false	false	false	false
            40151	3	Kommunikation			uint32be	2	1	0		state		false	false	false	false
            40189	3	max Ladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
            40191	3	max Entladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
            40795	3	Maximale Batterieladeleistung		W	uint32be	2	1	0		level		false	false	false	false
            40799	3	Maximale Batterieentladeleistung		W	uint32be	2	1	0		level		false	false	false	false
            

            Die aktuell in W anliegende PV-Leistung hole ich mir aus dem json des Web Frontends des WR:

            const axios = require('axios');
            const https = require('https');
            
            const cron = '*/5 * * * * *';
            
            const logging = false;
            
            const baseUri = 'https://10.3.0.9/dyn/getDashValues.json';
            
            const instanz = 'javascript.' + instance;
            const pfad = '.Strom.Photovoltaik.';
            const idAktuell = instanz + pfad + 'Leistung_aktuell';
            
            async function GetPvGenCounterFromUi() {
                try {
                    const response = await axios.post(baseUri, null, { httpsAgent: new https.Agent({ rejectUnauthorized: false }) });
            
                    if (response.status === 200) {
                        const resultValueAC = response.data.result["01B8-xxxxxB04"]["6100_0046C200"][9][0].val; // Leistung PV-Erzeugung
                        //const resultValueHome = body.result["01B8-xxxxxB04"]["6100_40263F00"][9][0].val; // Verbrauch Haus
                        //const resultValueAC = body.result["01B8-xxxxxB04"]["6100_00295A00"][9][0].val; // Batterie Entladung (modbus 30955)
            
                        if (typeof resultValueAC !== 'undefined') {
                            setState(idAktuell, resultValueAC, false);
                            if (logging) console.log("PV Erzeugung: " + resultValueAC);
                        }
                    }
                } catch (error) {
                    console.error(error);
                }
            }
            
            GetPvGenCounterFromUi();
            
            schedule(cron, function () {
                GetPvGenCounterFromUi();
            });
            

            Für die Berechnung der Autarkie läuft nochmal ein kleines Blockly:

            8bb60455-f238-4864-98e9-96cea5336aed-image.png

            <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
                <variable id=")A(,1t?QC+HBec3kpaD:">log_info_text</variable>
                <variable id="DEKENKZ_PW$)6(~vyubz">autarkie</variable>
              </variables>
              <block type="procedures_defnoreturn" id=")7Xc23hxhO);1[Qia]$i" x="13" y="13">
                <mutation>
                  <arg name="log_info_text" varid=")A(,1t?QC+HBec3kpaD:"></arg>
                </mutation>
                <field name="NAME">log_info</field>
                <comment pinned="false" h="80" w="160">Debuging - Log Ausgabe</comment>
                <statement name="STACK">
                  <block type="debug" id="oVE-wj4=kcL/14Zb`=)h">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="P0)38%YEoA-tS1,cn!L^">
                        <field name="TEXT">test</field>
                      </shadow>
                      <block type="text_join" id="d1s)E+PaZ649rHqE^ron">
                        <mutation items="4"></mutation>
                        <value name="ADD0">
                          <block type="text" id="-+FeT?Md^55hYYP{#n)_">
                            <field name="TEXT">+++ </field>
                          </block>
                        </value>
                        <value name="ADD1">
                          <block type="text" id="`6k);`:%idWaiG8bZ[5L">
                            <field name="TEXT">PV Autarkie Berechnung: </field>
                          </block>
                        </value>
                        <value name="ADD2">
                          <block type="variables_get" id="g:!wcT`1iKXT=n_C~Y`/">
                            <field name="VAR" id=")A(,1t?QC+HBec3kpaD:">log_info_text</field>
                          </block>
                        </value>
                        <value name="ADD3">
                          <block type="text" id="m:{Wlwl%u*`sI%N}Df/K">
                            <field name="TEXT"> +++</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </statement>
              </block>
              <block type="comment" id=",A]yxHxP_?W~iT98PE((" x="13" y="213">
                <field name="COMMENT">Autarkie berechnen:</field>
                <next>
                  <block type="on_ext" id="wCeOrIdzh@U0M9j/y2]a">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                    <field name="CONDITION">ne</field>
                    <field name="ACK_CONDITION"></field>
                    <value name="OID0">
                      <shadow type="field_oid" id="6Cp(`|G)vq7f=(_%h)Xm">
                        <field name="oid">default</field>
                      </shadow>
                      <block type="text" id="eH-77(JJc279;TiZeuo6">
                        <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                      </block>
                    </value>
                    <statement name="STATEMENT">
                      <block type="variables_set" id="FX$w~ckWq^Q?9K#:bLq.">
                        <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                        <value name="VALUE">
                          <block type="math_rndfixed" id="acSDN-J?%wFa/wX]6]Lc" inline="false">
                            <field name="n">1</field>
                            <value name="x">
                              <shadow type="math_number" id="[ov#Fk2wE1PanZsg~4,7">
                                <field name="NUM">3.1234</field>
                              </shadow>
                              <block type="math_arithmetic" id="/mpuXh#j;36m}VhMpgQ_">
                                <field name="OP">MINUS</field>
                                <value name="A">
                                  <shadow type="math_number" id="2?:VEYWisK^FF;(fWw2(">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_number" id="C}tO4CKdT]#w#q/~{hVm">
                                    <field name="NUM">100</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="CDzO:J3!PW(JVHi^.-MU">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="nVb5uo.+[unOkjyF}Yl=">
                                    <field name="OP">MULTIPLY</field>
                                    <value name="A">
                                      <shadow type="math_number" id="_sfnL[E7*EW:?nv[`v`M">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="math_arithmetic" id="=($FR)^2~2K+2TFm+Bpg" inline="false">
                                        <field name="OP">DIVIDE</field>
                                        <value name="A">
                                          <shadow type="math_number" id="l5nTX:u]JGAwCx(d+;M|">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="get_value_var" id=")Gs9Q(1m#,.f3AAhP|}v">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="F^ek.$A$%bzw.BKQ0qyz">
                                                <field name="TEXT">alias.0.energie.bezug</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="rH7+M!;t|RgWZkgm9ds)">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="get_value_var" id="g8?}GY**~]0LL@5b[e+p">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="LwEk=43AG`m=kPFI0!ww">
                                                <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="A.*:)97=N5r,!4:8y]d~">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="math_number" id="WSCwoh*p0EN~I);6YuF[">
                                        <field name="NUM">100</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="controls_if" id="8uw)s:xN5PsY-DDLHh?D">
                            <mutation else="1"></mutation>
                            <value name="IF0">
                              <block type="logic_compare" id="Vw2[df`2hfxZ2~q`_#qI">
                                <field name="OP">LT</field>
                                <value name="A">
                                  <block type="variables_get" id="5Yib_osW2eDUAOabo[/%">
                                    <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="^sz`W;3wksx![Gr]7DUw">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="procedures_callnoreturn" id="]^iRY4ug[B#}0H%TY/?)" inline="true" disabled="true">
                                <mutation name="log_info">
                                  <arg name="log_info_text"></arg>
                                </mutation>
                                <value name="ARG0">
                                  <block type="text_join" id="*w_zR^6}O,0nhzdBe!Mp">
                                    <mutation items="2"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id="bc9W1A7uOx2({;=X~u{6">
                                        <field name="TEXT">alias.0.energie.bezug: </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="get_value_var" id="#@oXFv3,}WPEmPxLAjT|">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="FiRE3$h8/+d6GH9CmQ[y">
                                            <field name="TEXT">alias.0.energie.bezug</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="7v5:+5-Lu;ZV^oT)(XM~" inline="true" disabled="true">
                                    <mutation name="log_info">
                                      <arg name="log_info_text"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="text_join" id="o3Gl~c$IXq8V%Qs4d_?`">
                                        <mutation items="2"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="K2H[B#r):z}@yd8J[.W*">
                                            <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="get_value_var" id="[|}?GpnK0`Ou5xZ2E{IT">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="uy.x]1O?6L3Q:nCi{y04">
                                                <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="procedures_callnoreturn" id="$tgFSk=g]{CHUw:H9?D@" inline="true" disabled="true">
                                        <mutation name="log_info">
                                          <arg name="log_info_text"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                          <block type="text_join" id="HXbnivB+oy%z_f/u^VzD" inline="true">
                                            <mutation items="3"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="/I7iyT73pWM.V_5J13R!">
                                                <field name="TEXT">Autarkie bei </field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="math_number" id="g!}an}KeY/K$[;@z{/V0">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="text" id="(8bT:?r+~)f?zJ[`TKWs">
                                                <field name="TEXT">%</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control_ex" id="19@x/as5:4$ODwL)9?F," inline="true">
                                            <field name="TYPE">true</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="z94,:IKfaAi+hulG`Wu!">
                                                <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                              </block>
                                            </value>
                                            <value name="VALUE">
                                              <shadow type="logic_boolean" id="vx:y7b!E_MT.siXV[oRj">
                                                <field name="BOOL">TRUE</field>
                                              </shadow>
                                              <block type="variables_get" id="r7gF$%(~d;Z,;xcXNRXU">
                                                <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                              </block>
                                            </value>
                                            <value name="DELAY_MS">
                                              <shadow type="math_number" id="P`hD;_!mGBuCv%a1F[UO">
                                                <field name="NUM">0</field>
                                              </shadow>
                                              <block type="math_number" id="ltA(/T7~+eE:_1JrBxS[">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <statement name="ELSE">
                              <block type="procedures_callnoreturn" id="8$xzBS!8VDTx`~xVS1S*" inline="true" disabled="true">
                                <mutation name="log_info">
                                  <arg name="log_info_text"></arg>
                                </mutation>
                                <value name="ARG0">
                                  <block type="text_join" id="YTVLdrG;xbH?//lE1M^A">
                                    <mutation items="2"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id="rb^affafd0nCm^mEpHTx">
                                        <field name="TEXT">alias.0.energie.bezug: </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="get_value_var" id=".:TRJAQL%?]o/SDG;KA!">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="31/N!vZ`pn,:i(NQB2II">
                                            <field name="TEXT">alias.0.energie.bezug</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="nY_UN+k7ME[BKJ/#n*@3" inline="true" disabled="true">
                                    <mutation name="log_info">
                                      <arg name="log_info_text"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="text_join" id="t;azLtHymv)6`5)u`P0@">
                                        <mutation items="2"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="+yhxR|J;S$N/ws$O+OnW">
                                            <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="get_value_var" id="1v1U{lw_*KY,SV3]e1sX">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="rC`x_$(?xAw-M@t($4#a">
                                                <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="procedures_callnoreturn" id="|:DU]J}68P]M/WlDsT=l" inline="true" disabled="true">
                                        <mutation name="log_info">
                                          <arg name="log_info_text"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                          <block type="text_join" id="X0KgmzdH*!3;~yZtX%G*" inline="true">
                                            <mutation items="3"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="A`mHqub}aB2AIh*eT_Gi">
                                                <field name="TEXT">Autarkie bei </field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="variables_get" id="3J-#|+JL.i{cOv)53qc7">
                                                <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="text" id="Tg(9;|4+wRq2Iq77MA_N">
                                                <field name="TEXT">%</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control_ex" id="nalaDY-3bdB2MT6-3B:D" inline="true">
                                            <field name="TYPE">true</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="A=((@JQG%#*bGh2R7%_q">
                                                <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                              </block>
                                            </value>
                                            <value name="VALUE">
                                              <shadow type="logic_boolean" id="=#$OMy,|`/Pw:p^a:9o$">
                                                <field name="BOOL">TRUE</field>
                                              </shadow>
                                              <block type="variables_get" id="~6?u-r71zjp+BV$4Gafs">
                                                <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                              </block>
                                            </value>
                                            <value name="DELAY_MS">
                                              <shadow type="math_number" id="SUeyREm+cm.l4.ZS|_:J">
                                                <field name="NUM">0</field>
                                              </shadow>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </xml>
            

            T Offline
            T Offline
            TripleX
            schrieb am zuletzt editiert von
            #5

            @darkiop said in SMA Wechselrichter in ioBroker einbinden:

            Und vor allem sollte bei so einer Frage auch etwas mehr an Details enthalten sein - welchen SMA-WR du im Einsatz hast z.B. ;)

            Für den SUNNY TRIPOWER 10.0 SE verwende ich aktuell folgendes:

            modbus (input)

            _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	cw	isScale
            30203	3	Operation.HealthStt.Ok	Nennleistung im Zustand Ok	W	uint32be	2	1			value			
            30513	3	Metering.TotWhOut Wh	Gesamtertrag in kWh	kWh	uint64be	4	1		x/1000	value			
            30535	3	Metering.DyWhOut	Tagesertrag	kWh	uint32be	2	1		x/1000	value			
            30581	3	Metering.GridMs.TotWhIn	Zählerstand Bezugszähler	kWh	uint32be	2	1		x/1000	value			
            30583	3	Metering.GridMs.TotWhOut	Zählerstand Einspeisezähler	kWh	uint32be	2	1		x/1000	value			
            30769	3	DcMs.Amp_1	DC Strom Eingang (Strang 1)	A	int32be	2	0.001			value			
            30771	3	DcMs.Vol_1	DC Spannung Eingang (Strang 1)	V	int32be	2	0.01			value			
            30773	3	DcMs.Watt_1	DC Leistung Eingang (Strang 1)	W	int32be	2	1		x=(x<0) ? 0:x	value			
            30775	3	GridMs.TotW	Leistung (Eigenverbrauch)	W	int32be	2	1			value			
            30845	3	Bat.ChaStt	Aktueller Batterieladezustand (SoC)	%	int32be	2	1			value			
            30847	3	Bat.Diag.ActlCapacNom	Aktuelle Batteriekapazität	%	uint32be	2	1			value			
            30849	3	Bat.TmpVal	Batterietemperatur	°C	uint32be	2	0.1			value			
            30865	3	Metering.GridMs.TotWIn	Leistung Bezug	W	int32be	2	1			value			
            30867	3	Metering.GridMs.TotWOut	Leistung Einspeisung	W	int32be	2	1			value			
            30955	3	Bat.OpStt	Betriebsstatus der Batterie		uint32be	2	1			value			
            30957	3	DcMs.Amp_2	DC Strom Eingang (Strang 2)	A	int32be	2	0.001			value			
            30959	3	DcMs.Vol_2	DC Spannung Eingang (Strang 2)	V	int32be	2	0.01			value			
            30961	3	DcMs.Watt_2	DC Leistung Eingang (Strang 2)	W	int32be	2	1		x=(x<0) ? 0:x	value			
            31057	3	BatUsDm.Stt	Status Batterienutzungsbereich		uint32be	2	1			value			
            31379	3	Nameplate.CmpBMS.Typ	Batterietyp		uint32be	2	1			value			
            31391	3	Operation.Bat.Health	Batterie-Zustand		uint32be	2	1			value			
            31393	3	BatChrg.CurBatCha	Momentane Batterieladung	W	uint32be	2	1			value			
            31395	3	BatDsch.CurBatDsch	Momentane Batterieentladung	W	uint32be	2	1			value			
            31397	3	BatChrg.BatChrg	Batterieladung	kWh	uint64be	4	1		x/1000	value			
            31401	3	BatDsch.BatDsch	Batterieentladung	kWh	uint64be	4	1		x/1000	value			
            32385	3	Operation.Inverter.Health	Wechselrichter-Zustand		uint32be	2	1			value			
            33003	3	Operation.RunStt	Betriebsstatus		uint32be	2	1			value			
            

            modbus (holding)

            _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	poll	wp	cw	isScale
            40149	3	Wirkleistungvorgabe		W	int32be	2	1	0		level		false	false	false	false
            40151	3	Kommunikation			uint32be	2	1	0		state		false	false	false	false
            40189	3	max Ladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
            40191	3	max Entladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
            40795	3	Maximale Batterieladeleistung		W	uint32be	2	1	0		level		false	false	false	false
            40799	3	Maximale Batterieentladeleistung		W	uint32be	2	1	0		level		false	false	false	false
            

            Die aktuell in W anliegende PV-Leistung hole ich mir aus dem json des Web Frontends des WR:

            const axios = require('axios');
            const https = require('https');
            
            const cron = '*/5 * * * * *';
            
            const logging = false;
            
            const baseUri = 'https://10.3.0.9/dyn/getDashValues.json';
            
            const instanz = 'javascript.' + instance;
            const pfad = '.Strom.Photovoltaik.';
            const idAktuell = instanz + pfad + 'Leistung_aktuell';
            
            async function GetPvGenCounterFromUi() {
                try {
                    const response = await axios.post(baseUri, null, { httpsAgent: new https.Agent({ rejectUnauthorized: false }) });
            
                    if (response.status === 200) {
                        const resultValueAC = response.data.result["01B8-xxxxxB04"]["6100_0046C200"][9][0].val; // Leistung PV-Erzeugung
                        //const resultValueHome = body.result["01B8-xxxxxB04"]["6100_40263F00"][9][0].val; // Verbrauch Haus
                        //const resultValueAC = body.result["01B8-xxxxxB04"]["6100_00295A00"][9][0].val; // Batterie Entladung (modbus 30955)
            
                        if (typeof resultValueAC !== 'undefined') {
                            setState(idAktuell, resultValueAC, false);
                            if (logging) console.log("PV Erzeugung: " + resultValueAC);
                        }
                    }
                } catch (error) {
                    console.error(error);
                }
            }
            
            GetPvGenCounterFromUi();
            
            schedule(cron, function () {
                GetPvGenCounterFromUi();
            });
            

            Für die Berechnung der Autarkie läuft nochmal ein kleines Blockly:

            8bb60455-f238-4864-98e9-96cea5336aed-image.png

            <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
                <variable id=")A(,1t?QC+HBec3kpaD:">log_info_text</variable>
                <variable id="DEKENKZ_PW$)6(~vyubz">autarkie</variable>
              </variables>
              <block type="procedures_defnoreturn" id=")7Xc23hxhO);1[Qia]$i" x="13" y="13">
                <mutation>
                  <arg name="log_info_text" varid=")A(,1t?QC+HBec3kpaD:"></arg>
                </mutation>
                <field name="NAME">log_info</field>
                <comment pinned="false" h="80" w="160">Debuging - Log Ausgabe</comment>
                <statement name="STACK">
                  <block type="debug" id="oVE-wj4=kcL/14Zb`=)h">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="P0)38%YEoA-tS1,cn!L^">
                        <field name="TEXT">test</field>
                      </shadow>
                      <block type="text_join" id="d1s)E+PaZ649rHqE^ron">
                        <mutation items="4"></mutation>
                        <value name="ADD0">
                          <block type="text" id="-+FeT?Md^55hYYP{#n)_">
                            <field name="TEXT">+++ </field>
                          </block>
                        </value>
                        <value name="ADD1">
                          <block type="text" id="`6k);`:%idWaiG8bZ[5L">
                            <field name="TEXT">PV Autarkie Berechnung: </field>
                          </block>
                        </value>
                        <value name="ADD2">
                          <block type="variables_get" id="g:!wcT`1iKXT=n_C~Y`/">
                            <field name="VAR" id=")A(,1t?QC+HBec3kpaD:">log_info_text</field>
                          </block>
                        </value>
                        <value name="ADD3">
                          <block type="text" id="m:{Wlwl%u*`sI%N}Df/K">
                            <field name="TEXT"> +++</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </statement>
              </block>
              <block type="comment" id=",A]yxHxP_?W~iT98PE((" x="13" y="213">
                <field name="COMMENT">Autarkie berechnen:</field>
                <next>
                  <block type="on_ext" id="wCeOrIdzh@U0M9j/y2]a">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                    <field name="CONDITION">ne</field>
                    <field name="ACK_CONDITION"></field>
                    <value name="OID0">
                      <shadow type="field_oid" id="6Cp(`|G)vq7f=(_%h)Xm">
                        <field name="oid">default</field>
                      </shadow>
                      <block type="text" id="eH-77(JJc279;TiZeuo6">
                        <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                      </block>
                    </value>
                    <statement name="STATEMENT">
                      <block type="variables_set" id="FX$w~ckWq^Q?9K#:bLq.">
                        <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                        <value name="VALUE">
                          <block type="math_rndfixed" id="acSDN-J?%wFa/wX]6]Lc" inline="false">
                            <field name="n">1</field>
                            <value name="x">
                              <shadow type="math_number" id="[ov#Fk2wE1PanZsg~4,7">
                                <field name="NUM">3.1234</field>
                              </shadow>
                              <block type="math_arithmetic" id="/mpuXh#j;36m}VhMpgQ_">
                                <field name="OP">MINUS</field>
                                <value name="A">
                                  <shadow type="math_number" id="2?:VEYWisK^FF;(fWw2(">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_number" id="C}tO4CKdT]#w#q/~{hVm">
                                    <field name="NUM">100</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="CDzO:J3!PW(JVHi^.-MU">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="nVb5uo.+[unOkjyF}Yl=">
                                    <field name="OP">MULTIPLY</field>
                                    <value name="A">
                                      <shadow type="math_number" id="_sfnL[E7*EW:?nv[`v`M">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="math_arithmetic" id="=($FR)^2~2K+2TFm+Bpg" inline="false">
                                        <field name="OP">DIVIDE</field>
                                        <value name="A">
                                          <shadow type="math_number" id="l5nTX:u]JGAwCx(d+;M|">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="get_value_var" id=")Gs9Q(1m#,.f3AAhP|}v">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="F^ek.$A$%bzw.BKQ0qyz">
                                                <field name="TEXT">alias.0.energie.bezug</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="rH7+M!;t|RgWZkgm9ds)">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="get_value_var" id="g8?}GY**~]0LL@5b[e+p">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="LwEk=43AG`m=kPFI0!ww">
                                                <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="A.*:)97=N5r,!4:8y]d~">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="math_number" id="WSCwoh*p0EN~I);6YuF[">
                                        <field name="NUM">100</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="controls_if" id="8uw)s:xN5PsY-DDLHh?D">
                            <mutation else="1"></mutation>
                            <value name="IF0">
                              <block type="logic_compare" id="Vw2[df`2hfxZ2~q`_#qI">
                                <field name="OP">LT</field>
                                <value name="A">
                                  <block type="variables_get" id="5Yib_osW2eDUAOabo[/%">
                                    <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="^sz`W;3wksx![Gr]7DUw">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="procedures_callnoreturn" id="]^iRY4ug[B#}0H%TY/?)" inline="true" disabled="true">
                                <mutation name="log_info">
                                  <arg name="log_info_text"></arg>
                                </mutation>
                                <value name="ARG0">
                                  <block type="text_join" id="*w_zR^6}O,0nhzdBe!Mp">
                                    <mutation items="2"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id="bc9W1A7uOx2({;=X~u{6">
                                        <field name="TEXT">alias.0.energie.bezug: </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="get_value_var" id="#@oXFv3,}WPEmPxLAjT|">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="FiRE3$h8/+d6GH9CmQ[y">
                                            <field name="TEXT">alias.0.energie.bezug</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="7v5:+5-Lu;ZV^oT)(XM~" inline="true" disabled="true">
                                    <mutation name="log_info">
                                      <arg name="log_info_text"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="text_join" id="o3Gl~c$IXq8V%Qs4d_?`">
                                        <mutation items="2"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="K2H[B#r):z}@yd8J[.W*">
                                            <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="get_value_var" id="[|}?GpnK0`Ou5xZ2E{IT">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="uy.x]1O?6L3Q:nCi{y04">
                                                <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="procedures_callnoreturn" id="$tgFSk=g]{CHUw:H9?D@" inline="true" disabled="true">
                                        <mutation name="log_info">
                                          <arg name="log_info_text"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                          <block type="text_join" id="HXbnivB+oy%z_f/u^VzD" inline="true">
                                            <mutation items="3"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="/I7iyT73pWM.V_5J13R!">
                                                <field name="TEXT">Autarkie bei </field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="math_number" id="g!}an}KeY/K$[;@z{/V0">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="text" id="(8bT:?r+~)f?zJ[`TKWs">
                                                <field name="TEXT">%</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control_ex" id="19@x/as5:4$ODwL)9?F," inline="true">
                                            <field name="TYPE">true</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="z94,:IKfaAi+hulG`Wu!">
                                                <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                              </block>
                                            </value>
                                            <value name="VALUE">
                                              <shadow type="logic_boolean" id="vx:y7b!E_MT.siXV[oRj">
                                                <field name="BOOL">TRUE</field>
                                              </shadow>
                                              <block type="variables_get" id="r7gF$%(~d;Z,;xcXNRXU">
                                                <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                              </block>
                                            </value>
                                            <value name="DELAY_MS">
                                              <shadow type="math_number" id="P`hD;_!mGBuCv%a1F[UO">
                                                <field name="NUM">0</field>
                                              </shadow>
                                              <block type="math_number" id="ltA(/T7~+eE:_1JrBxS[">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <statement name="ELSE">
                              <block type="procedures_callnoreturn" id="8$xzBS!8VDTx`~xVS1S*" inline="true" disabled="true">
                                <mutation name="log_info">
                                  <arg name="log_info_text"></arg>
                                </mutation>
                                <value name="ARG0">
                                  <block type="text_join" id="YTVLdrG;xbH?//lE1M^A">
                                    <mutation items="2"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id="rb^affafd0nCm^mEpHTx">
                                        <field name="TEXT">alias.0.energie.bezug: </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="get_value_var" id=".:TRJAQL%?]o/SDG;KA!">
                                        <field name="ATTR">val</field>
                                        <value name="OID">
                                          <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                            <field name="oid">Object ID</field>
                                          </shadow>
                                          <block type="text" id="31/N!vZ`pn,:i(NQB2II">
                                            <field name="TEXT">alias.0.energie.bezug</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="procedures_callnoreturn" id="nY_UN+k7ME[BKJ/#n*@3" inline="true" disabled="true">
                                    <mutation name="log_info">
                                      <arg name="log_info_text"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="text_join" id="t;azLtHymv)6`5)u`P0@">
                                        <mutation items="2"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="+yhxR|J;S$N/ws$O+OnW">
                                            <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="get_value_var" id="1v1U{lw_*KY,SV3]e1sX">
                                            <field name="ATTR">val</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="rC`x_$(?xAw-M@t($4#a">
                                                <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="procedures_callnoreturn" id="|:DU]J}68P]M/WlDsT=l" inline="true" disabled="true">
                                        <mutation name="log_info">
                                          <arg name="log_info_text"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                          <block type="text_join" id="X0KgmzdH*!3;~yZtX%G*" inline="true">
                                            <mutation items="3"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="A`mHqub}aB2AIh*eT_Gi">
                                                <field name="TEXT">Autarkie bei </field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="variables_get" id="3J-#|+JL.i{cOv)53qc7">
                                                <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="text" id="Tg(9;|4+wRq2Iq77MA_N">
                                                <field name="TEXT">%</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control_ex" id="nalaDY-3bdB2MT6-3B:D" inline="true">
                                            <field name="TYPE">true</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="OID">
                                              <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                                <field name="oid">Object ID</field>
                                              </shadow>
                                              <block type="text" id="A=((@JQG%#*bGh2R7%_q">
                                                <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                              </block>
                                            </value>
                                            <value name="VALUE">
                                              <shadow type="logic_boolean" id="=#$OMy,|`/Pw:p^a:9o$">
                                                <field name="BOOL">TRUE</field>
                                              </shadow>
                                              <block type="variables_get" id="~6?u-r71zjp+BV$4Gafs">
                                                <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                              </block>
                                            </value>
                                            <value name="DELAY_MS">
                                              <shadow type="math_number" id="SUeyREm+cm.l4.ZS|_:J">
                                                <field name="NUM">0</field>
                                              </shadow>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </xml>
            

            Wusste nicht, dass es bei SMA einen Unterschied in den Wechselrichtern gibt.
            Habe einen Sunny Tripower 8.0 SE mit dem Sunny Home Manager 2.0 im Einsatz.

            arteckA 1 Antwort Letzte Antwort
            0
            • T TripleX

              @darkiop said in SMA Wechselrichter in ioBroker einbinden:

              Und vor allem sollte bei so einer Frage auch etwas mehr an Details enthalten sein - welchen SMA-WR du im Einsatz hast z.B. ;)

              Für den SUNNY TRIPOWER 10.0 SE verwende ich aktuell folgendes:

              modbus (input)

              _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	cw	isScale
              30203	3	Operation.HealthStt.Ok	Nennleistung im Zustand Ok	W	uint32be	2	1			value			
              30513	3	Metering.TotWhOut Wh	Gesamtertrag in kWh	kWh	uint64be	4	1		x/1000	value			
              30535	3	Metering.DyWhOut	Tagesertrag	kWh	uint32be	2	1		x/1000	value			
              30581	3	Metering.GridMs.TotWhIn	Zählerstand Bezugszähler	kWh	uint32be	2	1		x/1000	value			
              30583	3	Metering.GridMs.TotWhOut	Zählerstand Einspeisezähler	kWh	uint32be	2	1		x/1000	value			
              30769	3	DcMs.Amp_1	DC Strom Eingang (Strang 1)	A	int32be	2	0.001			value			
              30771	3	DcMs.Vol_1	DC Spannung Eingang (Strang 1)	V	int32be	2	0.01			value			
              30773	3	DcMs.Watt_1	DC Leistung Eingang (Strang 1)	W	int32be	2	1		x=(x<0) ? 0:x	value			
              30775	3	GridMs.TotW	Leistung (Eigenverbrauch)	W	int32be	2	1			value			
              30845	3	Bat.ChaStt	Aktueller Batterieladezustand (SoC)	%	int32be	2	1			value			
              30847	3	Bat.Diag.ActlCapacNom	Aktuelle Batteriekapazität	%	uint32be	2	1			value			
              30849	3	Bat.TmpVal	Batterietemperatur	°C	uint32be	2	0.1			value			
              30865	3	Metering.GridMs.TotWIn	Leistung Bezug	W	int32be	2	1			value			
              30867	3	Metering.GridMs.TotWOut	Leistung Einspeisung	W	int32be	2	1			value			
              30955	3	Bat.OpStt	Betriebsstatus der Batterie		uint32be	2	1			value			
              30957	3	DcMs.Amp_2	DC Strom Eingang (Strang 2)	A	int32be	2	0.001			value			
              30959	3	DcMs.Vol_2	DC Spannung Eingang (Strang 2)	V	int32be	2	0.01			value			
              30961	3	DcMs.Watt_2	DC Leistung Eingang (Strang 2)	W	int32be	2	1		x=(x<0) ? 0:x	value			
              31057	3	BatUsDm.Stt	Status Batterienutzungsbereich		uint32be	2	1			value			
              31379	3	Nameplate.CmpBMS.Typ	Batterietyp		uint32be	2	1			value			
              31391	3	Operation.Bat.Health	Batterie-Zustand		uint32be	2	1			value			
              31393	3	BatChrg.CurBatCha	Momentane Batterieladung	W	uint32be	2	1			value			
              31395	3	BatDsch.CurBatDsch	Momentane Batterieentladung	W	uint32be	2	1			value			
              31397	3	BatChrg.BatChrg	Batterieladung	kWh	uint64be	4	1		x/1000	value			
              31401	3	BatDsch.BatDsch	Batterieentladung	kWh	uint64be	4	1		x/1000	value			
              32385	3	Operation.Inverter.Health	Wechselrichter-Zustand		uint32be	2	1			value			
              33003	3	Operation.RunStt	Betriebsstatus		uint32be	2	1			value			
              

              modbus (holding)

              _address	deviceId	name	description	unit	type	len	factor	offset	formula	role	room	poll	wp	cw	isScale
              40149	3	Wirkleistungvorgabe		W	int32be	2	1	0		level		false	false	false	false
              40151	3	Kommunikation			uint32be	2	1	0		state		false	false	false	false
              40189	3	max Ladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
              40191	3	max Entladeleistung BatWR		W	uint32be	2	1	0		level		true	false	false	false
              40795	3	Maximale Batterieladeleistung		W	uint32be	2	1	0		level		false	false	false	false
              40799	3	Maximale Batterieentladeleistung		W	uint32be	2	1	0		level		false	false	false	false
              

              Die aktuell in W anliegende PV-Leistung hole ich mir aus dem json des Web Frontends des WR:

              const axios = require('axios');
              const https = require('https');
              
              const cron = '*/5 * * * * *';
              
              const logging = false;
              
              const baseUri = 'https://10.3.0.9/dyn/getDashValues.json';
              
              const instanz = 'javascript.' + instance;
              const pfad = '.Strom.Photovoltaik.';
              const idAktuell = instanz + pfad + 'Leistung_aktuell';
              
              async function GetPvGenCounterFromUi() {
                  try {
                      const response = await axios.post(baseUri, null, { httpsAgent: new https.Agent({ rejectUnauthorized: false }) });
              
                      if (response.status === 200) {
                          const resultValueAC = response.data.result["01B8-xxxxxB04"]["6100_0046C200"][9][0].val; // Leistung PV-Erzeugung
                          //const resultValueHome = body.result["01B8-xxxxxB04"]["6100_40263F00"][9][0].val; // Verbrauch Haus
                          //const resultValueAC = body.result["01B8-xxxxxB04"]["6100_00295A00"][9][0].val; // Batterie Entladung (modbus 30955)
              
                          if (typeof resultValueAC !== 'undefined') {
                              setState(idAktuell, resultValueAC, false);
                              if (logging) console.log("PV Erzeugung: " + resultValueAC);
                          }
                      }
                  } catch (error) {
                      console.error(error);
                  }
              }
              
              GetPvGenCounterFromUi();
              
              schedule(cron, function () {
                  GetPvGenCounterFromUi();
              });
              

              Für die Berechnung der Autarkie läuft nochmal ein kleines Blockly:

              8bb60455-f238-4864-98e9-96cea5336aed-image.png

              <xml xmlns="https://developers.google.com/blockly/xml">
                <variables>
                  <variable id=")A(,1t?QC+HBec3kpaD:">log_info_text</variable>
                  <variable id="DEKENKZ_PW$)6(~vyubz">autarkie</variable>
                </variables>
                <block type="procedures_defnoreturn" id=")7Xc23hxhO);1[Qia]$i" x="13" y="13">
                  <mutation>
                    <arg name="log_info_text" varid=")A(,1t?QC+HBec3kpaD:"></arg>
                  </mutation>
                  <field name="NAME">log_info</field>
                  <comment pinned="false" h="80" w="160">Debuging - Log Ausgabe</comment>
                  <statement name="STACK">
                    <block type="debug" id="oVE-wj4=kcL/14Zb`=)h">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow type="text" id="P0)38%YEoA-tS1,cn!L^">
                          <field name="TEXT">test</field>
                        </shadow>
                        <block type="text_join" id="d1s)E+PaZ649rHqE^ron">
                          <mutation items="4"></mutation>
                          <value name="ADD0">
                            <block type="text" id="-+FeT?Md^55hYYP{#n)_">
                              <field name="TEXT">+++ </field>
                            </block>
                          </value>
                          <value name="ADD1">
                            <block type="text" id="`6k);`:%idWaiG8bZ[5L">
                              <field name="TEXT">PV Autarkie Berechnung: </field>
                            </block>
                          </value>
                          <value name="ADD2">
                            <block type="variables_get" id="g:!wcT`1iKXT=n_C~Y`/">
                              <field name="VAR" id=")A(,1t?QC+HBec3kpaD:">log_info_text</field>
                            </block>
                          </value>
                          <value name="ADD3">
                            <block type="text" id="m:{Wlwl%u*`sI%N}Df/K">
                              <field name="TEXT"> +++</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </statement>
                </block>
                <block type="comment" id=",A]yxHxP_?W~iT98PE((" x="13" y="213">
                  <field name="COMMENT">Autarkie berechnen:</field>
                  <next>
                    <block type="on_ext" id="wCeOrIdzh@U0M9j/y2]a">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                      <field name="CONDITION">ne</field>
                      <field name="ACK_CONDITION"></field>
                      <value name="OID0">
                        <shadow type="field_oid" id="6Cp(`|G)vq7f=(_%h)Xm">
                          <field name="oid">default</field>
                        </shadow>
                        <block type="text" id="eH-77(JJc279;TiZeuo6">
                          <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                        </block>
                      </value>
                      <statement name="STATEMENT">
                        <block type="variables_set" id="FX$w~ckWq^Q?9K#:bLq.">
                          <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                          <value name="VALUE">
                            <block type="math_rndfixed" id="acSDN-J?%wFa/wX]6]Lc" inline="false">
                              <field name="n">1</field>
                              <value name="x">
                                <shadow type="math_number" id="[ov#Fk2wE1PanZsg~4,7">
                                  <field name="NUM">3.1234</field>
                                </shadow>
                                <block type="math_arithmetic" id="/mpuXh#j;36m}VhMpgQ_">
                                  <field name="OP">MINUS</field>
                                  <value name="A">
                                    <shadow type="math_number" id="2?:VEYWisK^FF;(fWw2(">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="math_number" id="C}tO4CKdT]#w#q/~{hVm">
                                      <field name="NUM">100</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="CDzO:J3!PW(JVHi^.-MU">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="math_arithmetic" id="nVb5uo.+[unOkjyF}Yl=">
                                      <field name="OP">MULTIPLY</field>
                                      <value name="A">
                                        <shadow type="math_number" id="_sfnL[E7*EW:?nv[`v`M">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="math_arithmetic" id="=($FR)^2~2K+2TFm+Bpg" inline="false">
                                          <field name="OP">DIVIDE</field>
                                          <value name="A">
                                            <shadow type="math_number" id="l5nTX:u]JGAwCx(d+;M|">
                                              <field name="NUM">1</field>
                                            </shadow>
                                            <block type="get_value_var" id=")Gs9Q(1m#,.f3AAhP|}v">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                  <field name="oid">Object ID</field>
                                                </shadow>
                                                <block type="text" id="F^ek.$A$%bzw.BKQ0qyz">
                                                  <field name="TEXT">alias.0.energie.bezug</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <shadow type="math_number" id="rH7+M!;t|RgWZkgm9ds)">
                                              <field name="NUM">1</field>
                                            </shadow>
                                            <block type="get_value_var" id="g8?}GY**~]0LL@5b[e+p">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                  <field name="oid">Object ID</field>
                                                </shadow>
                                                <block type="text" id="LwEk=43AG`m=kPFI0!ww">
                                                  <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id="A.*:)97=N5r,!4:8y]d~">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="math_number" id="WSCwoh*p0EN~I);6YuF[">
                                          <field name="NUM">100</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <next>
                            <block type="controls_if" id="8uw)s:xN5PsY-DDLHh?D">
                              <mutation else="1"></mutation>
                              <value name="IF0">
                                <block type="logic_compare" id="Vw2[df`2hfxZ2~q`_#qI">
                                  <field name="OP">LT</field>
                                  <value name="A">
                                    <block type="variables_get" id="5Yib_osW2eDUAOabo[/%">
                                      <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="math_number" id="^sz`W;3wksx![Gr]7DUw">
                                      <field name="NUM">0</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="procedures_callnoreturn" id="]^iRY4ug[B#}0H%TY/?)" inline="true" disabled="true">
                                  <mutation name="log_info">
                                    <arg name="log_info_text"></arg>
                                  </mutation>
                                  <value name="ARG0">
                                    <block type="text_join" id="*w_zR^6}O,0nhzdBe!Mp">
                                      <mutation items="2"></mutation>
                                      <value name="ADD0">
                                        <block type="text" id="bc9W1A7uOx2({;=X~u{6">
                                          <field name="TEXT">alias.0.energie.bezug: </field>
                                        </block>
                                      </value>
                                      <value name="ADD1">
                                        <block type="get_value_var" id="#@oXFv3,}WPEmPxLAjT|">
                                          <field name="ATTR">val</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="FiRE3$h8/+d6GH9CmQ[y">
                                              <field name="TEXT">alias.0.energie.bezug</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="procedures_callnoreturn" id="7v5:+5-Lu;ZV^oT)(XM~" inline="true" disabled="true">
                                      <mutation name="log_info">
                                        <arg name="log_info_text"></arg>
                                      </mutation>
                                      <value name="ARG0">
                                        <block type="text_join" id="o3Gl~c$IXq8V%Qs4d_?`">
                                          <mutation items="2"></mutation>
                                          <value name="ADD0">
                                            <block type="text" id="K2H[B#r):z}@yd8J[.W*">
                                              <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                            </block>
                                          </value>
                                          <value name="ADD1">
                                            <block type="get_value_var" id="[|}?GpnK0`Ou5xZ2E{IT">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                  <field name="oid">Object ID</field>
                                                </shadow>
                                                <block type="text" id="uy.x]1O?6L3Q:nCi{y04">
                                                  <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="procedures_callnoreturn" id="$tgFSk=g]{CHUw:H9?D@" inline="true" disabled="true">
                                          <mutation name="log_info">
                                            <arg name="log_info_text"></arg>
                                          </mutation>
                                          <value name="ARG0">
                                            <block type="text_join" id="HXbnivB+oy%z_f/u^VzD" inline="true">
                                              <mutation items="3"></mutation>
                                              <value name="ADD0">
                                                <block type="text" id="/I7iyT73pWM.V_5J13R!">
                                                  <field name="TEXT">Autarkie bei </field>
                                                </block>
                                              </value>
                                              <value name="ADD1">
                                                <block type="math_number" id="g!}an}KeY/K$[;@z{/V0">
                                                  <field name="NUM">0</field>
                                                </block>
                                              </value>
                                              <value name="ADD2">
                                                <block type="text" id="(8bT:?r+~)f?zJ[`TKWs">
                                                  <field name="TEXT">%</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="control_ex" id="19@x/as5:4$ODwL)9?F," inline="true">
                                              <field name="TYPE">true</field>
                                              <field name="CLEAR_RUNNING">FALSE</field>
                                              <value name="OID">
                                                <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                                  <field name="oid">Object ID</field>
                                                </shadow>
                                                <block type="text" id="z94,:IKfaAi+hulG`Wu!">
                                                  <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                                </block>
                                              </value>
                                              <value name="VALUE">
                                                <shadow type="logic_boolean" id="vx:y7b!E_MT.siXV[oRj">
                                                  <field name="BOOL">TRUE</field>
                                                </shadow>
                                                <block type="variables_get" id="r7gF$%(~d;Z,;xcXNRXU">
                                                  <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                                </block>
                                              </value>
                                              <value name="DELAY_MS">
                                                <shadow type="math_number" id="P`hD;_!mGBuCv%a1F[UO">
                                                  <field name="NUM">0</field>
                                                </shadow>
                                                <block type="math_number" id="ltA(/T7~+eE:_1JrBxS[">
                                                  <field name="NUM">0</field>
                                                </block>
                                              </value>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                              <statement name="ELSE">
                                <block type="procedures_callnoreturn" id="8$xzBS!8VDTx`~xVS1S*" inline="true" disabled="true">
                                  <mutation name="log_info">
                                    <arg name="log_info_text"></arg>
                                  </mutation>
                                  <value name="ARG0">
                                    <block type="text_join" id="YTVLdrG;xbH?//lE1M^A">
                                      <mutation items="2"></mutation>
                                      <value name="ADD0">
                                        <block type="text" id="rb^affafd0nCm^mEpHTx">
                                          <field name="TEXT">alias.0.energie.bezug: </field>
                                        </block>
                                      </value>
                                      <value name="ADD1">
                                        <block type="get_value_var" id=".:TRJAQL%?]o/SDG;KA!">
                                          <field name="ATTR">val</field>
                                          <value name="OID">
                                            <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                              <field name="oid">Object ID</field>
                                            </shadow>
                                            <block type="text" id="31/N!vZ`pn,:i(NQB2II">
                                              <field name="TEXT">alias.0.energie.bezug</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="procedures_callnoreturn" id="nY_UN+k7ME[BKJ/#n*@3" inline="true" disabled="true">
                                      <mutation name="log_info">
                                        <arg name="log_info_text"></arg>
                                      </mutation>
                                      <value name="ARG0">
                                        <block type="text_join" id="t;azLtHymv)6`5)u`P0@">
                                          <mutation items="2"></mutation>
                                          <value name="ADD0">
                                            <block type="text" id="+yhxR|J;S$N/ws$O+OnW">
                                              <field name="TEXT">alias.0.energie.leistungsaufnahme_haus: </field>
                                            </block>
                                          </value>
                                          <value name="ADD1">
                                            <block type="get_value_var" id="1v1U{lw_*KY,SV3]e1sX">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow type="field_oid" id="@VD(lXcw=h?8M96f|,R=">
                                                  <field name="oid">Object ID</field>
                                                </shadow>
                                                <block type="text" id="rC`x_$(?xAw-M@t($4#a">
                                                  <field name="TEXT">alias.0.energie.leistungsaufnahme_haus</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="procedures_callnoreturn" id="|:DU]J}68P]M/WlDsT=l" inline="true" disabled="true">
                                          <mutation name="log_info">
                                            <arg name="log_info_text"></arg>
                                          </mutation>
                                          <value name="ARG0">
                                            <block type="text_join" id="X0KgmzdH*!3;~yZtX%G*" inline="true">
                                              <mutation items="3"></mutation>
                                              <value name="ADD0">
                                                <block type="text" id="A`mHqub}aB2AIh*eT_Gi">
                                                  <field name="TEXT">Autarkie bei </field>
                                                </block>
                                              </value>
                                              <value name="ADD1">
                                                <block type="variables_get" id="3J-#|+JL.i{cOv)53qc7">
                                                  <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                                </block>
                                              </value>
                                              <value name="ADD2">
                                                <block type="text" id="Tg(9;|4+wRq2Iq77MA_N">
                                                  <field name="TEXT">%</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="control_ex" id="nalaDY-3bdB2MT6-3B:D" inline="true">
                                              <field name="TYPE">true</field>
                                              <field name="CLEAR_RUNNING">FALSE</field>
                                              <value name="OID">
                                                <shadow type="field_oid" id="~yjdzf5c~g_W=Ot^9wM8">
                                                  <field name="oid">Object ID</field>
                                                </shadow>
                                                <block type="text" id="A=((@JQG%#*bGh2R7%_q">
                                                  <field name="TEXT">javascript.0.Strom.Photovoltaik.Autarkie</field>
                                                </block>
                                              </value>
                                              <value name="VALUE">
                                                <shadow type="logic_boolean" id="=#$OMy,|`/Pw:p^a:9o$">
                                                  <field name="BOOL">TRUE</field>
                                                </shadow>
                                                <block type="variables_get" id="~6?u-r71zjp+BV$4Gafs">
                                                  <field name="VAR" id="DEKENKZ_PW$)6(~vyubz">autarkie</field>
                                                </block>
                                              </value>
                                              <value name="DELAY_MS">
                                                <shadow type="math_number" id="SUeyREm+cm.l4.ZS|_:J">
                                                  <field name="NUM">0</field>
                                                </shadow>
                                              </value>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </xml>
              

              Wusste nicht, dass es bei SMA einen Unterschied in den Wechselrichtern gibt.
              Habe einen Sunny Tripower 8.0 SE mit dem Sunny Home Manager 2.0 im Einsatz.

              arteckA Offline
              arteckA Offline
              arteck
              Developer Most Active
              schrieb am zuletzt editiert von
              #6

              @triplex na du bist lustig... sogar GEWALTIGEN... da ist nix standard

              zigbee hab ich, zwave auch, nuc's genauso und HA auch

              1 Antwort Letzte Antwort
              0
              • arteckA arteck

                @darkiop
                bei holding

                40189 3 max Ladeleistung BatWR
                40191 3 max Entladeleistung BatWR
                40795 3 Maximale Batterieladeleistung
                40799 3 Maximale Batterieentladeleistung

                kannst du dir die Parameter sparen.. haben ehh keine wirkung

                ich hätte da noch prognosebasiertes Laden und tibber Steuerung
                https://github.com/arteck/SMA_forecast_charging/tree/master/SUNNY_TRIPOWER _10.0_SE

                @TripleX geht das auch geneuer mit dem Wechselrichter von SMA

                D Offline
                D Offline
                darkiop
                Most Active
                schrieb am zuletzt editiert von
                #7

                @arteck sagte in SMA Wechselrichter in ioBroker einbinden:

                kannst du dir die Parameter sparen.. haben ehh keine wirkung

                Danke Dir - hab die ehrlich gesagt auch nie näher angeschaut / überprüft ;)

                @arteck sagte in SMA Wechselrichter in ioBroker einbinden:

                ich hätte da noch prognosebasiertes Laden und tibber Steuerung
                https://github.com/arteck/SMA_forecast_charging/tree/master/SUNNY_TRIPOWER _10.0_SE

                Interessantes Projekt - Haben zwar kein Tibber und Co., werde mir die Skripte aber mal die Tage anschauen.

                Proxmox-ioBroker-Redis-HA Doku: https://forum.iobroker.net/topic/47478/dokumentation-einer-proxmox-iobroker-redis-ha-umgebung

                1 Antwort Letzte Antwort
                0
                Antworten
                • In einem neuen Thema antworten
                Anmelden zum Antworten
                • Älteste zuerst
                • Neuste zuerst
                • Meiste Stimmen


                Support us

                ioBroker
                Community Adapters
                Donate

                369

                Online

                32.5k

                Benutzer

                81.8k

                Themen

                1.3m

                Beiträge
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                ioBroker Community 2014-2025
                logo
                • Anmelden

                • Du hast noch kein Konto? Registrieren

                • Anmelden oder registrieren, um zu suchen
                • Erster Beitrag
                  Letzter Beitrag
                0
                • Home
                • Aktuell
                • Tags
                • Ungelesen 0
                • Kategorien
                • Unreplied
                • Beliebt
                • GitHub
                • Docu
                • Hilfe