- ESP Development Board (e.g., ESP32-DevKit V1)
- RS485 to TTL Converter
- Deye Inverter with Modbus RTU support
- Connecting Cables (for RS485 communication)
Connect your ESP32-DevKit V1 to the inverter's Modbus port:
ESP32 RS485 Converter Inverter
GPIO17 (TX) -> DI/A+ -> A+ (Modbus)
GPIO16 (RX) -> RO/B- -> B- (Modbus)
3.3V -> VCC
GND -> GND -> GND (Modbus)
Note: Some RS485 converters may require a flow control pin. Uncomment and configure the flow_control_pin in the main configuration if needed.
This is the easiest way to get started if you're using Home Assistant.
- Home Assistant with Add-on store access
- ESP development board
- RS485 to TTL converter
- In Home Assistant, go to Settings → Add-ons → Add-on Store
- Search for "ESPHome" and click Install
- After installation, click Start and optionally enable "Start on boot"
- Click "Open Web UI" to access ESPHome dashboard
- In ESPHome dashboard, click "+ NEW DEVICE"
- Click "CONTINUE" on the welcome screen
- Enter a name for your device (e.g., "Deye Inverter")
- Select your "ESP" device as device type
- Click "NEXT" and note down the encryption key (save it safely)
- Click "SKIP" for now - we'll add the configuration manually
- Create secrets file:
Create
secrets.yamlin your ESPHome configuration directory:wifi_ssid: "YourWiFiSSID" wifi_password: "YourWiFiPassword" pv_inverter_api_key: "your-32-character-api-key" pv_inverter_fallback_password: "your-fallback-password"
- Click "EDIT" on your newly created device
- Replace the entire content with the configuration from
pv-inverter.yaml - Click "SAVE" and then "INSTALL"
- Connect your ESP32 to your computer via USB
- Click "Plug into this computer"
- Select the correct COM port
- Click "INSTALL" and wait for the process to complete
- Click "STOP LOGS" when installation is finished
- Disconnect ESP32 from computer
- Connect RS485 converter according to wiring diagram above
- Power up the ESP32 (via USB power adapter or external power)
- The device should appear in Home Assistant automatically under Settings → Devices & Services → ESPHome
If you prefer using command line or don't have Home Assistant:
-
Install ESPHome CLI:
pip install esphome
-
Download Configuration:
wget https://raw.githubusercontent.com/Lewa-Reka/esphome-deye-inverter/main/pv-inverter.yaml
-
Create secrets.yaml:
wifi_ssid: "YourWiFiSSID" wifi_password: "YourWiFiPassword" pv_inverter_api_key: "your-32-character-api-key" pv_inverter_fallback_password: "your-fallback-password"
-
Flash to ESP:
esphome run pv-inverter.yaml