Neue Versionen und Support zum Modbus-Modul

Begonnen von StefanStrobel, 20 August 2017, 12:11:08

Vorheriges Thema - Nächstes Thema

tobmaster1985

Zitat von: tomseitz320 am 29 Mai 2024, 09:40:04Und wie sieht der Set-Befehl aus?

Set funktioniert wie bei jedem anderen FHEM Gerät auch:

set [Device] [reading] [wert]
Zitat von: tomseitz320 am 29 Mai 2024, 09:40:04Denn "ModbusSet" ist laut Wiki ein "module for the set silent heat pumps from Schmidt Energie Technik".
Das ist ein anderes Modul, oder?

Zitat von: tomseitz320 am 29 Mai 2024, 09:40:04Und der "Set"-Befehl innerhalb des Decices in fhem lässt in meinen Augen nur sinnvoll "sendraw" zu. Dazu finde ich aber keine Dokumentation (einfach eine Dezimalzahl?, einzelne Bits?, ein Hex-Wert, der OR verknüpft wird?...)?

Das hängt davon ab, wie du das Register konfiguriert hast und was das Gerät für einen Wert erwartet.

Stichwort unpack Attribut

VG
Tobias

StefanStrobel

Hallo tomseitz320,

Folgendes Beispiel steht in der commandref:
attr PWP obj-h770-reading Temp_Soll
attr PWP obj-h770-type signed short big
attr PWP obj-h770-expr $val / 10
attr PWP obj-h770-set 1
attr PWP obj-h770-setexpr $val * 10
attr PWP obj-h770-max 32
attr PWP obj-h770-min 10
attr PWP obj-h770-hint 8,10,20,25,28,29,30,30.5,31,31.5,32

Der set-Befehl lautet dann z.B.
set PWP Temp_Soll 25

Gruß
    Stefan

tomseitz320

You saved my day (and my garden)!!! :)
attr HumidSens1 obj-h0-reading ModbusAddress
attr HumidSens1 obj-h0-set 1
danach noch ein Set ...
und läuft!

300P

#1293
Hallo Zusammen,

bin per PM gefragt worden ob und wie es bei mir inzwischen mit Laden per Modbus bei dem SBS25 klappt:

Zitat von: link=action=profile;u=Hallo,

danke für die schnelle Rückmeldung.
Leider reagiert mein WR nicht auf die Befehle "set MB_SBS25 Set_Leistung_W -8000" und "set MB_SBS25 Set_Aktiv 802". Werte bekomme ich über Modbus ausgelesen, aber das Setzen klappt nicht.

Kannst du noch den Code vom MB_SBS25 teilen?
https://forum.fhem.de/index.php?topic=75638.msg1289206#msg1289206

Gruß & Danke

Hier mein derzeitig funktionierender Lösungsansatz für alle Interessierten zur Info:
=>> funktioniert zu 100 % bei den SMA-SBS25
=>> soll laut Photovoltikforum auch bei einigen andern SMA-BWR funktionieren.
=>> habe 2 Device (...weil 2 X SBS25)


Hier die beiden Modbus-Device (MB_SBS25 / MB_SBS25_2)
defmod MB_SBS25 ModbusAttr 3  15   192.168.121.176:502  TCP
attr MB_SBS25 comment manuelles Laden einschalten:\
\
\
Set_Leistung_W 5000       \
# Max. Bezug in Watt am Netzübergangspunkt (ADDR 40149)\
\
\
Set_Aktiv  802                   \
# Einschalten Kommunikationsregelung (ADDR 40151)\
Dieser SET (803) ergibt folgenden Eintrag im WR:\
10421    Eigenverbrauchsregelung wurde gestoppt\
\
Achtung:\
- Bei mir in den SBS25-Batterien steht.....:\
  Noch 30 Minuten mit aktuellen Werten auf Kommunikationssteuerung warten (bevor autom. auf Normal geregelt wird).\
\
daher extra zum Ausschalten:\
\
Ausschalten ("direkt") dann mit dieser Wartezeit nit :\
Set_Aktiv  803                   # Ausschalten Kommunikationsregelung\
\
Dieser SET (803) ergibt folgenden Eintrag im WR: \
10420    Eigenverbrauchsregelung wurde gestartet\
\
\
\
obj-h40149-expr $val\
obj-h40149-len 2\
obj-h40149-name SBS25_Set_Leistung_W\
obj-h40149-poll once \
obj-h40149-reading Set_Leistung_W\
obj-h40149-set 1\
obj-h40149-unpack I>\
obj-h40151-expr $val\
obj-h40151-name SBS25_Set_Aktiv\
obj-h40151-poll once\
obj-h40151-reading Set_Aktiv\
obj-h40151-set 1\
\

