View on GitHub

SunGoldPower LFP

ESPHome firmware for SunGoldPower LFP Inverter/Charger

SunGoldPower LFP Inverter ESPHome Firmware

This project provides ESPHome-based firmware for monitoring and controlling SunGoldPower LFP series inverter/chargers using an ESP32. It communicates with the inverter via its TTL serial port (typically an RJ45 jack) using the Q1 protocol.

Features

Bill of Materials

To build this controller, you will need:

Wiring Guide

To enable communication, you must connect the ESP32 to the inverter’s RJ45 communication port. The following table shows the required connections:

Inverter RJ45 Pin Purpose ESP32 Pin (Lolin C3 Mini)
Pin 2 GND GND
Pin 4 +5V (Power) 5V / Vin
Pin 6 TX (Inverter Out) GPIO1
Pin 8 RX (Inverter In) GPIO0

[!IMPORTANT] RJ45 Pinout: Pin 1 is the leftmost pin when looking into the socket with the clip/tab facing down.

Notes:

Installation

You can use the button below to install the pre-built firmware directly to your device via USB from the browser.

Post-Installation

Once flashed:

  1. Initial WiFi Setup:
    • Option A: Improv Wi-Fi: If your browser/system supports it, you can configure Wi-Fi credentials directly from the installer page using the Improv protocol.
    • Option B: Captive Portal (Fallback Hotspot): If the device cannot connect to a known network, it will create its own Wi-Fi hotspot named sungoldpower-lfp Fallback.
      1. Connect to this network on your phone or computer.
      2. A portal should open automatically (or visit 192.168.4.1 in your browser).
      3. Select your local Wi-Fi network and enter the password.
  2. Dashboard: Once connected to your network, the device will appear in your ESPHome dashboard and Home Assistant automatically.
  3. Telemetry: In Home Assistant, you will find sensors for all telemetry (voltages, current, frequency, etc.) and a switch for the Inverter Power Relay.
  4. Customization: If you need to customize the configuration (e.g., change pins or device name), you can edit the sungoldpower-lfp.yaml file and reflash via OTA.