Smart Home Automation Forum
RS485 Modbus working ESPHome configuration - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A6 (https://www.kincony.com/forum/forumdisplay.php?fid=22)
+--- Thread: RS485 Modbus working ESPHome configuration (/showthread.php?tid=7585)



RS485 Modbus working ESPHome configuration - darsh - 02-08-2025

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.


RE: RS485 Modbus working ESPHome configuration - admin - 02-08-2025

thanks share your result.