Skip to content
EN | DE

OpenEMS Modbus-API

License notice:

For active battery control on FENECON FEMS systems, a commercial license (FEMS App Modbus/TCP Write Access) is required.

FEMS documentation:
OpenEMS documentation:

Supported features

  • Battery control: External control of home battery charging and discharging via evcc.

Usage areas

  • Grid meter
  • Solar production
  • Battery

Parameters

NameDescriptionValueLevel
idModbus ID
Default: 1
intrequired
hostIP address or hostname
Example: 192.0.2.2
required
portPort
Default: 502
intrequired
batterycontrols battery component

active battery control (Modbus/TCP Write Access)

Default: false
optional
capacity [kWh]Battery capacity
Example: 50
optional
minsoc [%]Minimum charge

Lower limit when discharging the battery in normal operation

Example: 25
optional
maxsoc [%]Maximum charge

Upper limit when charging the battery from the grid

Example: 95
optional
grid_power_registerModbus register for grid power

GridActivePower (W)

Default: 315
advanced
grid_energy_registerModbus register for grid import energy

GridBuyActiveEnergy (Wh)

Default: 359
advanced
pv_power_registerModbus register for PV power

ProductionActivePower (W)

Default: 327
advanced
pv_energy_registerModbus register for PV energy

ProductionActiveEnergy (Wh)

Default: 367
advanced
maxacpower [W]Maximum AC power of the hybrid inverter
Default: 0
Example: 5000
advanced
battery_power_registerModbus register for battery power

EssDischargePower (W)

Default: 415
advanced
battery_soc_registerModbus register for state of charge

SoC (%)

Default: 302
advanced
battery_set_registerModbus register for charge power

SetActivePowerLessOrEquals (W)

Default: 710
advanced
watchdogbattery control API timeout
Default: 60s
advanced
maxchargepower [W]Maximum charge power

For forced charging of the battery.

advanced
maxdischargepower [W]Maximum discharge power

Maximum discharge power of the storage.

advanced
Configuration example for evcc.yaml

If you don't want to configure via the UI, you can alternatively use this YAML block.

meters:
- name: my_grid
type: template
template: openems-modbus
usage: grid
# Modbus TCP
modbus: tcpip
id: 1
host: # Hostname
port: 502 # Port
grid_power_register: 315 # Modbus register for grid power, GridActivePower (W) (optional)
grid_energy_register: 359 # Modbus register for grid import energy, GridBuyActiveEnergy (Wh) (optional)
meters:
- name: my_pv
type: template
template: openems-modbus
usage: pv
# Modbus TCP
modbus: tcpip
id: 1
host: # Hostname
port: 502 # Port
pv_power_register: 327 # Modbus register for PV power, ProductionActivePower (W) (optional)
pv_energy_register: 367 # Modbus register for PV energy, ProductionActiveEnergy (Wh) (optional)
maxacpower: 0 # Maximum AC power of the hybrid inverter (W), optional
meters:
- name: my_battery
type: template
template: openems-modbus
usage: battery
# Modbus TCP
modbus: tcpip
id: 1
host: # Hostname
port: 502 # Port
battery: false # controls battery component, active battery control (Modbus/TCP Write Access) (optional)
capacity: 50 # Battery capacity (kWh), optional
minsoc: 25 # Minimum charge (%), Lower limit when discharging the battery in normal operation (optional)
maxsoc: 95 # Maximum charge (%), Upper limit when charging the battery from the grid (optional)
battery_power_register: 415 # Modbus register for battery power, EssDischargePower (W) (optional)
battery_soc_register: 302 # Modbus register for state of charge, SoC (%) (optional)
battery_set_register: 710 # Modbus register for charge power, SetActivePowerLessOrEquals (W) (optional)
watchdog: 60s # battery control API timeout, optional
maxchargepower: # Maximum charge power (W), For forced charging of the battery. (optional)
maxdischargepower: # Maximum discharge power (W), Maximum discharge power of the storage. (optional)