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:
- FEMS App Modbus/TCP Read Access: docs.fenecon.de
- FEMS App Modbus/TCP Write Access: docs.fenecon.de
OpenEMS documentation:
- OpenEMS Edge Api Modbus Controller: openems.github.io
Supported features
- Battery control: External control of home battery charging and discharging via evcc.
Usage areas
- Grid meter
- Solar production
- Battery
Parameters
| Name | Description | Value | Level |
|---|---|---|---|
id | Modbus ID | int | required |
host | IP address or hostname | required | |
port | Port | int | required |
battery | controls battery component active battery control (Modbus/TCP Write Access) | optional | |
capacity [kWh] | Battery capacity | optional | |
minsoc [%] | Minimum charge Lower limit when discharging the battery in normal operation | optional | |
maxsoc [%] | Maximum charge Upper limit when charging the battery from the grid | optional | |
grid_power_register | Modbus register for grid power GridActivePower (W) | advanced | |
grid_energy_register | Modbus register for grid import energy GridBuyActiveEnergy (Wh) | advanced | |
pv_power_register | Modbus register for PV power ProductionActivePower (W) | advanced | |
pv_energy_register | Modbus register for PV energy ProductionActiveEnergy (Wh) | advanced | |
maxacpower [W] | Maximum AC power of the hybrid inverter | advanced | |
battery_power_register | Modbus register for battery power EssDischargePower (W) | advanced | |
battery_soc_register | Modbus register for state of charge SoC (%) | advanced | |
battery_set_register | Modbus register for charge power SetActivePowerLessOrEquals (W) | advanced | |
watchdog | battery control API timeout | 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), optionalmeters: - 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)