This repository contains the ESPHome configuration for integrating the SRNE HF2430U60 solar controller with Home Assistant. It would likely work with the similar variants like the HF2430U60, HF2320U60, etc... The setup uses Modbus communication to retrieve detailed data and control various aspects of the device.
- Modbus Communication: Collect real-time data using the UART interface.
- Comprehensive Sensors: Includes power, current, voltage, temperature, and historical energy statistics.
- Home Assistant Integration: Provides API and web server for seamless integration.
- Custom Controls: Features switches, numbers, and selectors for advanced configuration.
- ESP32 Development Board: Configured for Modbus communication.
- SRNE HF2430U60 Solar Controller: Ensure Modbus is enabled.
- Wiring: Connect the ESP32 UART pins to the solar controller:
TX
→ Solar ControllerRX
RX
→ Solar ControllerTX
GND
→ Solar ControllerGND
- ESPHome installed.
- A configured Home Assistant instance.
- Clone this repository or download the
SRNE_HF2430U60.yaml
file. - Adjust the following in the YAML file:
wifi.ssid
andwifi.password
(usesecrets.yaml
for secure storage).api.encryption.key
andota.password
.
- Compile and upload the configuration to your ESP32 device.
- Use ESPHome Dashboard or CLI:
esphome run SRNE_HF2430U60.yaml
- Follow the prompts to upload the firmware.
- UART:
uart: id: mod_bus tx_pin: GPIO1 rx_pin: GPIO3 baud_rate: 9600
- Modbus Controller:
modbus_controller: - id: srne1 address: 0x01 modbus_id: tdt1_modbus
Example sensor configuration for grid voltage:
sensor:
- platform: modbus_controller
modbus_controller_id: srne1
name: "Grid Voltage"
register_type: holding
address: 0x0213
unit_of_measurement: "V"
accuracy_decimals: 1
device_class: voltage
state_class: measurement
Provides local access:
web_server:
port: 80
auth:
username: "JohnDoe"
password: "abc123456"
- Some Modbus registers may return unexpected values.
- Ensure wiring is secure to avoid communication errors.
- Add support for additional Modbus registers.
- Improve error handling for invalid data.
This project is licensed under the MIT License. See the LICENSE
file for details.
For detailed documentation, visit the ESPHome Website.