attr MB_SBS25 dev-h-defIgnoreExpr (( $val==536870911 ) || ( $val ==2147483648 ) || ( $val ==4294967295 ))
attr MB_SBS25 dev-h-defLen 2
attr MB_SBS25 dev-h-defPoll 1
attr MB_SBS25 dev-h-defUnpack N
attr MB_SBS25 dev-type-S16F0-expr ($val & 0x8000) / 1
attr MB_SBS25 dev-type-S16F0-format %.0f
attr MB_SBS25 dev-type-S16F0-len 1
attr MB_SBS25 dev-type-S16F0-unpack N
attr MB_SBS25 dev-type-S16F1-expr $val/1
attr MB_SBS25 dev-type-S16F1-format %.1f
attr MB_SBS25 dev-type-S16F1-len 1
attr MB_SBS25 dev-type-S16F1-unpack N
attr MB_SBS25 dev-type-S16F2-expr ($val & 0x8000) / 100
attr MB_SBS25 dev-type-S16F2-format %.2f
attr MB_SBS25 dev-type-S16F2-len 1
attr MB_SBS25 dev-type-S16F2-unpack N
attr MB_SBS25 dev-type-S32-format %d
attr MB_SBS25 dev-type-S32-len 2
attr MB_SBS25 dev-type-S32-unpack i>
attr MB_SBS25 dev-type-S32F0-expr ($val)  / 1
attr MB_SBS25 dev-type-S32F0-format %.0f
attr MB_SBS25 dev-type-S32F0-len 2
attr MB_SBS25 dev-type-S32F0-unpack i>
attr MB_SBS25 dev-type-S32F1-expr ($val & 0x80000000) / 10
attr MB_SBS25 dev-type-S32F1-format %.1f
attr MB_SBS25 dev-type-S32F1-len 2
attr MB_SBS25 dev-type-S32F1-revRegs 1
attr MB_SBS25 dev-type-S32F1-unpack i>
attr MB_SBS25 dev-type-S32F2-expr ($val & 0x80000000) / 100
attr MB_SBS25 dev-type-S32F2-format %.2f
attr MB_SBS25 dev-type-S32F2-len 2
attr MB_SBS25 dev-type-S32F2-revRegs 1
attr MB_SBS25 dev-type-S32F2-unpack i>
attr MB_SBS25 dev-type-S32F3-expr ($val & 0x80000000) / 1000
attr MB_SBS25 dev-type-S32F3-format %.3f
attr MB_SBS25 dev-type-S32F3-len 2
attr MB_SBS25 dev-type-S32F3-unpack i>
attr MB_SBS25 dev-type-S32F4-expr $val
attr MB_SBS25 dev-type-S32F4-format %.4f
attr MB_SBS25 dev-type-S32F4-len 2
attr MB_SBS25 dev-type-S32F4-revRegs 1
attr MB_SBS25 dev-type-S32F4-unpack i>
attr MB_SBS25 dev-type-S32TEMP-expr ($val & 0xFFFF) / 10
attr MB_SBS25 dev-type-S32TEMP-format %.2f
attr MB_SBS25 dev-type-S32TEMP-len 2
attr MB_SBS25 dev-type-S32TEMP-unpack l>
attr MB_SBS25 dev-type-U32-format %u
attr MB_SBS25 dev-type-U32-len 2
attr MB_SBS25 dev-type-U32-unpack N
attr MB_SBS25 dev-type-U32F0-expr ($val ) / 1
attr MB_SBS25 dev-type-U32F0-format %.0f
attr MB_SBS25 dev-type-U32F0-len 2
attr MB_SBS25 dev-type-U32F0-unpack N
attr MB_SBS25 dev-type-U32F1-format %.1f
attr MB_SBS25 dev-type-U32F1-len 2
attr MB_SBS25 dev-type-U32F1-unpack N
attr MB_SBS25 dev-type-U32F2-format %.2f
attr MB_SBS25 dev-type-U32F2-len 2
attr MB_SBS25 dev-type-U32F2-unpack N
attr MB_SBS25 dev-type-U32F3-format %.3f
attr MB_SBS25 dev-type-U32F3-len 2
attr MB_SBS25 dev-type-U32F3-unpack N
attr MB_SBS25 dev-type-U32F4-format %.4f
attr MB_SBS25 dev-type-U32F4-len 2
attr MB_SBS25 dev-type-U32F4-unpack N
attr MB_SBS25 dev-type-U32RAW-format %d
attr MB_SBS25 dev-type-U32RAW-len 2
attr MB_SBS25 devStateIcon {\
my $mode = 'measure_power@green';;;;\
$mode = 'measure_power@yellow' if (ReadingsVal($name, "Wirkleistung_W", "") < 1);;;;\
\
my $chargePw = ReadingsVal("SBS25", "state", "")*1000;;;;\
\
my $charge = '';;;;\
$charge = 'control_arrow_leftward@greenyellow' if ($chargePw < 0);;;;\
$charge = 'control_arrow_rightward@green' if ($chargePw > 0);;;;\
\
my $ChargeStatus = 'measure_battery_100@green';;;;\
$ChargeStatus = 'measure_battery_75@green' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 80);;;;\
$ChargeStatus = 'measure_battery_50@yellow' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 55);;;;\
$ChargeStatus = 'measure_battery_25@orange' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 30);;;;\
$ChargeStatus = 'measure_battery_0@red' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 6);;;;\
\
my $Cap = (ReadingsVal($name,"BatterieLadezustand_%",0) ) * 98;;\
\
\
"<div>" . \
FW_makeImage($mode,"measure_power") ." AC ". ReadingsVal($name,"Wirkleistung_W",0) ."W  ". \
FW_makeImage($ChargeStatus,"") . \
FW_makeImage($charge,"") ." ". $chargePw ."W   ". \
ReadingsVal($name,"BatterieLadezustand_%",0) ."% ".\
$Cap."wh  ".\
"</div>"}
attr MB_SBS25 disable 0
attr MB_SBS25 event-min-interval .*:600
attr MB_SBS25 event-on-change-reading .*
attr MB_SBS25 obj-h30003-expr $val / 1
attr MB_SBS25 obj-h30003-format %.f
attr MB_SBS25 obj-h30003-len 2
attr MB_SBS25 obj-h30003-name SBS25_Nameplate.SusyId
attr MB_SBS25 obj-h30003-poll once
attr MB_SBS25 obj-h30003-reading TTTNameplate.SusyId
attr MB_SBS25 obj-h30003-type U32RAW
attr MB_SBS25 obj-h30003-unpack N
attr MB_SBS25 obj-h30005-expr $val / 1
attr MB_SBS25 obj-h30005-format %.f
attr MB_SBS25 obj-h30005-len 2
attr MB_SBS25 obj-h30005-name SBS25_Nameplate.SerNum
attr MB_SBS25 obj-h30005-poll once
attr MB_SBS25 obj-h30005-reading TTTNameplate.SerNum
attr MB_SBS25 obj-h30005-type U32RAW
attr MB_SBS25 obj-h30005-unpack N
attr MB_SBS25 obj-h30051-expr $val / 1
attr MB_SBS25 obj-h30051-format %.f
attr MB_SBS25 obj-h30051-len 2
attr MB_SBS25 obj-h30051-name SBS25_Nameplate.MainModel
attr MB_SBS25 obj-h30051-poll once
attr MB_SBS25 obj-h30051-reading TTTNameplate.MainModel
attr MB_SBS25 obj-h30051-unpack N
attr MB_SBS25 obj-h30053-expr $val / 1
attr MB_SBS25 obj-h30053-format %.f
attr MB_SBS25 obj-h30053-len 2
attr MB_SBS25 obj-h30053-name SBS25_Nameplate.Model
attr MB_SBS25 obj-h30053-poll once
attr MB_SBS25 obj-h30053-reading TTTNameplate.Model
attr MB_SBS25 obj-h30053-unpack N
attr MB_SBS25 obj-h30201-map 35:Fehler, 303:Aus, 307:OK, 455:Warnung
attr MB_SBS25 obj-h30201-name SBS25_StatusWR
attr MB_SBS25 obj-h30201-reading StatusWR
attr MB_SBS25 obj-h30211-map 336:Contact manufacturer, 337:Contact installer, 338:invalid, 887:none
attr MB_SBS25 obj-h30211-name SBS25_UserAction
attr MB_SBS25 obj-h30211-polldelay x1
attr MB_SBS25 obj-h30211-reading UserAction
attr MB_SBS25 obj-h30217-map 16777213:Fehler, 51:geschlossen, 311:offen
attr MB_SBS25 obj-h30217-name SBS25_Netzrelais
attr MB_SBS25 obj-h30217-polldelay x1
attr MB_SBS25 obj-h30217-reading Netzrelais
attr MB_SBS25 obj-h30235-expr $val / 1
attr MB_SBS25 obj-h30235-len 2
attr MB_SBS25 obj-h30235-map 1440: Netzbetrieb (ModGri), 1441: Inselnetzbetrieb (ModOffGri), 316777213: Information liegt nicht vor (NaNStt)
attr MB_SBS25 obj-h30235-name SBS25_TTTBatterie_Backup-Modus
attr MB_SBS25 obj-h30235-poll x13
attr MB_SBS25 obj-h30235-polldelay 1
attr MB_SBS25 obj-h30235-reading TTTBatterie_Backup-Modus
attr MB_SBS25 obj-h30235-unpack N
attr MB_SBS25 obj-h30529-format %.f
attr MB_SBS25 obj-h30529-name SBS25_NetzEMEinspeisungGesamt_Wh
attr MB_SBS25 obj-h30529-polldelay x7
attr MB_SBS25 obj-h30529-reading NetzEMEinspeisungGesamt_Wh
attr MB_SBS25 obj-h30529-type U32F0
attr MB_SBS25 obj-h30531-name SBS25_BatterieLadungTag_Wh
attr MB_SBS25 obj-h30531-polldelay x7
attr MB_SBS25 obj-h30531-reading BatterieLadungTag_Wh
attr MB_SBS25 obj-h30531-type U32F0
attr MB_SBS25 obj-h30535-name SBS25_BatterieEnladungTag_Wh
attr MB_SBS25 obj-h30535-polldelay x7
attr MB_SBS25 obj-h30535-reading BatterieEntladungTag_Wh
attr MB_SBS25 obj-h30535-type U32F0
attr MB_SBS25 obj-h30769-expr $val  / 1000
attr MB_SBS25 obj-h30769-format %.3f
attr MB_SBS25 obj-h30769-len 2
attr MB_SBS25 obj-h30769-name SBS25_DC_Strom_1_A
attr MB_SBS25 obj-h30769-poll 0
attr MB_SBS25 obj-h30769-polldelay x4
attr MB_SBS25 obj-h30769-reading DC_Strom_1_A
attr MB_SBS25 obj-h30771-expr $val  / 100
attr MB_SBS25 obj-h30771-format %.2f
attr MB_SBS25 obj-h30771-len 2
attr MB_SBS25 obj-h30771-name SBS25_DC_Spannung_1_V
attr MB_SBS25 obj-h30771-poll 0
attr MB_SBS25 obj-h30771-polldelay x4
attr MB_SBS25 obj-h30771-reading DC_Spannung_1_V
attr MB_SBS25 obj-h30773-name SBS25_DC_Leistung_1_W
attr MB_SBS25 obj-h30773-poll 0
attr MB_SBS25 obj-h30773-reading DC_Leistung_1_W
attr MB_SBS25 obj-h30775-expr $val
attr MB_SBS25 obj-h30775-name SBS25_Wirkleistung_W
attr MB_SBS25 obj-h30775-poll 1
attr MB_SBS25 obj-h30775-polldelay x3
attr MB_SBS25 obj-h30775-reading Wirkleistung_W
attr MB_SBS25 obj-h30775-type S32F0
attr MB_SBS25 obj-h30777-expr $val
attr MB_SBS25 obj-h30777-name SBS25_Wirkleistung_L1_W
attr MB_SBS25 obj-h30777-poll 0
attr MB_SBS25 obj-h30777-polldelay x3
attr MB_SBS25 obj-h30777-reading Wirkleistung_L1_W
attr MB_SBS25 obj-h30777-type S32F0
attr MB_SBS25 obj-h30779-expr $val
attr MB_SBS25 obj-h30779-name SBS25_Wirkleistung_L2_W
attr MB_SBS25 obj-h30779-poll 0
attr MB_SBS25 obj-h30779-polldelay x3
attr MB_SBS25 obj-h30779-reading Wirkleistung_L2_W
attr MB_SBS25 obj-h30779-type S32F0
attr MB_SBS25 obj-h30781-expr $val
attr MB_SBS25 obj-h30781-name SBS25_Wirkleistung_L3_W
attr MB_SBS25 obj-h30781-poll 0
attr MB_SBS25 obj-h30781-polldelay x3
attr MB_SBS25 obj-h30781-reading Wirkleistung_L3_W
attr MB_SBS25 obj-h30781-type S32F0
attr MB_SBS25 obj-h30783-expr $val
attr MB_SBS25 obj-h30783-format %.2f
attr MB_SBS25 obj-h30783-name SBS25_Grid_Spannung_V
attr MB_SBS25 obj-h30783-poll 0
attr MB_SBS25 obj-h30783-polldelay x7
attr MB_SBS25 obj-h30783-reading Grid_Spannung_V
attr MB_SBS25 obj-h30783-type U32F2
attr MB_SBS25 obj-h30843-expr ($val) / 1000
attr MB_SBS25 obj-h30843-name BatterieStrom_DC__A
attr MB_SBS25 obj-h30843-poll 1
attr MB_SBS25 obj-h30843-polldelay x1
attr MB_SBS25 obj-h30843-reading BatterieStrom_DC__A
attr MB_SBS25 obj-h30843-type S32F3
attr MB_SBS25 obj-h30845-name SBS25_BatterieLadezustand_%
attr MB_SBS25 obj-h30845-polldelay x5
attr MB_SBS25 obj-h30845-reading BatterieLadezustand_%
attr MB_SBS25 obj-h30845-unpack N
attr MB_SBS25 obj-h30847-name SBS25_BatterieKapazitaetaktuell_%
attr MB_SBS25 obj-h30847-polldelay x5
attr MB_SBS25 obj-h30847-reading BatterieKapazitaetaktuell_%
attr MB_SBS25 obj-h30847-unpack i>
attr MB_SBS25 obj-h30849-name SBS25_BatterieTemperatur_C
attr MB_SBS25 obj-h30849-polldelay x13
attr MB_SBS25 obj-h30849-reading BatterieTemperatur_C
attr MB_SBS25 obj-h30849-type S32TEMP
attr MB_SBS25 obj-h30851-expr ($val  & 0xFFFF) / 100
attr MB_SBS25 obj-h30851-format %.2f
attr MB_SBS25 obj-h30851-name SBS25_BatterieSpannung_V
attr MB_SBS25 obj-h30851-polldelay x7
attr MB_SBS25 obj-h30851-reading BatterieSpannung_V
attr MB_SBS25 obj-h30851-type U32F2
attr MB_SBS25 obj-h30865-format %.2f
attr MB_SBS25 obj-h30865-name SBS25_Grid_Bezug_W
attr MB_SBS25 obj-h30865-poll 1
attr MB_SBS25 obj-h30865-polldelay x3
attr MB_SBS25 obj-h30865-reading Grid_Bezug_W
attr MB_SBS25 obj-h30865-type U32F2
attr MB_SBS25 obj-h30867-format %.2f
attr MB_SBS25 obj-h30867-name SBS25_Grid_Einspeisung_W
attr MB_SBS25 obj-h30867-poll 1
attr MB_SBS25 obj-h30867-polldelay x3
attr MB_SBS25 obj-h30867-reading Grid_Einspeisung_W
attr MB_SBS25 obj-h30867-type U32F2
attr MB_SBS25 obj-h30953-name SBS25_WR_Temperatur_C
attr MB_SBS25 obj-h30953-polldelay x13
attr MB_SBS25 obj-h30953-reading WR_Temperatur_C
attr MB_SBS25 obj-h30953-type S32TEMP
attr MB_SBS25 obj-h30955-map 16777213:Fehler, 303:Aus, 2291:standby, 2292:laden, 2293:entladen
attr MB_SBS25 obj-h30955-name SBS25_BatterieStatus
attr MB_SBS25 obj-h30955-reading BatterieStatus
attr MB_SBS25 obj-h30957-expr ($val  & 0xFFFF) / 1000
attr MB_SBS25 obj-h30957-format %.3f
attr MB_SBS25 obj-h30957-name SBS25_DC_Strom_2_A
attr MB_SBS25 obj-h30957-poll 0
attr MB_SBS25 obj-h30957-reading DC_Strom_2_A
attr MB_SBS25 obj-h30959-expr ($val  & 0xFFFF) / 100
attr MB_SBS25 obj-h30959-format %.2f
attr MB_SBS25 obj-h30959-name SBS25_DC_Spannung_2_V
attr MB_SBS25 obj-h30959-poll 0
attr MB_SBS25 obj-h30959-reading DC_Spannung_2_V
attr MB_SBS25 obj-h30961-name SBS25_DC_Leistung_2_W
attr MB_SBS25 obj-h30961-poll 0
attr MB_SBS25 obj-h30961-polldelay x1
attr MB_SBS25 obj-h30961-reading DC_Leistung_2_W
attr MB_SBS25 obj-h30977-expr ($val & 0xFFFF) / 1000
attr MB_SBS25 obj-h30977-len 2
attr MB_SBS25 obj-h30977-name SBS25_GridMs.A.phsA
attr MB_SBS25 obj-h30977-poll 0
attr MB_SBS25 obj-h30977-polldelay x1
attr MB_SBS25 obj-h30977-reading BatterieStrom_AC_Phase_L1_A
attr MB_SBS25 obj-h30977-type S32F3
attr MB_SBS25 obj-h30979-expr ($val & 0xFFFF) / 1000
attr MB_SBS25 obj-h30979-len 2
attr MB_SBS25 obj-h30979-name SBS25_GridMs.A.phsB
attr MB_SBS25 obj-h30979-poll 1
attr MB_SBS25 obj-h30979-polldelay x1
attr MB_SBS25 obj-h30979-reading BatterieStrom_AC_Phase_L2_A
attr MB_SBS25 obj-h30979-type S32F3
attr MB_SBS25 obj-h30981-expr ($val & 0xFFFF) / 1000
attr MB_SBS25 obj-h30981-len 2
attr MB_SBS25 obj-h30981-name SBS25_GridMs.A.phsC
attr MB_SBS25 obj-h30981-poll 0
attr MB_SBS25 obj-h30981-polldelay x1
attr MB_SBS25 obj-h30981-reading BatterieStrom_AC_Phase_L3_A
attr MB_SBS25 obj-h30981-type S32F3
attr MB_SBS25 obj-h31377-expr ($val & 0xFFFFFFFF)
attr MB_SBS25 obj-h31377-format %.f
attr MB_SBS25 obj-h31377-len 2
attr MB_SBS25 obj-h31377-name SBS25_Nameplate.Bat.Vendor
attr MB_SBS25 obj-h31377-poll once
attr MB_SBS25 obj-h31377-reading TTTNameplate.Bat.Vendor
attr MB_SBS25 obj-h31377-unpack N
attr MB_SBS25 obj-h31379-expr $val / 1
attr MB_SBS25 obj-h31379-format %.f
attr MB_SBS25 obj-h31379-len 2
attr MB_SBS25 obj-h31379-name SBS25_Nameplate.CmpBMS.Typ
attr MB_SBS25 obj-h31379-poll 1
attr MB_SBS25 obj-h31379-polldelay x5
attr MB_SBS25 obj-h31379-reading TTTNameplate.CmpBMS.Typ
attr MB_SBS25 obj-h31379-unpack N
attr MB_SBS25 obj-h31393-name SBS25_BatterieLadeleistung_W
attr MB_SBS25 obj-h31393-poll 1
attr MB_SBS25 obj-h31393-polldelay x2
attr MB_SBS25 obj-h31393-reading BatterieLadeleistung_W
attr MB_SBS25 obj-h31395-name SBS25_BatterieEntladeleistung_W
attr MB_SBS25 obj-h31395-poll 1
attr MB_SBS25 obj-h31395-polldelay x2
attr MB_SBS25 obj-h31395-reading BatterieEntladeleistung_W
attr MB_SBS25 obj-h31397-expr $val & 0xFFFFFFFFFFFFFFFF
attr MB_SBS25 obj-h31397-len 4
attr MB_SBS25 obj-h31397-name SBS25_BatterieLadungGesamt_Wh
attr MB_SBS25 obj-h31397-poll 1
attr MB_SBS25 obj-h31397-polldelay x2
attr MB_SBS25 obj-h31397-reading BatterieLadungGesamt_Wh
attr MB_SBS25 obj-h31397-unpack Q>
attr MB_SBS25 obj-h31401-expr $val & 0xFFFFFFFFFFFFFFFF
attr MB_SBS25 obj-h31401-len 4
attr MB_SBS25 obj-h31401-name SBS25_BatterieEntladungGesamt_Wh
attr MB_SBS25 obj-h31401-poll 1
attr MB_SBS25 obj-h31401-polldelay x2
attr MB_SBS25 obj-h31401-reading BatterieEntladungGesamt_Wh
attr MB_SBS25 obj-h31401-unpack Q>
attr MB_SBS25 obj-h34113-expr $val / 10
attr MB_SBS25 obj-h34113-name SBS25_WR_Innentemperatur_C
attr MB_SBS25 obj-h34113-poll 1
attr MB_SBS25 obj-h34113-polldelay x13
attr MB_SBS25 obj-h34113-reading WR_Innentemperatur_C
attr MB_SBS25 obj-h34113-type S32TEMP
attr MB_SBS25 obj-h40073-expr $val
attr MB_SBS25 obj-h40073-len 2
attr MB_SBS25 obj-h40073-name SBS25_BatterieUntereEntladegrenze_%
attr MB_SBS25 obj-h40073-poll 1
attr MB_SBS25 obj-h40073-polldelay x10
attr MB_SBS25 obj-h40073-reading BatterieUntereEntladegrenze_%
attr MB_SBS25 obj-h40149-expr $val
attr MB_SBS25 obj-h40149-len 2
attr MB_SBS25 obj-h40149-name SBS25_Set_Leistung_W
attr MB_SBS25 obj-h40149-poll once
attr MB_SBS25 obj-h40149-reading Set_Leistung_W
attr MB_SBS25 obj-h40149-set 1
attr MB_SBS25 obj-h40149-type S32F0
attr MB_SBS25 obj-h40149-unpack I>
attr MB_SBS25 obj-h40151-expr $val
attr MB_SBS25 obj-h40151-name SBS25_Set_Aktiv
attr MB_SBS25 obj-h40151-poll 1
attr MB_SBS25 obj-h40151-reading Set_Aktiv
attr MB_SBS25 obj-h40151-set 1
attr MB_SBS25 obj-h40151-type U32F0
attr MB_SBS25 obj-h40187-expr $val
attr MB_SBS25 obj-h40187-name SBS25_BatterieNennkapazitaet_Wh
attr MB_SBS25 obj-h40187-poll once
attr MB_SBS25 obj-h40187-reading BatterieNennkapazitaet_Wh
attr MB_SBS25 obj-h40187-type U32F0
attr MB_SBS25 obj-h40236-expr $val / 1
attr MB_SBS25 obj-h40236-map 303:303Aus (Off), 308:308Ein (On), 1438:1438Automatik (Auto), 2289:2289Batterie laden (BatChaMod), 2290:2290Batterie entladen (BatDschMod), 2424:2424Voreinstellung (Dft), 16777213:16777213Information liegt nicht vor (NaNStt)
attr MB_SBS25 obj-h40236-name SBS25_Set_BMS_Mode
attr MB_SBS25 obj-h40236-poll once
attr MB_SBS25 obj-h40236-reading Set_BMS_Mode
attr MB_SBS25 obj-h40721-expr $val
attr MB_SBS25 obj-h40721-len 2
attr MB_SBS25 obj-h40721-name SBS25_BatterieTiefentladeschutzbereichMinimaleBreite_%
attr MB_SBS25 obj-h40721-poll once
attr MB_SBS25 obj-h40721-reading BatterieTiefentladeschutzbereichMinimaleBreite_%
attr MB_SBS25 obj-h40781-expr $val
attr MB_SBS25 obj-h40781-len 2
attr MB_SBS25 obj-h40781-name SBS25_Set_Netzaustauschleistung_W
attr MB_SBS25 obj-h40781-poll once
attr MB_SBS25 obj-h40781-reading Set_Netzaustauschleistung_W
attr MB_SBS25 obj-h40781-set 0
attr MB_SBS25 obj-h40793-expr $val
attr MB_SBS25 obj-h40793-len 2
attr MB_SBS25 obj-h40793-name SBS25_Set_LadeP_min_W
attr MB_SBS25 obj-h40793-poll once
attr MB_SBS25 obj-h40793-reading Set_LadeP_min_W
attr MB_SBS25 obj-h40793-set 0
attr MB_SBS25 obj-h40793-type U32F0
attr MB_SBS25 obj-h40795-expr $val
attr MB_SBS25 obj-h40795-len 2
attr MB_SBS25 obj-h40795-name SBS25_Set_LadeP_max_W
attr MB_SBS25 obj-h40795-poll once
attr MB_SBS25 obj-h40795-reading Set_LadeP_max_W
attr MB_SBS25 obj-h40795-set 0
attr MB_SBS25 obj-h40795-type U32F0
attr MB_SBS25 obj-h40797-expr $val
attr MB_SBS25 obj-h40797-len 2
attr MB_SBS25 obj-h40797-name SBS25_Set_EntladeP_min_W
attr MB_SBS25 obj-h40797-poll once
attr MB_SBS25 obj-h40797-reading Set_EntladeP_min_W
attr MB_SBS25 obj-h40797-set 0
attr MB_SBS25 obj-h40797-type U32F0
attr MB_SBS25 obj-h40799-expr $val
attr MB_SBS25 obj-h40799-len 2
attr MB_SBS25 obj-h40799-name SBS25_Set_EntladeP_max_W
attr MB_SBS25 obj-h40799-poll once
attr MB_SBS25 obj-h40799-reading Set_EntladeP_max_W
attr MB_SBS25 obj-h40799-set 0
attr MB_SBS25 obj-h40801-expr $val
attr MB_SBS25 obj-h40801-len 2
attr MB_SBS25 obj-h40801-name SBS25_Set_Sollwert_Netzaustauschleistung_W
attr MB_SBS25 obj-h40801-poll once
attr MB_SBS25 obj-h40801-reading Set_Sollwert_Netzaustauschleistung_W
attr MB_SBS25 obj-h40801-set 0
attr MB_SBS25 obj-h40801-type S32F0
attr MB_SBS25 obj-h44431-expr $val
attr MB_SBS25 obj-h44431-len 2
attr MB_SBS25 obj-h44431-name SBS25_TTTBatterie_Ladeleistung_Minimal
attr MB_SBS25 obj-h44431-poll 1
attr MB_SBS25 obj-h44431-polldelay x5
attr MB_SBS25 obj-h44431-reading TTTBatterie_Ladeleistung_Minimal
attr MB_SBS25 obj-h44431-type U32F0
attr MB_SBS25 obj-h44433-expr $val
attr MB_SBS25 obj-h44433-len 2
attr MB_SBS25 obj-h44433-name SBS25_TTTBatterie_Ladeleistung_Maximal
attr MB_SBS25 obj-h44433-poll 1
attr MB_SBS25 obj-h44433-polldelay x5
attr MB_SBS25 obj-h44433-reading TTTBatterie_Ladeleistung_Maximal
attr MB_SBS25 obj-h44433-type U32F0
attr MB_SBS25 obj-h44435-expr $val
attr MB_SBS25 obj-h44435-len 2
attr MB_SBS25 obj-h44435-name SBS25_TTTBatterie_Entladeleistung_Minimal
attr MB_SBS25 obj-h44435-poll 1
attr MB_SBS25 obj-h44435-polldelay x5
attr MB_SBS25 obj-h44435-reading TTTBatterie_Entladeleistung_Minimal
attr MB_SBS25 obj-h44435-type U32F0
attr MB_SBS25 obj-h44437-expr $val
attr MB_SBS25 obj-h44437-len 2
attr MB_SBS25 obj-h44437-name SBS25_TTTBatterie_Entladeleistung_Maximal
attr MB_SBS25 obj-h44437-poll 1
attr MB_SBS25 obj-h44437-polldelay x5
attr MB_SBS25 obj-h44437-reading TTTBatterie_Entladeleistung_Maximal
attr MB_SBS25 obj-h44437-type U32F0
attr MB_SBS25 obj-h44439-expr $val
attr MB_SBS25 obj-h44439-len 2
attr MB_SBS25 obj-h44439-name SBS25_TTTNetzaustauschleistung_Sollwert
attr MB_SBS25 obj-h44439-poll 1
attr MB_SBS25 obj-h44439-polldelay x5
attr MB_SBS25 obj-h44439-reading TTTNetzaustauschleistung_Sollwert
attr MB_SBS25 obj-h44439-type S32F0
attr MB_SBS25 room 011_MODBUS
attr MB_SBS25 verbose 2


