You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## User Guide: Integrating Deye Inverters with EMHASS for Home Assistant
12
+
13
+
This guide outlines how to integrate your Deye hybrid inverter (including solar PV, battery, and optional EV charger support) with Home Assistant using robust, local solutions. It then explains how to connect these sensors to the EMHASS add-on for advanced energy management and automation.
14
+
15
+
---
16
+
17
+
### **1. Integration Methods for Deye Inverters**
18
+
19
+
Deye inverters can be connected to Home Assistant using several local, privacy-friendly methods:
20
+
21
+
#### **A. Modbus TCP (Recommended for Most Users)**
22
+
23
+
-**Enable Modbus TCP on Your Inverter:**
24
+
- Access your inverter’s web interface (find the IP via your router or a network scanner).
25
+
- Log in (default: admin/admin).
26
+
- Go to the advanced config page (`http://<inverter_ip>/config_hide.html`).
27
+
- Set protocol to **TCP-Server**, port to **8899**, and enter your Home Assistant server’s IP. Save and reboot the inverter if needed[^7].
28
+
-**Configure Home Assistant:**
29
+
- Use the [Imanol82/Modbus-TCP-for-Deye-Inverter](https://github.com/Imanol82/Modbus-TCP-for-Deye-Inverter) project for a ready-to-use configuration[^2].
30
+
- Download the `modbus.yaml` and `template.yaml` files from the repository.
31
+
- Place them in your Home Assistant config directory.
32
+
- In `configuration.yaml`, add:
33
+
34
+
```yaml
35
+
modbus: !include modbus.yaml
36
+
template: !include template.yaml
37
+
```
38
+
39
+
- Restart Home Assistant.
40
+
- You should now see Deye inverter sensors (PV, battery, grid, etc.) in Developer Tools[^2].
41
+
42
+
43
+
#### **B. Modbus RTU (RS485)**
44
+
45
+
- For setups where TCP is unavailable, use an RS485-to-Ethernet or RS485-to-USB adapter[^4].
46
+
- Wire the RS485 lines from the inverter’s RJ45 port (see inverter manual for pinout) to the adapter.
47
+
- Configure the adapter’s parameters (baud rate usually 9600).
48
+
- Set up Home Assistant’s Modbus integration accordingly.
49
+
50
+
51
+
#### **C. ESPHome Integration**
52
+
53
+
- Use an ESP32 with a TTL-to-RS485 module and the [klatremis/esphome-for-deye](https://github.com/klatremis/esphome-for-deye) configuration for three-phase inverters[^6].
54
+
- This method provides real-time data and can be customized for your needs.
55
+
56
+
57
+
#### **D. Sunsynk/Deye Add-on**
58
+
59
+
- The [Sunsynk Add-on](https://github.com/kellerza/sunsynk) works for Deye-branded inverters via RS485 and MQTT, supporting extensive sensor coverage and control[^8][^9].
60
+
61
+
---
62
+
63
+
### **2. Solar PV Integration**
64
+
65
+
- **Key Sensor:**
66
+
- `sensor.pv_power` or similar (actual name may vary by integration).
67
+
- **EMHASS Configuration:**
68
+
69
+
```json
70
+
{
71
+
"sensor_power_photovoltaics": "sensor.pv_power"
72
+
}
73
+
```
74
+
75
+
- **Energy Dashboard:**
76
+
- Add your PV sensor to Home Assistant’s Energy dashboard for visualization and tracking[^3].
77
+
78
+
---
79
+
80
+
### **3. Battery Integration**
81
+
82
+
- **Key Sensors:**
83
+
- Battery Power: `sensor.battery_power`
84
+
- State of Charge: `sensor.battery_soc`
85
+
- **EMHASS Configuration:**
86
+
87
+
```json
88
+
{
89
+
"sensor_battery_power": "sensor.battery_power",
90
+
"sensor_battery_soc": "sensor.battery_soc",
91
+
"battery_capacity_kwh": 10 // Replace with your actual battery size
92
+
}
93
+
```
94
+
95
+
- **Energy Dashboard:**
96
+
- Add battery charge/discharge sensors for full tracking[^3].
97
+
98
+
---
99
+
100
+
### **4. EV Charger Integration (If Available)**
101
+
102
+
- Some Deye inverters and third-party solutions allow EV charger integration via Modbus or MQTT.
103
+
- **Key Sensors:**
104
+
- EV Charger Power: `sensor.ev_charger_power`
105
+
- Charger Status: `sensor.ev_charger_status`
106
+
- **EMHASS Configuration Example:**
107
+
108
+
```json
109
+
{
110
+
"deferrable_loads": {
111
+
"ev_charger": {
112
+
"entity_id": "switch.ev_charger",
113
+
"max_power": 7000 // Example for 7kW charger
114
+
}
115
+
}
116
+
}
117
+
```
118
+
119
+
120
+
---
121
+
122
+
### **5. Troubleshooting and Tips**
123
+
124
+
- **Incorrect Values:**
125
+
- If you see implausible sensor values (e.g., -100°C), check your Modbus register mapping and update to the latest YAML/templates[^1][^2].
126
+
- **Port Issues:**
127
+
- For Modbus TCP, ensure port **8899** is open and correctly set on both inverter and Home Assistant[^7].
128
+
- **Cloud API:**
129
+
- Deye is developing a cloud API, but local integration is faster and more reliable[^5].
130
+
- **Sensor Names:**
131
+
- Sensor names may differ based on your integration method. Use Home Assistant’s Developer Tools to confirm actual entity IDs.
132
+
133
+
---
134
+
135
+
### **6. Summary Table: Key Entities**
136
+
137
+
| Function | Home Assistant Entity Example | EMHASS Config Parameter |
138
+
| :-- | :-- | :-- |
139
+
| Solar PV Power | `sensor.pv_power` | `sensor_power_photovoltaics` |
140
+
| Main Load | `sensor.load_power` | `sensor_power_load_no_var_loads` |
141
+
| Battery Power | `sensor.battery_power` | `sensor_battery_power` |
| EV Charger | `switch.ev_charger` | `deferrable_loads.ev_charger` |
144
+
145
+
146
+
---
147
+
148
+
By following this guide, you can achieve reliable, local, and private integration of your Deye inverter with Home Assistant and EMHASS, enabling advanced automation and energy optimization for your solar, battery, and EV systems.
0 commit comments