dgtlcopywrite / renogy-esphome

MIT License
13 stars 5 forks source link

Renogy Rover 40 amp successful with modifications #1

Closed GloriamSemper closed 1 year ago

GloriamSemper commented 1 year ago

First, thank you @dgtlcopywrite for your preliminary work on this! You started me off with almost all of the work already done. Many thanks.

With a few tweaks I was able to get this reliably working on my two Rover 40 amp charge controllers and reliably reporting to ESP Home. I wanted to pass my experience on to possibly help you and others.

For the ESP32, I used this.

I used two MAX3232 with terminals I found on amazon.

I used this PDF from Renogy for serial communication reference which was identical to your references with some extras.

Your connections table you made from memory is correct, minus the repeated ESP RX/R1 OUT line of course.

In the ESPHome config I am using this for dual UARTs and modbusses:

uart:
  - id: uart_1
    tx_pin: 13
    rx_pin: 39
    baud_rate: 9600
    data_bits: 8
    stop_bits: 1
    parity: NONE

  - id: uart_2
    tx_pin: 27
    rx_pin: 26
    baud_rate: 9600
    data_bits: 8
    stop_bits: 1
    parity: NONE

modbus:
  - id: modbus_1
    uart_id: uart_1
    send_wait_time: 250ms

  - id: modbus_2
    uart_id: uart_2
    send_wait_time: 2250ms

modbus_controller:
  - id: renogy_1
    modbus_id: modbus_1
    address: 0xFF
    setup_priority: -10
    update_interval: 10s

  - id: renogy_2
    modbus_id: modbus_2
    address: 0xFF
    setup_priority: -10
    update_interval: 10s

I duplicated all sensors with their own number. I also changed this sensor to better read/record daily charged amount:

  - id: solar_controller_1_daily_kwh
    name: Solar Controller 1 Daily kWh
    platform: modbus_controller
    modbus_controller_id: renogy_1
    address: 0x0113
    unit_of_measurement: kWh
    register_type: holding
    value_type: U_WORD
    accuracy_decimals: 3
    filters:
      - multiply: 0.001

The real issue that I had trouble diagnosing, is at first nothing past the first serial value inquiry would return values. Turned out the Rover didn't like so many value inquiries at once. Removing a few of the sensors would make it last a few hours before failing. Removing half of the sensors (that I didn't use anyways) made it 100% reliable. Going on a few weeks now with zero issues from both controllers reporting values. The load switch also works, and I use that for a cooling fan I attached to the controller heat sink.

Hope this helps someone! Feel free to ask me questions about your setup for help.