Hello, in this post I would like to show you how you can easily get all the data from your PV system (grid meeter/backup box, batteries, inverter) via the Ethernet connection of your inverter.
All you have to do is create the following yaml files and restart HomeAssistant.
- If it doesn’t already exist, create a folder called packages, in this folder create the file integration_alpha_ess.yaml
- Copy the following content into the integration_alpha_ess.yaml file
modbus:
- name: modbuspvsystem
type: tcp
host: !secret alphaess_modbus_host_ip
port: !secret alphaess_modbus_host_port
message_wait_milliseconds: 5 # waittime between 2 messages
timeout: 10 # timeout in seconds before connection is closed
delay: 1 # delay in seconds at startup
#Registerdefinition: https://alphaess.de/Public/Uploads/uploadfile/files/20230926/AlphaESS_Register_Parameter_List.pdf
#Beispielconfig für ioBroaker: https://github.com/ioBroker/modbus-templates/blob/4241d2b1c3f68d0408561834efa9653f1ee6a343/PV-Inverter/Alpha-ESS/holding_register.txt
#definition of sensors
sensors:
#Power L1,L2,L3
- name: PV Power L1
unique_id: PV_Power_L1
slave: !secret alphaess_modbus_slaveId
address: 27
input_type: holding
data_type: int32
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
- name: PV Power L2
unique_id: PV_Power_L2
slave: !secret alphaess_modbus_slaveId
address: 29
input_type: holding
data_type: int32
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
- name: PV Power L3
unique_id: PV_Power_L3
slave: !secret alphaess_modbus_slaveId
address: 31
input_type: holding
data_type: int32
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
# Power from/to Grid
- name: PV total active power
unique_id: PV_total_active_power
slave: !secret alphaess_modbus_slaveId
address: 33
input_type: holding
data_type: int32
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
#Battery
#Power
- name: PV Power battery
unique_id: PV_Power battery
slave: !secret alphaess_modbus_slaveId
address: 294
input_type: holding
data_type: int16
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
#voltage
- name: PV Battery voltage
unique_id: PV_Battery_voltage
slave: !secret alphaess_modbus_slaveId
address: 256
input_type: holding
data_type: int16
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
scan_interval: 60
scale: 0.1
precision: 2
#SOC
- name: PV Battery SOC
unique_id: PV_Battery_SOC
slave: !secret alphaess_modbus_slaveId
address: 258
input_type: holding
data_type: int16
unit_of_measurement: "%"
device_class: battery
state_class: measurement
scan_interval: 60
scale: 0.1
precision: 2
#Min Cell temperature
- name: PV Battery Min Cell temperature
unique_id: PV_BBattery_Min_Cell_temperature
slave: !secret alphaess_modbus_slaveId
address: 269
input_type: holding
data_type: uint16
unit_of_measurement: "°C"
device_class: temperature
state_class: measurement
scan_interval: 60
scale: 0.1
precision: 2
#Max Cell temperature
- name: PV Battery Max Cell temperature
unique_id: PV_BBattery_Max_Cell_temperature
slave: !secret alphaess_modbus_slaveId
address: 272
input_type: holding
data_type: uint16
unit_of_measurement: "°C"
device_class: temperature
state_class: measurement
scan_interval: 60
scale: 0.1
precision: 2
#remaining term
- name: PV Battery remaining term
unique_id: PV_Battery_remaining_term
slave: !secret alphaess_modbus_slaveId
address: 295
input_type: holding
data_type: int16
unit_of_measurement: minutes
state_class: measurement
scan_interval: 60
scale: 1
precision: 2
#Battery capacity
- name: PV Battery capacity
unique_id: Battery_capacity
slave: !secret alphaess_modbus_slaveId
address: 281
input_type: holding
data_type: uint16
unit_of_measurement: kWh
device_class: energy
state_class: measurement
scan_interval: 60
scale: 0.1
precision: 1
#charging energy
- name: PV Battery charging energy
unique_id: PV_Battery_charging_energy
slave: !secret alphaess_modbus_slaveId
address: 288
input_type: holding
data_type: uint32
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 60
scale: 0.1
precision: 2
#Discharge energy
- name: PV Battery discharge energy
unique_id: PV_Battery_discharge_energy
slave: !secret alphaess_modbus_slaveId
address: 290
input_type: holding
data_type: uint32
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 60
scale: 0.1
precision: 2
#Inverter
#Power
- name: PV Power Inverter
unique_id: PV_Power_Inverter
slave: !secret alphaess_modbus_slaveId
address: 1036
input_type: holding
data_type: int32
unit_of_measurement: W
device_class: power
state_class: measurement
scan_interval: 10
scale: 1
precision: 2
#Temperatur
- name: PV Inverter temperature
unique_id: PV_Inverter_temperature
slave: !secret alphaess_modbus_slaveId
address: 1077
input_type: holding
data_type: int16
unit_of_measurement: "°C"
device_class: temperature
state_class: measurement
scan_interval: 60
scale: 0.1
precision: 2
#generator
#String1
#Power
- name: PV Power String1
unique_id: PV_Power_String1
slave: !secret alphaess_modbus_slaveId
address: 1055
input_type: holding
data_type: uint32
unit_of_measurement: "W"
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
#voltage
- name: PV voltage String1
unique_id: PV_voltage_String1
slave: !secret alphaess_modbus_slaveId
address: 1053
input_type: holding
data_type: int16
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#current
- name: PV current String1
unique_id: PV_current_String1
slave: !secret alphaess_modbus_slaveId
address: 1054
input_type: holding
data_type: int16
unit_of_measurement: "A"
device_class: current
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#String2
#Power
- name: PV Power String2
unique_id: PV_Power_String2
slave: !secret alphaess_modbus_slaveId
address: 1059
input_type: holding
data_type: uint32
unit_of_measurement: "W"
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
#voltage
- name: PV voltage String2
unique_id: PV_voltage_String2
slave: !secret alphaess_modbus_slaveId
address: 1057
input_type: holding
data_type: int16
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#current
- name: PV current String2
unique_id: PV_current_String2
slave: !secret alphaess_modbus_slaveId
address: 1058
input_type: holding
data_type: int16
unit_of_measurement: "A"
device_class: current
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#String3
#Power
- name: PV Power String3
unique_id: PV_Power_String3
slave: !secret alphaess_modbus_slaveId
address: 1063
input_type: holding
data_type: uint32
unit_of_measurement: "W"
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
#voltage
- name: PV voltage String3
unique_id: PV_voltage_String3
slave: !secret alphaess_modbus_slaveId
address: 1061
input_type: holding
data_type: int16
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#current
- name: PV current String3
unique_id: PV_current_String3
slave: !secret alphaess_modbus_slaveId
address: 1062
input_type: holding
data_type: int16
unit_of_measurement: "A"
device_class: current
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#String4
#Power
- name: PV Power String4
unique_id: PV_Power_String4
slave: !secret alphaess_modbus_slaveId
address: 1067
input_type: holding
data_type: uint32
unit_of_measurement: "W"
device_class: power
state_class: measurement
scan_interval: 5
scale: 1
precision: 2
#voltage
- name: PV voltage String4
unique_id: PV_voltage_String4
slave: !secret alphaess_modbus_slaveId
address: 1065
input_type: holding
data_type: int16
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#current
- name: PV current String4
unique_id: PV_current_String4
slave: !secret alphaess_modbus_slaveId
address: 1066
input_type: holding
data_type: int16
unit_of_measurement: "A"
device_class: current
state_class: measurement
scan_interval: 5
scale: 0.1
precision: 2
#ENERGY MEASUREMENTS STATISTIC
- name: PV Grid feed
unique_id: PV_Grid_feed
slave: !secret alphaess_modbus_slaveId
address: 16
input_type: holding
data_type: uint32
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 60
scale: 0.01
precision: 2
- name: PV Grid purchase
unique_id: PV_Grid_purchase
slave: !secret alphaess_modbus_slaveId
address: 18
input_type: holding
data_type: uint32
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 60
scale: 0.01
precision: 2
- name: PV Generator energy
unique_id: PV_Generator_energy
slave: !secret alphaess_modbus_slaveId
address: 1086
input_type: holding
data_type: uint32
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scan_interval: 60
scale: 0.1
precision: 2
#GRID Meter
#Rate of gridmeter
- name: PV Gridmeter CT Rate
unique_id: PV_GridMeter_CT_Rate
slave: !secret alphaess_modbus_slaveId
address: 1
input_type: holding
data_type: uint16
state_class: measurement
scan_interval: 60
scale: 1
precision: 1
- name: PV PVMeter CT Rate
unique_id: PV_PVMeter_CT_Rate
slave: !secret alphaess_modbus_slaveId
address: 129
input_type: holding
data_type: uint16
state_class: measurement
scan_interval: 60
scale: 1
precision: 1
- Add the following entries to secrets.yaml
alphaess_modbus_host_ip: 192.168.10.10 #TODO: Set ip adress of Alpha Ess Storage system
alphaess_modbus_host_port: 502 #Set port of Alpha Ess system - default: 502
alphaess_modbus_slaveId: 85 #Set slaveId of Alpha Ess system - default: 85
- Configure in the configuration.yaml that your system should use the packages in the package folder
homeassistant:
packages: !include_dir_named packages
- Finally, all you need to do is restart your HomeAsistant and the entities should appear under Settings → Devices and Services → Entities