Skip to content

Commit 6c44561

Browse files
authored
Merge pull request #17 from 0xAHA/dev
V0.0.5 - Add MIC profile. Fixes #16
2 parents 67f45af + 3535818 commit 6c44561

File tree

8 files changed

+257
-90
lines changed

8 files changed

+257
-90
lines changed

README.md

Lines changed: 132 additions & 88 deletions
Large diffs are not rendered by default.

custom_components/growatt_modbus/auto_detection.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ def detect_profile_from_model_name(model_name: str) -> Optional[str]:
3737

3838
# Model name patterns to profile mappings
3939
patterns = {
40+
# MIC series - Micro inverters
41+
'MIC600': 'mic_600_3300tl_x',
42+
'MIC750': 'mic_600_3300tl_x',
43+
'MIC1000': 'mic_600_3300tl_x',
44+
'MIC1500': 'mic_600_3300tl_x',
45+
'MIC2000': 'mic_600_3300tl_x',
46+
'MIC2500': 'mic_600_3300tl_x',
47+
'MIC3000': 'mic_600_3300tl_x',
48+
'MIC3300': 'mic_600_3300tl_x',
49+
4050
# MIN series
4151
'MIN3000': 'min_3000_6000_tl_x',
4252
'MIN4000': 'min_3000_6000_tl_x',

custom_components/growatt_modbus/device_profiles.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@
7070
# ============================================================================
7171

7272
INVERTER_PROFILES = {
73+
74+
# ========================================================================
75+
# MIC SERIES - Single Phase Micro Inverters
76+
# ========================================================================
77+
"mic_600_3300tl_x": {
78+
"name": "MIC 600-3300TL-X",
79+
"description": "Micro inverter (0.6-3.3kW)",
80+
"register_map": "MIC_600_3300TL_X",
81+
"has_battery": False,
82+
"phase": "single",
83+
"pv_strings": 1,
84+
},
85+
86+
7387
# ========================================================================
7488
# MIN SERIES - Single Phase String Inverters
7589
# ========================================================================

custom_components/growatt_modbus/diagnostic.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,17 @@ def has_reg(addr):
207207
elif has_pv1_at_3:
208208
detection["reasoning"].append("✓ Found PV1 at register 3 (0-124 base range detected)")
209209

210+
if not has_1000_1124 and not has_3000_3124 and not has_3125_3249:
211+
# Only base range responds, no extended ranges → MIC micro inverter
212+
detection["model"] = "MIC 600-3300TL-X"
213+
detection["confidence"] = "High"
214+
detection["profile_key"] = "mic_600_3300tl_x"
215+
detection["register_map"] = "MIC_600_3300TL_X"
216+
detection["reasoning"].append("✓ Only 0-179 register range responds → MIC micro inverter (V3.05 protocol)")
217+
detection["reasoning"].append("✓ Single PV string, legacy protocol from 2013")
218+
210219
# Check for battery (SPH series)
211-
if has_battery_at_13 or has_battery_at_1013 or has_storage_range:
220+
elif has_battery_at_13 or has_battery_at_1013 or has_storage_range:
212221
detection["reasoning"].append("✓ Battery detected → SPH hybrid series")
213222

214223
# Check for 3-phase

custom_components/growatt_modbus/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"pymodbus>=3.0.0",
1313
"pyserial>=3.4"
1414
],
15-
"version": "0.0.4"
15+
"version": "0.0.5"
1616
}

custom_components/growatt_modbus/profiles/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from typing import Dict, List, Optional
1515

1616
# Import register maps from individual profile files
17+
from .mic import MIC_REGISTER_MAPS
1718
from .min import MIN_REGISTER_MAPS
1819
from .mid import MID_REGISTER_MAPS
1920
from .sph import SPH_REGISTER_MAPS
@@ -24,6 +25,7 @@
2425

