Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RS485 Modbus working ESPHome configuration
#1
Hello everyone!
I wanted to share my ESPHome configuration for interfacing with a solar charge controller (Epever LS1024B) using RS485. 
This setup allows to read the PV voltage from the controller's register. 
Below is the working configuration that I used, which may help others facing similar challenges.


Code:
# UART configuration
uart:
  - id: rs485
    tx_pin: GPIO27
    rx_pin: GPIO14
    baud_rate: 115200  # Baud rate
    data_bits: 8       # Data bits
    stop_bits: 1       # Stop bits
    parity: NONE       # No parity

# Modbus configuration
modbus:
  send_wait_time: 200ms
  uart_id: rs485
  id: mod_bus

# Modbus controller configuration
modbus_controller:
  - id: charge_controller
    address: 0x01
    modbus_id: mod_bus
    command_throttle: 100ms
    setup_priority: -10
    update_interval: 300s  # Update interval

# Reading register 0x3100
sensor:
  - platform: modbus_controller
    name: "Solar Charge Controller PV Voltage"
    address: 0x3100
    register_type: read
    id: solar_register_v_in
    accuracy_decimals: 2  # Decimal accuracy
    unit_of_measurement: V
    filters:
      - multiply: 0.01  # Scale factor based on charger specs

I hope this helps others in the community.
Reply
#2
thanks share your result.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)