@maeuseking sagte in SMA Wechselrichter:
Moin!
Krankheitsbedingt war ich leider schon sehr lange nicht mehr in dem Forum, deswegen erst jetzt:
So 100% zufrieden bin ich damit noch nicht, da zum Beispiel der Speicher bei 100% oder eben im leeren Zustand nicht grau wird...
Anbei alles in einer ZIP
SMA Bilder.zipViele Grüße, Klaus
Wie von @Bastel per PN gewünscht anbei auch noch die einzelnen Scripte für:
- PV-Leistung:
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on" id="r^o?49XLyi.+W{wlO4yR" x="188" y="-188">
<field name="OID">modbus.1.inputRegisters.30775_AC_PV Leistung</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="eArDoqaTpA`jO8nww%@0">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="/`LI8b;?i8C|/hv1Ul9e">
<field name="OP">GT</field>
<value name="A">
<block type="get_value" id="%?(b})nXmQ?~[Ra![g9G">
<field name="ATTR">val</field>
<field name="OID">modbus.1.inputRegisters.30775_AC_PV Leistung</field>
</block>
</value>
<value name="B">
<block type="math_number" id=";Ff!Z:[o`iyI[|;%jF:O">
<field name="NUM">20000</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id="EETyox0rg_wW|?F@?8mE">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.PV-Leistung-Skript</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id=";Na;zOzP75DG7l/S3^XV">
<field name="TEXT">0</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="update" id="^;^1pk2~gFENz8U%62*M">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.PV-Leistung-Skript</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="get_value" id="m!xeY#u+L4jz:tNC;B4!">
<field name="ATTR">val</field>
<field name="OID">modbus.1.inputRegisters.30775_AC_PV Leistung</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>
- Gesamtverbrauch
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="comment" id="p;1`E=p/-TOrlb[c)O/Y" x="-37" y="-663">
<field name="COMMENT">Berechnung Gesamtverbrauch aktuell</field>
<next>
<block type="on_ext" id="UHw2mJ.ARy/w=@}.T-b,">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="#4;_~vI2$D=ItI;(Ps]b">
<field name="oid">sma-em.0.3002136462.pregard</field>
</shadow>
</value>
<value name="OID1">
<shadow type="field_oid" id="a|nJw5I-b.4Uh00VX]$`">
<field name="oid">sma-em.0.3002136462.psurplus</field>
</shadow>
</value>
<value name="OID2">
<shadow type="field_oid" id="R?kY3A?dHJ?x_X_=`e?V">
<field name="oid">modbus.1.inputRegisters.30775_AC_PV Leistung</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="update" id="qA3N.5uI^^|)qnRkKWLW">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.Gesamtverbrauch</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_arithmetic" id="}}K?hwu.i$l7}qDmXU_!">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="PXVFaEH.W%=?o*~u%{T;">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="a9[j=qdFLSc2*wyOCs.5">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="pw#FHl!edu-?j4Q:_kVp">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="mYY^Ybc1ti~rdR^*NjhX">
<field name="OP">MINUS</field>
<value name="A">
<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="GzEKyyRZeWkBsDaP8[aF">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="bT^OH[TvWQrpR+PbdxEz">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="`g{HJFF~K_H8xL!Z_k9r">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="hM.dE)RL;x^buJec}v;3">
<field name="ATTR">val</field>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.PV-Leistung-Skript</field>
</block>
</value>
<value name="B">
<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="Ek5/h)71i~SD2mMUOHc~">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="7]v*y~++Ahb+wXh65ixR">
<field name="ATTR">val</field>
<field name="OID">sma-em.0.3002136462.pregard</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="ZOTY]pXlDH4h/fR92l-S">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="zzhVUW+W,2emiW3tj!NH">
<field name="ATTR">val</field>
<field name="OID">sma-em.0.3002136462.psurplus</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="U/+tq-f(ZzDzdpDu7VF^">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="]5FxhZ#CuZ;^G#wFxggP">
<field name="ATTR">val</field>
<field name="OID">modbus.0.inputRegisters.31393_Momentane_Batterialadung</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="PbLZpMPj1F:tK^)|]Q4G">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="it6V?X@d=I/u.9ZNjm8e">
<field name="ATTR">val</field>
<field name="OID">modbus.0.inputRegisters.31395_Momentane_Batterieentladung</field>
</block>
</value>
</block>
</value>
</block>
</statement>
<next>
<block type="comment" id="P.XDHJ,p1HEr_Pk3f4M?">
<field name="COMMENT">Berechnung Gesamtverbrauch Skript</field>
<next>
<block type="on_ext" id=")R3$jqhdaYoGsx%:yJ;*">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="k;$dun+IQ=uITvABYee^">
<field name="oid">sma-em.0.3002136462.pregardcounter</field>
</shadow>
</value>
<value name="OID1">
<shadow type="field_oid" id="NA|^_,]FMZL3M?qRU/jW">
<field name="oid">sma-em.0.3002136462.psurpluscounter</field>
</shadow>
</value>
<value name="OID2">
<shadow type="field_oid" id="OR*b)vwFQ+T`@/@{_@8E">
<field name="oid">modbus.1.inputRegisters.30775_AC_PV Leistung</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="update" id="x.9dv{FW`m:{srtDeI*U">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.Gesamtverbrauch_Skript</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_arithmetic" id="t0f?Kex)dBO]HN0qRf8#">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="xrg%wF6kCSBKp)8|awT2">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="b0]1VwW++O2yZ+hDy@`r">
<field name="OP">MINUS</field>
<value name="A">
<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id=";eer`zoQEi0P|PmsI=v:">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="oVHJ{Ky_[h(k.!B.Sx0J">
<field name="ATTR">val</field>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.PV-Ertrag_Heute</field>
</block>
</value>
<value name="B">
<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="Un2M+?`B%reix=gHB-]O">
<field name="ATTR">val</field>
<field name="OID">sma-em.0.3002136462.pregardcounter</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="`g9[aIr}3Hu(Er[BGw1h">
<field name="ATTR">val</field>
<field name="OID">sma-em.0.3002136462.psurpluscounter</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="G%;pyUr.wx.xvj]3n)Z|">
<field name="ATTR">val</field>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.Batterieladung_Heute</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="get_value" id="wlXQoN_oti]5=#0UwQ-]">
<field name="ATTR">val</field>
<field name="OID">javascript.0.scriptEnabled.Photovoltaik.Batterieentladung_Heute</field>
</block>
</value>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>
Ich hoffe, dass dir das weiterhilft @Bastel