defmod MB_SBS25_2 ModbusAttr 3  15   192.168.121.179:502  TCP
attr MB_SBS25_2 dev-h-defLen 2
attr MB_SBS25_2 dev-h-defPoll 1
attr MB_SBS25_2 dev-h-defUnpack N
attr MB_SBS25_2 dev-type-S16F0-expr $val/1
attr MB_SBS25_2 dev-type-S16F0-format %.0f
attr MB_SBS25_2 dev-type-S16F0-len 1
attr MB_SBS25_2 dev-type-S16F0-unpack N
attr MB_SBS25_2 dev-type-S16F1-expr $val/1
attr MB_SBS25_2 dev-type-S16F1-format %.1f
attr MB_SBS25_2 dev-type-S16F1-len 1
attr MB_SBS25_2 dev-type-S16F1-unpack N
attr MB_SBS25_2 dev-type-S16F2-expr $val/1
attr MB_SBS25_2 dev-type-S16F2-format %.2f
attr MB_SBS25_2 dev-type-S16F2-len 1
attr MB_SBS25_2 dev-type-S16F2-unpack N
attr MB_SBS25_2 dev-type-S32-format %d
attr MB_SBS25_2 dev-type-S32-len 2
attr MB_SBS25_2 dev-type-S32-unpack l>
attr MB_SBS25_2 dev-type-S32F0-expr $val
attr MB_SBS25_2 dev-type-S32F0-format %.0f
attr MB_SBS25_2 dev-type-S32F0-len 2
attr MB_SBS25_2 dev-type-S32F0-unpack i>
attr MB_SBS25_2 dev-type-S32F1-expr $val
attr MB_SBS25_2 dev-type-S32F1-format %.1f
attr MB_SBS25_2 dev-type-S32F1-len 2
attr MB_SBS25_2 dev-type-S32F1-revRegs 1
attr MB_SBS25_2 dev-type-S32F1-unpack i>
attr MB_SBS25_2 dev-type-S32F2-expr $val
attr MB_SBS25_2 dev-type-S32F2-format %.2f
attr MB_SBS25_2 dev-type-S32F2-len 2
attr MB_SBS25_2 dev-type-S32F2-revRegs 1
attr MB_SBS25_2 dev-type-S32F2-unpack i>
attr MB_SBS25_2 dev-type-S32F3-expr $val
attr MB_SBS25_2 dev-type-S32F3-format %.3f
attr MB_SBS25_2 dev-type-S32F3-len 2
attr MB_SBS25_2 dev-type-S32F3-unpack i>
attr MB_SBS25_2 dev-type-S32F4-expr $val
attr MB_SBS25_2 dev-type-S32F4-format %.4f
attr MB_SBS25_2 dev-type-S32F4-len 2
attr MB_SBS25_2 dev-type-S32F4-revRegs 1
attr MB_SBS25_2 dev-type-S32F4-unpack i>
attr MB_SBS25_2 dev-type-S32TEMP-expr ($val & 0xFFFF) / 10
attr MB_SBS25_2 dev-type-S32TEMP-format %.2f
attr MB_SBS25_2 dev-type-S32TEMP-len 2
attr MB_SBS25_2 dev-type-S32TEMP-unpack l>
attr MB_SBS25_2 dev-type-U32-format %u
attr MB_SBS25_2 dev-type-U32-len 2
attr MB_SBS25_2 dev-type-U32-unpack I
attr MB_SBS25_2 dev-type-U32F0-format %.0f
attr MB_SBS25_2 dev-type-U32F0-len 2
attr MB_SBS25_2 dev-type-U32F0-unpack N
attr MB_SBS25_2 dev-type-U32F1-format %.1f
attr MB_SBS25_2 dev-type-U32F1-len 2
attr MB_SBS25_2 dev-type-U32F1-unpack N
attr MB_SBS25_2 dev-type-U32F2-format %.2f
attr MB_SBS25_2 dev-type-U32F2-len 2
attr MB_SBS25_2 dev-type-U32F2-unpack N
attr MB_SBS25_2 dev-type-U32F3-format %.3f
attr MB_SBS25_2 dev-type-U32F3-len 2
attr MB_SBS25_2 dev-type-U32F3-unpack N
attr MB_SBS25_2 dev-type-U32F4-format %.4f
attr MB_SBS25_2 dev-type-U32F4-len 2
attr MB_SBS25_2 dev-type-U32F4-unpack N
attr MB_SBS25_2 dev-type-U32RAW-format %d
attr MB_SBS25_2 dev-type-U32RAW-len 2
attr MB_SBS25_2 devStateIcon {\
my $mode = 'measure_power@green';;;;\
$mode = 'measure_power@yellow' if (ReadingsVal($name, "Wirkleistung_W", "") < 1);;;;\
\
my $chargePw = ReadingsVal("SBS25_2", "state", "")*1000;;;;\
\
my $charge = '';;;;\
$charge = 'control_arrow_leftward@greenyellow' if ($chargePw < 0);;;;\
$charge = 'control_arrow_rightward@green' if ($chargePw > 0);;;;\
\
my $ChargeStatus = 'measure_battery_100@green';;;;\
$ChargeStatus = 'measure_battery_75@green' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 80);;;;\
$ChargeStatus = 'measure_battery_50@yellow' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 55);;;;\
$ChargeStatus = 'measure_battery_25@orange' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 30);;;;\
$ChargeStatus = 'measure_battery_0@red' if (ReadingsVal($name, "BatterieLadezustand_%", "") < 6);;;;\
\
my $Cap = (ReadingsVal($name,"BatterieLadezustand_%",0) ) * 98;;\
\
\
"<div>" . \
FW_makeImage($mode,"measure_power") ." AC ". ReadingsVal($name,"Wirkleistung_W",0) ."W  ". \
FW_makeImage($ChargeStatus,"") . \
FW_makeImage($charge,"") ." ". $chargePw ."W   ". \
ReadingsVal($name,"BatterieLadezustand_%",0) ."% ".\
$Cap."wh  ".\
"</div>"}
attr MB_SBS25_2 event-min-interval .*:600
attr MB_SBS25_2 event-on-change-reading .*
attr MB_SBS25_2 obj-h30003-expr $val / 1
attr MB_SBS25_2 obj-h30003-format %.f
attr MB_SBS25_2 obj-h30003-len 2
attr MB_SBS25_2 obj-h30003-name SBS25_Nameplate.SusyId
attr MB_SBS25_2 obj-h30003-poll once
attr MB_SBS25_2 obj-h30003-reading TTTNameplate.SusyId
attr MB_SBS25_2 obj-h30003-type U32RAW
attr MB_SBS25_2 obj-h30003-unpack N
attr MB_SBS25_2 obj-h30005-expr $val / 1
attr MB_SBS25_2 obj-h30005-format %.f
attr MB_SBS25_2 obj-h30005-len 2
attr MB_SBS25_2 obj-h30005-name SBS25_Nameplate.SerNum
attr MB_SBS25_2 obj-h30005-poll once
attr MB_SBS25_2 obj-h30005-reading TTTNameplate.SerNum
attr MB_SBS25_2 obj-h30005-type U32RAW
attr MB_SBS25_2 obj-h30005-unpack N
attr MB_SBS25_2 obj-h30051-expr $val / 1
attr MB_SBS25_2 obj-h30051-format %.f
attr MB_SBS25_2 obj-h30051-len 2
attr MB_SBS25_2 obj-h30051-name SBS25_Nameplate.MainModel
attr MB_SBS25_2 obj-h30051-poll once
attr MB_SBS25_2 obj-h30051-reading TTTNameplate.MainModel
attr MB_SBS25_2 obj-h30051-unpack N
attr MB_SBS25_2 obj-h30053-expr $val / 1
attr MB_SBS25_2 obj-h30053-format %.f
attr MB_SBS25_2 obj-h30053-len 2
attr MB_SBS25_2 obj-h30053-name SBS25_Nameplate.Model
attr MB_SBS25_2 obj-h30053-poll once
attr MB_SBS25_2 obj-h30053-reading TTTNameplate.Model
attr MB_SBS25_2 obj-h30053-unpack N
attr MB_SBS25_2 obj-h30201-map 35:Fehler, 303:Aus, 307:OK, 455:Warnung
attr MB_SBS25_2 obj-h30201-name SBS25_StatusWR
attr MB_SBS25_2 obj-h30201-reading StatusWR
attr MB_SBS25_2 obj-h30211-map 336:Contact manufacturer, 337:Contact installer, 338:invalid, 887:none
attr MB_SBS25_2 obj-h30211-name SBS25_UserAction
attr MB_SBS25_2 obj-h30211-polldelay x1
attr MB_SBS25_2 obj-h30211-reading UserAction
attr MB_SBS25_2 obj-h30217-map 16777213:Fehler, 51:geschlossen, 311:offen
attr MB_SBS25_2 obj-h30217-name SBS25_Netzrelais
attr MB_SBS25_2 obj-h30217-polldelay x1
attr MB_SBS25_2 obj-h30217-reading Netzrelais
attr MB_SBS25_2 obj-h30235-expr $val / 1
attr MB_SBS25_2 obj-h30235-len 2
attr MB_SBS25_2 obj-h30235-map 1440: Netzbetrieb (ModGri), 1441: Inselnetzbetrieb (ModOffGri), 316777213: Information liegt nicht vor (NaNStt)
attr MB_SBS25_2 obj-h30235-name SBS25_TTTBatterie_Backup-Modus
attr MB_SBS25_2 obj-h30235-poll x13
attr MB_SBS25_2 obj-h30235-polldelay 1
attr MB_SBS25_2 obj-h30235-reading TTTBatterie_Backup-Modus
attr MB_SBS25_2 obj-h30235-unpack N
attr MB_SBS25_2 obj-h30529-format %.f
attr MB_SBS25_2 obj-h30529-name SBS25_NetzEMEinspeisungGesamt_Wh
attr MB_SBS25_2 obj-h30529-polldelay x7
attr MB_SBS25_2 obj-h30529-reading NetzEMEinspeisungGesamt_Wh
attr MB_SBS25_2 obj-h30529-type U32F0
attr MB_SBS25_2 obj-h30531-name SBS25_BatterieLadungTag_Wh
attr MB_SBS25_2 obj-h30531-polldelay x7
attr MB_SBS25_2 obj-h30531-reading BatterieLadungTag_Wh
attr MB_SBS25_2 obj-h30531-type U32F0
attr MB_SBS25_2 obj-h30535-name SBS25_BatterieEnladungTag_Wh
attr MB_SBS25_2 obj-h30535-polldelay x7
attr MB_SBS25_2 obj-h30535-reading BatterieEntladungTag_Wh
attr MB_SBS25_2 obj-h30535-type U32F0
attr MB_SBS25_2 obj-h30769-expr $val  / 1000
attr MB_SBS25_2 obj-h30769-format %.3f
attr MB_SBS25_2 obj-h30769-len 2
attr MB_SBS25_2 obj-h30769-name SBS25_DC_Strom_1_A
attr MB_SBS25_2 obj-h30769-poll 0
attr MB_SBS25_2 obj-h30769-polldelay x4
attr MB_SBS25_2 obj-h30769-reading DC_Strom_1_A
attr MB_SBS25_2 obj-h30771-expr $val  / 100
attr MB_SBS25_2 obj-h30771-format %.2f
attr MB_SBS25_2 obj-h30771-len 2
attr MB_SBS25_2 obj-h30771-name SBS25_DC_Spannung_1_V
attr MB_SBS25_2 obj-h30771-poll 0
attr MB_SBS25_2 obj-h30771-polldelay x4
attr MB_SBS25_2 obj-h30771-reading DC_Spannung_1_V
attr MB_SBS25_2 obj-h30773-name SBS25_DC_Leistung_1_W
attr MB_SBS25_2 obj-h30773-poll 0
attr MB_SBS25_2 obj-h30773-reading DC_Leistung_1_W
attr MB_SBS25_2 obj-h30775-expr $val
attr MB_SBS25_2 obj-h30775-name SBS25_Wirkleistung_W
attr MB_SBS25_2 obj-h30775-poll 1
attr MB_SBS25_2 obj-h30775-polldelay x3
attr MB_SBS25_2 obj-h30775-reading Wirkleistung_W
attr MB_SBS25_2 obj-h30775-type S32F0
attr MB_SBS25_2 obj-h30777-expr $val
attr MB_SBS25_2 obj-h30777-name SBS25_Wirkleistung_L1_W
attr MB_SBS25_2 obj-h30777-poll 0
attr MB_SBS25_2 obj-h30777-polldelay x3
attr MB_SBS25_2 obj-h30777-reading Wirkleistung_L1_W
attr MB_SBS25_2 obj-h30777-type S32F0
attr MB_SBS25_2 obj-h30779-expr $val
attr MB_SBS25_2 obj-h30779-name SBS25_Wirkleistung_L2_W
attr MB_SBS25_2 obj-h30779-poll 0
attr MB_SBS25_2 obj-h30779-polldelay x3
attr MB_SBS25_2 obj-h30779-reading Wirkleistung_L2_W
attr MB_SBS25_2 obj-h30779-type S32F0
attr MB_SBS25_2 obj-h30781-expr $val
attr MB_SBS25_2 obj-h30781-name SBS25_Wirkleistung_L3_W
attr MB_SBS25_2 obj-h30781-poll 0
attr MB_SBS25_2 obj-h30781-polldelay x3
attr MB_SBS25_2 obj-h30781-reading Wirkleistung_L3_W
attr MB_SBS25_2 obj-h30781-type S32F0
attr MB_SBS25_2 obj-h30783-expr $val
attr MB_SBS25_2 obj-h30783-format %.2f
attr MB_SBS25_2 obj-h30783-name SBS25_Grid_Spannung_V
attr MB_SBS25_2 obj-h30783-poll 0
attr MB_SBS25_2 obj-h30783-polldelay x7
attr MB_SBS25_2 obj-h30783-reading Grid_Spannung_V
attr MB_SBS25_2 obj-h30783-type U32F2
attr MB_SBS25_2 obj-h30843-expr ($val /1000)
attr MB_SBS25_2 obj-h30843-name BatterieStrom_DC__A
attr MB_SBS25_2 obj-h30843-poll 1
attr MB_SBS25_2 obj-h30843-polldelay x1
attr MB_SBS25_2 obj-h30843-reading BatterieStrom_DC__A
attr MB_SBS25_2 obj-h30843-type S32F3
attr MB_SBS25_2 obj-h30845-name SBS25_BatterieLadezustand_%
attr MB_SBS25_2 obj-h30845-polldelay x5
attr MB_SBS25_2 obj-h30845-reading BatterieLadezustand_%
attr MB_SBS25_2 obj-h30845-unpack N
attr MB_SBS25_2 obj-h30847-name SBS25_BatterieKapazitaetaktuell_%
attr MB_SBS25_2 obj-h30847-polldelay x5
attr MB_SBS25_2 obj-h30847-reading BatterieKapazitaetaktuell_%
attr MB_SBS25_2 obj-h30847-unpack i>
attr MB_SBS25_2 obj-h30849-name SBS25_BatterieTemperatur_C
attr MB_SBS25_2 obj-h30849-polldelay x13
attr MB_SBS25_2 obj-h30849-reading BatterieTemperatur_C
attr MB_SBS25_2 obj-h30849-type S32TEMP
attr MB_SBS25_2 obj-h30851-expr ($val  & 0xFFFF) / 100
attr MB_SBS25_2 obj-h30851-format %.2f
attr MB_SBS25_2 obj-h30851-name SBS25_BatterieSpannung_V
attr MB_SBS25_2 obj-h30851-polldelay x7
attr MB_SBS25_2 obj-h30851-reading BatterieSpannung_V
attr MB_SBS25_2 obj-h30851-type U32F2
attr MB_SBS25_2 obj-h30865-format %.2f
attr MB_SBS25_2 obj-h30865-name SBS25_Grid_Bezug_W
attr MB_SBS25_2 obj-h30865-poll 1
attr MB_SBS25_2 obj-h30865-polldelay x3
attr MB_SBS25_2 obj-h30865-reading Grid_Bezug_W
attr MB_SBS25_2 obj-h30865-type U32F2
attr MB_SBS25_2 obj-h30867-format %.2f
attr MB_SBS25_2 obj-h30867-name SBS25_Grid_Einspeisung_W
attr MB_SBS25_2 obj-h30867-poll 1
attr MB_SBS25_2 obj-h30867-polldelay x3
attr MB_SBS25_2 obj-h30867-reading Grid_Einspeisung_W
attr MB_SBS25_2 obj-h30867-type U32F2
attr MB_SBS25_2 obj-h30953-name SBS25_WR_Temperatur_C
attr MB_SBS25_2 obj-h30953-polldelay x13
attr MB_SBS25_2 obj-h30953-reading WR_Temperatur_C
attr MB_SBS25_2 obj-h30953-type S32TEMP
attr MB_SBS25_2 obj-h30955-map 16777213:Fehler, 303:Aus, 2291:standby, 2292:laden, 2293:entladen
attr MB_SBS25_2 obj-h30955-name SBS25_BatterieStatus
attr MB_SBS25_2 obj-h30955-reading BatterieStatus
attr MB_SBS25_2 obj-h30957-expr ($val  & 0xFFFF) / 1000
attr MB_SBS25_2 obj-h30957-format %.3f
attr MB_SBS25_2 obj-h30957-name SBS25_DC_Strom_2_A
attr MB_SBS25_2 obj-h30957-poll 0
attr MB_SBS25_2 obj-h30957-reading DC_Strom_2_A
attr MB_SBS25_2 obj-h30959-expr ($val  & 0xFFFF) / 100
attr MB_SBS25_2 obj-h30959-format %.2f
attr MB_SBS25_2 obj-h30959-name SBS25_DC_Spannung_2_V
attr MB_SBS25_2 obj-h30959-poll 0
attr MB_SBS25_2 obj-h30959-reading DC_Spannung_2_V
attr MB_SBS25_2 obj-h30961-name SBS25_DC_Leistung_2_W
attr MB_SBS25_2 obj-h30961-poll 0
attr MB_SBS25_2 obj-h30961-polldelay x1
attr MB_SBS25_2 obj-h30961-reading DC_Leistung_2_W
attr MB_SBS25_2 obj-h30977-expr ($val & 0xFFFF) / 1000
attr MB_SBS25_2 obj-h30977-len 2
attr MB_SBS25_2 obj-h30977-name SBS25_GridMs.A.phsA
attr MB_SBS25_2 obj-h30977-poll 0
attr MB_SBS25_2 obj-h30977-polldelay x1
attr MB_SBS25_2 obj-h30977-reading BatterieStrom_AC_Phase_L1_A
attr MB_SBS25_2 obj-h30977-type S32F3
attr MB_SBS25_2 obj-h30979-expr ($val & 0xFFFF) / 1000
attr MB_SBS25_2 obj-h30979-len 2
attr MB_SBS25_2 obj-h30979-name SBS25_GridMs.A.phsB
attr MB_SBS25_2 obj-h30979-poll 1
attr MB_SBS25_2 obj-h30979-polldelay x1
attr MB_SBS25_2 obj-h30979-reading BatterieStrom_AC_Phase_L2_A
attr MB_SBS25_2 obj-h30979-type S32F3
attr MB_SBS25_2 obj-h30981-expr ($val & 0xFFFF) / 1000
attr MB_SBS25_2 obj-h30981-len 2
attr MB_SBS25_2 obj-h30981-name SBS25_GridMs.A.phsC
attr MB_SBS25_2 obj-h30981-poll 0
attr MB_SBS25_2 obj-h30981-polldelay x1
attr MB_SBS25_2 obj-h30981-reading BatterieStrom_AC_Phase_L3_A
attr MB_SBS25_2 obj-h30981-type S32F3
attr MB_SBS25_2 obj-h31377-expr ($val & 0xFFFFFFFF)
attr MB_SBS25_2 obj-h31377-format %.f
attr MB_SBS25_2 obj-h31377-len 2
attr MB_SBS25_2 obj-h31377-name SBS25_Nameplate.Bat.Vendor
attr MB_SBS25_2 obj-h31377-poll once
attr MB_SBS25_2 obj-h31377-reading TTTNameplate.Bat.Vendor
attr MB_SBS25_2 obj-h31377-unpack N
attr MB_SBS25_2 obj-h31379-expr $val / 1
attr MB_SBS25_2 obj-h31379-format %.f
attr MB_SBS25_2 obj-h31379-len 2
attr MB_SBS25_2 obj-h31379-name SBS25_Nameplate.CmpBMS.Typ
attr MB_SBS25_2 obj-h31379-poll 1
attr MB_SBS25_2 obj-h31379-polldelay x5
attr MB_SBS25_2 obj-h31379-reading TTTNameplate.CmpBMS.Typ
attr MB_SBS25_2 obj-h31379-unpack N
attr MB_SBS25_2 obj-h31393-name SBS25_BatterieLadeleistung_W
attr MB_SBS25_2 obj-h31393-poll 1
attr MB_SBS25_2 obj-h31393-polldelay x2
attr MB_SBS25_2 obj-h31393-reading BatterieLadeleistung_W
attr MB_SBS25_2 obj-h31395-name SBS25_BatterieEntladeleistung_W
attr MB_SBS25_2 obj-h31395-poll 1
attr MB_SBS25_2 obj-h31395-polldelay x2
attr MB_SBS25_2 obj-h31395-reading BatterieEntladeleistung_W
attr MB_SBS25_2 obj-h31397-expr $val & 0xFFFFFFFFFFFFFFFF
attr MB_SBS25_2 obj-h31397-len 4
attr MB_SBS25_2 obj-h31397-name SBS25_BatterieLadungGesamt_Wh
attr MB_SBS25_2 obj-h31397-poll 1
attr MB_SBS25_2 obj-h31397-polldelay x2
attr MB_SBS25_2 obj-h31397-reading BatterieLadungGesamt_Wh
attr MB_SBS25_2 obj-h31397-unpack Q>
attr MB_SBS25_2 obj-h31401-expr $val & 0xFFFFFFFFFFFFFFFF
attr MB_SBS25_2 obj-h31401-len 4
attr MB_SBS25_2 obj-h31401-name SBS25_BatterieEntladungGesamt_Wh
attr MB_SBS25_2 obj-h31401-poll 1
attr MB_SBS25_2 obj-h31401-polldelay x2
attr MB_SBS25_2 obj-h31401-reading BatterieEntladungGesamt_Wh
attr MB_SBS25_2 obj-h31401-unpack Q>
attr MB_SBS25_2 obj-h34113-expr $val / 10
attr MB_SBS25_2 obj-h34113-name SBS25_WR_Innentemperatur_C
attr MB_SBS25_2 obj-h34113-poll 1
attr MB_SBS25_2 obj-h34113-polldelay x13
attr MB_SBS25_2 obj-h34113-reading WR_Innentemperatur_C
attr MB_SBS25_2 obj-h34113-type S32TEMP
attr MB_SBS25_2 obj-h40073-expr $val
attr MB_SBS25_2 obj-h40073-len 2
attr MB_SBS25_2 obj-h40073-name SBS25_BatterieUntereEntladegrenze_%
attr MB_SBS25_2 obj-h40073-poll 1
attr MB_SBS25_2 obj-h40073-polldelay x10
attr MB_SBS25_2 obj-h40073-reading BatterieUntereEntladegrenze_%
attr MB_SBS25_2 obj-h40149-expr $val
attr MB_SBS25_2 obj-h40149-len 2
attr MB_SBS25_2 obj-h40149-name SBS25_Set_Leistung_W
attr MB_SBS25_2 obj-h40149-poll once
attr MB_SBS25_2 obj-h40149-reading Set_Leistung_W
attr MB_SBS25_2 obj-h40149-set 1
attr MB_SBS25_2 obj-h40149-unpack I>
attr MB_SBS25_2 obj-h40151-expr $val
attr MB_SBS25_2 obj-h40151-name SBS25_Set_Aktiv
attr MB_SBS25_2 obj-h40151-poll once
attr MB_SBS25_2 obj-h40151-reading Set_Aktiv
attr MB_SBS25_2 obj-h40151-set 1
attr MB_SBS25_2 obj-h40187-expr $val
attr MB_SBS25_2 obj-h40187-name SBS25_BatterieNennkapazitaet_Wh
attr MB_SBS25_2 obj-h40187-poll once
attr MB_SBS25_2 obj-h40187-reading BatterieNennkapazitaet_Wh
attr MB_SBS25_2 obj-h40187-type U32F0
attr MB_SBS25_2 obj-h40236-expr $val / 1
attr MB_SBS25_2 obj-h40236-map 303:303Aus (Off), 308:308Ein (On), 1438:1438Automatik (Auto), 2289:2289Batterie laden (BatChaMod), 2290:2290Batterie entladen (BatDschMod), 2424:2424Voreinstellung (Dft), 16777213:16777213Information liegt nicht vor (NaNStt)
attr MB_SBS25_2 obj-h40236-name SBS25_Set_BMS_Mode
attr MB_SBS25_2 obj-h40236-poll once
attr MB_SBS25_2 obj-h40236-reading Set_BMS_Mode
attr MB_SBS25_2 obj-h40721-expr $val
attr MB_SBS25_2 obj-h40721-len 2
attr MB_SBS25_2 obj-h40721-name SBS25_BatterieTiefentladeschutzbereichMinimaleBreite_%
attr MB_SBS25_2 obj-h40721-poll once
attr MB_SBS25_2 obj-h40721-reading BatterieTiefentladeschutzbereichMinimaleBreite_%
attr MB_SBS25_2 obj-h40781-expr $val
attr MB_SBS25_2 obj-h40781-len 2
attr MB_SBS25_2 obj-h40781-name SBS25_Set_Netzaustauschleistung_W
attr MB_SBS25_2 obj-h40781-poll once
attr MB_SBS25_2 obj-h40781-reading Set_Netzaustauschleistung_W
attr MB_SBS25_2 obj-h40781-set 1
attr MB_SBS25_2 obj-h40793-expr $val
attr MB_SBS25_2 obj-h40793-len 2
attr MB_SBS25_2 obj-h40793-name SBS25_Set_LadeP_min_W
attr MB_SBS25_2 obj-h40793-poll once
attr MB_SBS25_2 obj-h40793-reading Set_LadeP_min_W
attr MB_SBS25_2 obj-h40793-set 1
attr MB_SBS25_2 obj-h40793-type U32F0
attr MB_SBS25_2 obj-h40795-expr $val
attr MB_SBS25_2 obj-h40795-len 2
attr MB_SBS25_2 obj-h40795-name SBS25_Set_LadeP_max_W
attr MB_SBS25_2 obj-h40795-poll once
attr MB_SBS25_2 obj-h40795-reading Set_LadeP_max_W
attr MB_SBS25_2 obj-h40795-set 1
attr MB_SBS25_2 obj-h40795-type U32F0
attr MB_SBS25_2 obj-h40797-expr $val
attr MB_SBS25_2 obj-h40797-len 2
attr MB_SBS25_2 obj-h40797-name SBS25_Set_EntladeP_min_W
attr MB_SBS25_2 obj-h40797-poll once
attr MB_SBS25_2 obj-h40797-reading Set_EntladeP_min_W
attr MB_SBS25_2 obj-h40797-set 1
attr MB_SBS25_2 obj-h40797-type U32F0
attr MB_SBS25_2 obj-h40799-expr $val
attr MB_SBS25_2 obj-h40799-len 2
attr MB_SBS25_2 obj-h40799-name SBS25_Set_EntladeP_max_W
attr MB_SBS25_2 obj-h40799-poll once
attr MB_SBS25_2 obj-h40799-reading Set_EntladeP_max_W
attr MB_SBS25_2 obj-h40799-set 1
attr MB_SBS25_2 obj-h40801-expr $val
attr MB_SBS25_2 obj-h40801-len 2
attr MB_SBS25_2 obj-h40801-name SBS25_Set_Sollwert_Netzaustauschleistung_W
attr MB_SBS25_2 obj-h40801-poll once
attr MB_SBS25_2 obj-h40801-reading Set_Sollwert_Netzaustauschleistung_W
attr MB_SBS25_2 obj-h40801-set 1
attr MB_SBS25_2 obj-h40801-type S32F0
attr MB_SBS25_2 obj-h44431-expr $val
attr MB_SBS25_2 obj-h44431-len 2
attr MB_SBS25_2 obj-h44431-name SBS25_TTTBatterie_Ladeleistung_Minimal
attr MB_SBS25_2 obj-h44431-poll 1
attr MB_SBS25_2 obj-h44431-polldelay x5
attr MB_SBS25_2 obj-h44431-reading TTTBatterie_Ladeleistung_Minimal
attr MB_SBS25_2 obj-h44431-type U32F0
attr MB_SBS25_2 obj-h44433-expr $val
attr MB_SBS25_2 obj-h44433-len 2
attr MB_SBS25_2 obj-h44433-name SBS25_TTTBatterie_Ladeleistung_Maximal
attr MB_SBS25_2 obj-h44433-poll 1
attr MB_SBS25_2 obj-h44433-polldelay x5
attr MB_SBS25_2 obj-h44433-reading TTTBatterie_Ladeleistung_Maximal
attr MB_SBS25_2 obj-h44433-type U32F0
attr MB_SBS25_2 obj-h44435-expr $val
attr MB_SBS25_2 obj-h44435-len 2
attr MB_SBS25_2 obj-h44435-name SBS25_TTTBatterie_Entladeleistung_Minimal
attr MB_SBS25_2 obj-h44435-poll 1
attr MB_SBS25_2 obj-h44435-polldelay x5
attr MB_SBS25_2 obj-h44435-reading TTTBatterie_Entladeleistung_Minimal
attr MB_SBS25_2 obj-h44435-type U32F0
attr MB_SBS25_2 obj-h44437-expr $val
attr MB_SBS25_2 obj-h44437-len 2
attr MB_SBS25_2 obj-h44437-name SBS25_TTTBatterie_Entladeleistung_Maximal
attr MB_SBS25_2 obj-h44437-poll 1
attr MB_SBS25_2 obj-h44437-polldelay x5
attr MB_SBS25_2 obj-h44437-reading TTTBatterie_Entladeleistung_Maximal
attr MB_SBS25_2 obj-h44437-type U32F0
attr MB_SBS25_2 obj-h44439-expr $val
attr MB_SBS25_2 obj-h44439-len 2
attr MB_SBS25_2 obj-h44439-name SBS25_TTTNetzaustauschleistung_Sollwert
attr MB_SBS25_2 obj-h44439-poll 1
attr MB_SBS25_2 obj-h44439-polldelay x5
attr MB_SBS25_2 obj-h44439-reading TTTNetzaustauschleistung_Sollwert
attr MB_SBS25_2 obj-h44439-type S32F0
attr MB_SBS25_2 room 011_MODBUS
attr MB_SBS25_2 verbose 2