2526
# Combine all register maps into single dict
2627
REGISTER_MAPS = {
28+
**MIC_REGISTER_MAPS,
2729
**MIN_REGISTER_MAPS,
2830
**MID_REGISTER_MAPS,
2931
**SPH_REGISTER_MAPS,
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# MIC Series - Micro Inverters (V3.05 Protocol)
2+
# Single-phase micro inverters, 600W-3300W
3+
# Register range: 0-179 (compact legacy protocol)
4+
# Protocol version: V3.05 (2013)
5+
6+
MIC_600_3300TL_X = {
7+
'name': 'MIC 600-3300TL-X',
8+
'description': 'Single-phase micro inverter (0.6-3.3kW) - Legacy V3.05 protocol',
9+
'notes': 'Uses legacy 0-179 register range. Single PV string only. Simple monitoring features. Protocol V3.05 from 2013.',
10+
'input_registers': {
11+
# ============================================================================
12+
# RANGE 0-179: Complete register map for MIC series
13+
# ============================================================================
14+
15+
# System Status
16+
0: {'name': 'inverter_status', 'scale': 1, 'unit': '', 'desc': '0=Waiting, 1=Normal, 3=Fault'},
17+
18+
# PV Input Total Power (32-bit)
19+
1: {'name': 'pv_total_power_high', 'scale': 1, 'unit': '', 'pair': 2},
20+
2: {'name': 'pv_total_power_low', 'scale': 1, 'unit': '', 'pair': 1, 'combined_scale': 0.1, 'combined_unit': 'W'},
21+
22+
# PV String 1 (Only string for MIC series)
23+
3: {'name': 'pv1_voltage', 'scale': 0.1, 'unit': 'V'},
24+
4: {'name': 'pv1_current', 'scale': 0.1, 'unit': 'A'},
25+
5: {'name': 'pv1_power_high', 'scale': 1, 'unit': '', 'pair': 6},
26+
6: {'name': 'pv1_power_low', 'scale': 1, 'unit': '', 'pair': 5, 'combined_scale': 0.1, 'combined_unit': 'W'},
27+
28+
# AC Output Total Power (32-bit)
29+
11: {'name': 'ac_power_high', 'scale': 1, 'unit': '', 'pair': 12},
30+
12: {'name': 'ac_power_low', 'scale': 1, 'unit': '', 'pair': 11, 'combined_scale': 0.1, 'combined_unit': 'W'},
31+
32+
# AC Output
33+
13: {'name': 'ac_frequency', 'scale': 0.01, 'unit': 'Hz'},
34+
14: {'name': 'ac_voltage', 'scale': 0.1, 'unit': 'V'},
35+
15: {'name': 'ac_current', 'scale': 0.1, 'unit': 'A'},
36+
16: {'name': 'ac_power_single_high', 'scale': 1, 'unit': '', 'pair': 17},
37+
17: {'name': 'ac_power_single_low', 'scale': 1, 'unit': '', 'pair': 16, 'combined_scale': 0.1, 'combined_unit': 'VA'},
38+
39+
# Energy
40+
26: {'name': 'energy_today_high', 'scale': 1, 'unit': '', 'desc': 'Today energy HIGH', 'pair': 27},
41+
27: {'name': 'energy_today_low', 'scale': 1, 'unit': '', 'desc': 'Today energy LOW', 'pair': 26, 'combined_scale': 0.1, 'combined_unit': 'kWh'},
42+
28: {'name': 'energy_total_high', 'scale': 1, 'unit': '', 'desc': 'Total energy HIGH', 'pair': 29},
43+
29: {'name': 'energy_total_low', 'scale': 1, 'unit': '', 'desc': 'Total energy LOW', 'pair': 28, 'combined_scale': 0.1, 'combined_unit': 'kWh'},
44+
30: {'name': 'time_total_high', 'scale': 1, 'unit': '', 'pair': 31},
45+
31: {'name': 'time_total_low', 'scale': 1, 'unit': '', 'pair': 30, 'combined_scale': 0.5, 'combined_unit': 'h'},
46+
47+
# Temperatures
48+
32: {'name': 'inverter_temp', 'scale': 0.1, 'unit': '°C'},
49+
41: {'name': 'ipm_temp', 'scale': 0.1, 'unit': '°C', 'desc': 'Internal power module temperature'},
50+
51+
# Diagnostics
52+
40: {'name': 'fault_code', 'scale': 1, 'unit': ''},
53+
64: {'name': 'warning_code', 'scale': 1, 'unit': ''},
54+
55+
# Grid Fault Records (90-114 for fault history)
56+
90: {'name': 'grid_fault_1_code', 'scale': 1, 'unit': ''},
57+
91: {'name': 'grid_fault_1_date', 'scale': 1, 'unit': '', 'desc': 'Year/Month (year offset 2000)'},
58+
92: {'name': 'grid_fault_1_time', 'scale': 1, 'unit': '', 'desc': 'Day/Hour'},
59+
93: {'name': 'grid_fault_1_time_ms', 'scale': 1, 'unit': '', 'desc': 'Min/Sec'},
60+
94: {'name': 'grid_fault_1_value', 'scale': 1, 'unit': '', 'desc': '0.1V for voltage faults, 0.01Hz for frequency'},
61+
62+
# Auto test diagnostics (135-144)
63+
135: {'name': 'auto_test_process', 'scale': 1, 'unit': ''},
64+
136: {'name': 'auto_test_result', 'scale': 1, 'unit': ''},
65+
137: {'name': 'test_step_stop', 'scale': 1, 'unit': ''},
66+
138: {'name': 'reserved_0', 'scale': 1, 'unit': ''},
67+
139: {'name': 'safety_voltage_limit', 'scale': 0.1, 'unit': 'V'},
68+
140: {'name': 'safety_time_limit', 'scale': 1, 'unit': 'ms'},
69+
141: {'name': 'real_value', 'scale': 0.1, 'unit': 'V'},
70+
142: {'name': 'test_value', 'scale': 0.1, 'unit': 'V'},
71+
143: {'name': 'test_treat_value', 'scale': 0.1, 'unit': 'V'},
72+
144: {'name': 'test_treat_time', 'scale': 1, 'unit': 'ms'},
73+
},
74+
'holding_registers': {
75+
0: {'name': 'on_off', 'scale': 1, 'unit': '', 'access': 'RW', 'desc': 'Low byte: on/off (1/0), High byte: auto start (1/0)'},
76+
2: {'name': 'pf_cmd_memory', 'scale': 1, 'unit': '', 'access': 'RW', 'desc': 'Power factor memory state (0/1)'},
77+
3: {'name': 'active_power_rate', 'scale': 1, 'unit': '%', 'access': 'RW', 'desc': 'Max output active power percent (0-100)'},
78+
4: {'name': 'reactive_power_rate', 'scale': 1, 'unit': '%', 'access': 'RW', 'desc': 'Max output reactive power percent (0-100)'},
79+
5: {'name': 'power_factor', 'scale': 1, 'unit': '', 'access': 'RW', 'desc': 'Power factor x10000 (0-20000)'},
80+
30: {'name': 'com_address', 'scale': 1, 'unit': '', 'access': 'RW', 'desc': 'Modbus communication address'},
81+
}
82+
}
83+
84+
# Export all MIC profiles
85+
MIC_REGISTER_MAPS = {
86+
'MIC_600_3300TL_X': MIC_600_3300TL_X,
87+
}

custom_components/growatt_modbus/strings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"selector": {
7676
"inverter_series": {
7777
"options": {
78+
"mic_600_3300tl_x": "MIC 600-3300TL-X (Micro inverter 0.6-3.3kW)",
7879
"mid_15000_25000_tl3_x": "MID 15000-25000TL3-X (3-phase, 15-25kW)",
7980
"min_3000_6000_tl_x": "MIN 3000-6000TL-X (Single-phase, 2 PV, 3-6kW)",
8081
"min_7000_10000_tl_x": "MIN 7000-10000TL-X (Single-phase, 3 PV, 7-10kW)",

0 commit comments

Comments
 (0)