EPEVER Modbus RS-485 Config

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.

I have same issue with modbus and eBox-TCP-02. No data received.

Works perfectly fine with AdamWelchUk nodered routine via mqqt.

How do you get the ip of the epever?

I have connected my epever charge controller to my HA RPI but don’t get any data with the below configuration.

Must I install any drivers? How do I find out which port my epever is using?

modbus:
  - name: "epever"
    type: rtuovertcp
    host: 192.168.1.100
    port: 8088
    delay: 5
    timeout: 10
    close_comm_on_error: false
    retry_on_empty: true
    retries: 20
    sensors:  
      - name: "epever PV Charging Equipment Rated Input Voltage" #0x003000
        unit_of_measurement: V
        slave: 1
        address: 12288
        input_type: input
        scale: 0.01
        precision: 1 
      - name: "epever PV Array Input Voltage" #0x003100
        unit_of_measurement: V
        slave: 1
        address: 12544
        input_type: input
        scale: 0.01
        precision: 2
      - name: "epever PV Array Input Current" # 0x003101
        unit_of_measurement: A
        slave: 1
        address: 12545
        input_type: input
        scale: 0.01
        precision: 2
      - name: "epever PV Array Power" # 3102 and 3103
        unit_of_measurement: W
        slave: 1
        address: 12546
        input_type: input
        scale: .01
        count: 2
        precision: 2
      - name: "epever PV Battery Temperature" #0x003110
        unit_of_measurement: °C
        slave: 1
        address: 12560
        input_type: input
        scale: 0.01
        precision: 2
      - name: "epever PV Device Temperature" #0x003111
        unit_of_measurement: °C
        slave: 1
        address: 12561
        input_type: input
        scale: 0.01
        precision: 2
      - name: "epever PV Battery State of Charge" #0x00311A
        unit_of_measurement: "%"
        slave: 1
        address: 12570
        input_type: input
        scale: 1
        precision: 0
      - name: "epever PV Battery Real Rated Voltage" #0x00311D
        unit_of_measurement: V
        slave: 1
        address: 12573
        input_type: input
        scale: .01
        precision: 0  
      - name: "epever PV Battery Status" #0x003200
        slave: 1
        address: 12800
        input_type: input
        scale: 1
        precision: 0 
      - name: "epever PV Charging Equipment Status" #0x003201
        slave: 1
        address: 12801
        input_type: input
        scale: 1
        precision: 0
      - name: "epever PV Maximum Battery Voltage Today" #0x003302
        unit_of_measurement: V
        slave: 1
        address: 13058
        input_type: input
        scale: 0.01
        precision: 2
      - name: "epever PV Minimum Battery Voltage Today" #0x003303
        unit_of_measurement: V
        slave: 1
        address: 13059
        input_type: input
        scale: 0.01
        precision: 2
      - name: "epever PV Consumed Energy Today" #0x003304 and 0x003305
        unit_of_measurement: KWh
        slave: 1
        address: 13060
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Consumed Energy This Month" #0x003306 and 07
        unit_of_measurement: KWh
        slave: 1
        address: 13062
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Consumed Energy This Year" #0x003308 & 09
        unit_of_measurement: KWh
        slave: 1
        address: 13064
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Total Consumed Energy" #0x00330A & 0B
        unit_of_measurement: KWh
        slave: 1
        address: 13066
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Generated Energy Today" #0x00330C & 0D
        unit_of_measurement: KWh
        slave: 1
        address: 13068
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Generated Energy This Month" #0x00330E & 0F
        unit_of_measurement: KWh
        slave: 1
        address: 13070
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Generated Energy This Year" #0x003310 & 11
        unit_of_measurement: KWh
        slave: 1
        address: 13072
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Total Generated Energy" #0x003312 & 13
        unit_of_measurement: KWh
        slave: 1
        address: 13074
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
      - name: "epever PV Battery Voltage" #0x00331A
        unit_of_measurement: V
        slave: 1
        address: 13082
        input_type: input
        scale: 0.01
        precision: 2
      - name: "epever PV Battery Current" #0x00331B & 1C
        unit_of_measurement: A
        slave: 1
        address: 13083
        input_type: input
        scale: 0.01
        precision: 2
        count: 2
1 Like

OMG, I got it to work using your settings. Unbelievable. Didn’t have to install any drivers on a clean RPI4 install. Thanks!!!

