User Tools

Site Tools


deyecodes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
deyecodes [2026/04/27 23:46] – created jwandeyecodes [2026/07/22 17:32] (current) – [Grid and AC Data] jwan
Line 1: Line 1:
-Here is a categorized map of almost every readable register available on these hybrid units. You can use these to build your own custom "block reads" in your code.+SUN-6K-SG04LP1-EU-SM2 is using V2/Low Address Protocol 
  
-1. Inverter & Power Stage (Health)+Connection requirements: **9600 8N1** 
 +Slave 1 Read Function 3
  
-These tell you if the hardware is stressed or overheating.+Note: every return value is 16bit (signed or unsigned)
  
-    Registers 90-91: Internal Temperatures (DC-DC and Radiator).+Available Addresses:
  
-    Register 103: Fault Code (0 = OK).+====== PV (Solar) Input Data ====== 
 +<code> 
 +108 PV Daily Production kWh 0.1 
 +109 PV1 Voltage V 0.1 
 +110 PV1 Current A 0.1 
 +111 PV2 Voltage V 0.1 
 +112 PV2 Current A 0.1 
 +114 Gross Daily PV  
 +186 PV1 Power W 1 
 +187 PV2 Power W 1 
 +96 PV Total Production kWh (Combined with 97) 
 + (Lifetime High) 
 +97 PV Total Production kWh 0.1 
 + (Lifetime Low) 
 +</code>
  
-    Register 109: Inverter Running Status (Standby, Normal, Fault, etc.).+====== Battery Data ====== 
 +<code> 
 +70      Battery Charge (Daily) kWh 0.1 
 +71      Battery Discharge (Daily) kWh 0.1 
 +182 Battery Temperature °C 0.1 (Offset 1000) 
 +183 Battery Voltage V 0.01 
 +184 Battery SOC % 1 
 +189     Battery Status                          0=charge 1=standby 2=discharge 
 +190 Battery Power W 1 (Signed) 
 +191 Battery Current A 0.1 (Signed) 
 +105 Battery Daily Charge kWh 0.1 
 +106 Battery Daily Discharge kWh 0.1 
 +102 Battery Total Charge kWh 0.1 
 + (Lifetime)  
 +103 Battery Total Discharge kWh 0.1 
 + (Lifetime)  
 +586 BMS Maximum Charge Voltage V 0.01 
 +587 BMS Maximum Charge Current A 1 
 +588 BMS Maximum Discharge Current A 1 
 +</code>
  
-    Register 115: Total Operational Hours (Great for maintenance tracking).+====== Grid and AC Data ====== 
 +<code> 
 +79      Grid Frequency                  Hz 0.01 
 +150     Grid Voltage L1                 V       0.1 
 +151     Grid Voltage L2                 V       0.1 
 +157     Load Voltage                    V       0.1 
 +160 Grid Current L1 A 0.1 
 +161 Grid Current L2 A 0.1 
 +166 GRID Power (Total) W 1 (Signed) 
 +167 Grid L1 Power (Internal CT) W 1 (Signed) 
 +168     Grid L2 Power (Internal CT)     W       1 (Signed) 
 +169 External CT / Check Meter Power W 1 (Signed)  <- Grid Import 
 +170     Grid L1 Power (External CT)     W       1 (Signed) 
 +171     Grid L2 Power (External CT)     W       1 (Signed) 
 +175 Inverter Power (AC Output) W 1 (Signed) 
 +176     Load L1 Power                   W       1 (Signed) 
 +177     Load L2 Power                   W       1 (Signed) 
 +178 Load Power (Essential) W 1 
 +84 Total Load Power kWh 0.1 
 +192 Inverter L1 Current A 0.1 
 +76 Total Grid Daily Buy kWh 0.1 
 +77 Total Grid Daily Sell kWh 0.1 
 +78 Grid Total Buy (Lifetime) kWh 0.1 
 +79 Grid Total Sell (Lifetime) kWh 0.1 
 +</code>
  
-2. Solar PV Strings (Production)+====== System Status and Health Data ====== 
 +<code> 
 +90 Inverter Temperature °C 0.1 (Offset 1000) 
 +91 DC Transformer Temp °C 0.1 (Offset 1000) 
 +200 Radiator Temperature °C 0.1 (Offset 1000) 
 +500 Inverter Mode Code (0: Standby, 1: Self-Check, 2: Normal, 3: Fault) 
 +233 Fault Code 1 - (Bitmapped) 
 +234 Fault Code 2 - (Bitmapped) 
 +</code>
  
-Since you have 12 panels, you likely have two strings (PV1 and PV2).+====== Misc Data ====== 
 +<code> 
 +0 Modbus Protocol Version Decimal  
 +1 Control Software Version (Firmware) Decimal  
 +2 Communication Board Version Decimal  
 +13 Rated Power (e.g., 6000 for 6kW) Watts  
 +</code>
  
-    Registers 186-187: PV1 Power and PV2 Power (Watts).+Note:  
 +To compute for the temperature, subtract value by 1000 then divide by 10
  