Testen der Ladungsfunktion an einem SBS25:
Hiermit kann die Ladung testweise für XX-Minuten (Wert im BWR maßgeblich) um 00:01 Uhr (oder verändern nach eigenem Wunsch) gestartet werden. (XX = Parameterwert für "Timeout für Kommunikationsfehlermeldung")
Es muss aber auch ein negativer Wert für den Netzübergabewert eingetragen sein.
Damals hatte ich zum Testen einfach immer -10000 W drin
> dann wird halt immer mit der Max.-Ladeleistung des BWR (bei SBS25 sind dies 2500 W) aus dem Netz (bzw. aus PV-Leistung sowie greifbar) geladen.
->>> (dauert ehe der BWR-reagiert - evtl. mehrfach senden)

defmod at.TibberLoadBatterySBS25 at +*00:01:00 set MB_SBS25 Set_Aktiv 803
attr at.TibberLoadBatterySBS25 comment Aufruf für die Test - Batterieladung mit Start um 00:01 Uhr am SBS25
attr at.TibberLoadBatterySBS25 room 011_MODBUS
attr at.TibberLoadBatterySBS25 verbose 3


Als das dann funktionierte habe ich in einem zyklisch (alle 15 Sekunden) ablaufenden Programmteil den Aufrufcode für die Steuerung (ON/OFF) integriert um das Laden (mit Tibberpreisbeachtung) zu steuern. Das würde aber hier zu weit führen, da ich neben diversen PV-Anlagen-Devices / Solarforcast-Devices / einem Brennstoffzellen-Device / einem Heizungsstab-Device dies mit den Bezugspreisen noch abstimme.