Hello,
Thank you very much for this post which helped me a lot!
Then I have a functional configuration, which I transmit to you below.
To begin I have an EPEVER XTRA3210N-XDS2.
I have then a machine for modbus with the software “mbusb”.

With a chinese cable and the “CH343” chip I have installed the driver:

I have configured as follows MBUSB

root@modbus:/etc/mbusd# cat mbusd-ttyCH343USB0.conf 
#############################################
#                                           #
#    Sample configuration file for mbusd    #
#                                           #
#############################################

########## Serial port settings #############

# Serial port device name
device = /dev/ttyCH343USB0

# Serial port speed
speed = 115200

# Serial port mode
mode = 8n1

# RS-485 data direction control type (addc, rts, sysfs_0, sysfs_1)
trx_control = addc

# Sysfs file to use to control data direction
# trx_sysfile =

############# TCP port settings #############

# TCP server address to bind
address = 0.0.0.0

# TCP server port number
port = 502

# Maximum number of simultaneous TCP connections
maxconn = 32

# Connection timeout value in seconds
timeout = 60

######### Request/response settings #########

# Maximum number of request retries
retries = 3

# Pause between requests in milliseconds
pause = 100

# Response wait time in milliseconds
wait = 500

# Reply on Broadcast
replyonbroadcast = no

I then connected it in modbus to Home Assitant

#EPEver eBox-Wifi-01 modbus
modbus:
  - type: tcp
    name: "Solar2EP"
    host: 192.168.1.240
    port: 502
    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: "Solaire Volt" 
      unique_id: epever.solarvolt
      unit_of_measurement: V
      slave: 1
      address: 12544
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Solaire Ampere" 
      unique_id: epever.solarapm
      unit_of_measurement: A
      slave: 1
      address: 12545
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Solaire Status"
      unique_id: epever.solarstatus
      slave: 1
      address: 12545
      input_type: input
      precision: 2
      swap: word
    - name: "Solaire Watt L"
      unique_id: epever.solarwatt
      unit_of_measurement: W
      slave: 1
      address: 12546
      input_type: input
      data_type: int32
      scale: 0.01
      count: 2
      precision: 2
      swap: word
    - name: "Solaire Watt H"
      unique_id: epever.solarwatt2
      unit_of_measurement: kWh
      slave: 1
      address: 12547
      input_type: input
      data_type: int32
      scale: 0.01
      count: 2
      precision: 2
      swap: word
#    - name: "Solaire kWh"
#      unique_id: epever.solairewattkwh
#      unit_of_measurement: "kWh"
#      slave: 1
#      address: 12546
#      input_type: input
#      data_type: int32
#      scale: 0.0000000001
#      count: 2
#      precision: 4
#      scan_interval: 20
#      device_class: energy
#      state_class: total_increasing
    - name: "Batterie Capacité"
      unique_id: epever.batcap
      unit_of_measurement: "%"
      slave: 1
      address: 12570
      input_type: input
    - name: "Charging status" 
      unique_id: epever.charginwatt
      unit_of_measurement: W
      slave: 1
      address: 12801
      input_type: input
      scale: 0.01
      count: 2
      precision: 2
      swap: word
    - name: "Batterie Max volt"
      unique_id: epever.batmaxvolt
      unit_of_measurement: V
      slave: 1
      address: 13058
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Batterie Min volt"
      unique_id: epever.batminvolt
      unit_of_measurement: V
      slave: 1
      address: 13059
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Batterie Volt"
      unique_id: epever.batvolt
      unit_of_measurement: V
      slave: 1
      address: 13082
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Batterie Ampere"
      unique_id: epever.batamp
      unit_of_measurement: A
      slave: 1
      address: 13083
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Consommation Ampere "
      unique_id: epever.loadamp2
      unit_of_measurement: A
      slave: 1
      address: 12557
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Consommation Watt L"
      unique_id: epever.loadwatt
      unit_of_measurement: W
      slave: 1
      address: 12558  # low 12550  high 12551 #12558
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Consommation Watt H"
      unique_id: epever.loadwattH
      unit_of_measurement: W
      slave: 1
      address: 12559  # low 12550  high 12551 #12558
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Consommation Volt"
      unique_id: epever.loadvolt
      unit_of_measurement: V
      slave: 1
      address: 12556
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Batterie Température"
      unique_id: epever.battemp
      unit_of_measurement: °C
      slave: 1
      address: 12560
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Controlleur Température"
      unique_id: epever.controltemp
      unit_of_measurement: °C
      slave: 1
      address: 12561
      input_type: input
      scale: 0.01
      precision: 2
    - name: "Generation KWh jour"
      unique_id: epever.productoday
      unit_of_measurement: KWh
      slave: 1
      address: 13068
      input_type: input
      data_type: int32
      scale: 0.01
      precision: 2
      count: 2
      swap: word
    - name: "Generation KWh jour 2 "
      unique_id: epever.producday
      unit_of_measurement: KWh
      slave: 1
      address: 13068
      input_type: input
      data_type: int32
      scale: 0.01
      precision: 2
      count: 2
      swap: word
    - name: "Generation KWh mois"
      unique_id: epever.producmonth
      unit_of_measurement: KWh
      slave: 1
      address: 13070
      input_type: input
      data_type: int32
      scale: 0.01
      precision: 2
      count: 2
      swap: word
    - name: "Generation KWh année"
      unique_id: epever.producyear
      unit_of_measurement: KWh
      slave: 1
      address: 13072
      input_type: input
      data_type: int32
      scale: 0.01
      precision: 2
      count: 2
      swap: word
    - name: "Generation KWh Total"
      unique_id: epever.productotal
      unit_of_measurement: KWh
      slave: 1
      address: 13074
      input_type: input
      data_type: int32
      scale: 0.01
      precision: 2
      count: 2
      swap: word

