Hi.
Thanks for this information.
Do you know which Modbus register/command should be executed in order to set Device ID?
Hi.
Thanks for this information.
Do you know which Modbus register/command should be executed in order to set Device ID?
Hi, Andrii.
Iām afraid that I donāt know the Modbus command to set the Device ID. I have not tried to sniff the RS-485 data, but it sounds like something that I should do when I get some spare time! I had seen a list of commands that someone else had posted.
Here is what I did so set the IDs on my 6 controllers. Make sure that only one controller is on the bus. If it is set to default, then the ID number will be ā1ā, the number one. You can change the ID to the number that you want using the Solar Station Monitor V1.95.
I just did a Google for āEPEVER Modbus RS-485 commandsā and received a lot of very interesting hits, but did not find the specific answer to your question.
Greg
Just received an email from Epever support
The commend to read the ID of the controller: F8 45 00 01 01 F8 89 BE
F8 45: function code
00 01: the number of the address
01: the number of the bit
F8: read the Device ID value
89 BE: CRC
ā
The commend to set the ID of the controller: F8 45 00 01 01 02 09 FD
F8 45: function code
00 01: the number of the address
01: the number of the bit
02: the sending data (ID)
09 FD: CRC
Thanks, Epever!!!
hereās my config with EPEver Tracer series MPPT controller:
modbus:
- name: EPEver_Solar
type: rtuovertcp
host: 192.168.100.130
port: 8899
timeout: 9
sensors:
- name: EPEver_Solar_Voltage #3100
scan_interval: 30
unit_of_measurement: V
slave: 1
address: 12544
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Solar_Current #3101
scan_interval: 30
unit_of_measurement: A
slave: 1
address: 12545
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Solar_Power #3102
scan_interval: 30
unit_of_measurement: W
slave: 1
address: 12546
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_load_Voltage #310C
scan_interval: 600
unit_of_measurement: V
slave: 1
address: 12556
input_type: input
scale: 0.01
precision: 2
- name: EPEver_load_Current #310D
scan_interval: 20
unit_of_measurement: A
slave: 1
address: 12557
input_type: input
scale: 0.01
precision: 2
- name: EPEver_load_Power #310E
scan_interval: 20
unit_of_measurement: W
slave: 1
address: 12558
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Battery_Temperature #3110
scan_interval: 30
unit_of_measurement: Ā°C
slave: 1
address: 12560
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Device_Temperature #3111
scan_interval: 30
unit_of_measurement: Ā°C
slave: 1
address: 12561
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Battery_soc #311A
scan_interval: 30
unit_of_measurement: "%"
slave: 1
address: 12570
input_type: input
- name: EPEver_Battery_max_Voltage #3302
scan_interval: 600
unit_of_measurement: V
slave: 1
address: 13058
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Battery_min_Voltage #3303
scan_interval: 600
unit_of_measurement: V
slave: 1
address: 13059
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_Consuption_day #3304
scan_interval: 600
unit_of_measurement: Kwh
slave: 1
address: 13060
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_Consuption_month #3306
scan_interval: 86400
unit_of_measurement: Kwh
slave: 1
address: 13062
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_Consuption_year #3308
scan_interval: 86400
unit_of_measurement: Kwh
slave: 1
address: 13064
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_Consuption_total #330A
scan_interval: 86400
unit_of_measurement: Kwh
slave: 1
address: 13066
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_charge_day #330C
scan_interval: 600
unit_of_measurement: Kwh
slave: 1
address: 13068
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_charge_month #330E
scan_interval: 86400
unit_of_measurement: Kwh
slave: 1
address: 13070
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_charge_year #3310
scan_interval: 86400
unit_of_measurement: Kwh
slave: 1
address: 13072
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_power_charge_total #3312
scan_interval: 86400
unit_of_measurement: Kwh
slave: 1
address: 13074
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Battery_Voltage #331A
scan_interval: 20
unit_of_measurement: V
slave: 1
address: 13082
input_type: input
scale: 0.01
precision: 2
- name: EPEver_Battery_Current #331B
scan_interval: 20
unit_of_measurement: A
slave: 1
address: 13083
count: 2
swap: word
input_type: input
scale: 0.01
precision: 2
could this be achieved directly with USB to RS485 cable or via Epever eLOG01 and USB cable to HA RPi?
I am looking for an answer on this also. I have an Intel NUC with the usb to rs485 connection to a Tracer series and I would love to be able to check on this
I moved to a USB to rs485 it does work just change the front config part. Also the entire modbus integration changed so this file no long works in latest versions. Iāll upload a new version soon
Thank you so much
sorry for being total noob, but what do you mean by āfront config partā here?
Any chance for some help: so close As mentioned, have the USB-RS485 cable. You mentioned that now should work with your solution?
Hi Guys!!
I am also a proud owner of 2 ep-ever-chargers and have been following you and using your configs as guidelines.
until 2021.8.6
everything worked just fine, but now with 2021.9.5 some of my
sensors stopped working and while i was never able to write to the load-switch-coils at least i got all sensor values.
i was wondering what your experiences with the new release are.
my dashboard:
here one sensor is missing ā¦
- name: "Sol2 Charging W"
unit_of_measurement: W
slave: 1
address: 12546
input_type: input
scale: 0.01
count: 2
precision: 2
swap: word
i cannot figure out what is going wrongā¦
here my complete config
#EPEver eBox-Wifi-01 modbus
modbus:
- type: rtuovertcp
name: "Solar2EP"
host: 10.0.0.63
port: 8088
delay: 5
timeout: 10
close_comm_on_error: false
retry_on_empty: true
retries: 20
# Modbus sensors for EPever Charge Controller 4 (4310 AN)
sensors:
- name: "Sol2 Battery Capacity"
unit_of_measurement: "%"
slave: 1
address: 12570
input_type: input
- name: "Sol2 Solar W"
unit_of_measurement: W
slave: 1
address: 12546
input_type: input
scale: 0.01
count: 2
precision: 2
swap: word
- name: "Sol2 Solar A"
unit_of_measurement: A
slave: 1
address: 12545
input_type: input
scale: 0.01
precision: 2
- name: "Sol2 Solar V"
unit_of_measurement: V
slave: 1
address: 12544
input_type: input
scale: 0.01
precision: 2
- name: "Sol2 Charging W"
unit_of_measurement: W
slave: 1
address: 12546
input_type: input
scale: 0.01
count: 2
precision: 2
swap: word
- name: "Sol2 Charging A"
unit_of_measurement: A
slave: 1
address: 13083
input_type: input
scale: 0.01
precision: 2
count: 2
swap: word
- name: "Sol2 Battery V"
unit_of_measurement: V
slave: 1
address: 13082
input_type: input
scale: 0.01
precision: 2
- name: "Sol2 Load W"
unit_of_measurement: W
slave: 1
address: 12558 # low 12550 high 12551 #12558
input_type: input
scale: 0.01
precision: 2
- name: "Sol2 Load A"
unit_of_measurement: A
slave: 1
address: 12549
input_type: input
scale: 0.001
precision: 2
- name: "Sol2 Load V"
unit_of_measurement: V
slave: 1
address: 12548
input_type: input
scale: 0.01
precision: 2
- name: "Sol2 Battery Temp"
unit_of_measurement: Ā°C
slave: 1
address: 12560
input_type: input
scale: 0.01
precision: 2
- name: "Sol2 Controller Temp"
unit_of_measurement: Ā°C
slave: 1
address: 12561
input_type: input
scale: 0.01
precision: 2
- name: "Sol2 WH Today"
unit_of_measurement: KWh
slave: 1
address: 13068
input_type: input
scale: 0.01
precision: 2
count: 2
swap: word
- name: "Sol2 WH Month"
unit_of_measurement: KWh
slave: 1
address: 13070
input_type: input
scale: 0.01
precision: 2
count: 2
swap: word
- name: "Sol2 WH Year"
unit_of_measurement: KWh
slave: 1
address: 13072
input_type: input
scale: 0.01
precision: 2
count: 2
swap: word
- name: "Sol2 WH Total"
unit_of_measurement: KWh
slave: 1
address: 13074
input_type: input
scale: 0.01
precision: 2
count: 2
swap: word
The files you mention, is that on github?
A complete example for epever is at https://github.com/martgras/esphome/tree/testing/esphome/components/modbus_controller/examples/epever.
Btw The component has been merged into esphomes dev branch now.
Hi there, I am also looking to set this up. my raspberry pi with HA running it right next to my Epever charge controller. Could someone please show their yaml file for use with a usb to rs485 cable connect to the raspberry pi running HA? Would be supper grateful.
That worked for me with the EPEVER eBox-WIFI-01 WIFI in my local WIFI Network.
Thanks a lot!
Does that mean that a Wemos D1 with ESPhome will get me easier to the goal? could you explain the steps?
With the latest update some sensor values where not available any more
In the Core.logs i found errors, pointing to a problem with converting two-byte-values
i worked through it and want to share my
Latest working Version of my Configuration
#EPEver eBox-Wifi-01 modbus
modbus:
- type: rtuovertcp
name: "Solar2EP"
host: 10.0.0.xx
port: 8088
delay: 5
timeout: 10
close_comm_on_error: false
retry_on_empty: true
retries: 20
# Modbus sensors for EPever Charge Controller 2
sensors:
- name: "Sol2 Battery Capacity"
unit_of_measurement: "%"
device_class: battery
slave: 1
address: 12570
input_type: input
scan_interval: 10
- name: "Sol2 Solar V"
unit_of_measurement: V
device_class: voltage
slave: 1
address: 12544
input_type: input
scale: 0.01
precision: 2
scan_interval: 10
- name: "Sol2 Solar A"
unit_of_measurement: A
device_class: current
slave: 1
address: 12545
input_type: input
scale: 0.01
precision: 2
scan_interval: 10
- name: "Sol2 Charging W"
unit_of_measurement: W
device_class: power
slave: 1
address: 12546
input_type: input
data_type: int32
scale: 0.01
count: 2
precision: 2
swap: word
scan_interval: 10
- name: "Sol2 Battery V"
unit_of_measurement: V
device_class: voltage
slave: 1
address: 13082
input_type: input
scale: 0.01
precision: 2
scan_interval: 10
- name: "Sol2 Load W"
unit_of_measurement: W
device_class: power
slave: 1
address: 12558 # low 12550 high 12551 #12558
input_type: input
scale: 0.01
precision: 2
scan_interval: 5
- name: "Sol2 Load A"
device_class: current
unit_of_measurement: A
slave: 1
address: 12549
input_type: input
scale: 0.001
precision: 2
scan_interval: 10
- name: "Sol2 Load V"
device_class: voltage
unit_of_measurement: V
slave: 1
address: 12548
input_type: input
scale: 0.01
precision: 2
scan_interval: 10
- name: "Sol2 Battery Temp"
unit_of_measurement: Ā°C
slave: 1
address: 12560
input_type: input
scale: 0.01
precision: 2
scan_interval: 10
- name: "Sol2 Controller Temp"
unit_of_measurement: Ā°C
slave: 1
address: 12561
input_type: input
scale: 0.01
precision: 2
scan_interval: 10
- name: "Sol2 WH Today"
device_class: energy
unit_of_measurement: KWh
slave: 1
address: 13068
input_type: input
data_type: int32
scale: 0.01
precision: 2
count: 2
swap: word
scan_interval: 10
- name: "Sol2 WH Month"
device_class: energy
unit_of_measurement: KWh
slave: 1
address: 13070
input_type: input
data_type: int32
scale: 0.01
precision: 2
count: 2
swap: word
scan_interval: 10
- name: "Sol2 WH Year"
device_class: energy
unit_of_measurement: KWh
slave: 1
address: 13072
input_type: input
data_type: int32
scale: 0.01
precision: 2
count: 2
swap: word
scan_interval: 10
- name: "Sol2 WH Total"
device_class: energy
unit_of_measurement: KWh
slave: 1
address: 13074
input_type: input
data_type: int32
scale: 0.01
precision: 2
count: 2
swap: word
scan_interval: 10
binary_sensors:
- name: "Sol2 load switch"
slave: 1
address: 2
scan_interval: 10
My Dashboard:
views:
- title: Sol2
path: sol2
badges: []
cards:
- type: vertical-stack
cards:
- type: vertical-stack
cards:
- type: sensor
entity: sensor.sol2_charging_w
graph: line
name: Power In -2d
hours_to_show: 48
- type: entities
entities:
- entity: sensor.sol2_solar_v
name: Spannung
- entity: sensor.sol2_solar_a
name: Strom
- entity: sensor.sol2_charging_w
name: Leistung
title: Charging
show_header_toggle: false
state_color: false
- type: glance
entities:
- entity: sensor.sol2_wh_today
- entity: sensor.sol2_wh_month
- entity: sensor.sol2_wh_year
- entity: sensor.sol2_wh_total
show_icon: false
show_name: false
state_color: false
title: Solar Gain d m Y T
- type: vertical-stack
cards:
- type: sensor
entity: sensor.sol2_battery_capacity
graph: line
name: Ladezustand -2d
hours_to_show: 48
- type: gauge
entity: sensor.sol2_battery_capacity
min: 0
max: 100
name: Batterie-Status
severity:
green: 80
yellow: 40
red: 0
- type: gauge
entity: sensor.sol2_battery_v
max: 28
min: 22
name: Batterie-Spannung
Thank you so much. Iāve been really struggling to convert my old HASS Epever config over to the new version because things like reverse_order were no longer available. Your example config made my new hass install finally work with my Epever.
that makes my day!
For anyone interested, hereās my modbus configuration for my 3 x Epever Charge Contollers:
Iāve only used the Load Switch Entity on my 1206AN so I could automate it to turn off if the IOT router uses too much power. Of course the 5415ANs donāt use Load because the inverter is connected directly to the batteies. The 36v - 220v Inverter is connected to a Sonoff POW2 so I can moitor power usage.
modbus:
- type: rtuovertcp
host: 10.240.1.4
port: 8088
name: epeveriot
switches:
- name: Solar Load Switch IOT
slave: 1
address: 2
write_type: coil
verify:
sensors:
- name: "Battery Array Capacity IOT"
unit_of_measurement: "%"
slave: 1
device_class: battery
address: 12570
input_type: input
scan_interval: 5
- name: "Solar Power Watts IOT"
unit_of_measurement: W
device_class: power
slave: 1
address: 12546
input_type: input
data_type: int32
scale: 0.01
count: 2
precision: 2
swap: word
scan_interval: 5
- name: "Solar Voltage IOT" #3100
unit_of_measurement: V
slave: 1
device_class: voltage
address: 12544
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Solar Amps IOT" # 0x003101
unit_of_measurement: A
slave: 1
device_class: current
address: 12545
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Load Watts IOT"
unit_of_measurement: W
device_class: power
slave: 1
address: 12558
input_type: input
scale: 0.01
precision: 2
scan_interval: 5
- name: "Load Amps IOT"
device_class: current
unit_of_measurement: A
slave: 1
address: 12549
input_type: input
scale: 0.001
precision: 2
scan_interval: 5
- name: "Load Volts IOT"
device_class: voltage
unit_of_measurement: V
slave: 1
address: 12548
input_type: input
scale: 0.01
precision: 2
scan_interval: 5
- name: "Battery Charging Watts IOT"
unit_of_measurement: W
slave: 1
device_class: power
address: 13084 # 3106-3107
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
swap: word
count: 2
precision: 2
- name: "Battery Charging Amps IOT" # 0x003101
unit_of_measurement: A
slave: 1
address: 13083
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Battery Voltage IOT"
unit_of_measurement: V
slave: 1
address: 13082
device_class: voltage
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Battery Temperature IOT"
unit_of_measurement: Ā°C
slave: 1
address: 12560
input_type: input
scan_interval: 5
scale: 0.01
precision: 1
- name: "Controller Temperature IOT" #0x003111
unit_of_measurement: Ā°C
slave: 1
address: 12561
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: Energy Generated Today IOT
unit_of_measurement: KWh
slave: 1
device_class: energy
address: 13068
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: Energy Generated this Month IOT
unit_of_measurement: KWh
slave: 1
address: 13070
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: Energy Generated this Year IOT
unit_of_measurement: KWh
slave: 1
device_class: energy
address: 13072
input_type: input
scan_interval: 5
data_type: int32
scale: 0.01
precision: 2
count: 2
swap: word
- name: Total Energy Generated IOT
unit_of_measurement: kWh
slave: 1
device_class: energy
address: 13074
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: epever
port: /dev/ttyXRUSB0
delay: 5
close_comm_on_error: true
retry_on_empty: true
retries: 10
type: serial
baudrate: 115200
bytesize: 8
method: rtu
parity: N
stopbits: 1
switches:
- name: Load Switch 1
slave: 1
address: 2
write_type: coil
verify:
- name: Load Switch 2
slave: 2
address: 2
write_type: coil
verify:
sensors:
- name: "Battery Array Capacity 1"
unit_of_measurement: "%"
slave: 1
device_class: battery
address: 12570
input_type: input
scan_interval: 5
- name: "Battery Array Capacity 2"
unit_of_measurement: '%'
slave: 2
device_class: battery
address: 12570
input_type: input
scan_interval: 5
- name: "Solar Power Watts 1" # 3102 and 3103 https://community.home-assistant.io/t/epever-modbus-rs-485-config/214397
unit_of_measurement: W
device_class: power
slave: 1
address: 12546
input_type: input
data_type: int32
scale: 0.01
count: 2
precision: 2
swap: word
scan_interval: 5
- name: "Solar Power Watts 2"
unit_of_measurement: W
device_class: power
slave: 2
address: 12546
input_type: input
data_type: int32
scale: 0.01
count: 2
precision: 2
swap: word
scan_interval: 5
- name: "Solar Voltage 1" #3100
unit_of_measurement: V
slave: 1
device_class: voltage
address: 12544
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Solar Voltage 2" #3100
unit_of_measurement: V
slave: 2
device_class: voltage
address: 12544
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Solar Amps 1" # 0x003101
unit_of_measurement: A
slave: 1
device_class: current
address: 12545
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Solar Amps 2" # 0x003101
unit_of_measurement: A
slave: 2
device_class: current
address: 12545
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Battery Charging Watts 1"
unit_of_measurement: W
slave: 1
device_class: power
address: 13084 # 3106-3107
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
swap: word
count: 2
precision: 2
- name: "Battery Charging Watts 2"
unit_of_measurement: W
slave: 2
device_class: power
address: 13084
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
swap: word
count: 2
precision: 2
- name: "Battery Charging Amps 1" # 0x003101
unit_of_measurement: A
slave: 1
address: 13083
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Battery Charging Amps 2" # 0x003101
unit_of_measurement: A
slave: 2
address: 13083
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Battery Voltage 1"
unit_of_measurement: V
slave: 1
address: 13082
device_class: voltage
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Battery Voltage 2"
unit_of_measurement: V
slave: 2
address: 13082
device_class: voltage
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Battery Temperature 1"
unit_of_measurement: Ā°C
slave: 1
address: 12560
input_type: input
scan_interval: 5
scale: 0.01
precision: 1
- name: "Battery Temperature 2"
unit_of_measurement: Ā°C
slave: 2
address: 12560
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Controller Temperature 1" #0x003111
unit_of_measurement: Ā°C
slave: 1
address: 12561
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: "Controller Temperature 2" #0x003111
unit_of_measurement: Ā°C
slave: 2
address: 12561
input_type: input
scan_interval: 5
scale: 0.01
precision: 2
- name: Energy Generated Today 1
unit_of_measurement: KWh
slave: 1
device_class: energy
address: 13068
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: Energy Generated Today 2
unit_of_measurement: KWh
slave: 2
device_class: energy
address: 13068
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: Energy Generated this Month 1
unit_of_measurement: KWh
slave: 1
address: 13070
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: Energy Generated this Month 2
unit_of_measurement: KWh
slave: 2
address: 13070
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: Energy Generated this Year 1
unit_of_measurement: KWh
slave: 1
device_class: energy
address: 13072
input_type: input
scan_interval: 5
data_type: int32
scale: 0.01
precision: 2
count: 2
swap: word
- name: Energy Generated this Year 2
unit_of_measurement: KWh
slave: 2
device_class: energy
address: 13072
input_type: input
scan_interval: 5
data_type: int32
scale: 0.01
precision: 2
count: 2
swap: word
- name: Total Energy Generated 1
unit_of_measurement: kWh
slave: 1
device_class: energy
address: 13074
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word
- name: Total Energy Generated 2
unit_of_measurement: kWh
slave: 2
device_class: energy
address: 13074
input_type: input
data_type: int32
scan_interval: 5
scale: 0.01
precision: 2
count: 2
swap: word