Ladung (bzw Entladung) ein: (dauert etwas ehe der BWR-reagiert - mehrfach zyklisch senden - wird im SMA-BWR-Protokoll eingetragen)



sub SMABatteryChargeON()
{
    #Werte für Ladungsbeginn (Entladung geht auch hiermit)  per Modbus an Battery senden
    fhem("set MB_SBS25 Set_Leistung_W -8000"); # -8000 Watt = laden +8000 = Batterie entladen =>>Netzleistung am Übergabemesspunkt (WR1)
    fhem("set MB_SBS25_2 Set_Leistung_W -8000");  # -8000 Watt = laden +8000 Watt = Batterie entladen =>> Netzleistung am Übergabemesspunkt (WR2)
    fhem("set MB_SBS25 Set_Aktiv 802");  # 802 - Steuerung aktiv (WR1)
    fhem("set MB_SBS25_2 Set_Aktiv 802");   # 802 - Steuerung aktiv (WR2)
    ###so geht es aber auch (für 30 Minuten - weil so im WR Wartezeit von 30 Minuten hinterlegt wenn kein Kontakt mehr zu Fremdsteuerung besteht)################
    #defmod di_Test_Batterie_Laden DOIF ([05:00-05:10]) (set MB_SBS25 Set_Leistung_W 5000) (set MB_SBS25_2 Set_Leistung_W 5000) (set MB_SBS25 Set_Aktiv 802) (set MB_SBS25_2 Set_Aktiv 802)
    #attr di_Test_Batterie_Laden comment ([22:10-22:20] and [BatteryDummy:chargestatus] < 25) (set MB_SBS25 Set_Leistung_W 5000) (set MB_SBS25_2 Set_Leistung_W 5000) (set MB_SBS25 Set_Aktiv 802) (set MB_SBS25_2 Set_Aktiv 802)
    #attr di_Test_Batterie_Laden room 011_MODBUS,025_Tibber,Strompreis->Dynamisch
    #attr di_Test_Batterie_Laden stateFormat timer_01_c01 bis timer_02_c01
    #attr di_Test_Batterie_Laden verbose 5
    #attr di_Test_Batterie_Laden wait 0,10,10,10
}