I’m still trying to understand the difference between PV ARRAY LOW and HIGH, that’s why there are high values on the panel

1 Like

So i have an EPEVER wifi 2.4g RJ45 A connected to my wifi but it doesnt connect to my home assistant i get the error: Connection to (192.168.178.187, 8088) failed: [Errno 111] Connection refused

If some one could help that would be much appreciated.

I just did a full port scan and not a single port was open was i wrong setting it up over the epever pair app?

Could this be that on these newer devices Epever want’s to use their cloud service and that’s why don’t open local ports?

I have UPower-HI series hybrid-inverter and hopefully I get “EPEVER-WIFI-2.4G-DB9-B” (this connects to DB9 connector) on next week and I can check if there is open ports to connect it to HA.

BTW, they ship newer USB cable with UPower-HI adn looks like it use CH343 chip nowadays.

Today I scanned open ports of my EPEVER-WIFI-2.4G-DB9-B and only port what was open was 65010/tcp. But when I connected WiFi dongle to Epever Cloud (with EPEVER Pair app) then all port was closed, actually whole SSID went missing.

So 65010/tcp is for EPEVER Pair in local mode, but no idea what kind of service/api is that…

Epever has changed registers for the UPower-Hi series from UPower. I found perl script from German FHEM forum https://forum.fhem.de/index.php?topic=111967.0 and downloaded it.

I don’t know perl but looks like there is new registers for UPower-Hi, like for PV, I assume this “i13641” is register for PV Array Voltage :thinking:

          "i13641" =>  {       'reading' => 'PVInputVolt',
								  'expr' => '$val=($val/100)." V"',
                       },
          "i13642" =>  {       'reading' => 'PVInputCurrent',
								  'expr' => '$val=($val/100)." A"',
                       },
          "i13643" =>  {       'reading' => 'PVInputPower',
								  'expr' => '$val=($val/100)." W"',
                                   'len' => '2',
                                'unpack' => 'l>', 							  
                       },
          "i13655" =>  {       'reading' => 'PVTotalCargePower',
								  'expr' => '$val=($val/100)." kWh"',
                                   'len' => '2',
                                'unpack' => 'l>', 							  
                       },

Any ideas how easy is to convert to python? Whole perl script can be found here.

What Type of Temp. Sensor does the Tracer-AN use?

hi @timnis, we are in the same boat…

I expected the ebox-wifi-01 to connect with the UPower-HI but I had a bad surprise as the RJ45 port is not meant for that. Some store told me it is possible to connect the ebox-wifi-01 on the RS485 with limitations, I tried to follow the RS485 interface pin scheme described on the UPower-HI manual and build an adapter but sadly it did not work.

I am not planning to buy “EPEVER-WIFI-2.4G-DB9-B" until I am 100% sure it will work with Home Assistant.

Epever is a very famous brand, it is hard to believe there is no integration built for Home Assistant.

Please keep me posted if you find a solution.

By the way, I found a new dongle on the official website “EPEVER WiFi Adapter 2.4G RJ45 C” no idea if this works with the UPower-HI, but I guess not :stuck_out_tongue_winking_eye:

hi @marcao88

Yes there is rs485 rj-45 port on UPpower Hi, but like I have it’s connected to BMS-LINK.

