This is what I use to control the load from HA on my EPEver. Hope this helps.
sensor:
- platform: modbus
scan_interval: 15
coils:
- name: Solar Load
hub: hub1
slave: 1
coil: 2
This is what I use to control the load from HA on my EPEver. Hope this helps.
sensor:
- platform: modbus
scan_interval: 15
coils:
- name: Solar Load
hub: hub1
slave: 1
coil: 2
Thanks. That has definitely helped. It wouldn’t work with my other epever sensors so I had to make it a binary_sensor:
binary_sensor:
- platform: modbus
scan_interval: 60
coils:
- name: Solar Load 3
hub: epever
slave: 1
coil: 2
However, were you able to make it a switch so you could turn it off and on?
I manged to get it working by putting those settings in my switch config:
switch:
- platform: modbus
scan_interval: 10
coils:
- name: Solar Load Switch 1
hub: epever
slave: 1
coil: 2
- name: Solar Load Switch 2
hub: epever
slave: 2
coil: 2
- name: Solar Load Switch 3
hub: epever
slave: 3
coil: 2
Thanks a lot. I’ve been wanting to get this working for ages.
Awesome. Glad to hear it’s working for you.
Fyi I submitted a PR for esphome to improve modbus support : Modbus controller by martgras · Pull Request #1779 · esphome/esphome · GitHub
There’s an example for epever included that shows how to configure battery settings or the rtc clock
More details are in the readme esphome/esphome/components/modbus_controller at modbus_controller · martgras/esphome · GitHub
Greg & @gabrielpc , you might take a look at the Elfin EW11. They’re inexpensive and much more flexible than the e-Box models. They allow configuration of multiple interfaces on multiple ports within each device. I do have 2 Epever controllers, but only have one hooked up currently so I can’t test it. Having successfully set up both the e-Box-WiFi and the EW11, I can definitely say the config options on the latter are much more robust.
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.