Overview Marstek Storage



With this function block, a Marstek energy storage is controlled and monitored via the local Open API (JSON over UDP). The communication takes place over the home network. The Open API must first be activated in the Marstek app and the UDP port set (default 30000).


Inputs

BA Operating mode* Operating mode:
  • 0=Automatic: The storage is controlled via the input "Power setpoint".
  • 1=Manual: No control commands are sent, only the status is queried. This enables parallel operation with the Marstek app.
LS Power setpoint W Power setpoint in W, only effective in the operating mode Automatic:
  • Value < 0: Charge with this power
  • Value > 0: Discharge with this power
  • Value = 0: Standby

Outputs

ER Communication error 0 = ok
1 = communication error (no response from the storage)
SOC State of charge % State of charge of the battery in % (Bat.GetStatus)
BL Battery power W Current battery power in W (ES.GetStatus, if provided by the device).
PV PV power W PV power in W, sum of all PV inputs (PV.GetStatus)
NL Grid power W Grid power in W (ES.GetStatus, ongrid_power)
CT CT total power W Total power of the current transformer/energy meter in W (EM.GetStatus, total_power)
BC Battery capacity Wh Total battery capacity in Wh (ES.GetStatus, bat_cap)
OG Offgrid power W Island grid/offgrid power in W (ES.GetStatus, offgrid_power)
PE Total PV energy Wh Total generated PV energy in Wh (ES.GetStatus, total_pv_energy)
NA Total grid feed-in Wh Total energy fed into the grid in Wh (ES.GetStatus, total_grid_output_energy)
NE Total grid consumption Wh Total energy drawn from the grid in Wh (ES.GetStatus, total_grid_input_energy)
VE Total consumption Wh Total consumption (load/offgrid) in Wh (ES.GetStatus, total_load_energy)

Parameters

IP address IP address of the Marstek storage. A static IP address is recommended.
MAC address MAC address of the storage. If the MAC address is specified, only responses from this device are evaluated. If the field remains empty, the check is skipped.
UDP Port UDP port of the Open API, as set in the Marstek app. Default 30000.
Debug If Debug is active, the sent and received raw JSON data is output as a message.


See also common parameters of all function blocks.