Ladung / Entladung aus:  (dauert ehe der BWR-reagiert - mehrfach zyklisch senden - wird im SMA-BWR-Protokoll eingetragen)

sub SMABatteryChargeOFF()
{
    #Werte für Ladungsende per Modbus an Battery senden  - (wenn nicht klappt evtl delay oder wait einbauen???)
    fhem("set MB_SBS25 Set_Leistung_W 0"); # 0 Watt Netzleistung am Übergabemesspunkt (WR1)
    fhem("set MB_SBS25_2 Set_Leistung_W 0");  # 0 Watt Netzleistung am Übergabemesspunkt (WR2)
    fhem("set MB_SBS25 Set_Aktiv 803");  # 803 - Steuerung nicht aktiv (WR1)
    fhem("set MB_SBS25_2 Set_Aktiv 803");   # 803 - Steuerung nicht aktiv (WR2)
    ###so geht es aber auch)################
    ###################
    #defmod di_Test_Batterie_Laden_Ende DOIF ([05:00-05:10]) (set MB_SBS25 Set_Leistung_W 0) (set MB_SBS25_2 Set_Leistung_W 0) (set MB_SBS25 Set_Aktiv 803) (set MB_SBS25_2 Set_Aktiv 803)
    #attr di_Test_Batterie_Laden_Ende comment ([22:10-22:20] and [BatteryDummy:chargestatus] > 85) (set MB_SBS25 Set_Leistung_W 0) (set MB_SBS25_2 Set_Leistung_W 0) (set MB_SBS25 Set_Aktiv 803) (set MB_SBS25_2 Set_Aktiv 803)
    #attr di_Test_Batterie_Laden_Ende room 011_MODBUS,025_Tibber,Strompreis->Dynamisch
    #attr di_Test_Batterie_Laden_Ende stateFormat timer_01_c01 bis timer_02_c01
    #attr di_Test_Batterie_Laden_Ende verbose 5
    #attr di_Test_Batterie_Laden_Ende wait 0,10,10,10
}

Alles nicht "auf schön" getrimmt - aber funktioniert für mich.  ;D

PS:
Die Parameter können für andere SMA-BWR - müssen aber nicht unbedingt - passen.
Dazu bitte selber die passende SMA-Dokumentation der Modbus-Register für den jeweiligen SMA-BWR nachschlagen.

Gruß
300P
FHEM 6.3 - Raspberry Pi 3 / Pi 4 - VControl300 mit VITOVALOR 300P - SMAEM - SMAInverter - DbLog/DbRep - MariaDB/QNAP - div. HTTPMOD - div. Modbus ser+TCP - SolarForecast - Tibber + Ladung mit SMA-SBS25