If you have ebox-wifi-01, make the cable and connect it to DB9 connector, should be easy and pinouts are in the manuals. That way you should able to connect like in this thread.

I have feel that Epever try to get all new inverters connected to their cloud services (like other manufactures also) and from there I assume in future they offer API (in Epever Cloud service, there is already some mentions on the API). That way it works in normal conditions. But if after few years cloud service stop working or you have unreliable/no internet connection then it is problematic.

I finally ditched “EPEVER-WIFI-2.4G-DB9-B" and I have old rpi2b connected via usb-rs485 cable to inverter (which was delivered with inverter). Basically config same as in post #67 by dylan, but with different registers values. This has been worked for me few weeks now without problems and I also control from HA when UPower Hi charge battery from grid (and when consuming it).

Check this for newer register values https://community.home-assistant.io/t/epever-upower-hi-modbus-setting-if-you-need/483184. And from this perl script you will find more register values (from German FHEM forum)

1 Like

Please forgive me for asking for help but I could not manage to get it done and you are my last hope.
I made the cable but it did not work, my ebox-wifi-01 remains dead. :sob:
This is what I prepared:

I am using this adapter:
adapter2

And having this cable order, that is not working:
adapter3

This is what I found on the official manual:
I am not sure what to do with pin 1,2 and 6. Even 4 and 5 are confusing to me as in the adapter it had a GND door that I am not using.

The link below refers to the ebox wifi manual, that contains more fancy Definitions for the pins…
https://www.epever.com/wp-content/uploads/2022/04/EPEVER-WiFi-2.4G-Manual-EN-V1.4.pdf

Thank you for your support. :slight_smile:

  • List item

cal wifi connectivity adapter

Hi,

Ebox-wifi-01 works on 5vdc and below is Pinout from UPower (older version) RS485 port.

So, I assume you need to connect following pins

Rj45 - db9
1 - 9 (5vdc)
7 - 5 (gnd)
5 - 7 (A)
3 - 8 (B)

Thank you! It was very helpful, for me to understand it, but this is what worked por the UPOWER HI RTU, I hope more people will benefit from this finding:

RJ45 - DB9
1-9 (5V)
3-8 (B-)
5-7 (A+)
7-4 (gnd)
8-5 (gnd)

1 Like

Good. According pinouts there is two GND’s, but maybe only one is connected.

Anyway, nicely done :+1:

Hello everyone! and @timnis, I am facing a hard time bringing the epever sensors to Home Assistant.

Ebox-wifi-01 might be innocent as it works providing data locally to the phone app (when in AP mode) as it is supposed to be. So, there are no broken links between this lovely ebox-wifi-01 and the Epever UP5000 - HM8042(RTU)

When I place the Ebox-wifi-01 inside the network (STA mode), port 8088 is confirmed to open and I see ZERO significant errors on home assistant logs, this is the log level that I am using:

logger:
default: debug

When I search for errors I look for keywords like “modbus”, “connection”, “sol2” this is what I get:

Logger: homeassistant.components.modbus.validators
Source: components/modbus/validators.py:169
Integration: Modbus (documentation, issues)
First occurred: 4:09:22 PM (2 occurrences)
Last logged: 4:15:56 PM

Modbus Solar2EP timeout(10) is adjusted(4) due to scan_interval

and this:

Something is blocking Home Assistant from wrapping up the start up phase. We’re going to continue anyway.
Please report the following info at https://github.com/home-assistant/core/issues:
BIG LIST of everything including: sensor.modbus, sensor.broadlink… and 1000 things.

I have included the ESPHome addon, (honestly not sure if this helps :blush:)

Since I do not see connection issues I suspect the problem might be the sensor addresses code, so I made a few tests by replacing the addresses for the PV Voltage with the suggestions I found around but with no success, I wonder if I can really use HEX:

12544
13334
12288
13641
0x3549

This is what I have on my configuration.yaml, I am just following the recommendations from this community but still got a problem, please take a moment to suggest:

#EPEver eBox-Wifi-01 modbus
modbus:
  # - type: tcp
  - type: rtuovertcp
    name: "Solar2EP"
    host: 192.168.1.117
    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 # original
      # address: 13334 # tested
      # address: 12288 # tested
      # address: 13641 # tested
      # address: 0x3549 # tested
      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

@marcao88 have you tried to set slave=4?

Check here https://community.home-assistant.io/t/epever-upower-hi-modbus-setting-if-you-need/483184