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:
- 2 x Epever 5415ANs, connected in serial, used to charge 98 x 36v lithium scooter batteries to power my house (862.4 Ah)
- 1 x Epever 1206AN connected to an Epever eBox Wifi unit that powers a Raspberry Pi3 IOT router on my roof.
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
Hi Brynn,
I have an Epever 4210AN with an original epever rs485 to usb cable: CC-USB-RS485-150U
I have Home assistant installed in Proxmox on a minicPC.
I connected the USB cable to a port in the MiniPC, and i made a pass-through to the VM.
I can see the USB connection in Home assistant as /dev/ttyACM0
I tried your config but not working, any idea what to do next?
this is my config:
modbus:
- name: epever
port: /dev/ttyACM0
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
sensors:
- name: "Battery Array Capacity 1"
unit_of_measurement: "%"
slave: 1
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 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
Epever is tricky with Home Assistant because you have to compile the XRUSB driver for it to work. Your easiest option would be to buy an Epever eBox Wifi unit. They are really easy to setup.
After reading a lot of posts, I understand that the driver for the original cable is very hard to install in linux, I ordered a TTL USB module and I will go via ESPHOME path.
Thanks for replying.
After a tinkering with the drivers i have found a good tutorial here: Exar XR21B1411 driver - Raspberry Pi Forums
I installed on an RPI a fresh Raspian, installed the drivers after that I installed the HASS core in docker. Now your config works like a charm. Thanks @Brynn
That’s great news.
Hi
I have an Epever with Wifi Box and it is connected to my home network. Unfortunately, the configuration does not work. The entity is only displayed in light gray.
This entity (“sensor.epever_battery_current”) does not have a unique ID, so the settings cannot be managed from the UI. Check the documentation for more details.
Have you given it a name like this:
- name: "Epever Battery Amps"
device_class: current
unit_of_measurement: A
slave: 1
address: 12549
input_type: input
scale: 0.001
precision: 2
scan_interval: 5
Hi, i have a Wifi Box 01, and i have change it to STA mode and added to my local network. ( not LSD ).
I have acess to the wifi box inside my network but i cant acess the data.
I have tryed several virtual port software and nothing work to get data to the epever software.
Also i have insered the latest modbus settings on homeassistant and still no data. I have tried TCP, rtuovertcp and i always get this error:
Pymodbus: hub1: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
The charger is a Tracer AN 50A, i can use the wifi box with the app, and since i put it inside my network i can acess the config menu in my local network.
modbus:
- type: rtuovertcp
name: hub1
host: 192.168.1.185
port: 8088
close_comm_on_error: false
timeout: 9
delay: 9
message_wait_milliseconds: 50
retry_on_empty: true
retries: 10
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
I have bought i wifi box and still canot get it to work with home assistant.
In the settings of your wifi unit ensure that it is using port 8088
Hi Miguel, have you tried adding the data_type
to your sensors?
Here’s part of my working config for the WiFi Box:
modbus:
- type: rtuovertcp
name: epever
host: 10.0.0.188
port: 8088
switches:
- name: Load Switch
slave: 1
address: 2
write_type: coil
verify:
sensors:
- name: Battery
address: 13082
data_type: uint16
slave: 1
unit_of_measurement: V
input_type: input
scale: 0.01
precision: 2
scan_interval: 10
- name: Solar Power # 3102
address: 12546
slave: 1
data_type: uint16
input_type: input
unit_of_measurement: W
state_class: measurement
device_class: power
scale: 0.01
Humm, stil nothing.
Im sure the port is 8088, i scan IP and the port is open, and im conected to the wifi box. I still can’t decode any data.
I dont know what to do more.
I get this in home assistant.
Pymodbus: epever: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
08:47:17 – (ERRO) Modbus
I now disabled the MT50 and using only the Wifi Box. The home assistant message changed but still not recieving data.
Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:304
Integration: Modbus (documentation, issues)
First occurred: 16:33:20 (1 occurrences)
Last logged: 16:33:20
Pymodbus: epever: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)
Damn. Color me impressed. I’ve been using a Pi with a Python script to send the data over MQTT to my OpenHAB box. This would simplify it and free up a Pi for some other task.