Epever RS485 + Elfin EW11 WiFi Modbus (or MQTT)

Not sure what actually fixed it, but it’s working now. I did a factory reset on the EW11 before the start of the day. It doesn’t seem like I did anything else that I didn’t try yesterday, but I’ll take luck over understanding (for now)! The working settings ended up being very close to factory defaults. I think all I changed was Protocol from None to Modbus and Local Port from 8899 to the standard modbus port, 502.

My best guess is that there was a problem in the wiring in my initial attempts. It was common to see no data received when checking the EW11 status page. I’m pretty sure I had all of the settings the way they ended up working multiple times before it actually worked. I basically stopped troubleshooting after I got it working, so I’m not even sure what changes would break it (Local Port, etc.).

Working HA config

Configuration.yaml (modbus):

modbus:
  - type: tcp
    host: 192.168.1.232
    port: 502
    name: hub1
  - type: serial
    name: hub2
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 115200
    stopbits: 1
    bytesize: 8
    parity: N

Note on above: I left the serial hub lines in there in case someone needs them, but they’re not actually active in my system.

Configuration.yaml (sensors):

  - platform: modbus
    registers:
      - name: Battery
        hub: hub1
        unit_of_measurement: V
        slave: 01
        register: 13082
        register_type: input
        scale: 0.01
        precision: 2
      - name: Solar #3100
        hub: hub1
        unit_of_measurement: V
        slave: 1
        register: 12544
        register_type: input
        scale: 0.01
      - name: Solar Power L # 3102
        hub: hub1
        unit_of_measurement: W
        slave: 01
        register: 12546
        register_type: input
        scale: 0.01
      - name: Solar Current # 3101
        hub: hub1
        unit_of_measurement: A
        slave: 01
        register: 12545
        register_type: input
        scale: 0.01
        precision: 2
      - name: Load # 310E
        hub: hub1
        unit_of_measurement: W
        slave: 01
        register: 12558
        register_type: input
        scale: 0.01

Note on above: there’s more data available, these are just the ones I was interested in. See the linked PDFs in the OP for more. Commented values are the hex values from the PDF, and the registers are the decimal equivalents.

Working EW11 Config

GitHub Gist Page | Direct download: ew11-config.xml (Probably want to change SSIDs and passwords)

I still want to get MQTT working, and also set up a couple switches through modbus or MQTT. I’ll try to document further, but I’m on to other projects first. One thing I definitely need to record is if the Blue (3 & 4) or Green (5 & 6) wires actually correspond to modbus A+. Epever lists them differently in different places, and I never found a definitive list which corresponds to the various model numbers.

2 Likes