-    Registers 188-189: PV1 Voltage and PV2 Voltage. 
  
-    Registers 192-193: PV1 Current and PV2 Current (Amps). 
  
-    Register 108: Daily PV Generation (kWh). 
  
-3. Battery Management (The Most Critical)+https://community.home-assistant.io/t/connecting-to-the-new-deye-logger-to-home-assistant-using-esphome/997672 
 +<code>
  
-If you are using a LiFePO4 battery (like your LVTOPSUN), these are the registers that keep your system safe.+Production
  
-    Register 183: Battery Voltage (Scale: 0.01).+Sensor Unit Register 
 +Total Production kWh 0x0060 
 +Daily Production kWh 0x006C 
 +PV
  
-    Register 184: State of Charge (SOC %).+Sensor Unit Register 
 +PV1 Voltage V 0x006D 
 +PV1 Current A 0x006E 
 +PV1 Power W computed (V × I) 
 +PV2 Voltage V 0x006F 
 +PV2 Current A 0x0070 
 +PV2 Power W computed (V × I) 
 +Total PV Power W computed (PV1 + PV2) 
 +Max Solar Power W 0x0035 
 +Grid
  
-    Register 185: Battery Current (Signed: + for Charge, - for Discharge).+Sensor Unit Register 
 +Grid Voltage 1 V 0x0096 
 +Grid Voltage 2 V 0x0097 
 +Grid Power W 0x00A9 
 +Load
  
-    Register 190: Battery Temperature (Scale: 0.1, Offset: -100).+Sensor Unit Register 
 +Daily Load Consumption kWh 0x0054 
 +Total Load Consumption kWh 0x0055 
 +Load L1 Voltage V 0x009D 
 +Load L1 Current A 0x00A4 
 +Load L1 Power W 0x00B2 
 +Total Load Power W 0x00B0 
 +Inverter
  
-    Register 191: Battery Power (Watts).+Sensor Unit Register 
 +Total Power W 0x00AD 
 +Inverter L1 Power W 0x00AF 
 +DC Temperature °C 0x005A 
 +AC Temperature °C 0x005B 
 +Battery
  
-    Registers 312-315: Battery Capacity, Charge/Discharge efficiency, and Cycle Count (if supported by BMS).+Sensor Unit Register 
 +Battery Voltage V 0x00B7 
 +Battery Current A 0x00BF 
 +Battery Power W 0x00BE 
 +Battery SOC % 0x00B8 
 +Battery Settings (diagnostic)
  
-4. Grid & Consumption (The Business Side)+Sensor Unit Register 
 +Battery Capacity Ah 0x00CC 
 +Battery Empty Voltage V 0x00CD 
 +Max Charge Current A 0x00D2 
 +Max Discharge Current A 0x00D3 
 +Battery Shutdown % % 0x00D9 
 +Battery Restart % % 0x00DA 
 +Battery Low % % 0x00DB 
 +Selling Mode (diagnostic)
  
-Essential for monitoring your grocery business load vs. utility costs.+Sensor Unit Register 
 +Selling Mode Time 1–6 HH:MM 0x00FA–0x00FF 
 +Selling Mode Power 1–6 W 0x0100–0x0105 
 +Selling Mode SOC 1–6 % 0x010C–0x0111 
 +Selling Mode Charge Flag 1–6 — 0x0112–0x0117 
 +</code>
  
-    Registers 166-168: Grid Voltage for L1, L2, L3 (if 3-phase).+[[deyecodedefinition|Deye Code Definition (from Solarman)]]
  
-    Registers 169-171: Grid Power for L1, L2, L3 (Signed). 
- 
-    Register 172: Total Grid Power (Watts). 
- 
-    Register 175: Grid Frequency (Hz). 
- 
-    Registers 176-178: Load Power per Phase (Exactly what your shop is using). 
- 
-    Registers 76-78: Daily Grid Purchase, Daily Grid Sell, and Daily Load consumption. 
- 
-5. Advanced Control (Writable Registers) 
- 
-As a developer, you can also write to these to automate your system. 
- 
-    Register 141: Max Battery Charge Current (Amps). 
- 
-    Register 142: Max Battery Discharge Current (Amps). 
- 
-    Register 127: Forced Charge/Discharge control. 
- 
-    Register 143: Battery Shutdown Voltage. 
-     
-In Modbus, you can't read all of these in one go. The maximum "chunk" size is typically 125 registers per request, but the Deye often chokes if you ask for more than 20-30 at once. 
- 
-Block1: Grid Info Start Reg=160; Length=20; "Pulls all Voltages, Power, and Frequencies." 
- 
-Block2: Solar/Batt Start Reg=180; Length=15; "Pulls all PV stats and Battery SOC/Volt/Amps." 
- 
-Block3: Health/Temp Start Reg=90; Length=15; "Pulls internal temps and fault codes." 
- 
-Block4: Totals/Yield Start Reg=60; Length=20; "Pulls Daily Energy, Total Energy, and Runtime." 
deyecodes.1777333586.txt.gz · Last modified: by jwan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki