Skip to content

Commit 002987b

Browse files
author
Maksym Shtembuliak
committed
feat: add guarded controls for SMG protocol 1 2 and 11 variants
1 parent bc91978 commit 002987b

29 files changed

Lines changed: 1832 additions & 105 deletions

‎CHANGELOG.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ the GitHub release body should be rendered from the matching version section her
99

1010
### Added
1111

12+
- Added protocol-level fallback profiles for unknown SMG models reporting
13+
protocol 1, 2, or 11. Protocols 1 and 11 expose 30 compatible basic controls;
14+
the July 2024 GM6200 protocol-2 document supplies a separate 54-capability
15+
profile, CT power, schedules, clock and PV-energy decoding. All generic
16+
controls remain untested and require Full Control; blocked operations stay
17+
unavailable. Exact model profiles retain their existing behavior.
1218
- Added version-specific, document-backed write profiles for Anenji
1319
Communication Protocol No. 3-10 variants 3, 4, 5, and 6. The exact HHS-11kW
1420
Protocol 3 fingerprint can now opt into its documented controls through Full
@@ -41,8 +47,9 @@ the GitHub release body should be rendered from the matching version section her
4147
- Replaced the ambiguous writable `modbus_smg/base.json` profile with one
4248
explicit, document-backed classic SMG RS232 V1 map shared by compatible
4349
layout 1/2/11 model profiles. Exact hardware overlays retain their existing
44-
tested controls and model-only registers, while unknown SMG fingerprints
45-
remain read-only. The V1 document version is no longer presented as proof
50+
tested controls and model-only registers. Unknown fingerprints now use the
51+
compatible protocol profiles described above, not a known model's tested
52+
write surface. The V1 document version is no longer presented as proof
4653
that register 184 must contain protocol number 1.
4754
- Rebuilt the Anenji Protocol No. 3-10 telemetry layer as one documented shared
4855
schema with separate Protocol 3 and Protocol 4 output projections. ANJ-11KW,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"schema_version": 1,
3+
"source_key": "documentation_gm6200_protocol_2",
4+
"kind": "documentation",
5+
"title": "GM6200 Communication Protocol 2, July 2024",
6+
"reference": "https://github.com/syssi/esphome-smg-ii/blob/main/docs/GM6200%2BCommunication%2BProtocol%2B2_CN.html",
7+
"captured_at": "2026-09-07",
8+
"visibility": "public",
9+
"summary_publishable": true,
10+
"summary": "The document explicitly identifies holding register 184 as 0x02. It shares the classic live/configuration base but defines distinct output/charging enums, schedules at 345-348, CT power at 235-236 and clock/energy at 434-445. This is not a Protocol 11 specification.",
11+
"assertions": [
12+
"register_map",
13+
"runtime_compatibility"
14+
]
15+
}

‎custom_components/eybond_local/protocol_catalogs/inverter_catalog.json‎

Lines changed: 202 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,37 @@
12091209
"notes": [
12101210
"Deye-compatible three-phase high-power hybrid map observed on the Kevolt PD0080G-TPM-EU. All read ranges use holding-register function 3 and stay at 15 words or fewer, matching the successful request shape in the supplied cloud proxy capture. A bounded document-backed operational control subset uses FC 0x10 and remains Full-Control-only until writes are confirmed on hardware."
12111211
]
1212+
},
1213+
"smg_protocol_2": {
1214+
"ranges": [
1215+
[
1216+
171,
1217+
1
1218+
],
1219+
[
1220+
184,
1221+
1
1222+
],
1223+
[
1224+
402,
1225+
2
1226+
],
1227+
[
1228+
434,
1229+
12
1230+
],
1231+
[
1232+
626,
1233+
8
1234+
],
1235+
[
1236+
643,
1237+
2
1238+
]
1239+
],
1240+
"notes": [
1241+
"GM6200 Protocol 2 identity, active priorities and clock/energy windows; do not inherit OP2 or Protocol 3-6 addresses."
1242+
]
12121243
}
12131244
},
12141245
"surfaces": [
@@ -1581,6 +1612,39 @@
15811612
"tier": "full",
15821613
"read_only": false,
15831614
"support_capture_policy": "deye_3ph_high_80kw"
1615+
},
1616+
{
1617+
"key": "smg_protocol_1_family_fallback",
1618+
"protocol_key": "modbus_smg",
1619+
"driver_key": "modbus_smg",
1620+
"variant_key": "protocol_1_family_fallback",
1621+
"profile_name": "modbus_smg/protocols/communication_protocol_1.json",
1622+
"register_schema_name": "modbus_smg/protocols/communication_protocol_1.json",
1623+
"tier": "full",
1624+
"read_only": false,
1625+
"support_capture_policy": "smg_protocol_1"
1626+
},
1627+
{
1628+
"key": "smg_protocol_2_family_fallback",
1629+
"protocol_key": "modbus_smg",
1630+
"driver_key": "modbus_smg",
1631+
"variant_key": "protocol_2_family_fallback",
1632+
"profile_name": "modbus_smg/protocols/communication_protocol_2.json",
1633+
"register_schema_name": "modbus_smg/protocols/communication_protocol_2.json",
1634+
"tier": "full",
1635+
"read_only": false,
1636+
"support_capture_policy": "smg_protocol_2"
1637+
},
1638+
{
1639+
"key": "smg_protocol_11_family_fallback",
1640+
"protocol_key": "modbus_smg",
1641+
"driver_key": "modbus_smg",
1642+
"variant_key": "protocol_11_family_fallback",
1643+
"profile_name": "modbus_smg/protocols/communication_protocol_11.json",
1644+
"register_schema_name": "modbus_smg/protocols/communication_protocol_11.json",
1645+
"tier": "full",
1646+
"read_only": false,
1647+
"support_capture_policy": "smg_protocol_1"
15841648
}
15851649
],
15861650
"devices": [
@@ -2893,54 +2957,6 @@
28932957
}
28942958
],
28952959
"family_defaults": [
2896-
{
2897-
"when_layout_codes": [
2898-
1,
2899-
2,
2900-
11
2901-
],
2902-
"model_name": "SMG Family (Unverified Variant)",
2903-
"surface_key": "smg_family_read_only",
2904-
"runtime_probe": {
2905-
"validation": [
2906-
{
2907-
"key": "output_rating_voltage",
2908-
"min": 1
2909-
},
2910-
{
2911-
"key": "output_rating_frequency",
2912-
"min": 1
2913-
}
2914-
],
2915-
"optional_registers": [
2916-
{
2917-
"key": "device_type",
2918-
"register": 171
2919-
},
2920-
{
2921-
"key": "protocol_number",
2922-
"register": 184
2923-
},
2924-
{
2925-
"key": "rated_cell_count",
2926-
"register": 644
2927-
}
2928-
],
2929-
"optional_ascii": [
2930-
{
2931-
"key": "device_name",
2932-
"register": 172,
2933-
"word_count": 12
2934-
},
2935-
{
2936-
"key": "program_version",
2937-
"register": 626,
2938-
"word_count": 8
2939-
}
2940-
]
2941-
},
2942-
"note": "Known SMG layout, unknown model: base reads only; writes require learning."
2943-
},
29442960
{
29452961
"when_layout_codes": [
29462962
3
@@ -3044,6 +3060,144 @@
30443060
]
30453061
},
30463062
"note": "Documented Protocol 6, unknown model: protocol-specific telemetry; document-backed untested controls require explicit Full Control."
3063+
},
3064+
{
3065+
"when_layout_codes": [
3066+
1
3067+
],
3068+
"model_name": "SMG Protocol 1 (Unverified Variant)",
3069+
"surface_key": "smg_protocol_1_family_fallback",
3070+
"runtime_probe": {
3071+
"validation": [
3072+
{
3073+
"key": "output_rating_voltage",
3074+
"min": 1
3075+
},
3076+
{
3077+
"key": "output_rating_frequency",
3078+
"min": 1
3079+
}
3080+
],
3081+
"optional_registers": [
3082+
{
3083+
"key": "device_type",
3084+
"register": 171
3085+
},
3086+
{
3087+
"key": "protocol_number",
3088+
"register": 184
3089+
},
3090+
{
3091+
"key": "rated_cell_count",
3092+
"register": 644
3093+
}
3094+
],
3095+
"optional_ascii": [
3096+
{
3097+
"key": "device_name",
3098+
"register": 172,
3099+
"word_count": 12
3100+
},
3101+
{
3102+
"key": "program_version",
3103+
"register": 626,
3104+
"word_count": 8
3105+
}
3106+
]
3107+
},
3108+
"note": "Protocol 1 compatible map, unknown model: untested controls require explicit Full Control. Exact model descriptors win; no model-specific write verification is inherited."
3109+
},
3110+
{
3111+
"when_layout_codes": [
3112+
2
3113+
],
3114+
"model_name": "SMG Protocol 2 (Unverified Variant)",
3115+
"surface_key": "smg_protocol_2_family_fallback",
3116+
"runtime_probe": {
3117+
"validation": [
3118+
{
3119+
"key": "output_rating_voltage",
3120+
"min": 1
3121+
},
3122+
{
3123+
"key": "output_rating_frequency",
3124+
"min": 1
3125+
}
3126+
],
3127+
"optional_registers": [
3128+
{
3129+
"key": "device_type",
3130+
"register": 171
3131+
},
3132+
{
3133+
"key": "protocol_number",
3134+
"register": 184
3135+
},
3136+
{
3137+
"key": "rated_cell_count",
3138+
"register": 644
3139+
}
3140+
],
3141+
"optional_ascii": [
3142+
{
3143+
"key": "device_name",
3144+
"register": 172,
3145+
"word_count": 12
3146+
},
3147+
{
3148+
"key": "program_version",
3149+
"register": 626,
3150+
"word_count": 8
3151+
}
3152+
]
3153+
},
3154+
"note": "Protocol 2 compatible map, unknown model: untested controls require explicit Full Control. Exact model descriptors win; no model-specific write verification is inherited."
3155+
},
3156+
{
3157+
"when_layout_codes": [
3158+
11
3159+
],
3160+
"model_name": "SMG Protocol 11 (Unverified Variant)",
3161+
"surface_key": "smg_protocol_11_family_fallback",
3162+
"runtime_probe": {
3163+
"validation": [
3164+
{
3165+
"key": "output_rating_voltage",
3166+
"min": 1
3167+
},
3168+
{
3169+
"key": "output_rating_frequency",
3170+
"min": 1
3171+
}
3172+
],
3173+
"optional_registers": [
3174+
{
3175+
"key": "device_type",
3176+
"register": 171
3177+
},
3178+
{
3179+
"key": "protocol_number",
3180+
"register": 184
3181+
},
3182+
{
3183+
"key": "rated_cell_count",
3184+
"register": 644
3185+
}
3186+
],
3187+
"optional_ascii": [
3188+
{
3189+
"key": "device_name",
3190+
"register": 172,
3191+
"word_count": 12
3192+
},
3193+
{
3194+
"key": "program_version",
3195+
"register": 626,
3196+
"word_count": 8
3197+
}
3198+
]
3199+
},
3200+
"note": "Protocol 11 compatible map, unknown model: untested controls require explicit Full Control. Exact model descriptors win; no model-specific write verification is inherited."
30473201
}
30483202
]
30493203
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"extends": "./classic_smg_rs232_v1.json",
3+
"profile_key": "modbus_smg_communication_protocol_1",
4+
"title": "SMG Protocol 1 Compatible Controls (Unverified)",
5+
"driver_key": "modbus_smg",
6+
"protocol_family": "modbus_smg",
7+
"capability_defaults": {
8+
"tested": false,
9+
"provenance": "doc_backed",
10+
"support_tier": "conditional"
11+
},
12+
"capabilities": [
13+
{
14+
"key": "battery_bulk_voltage",
15+
"minimum": 0,
16+
"maximum": 700,
17+
"note": "No exact battery-class limits are inferred for an unknown model. This broad 12/24/48 V UI window is not a hardware specification."
18+
},
19+
{
20+
"key": "battery_overvoltage_protection_voltage",
21+
"minimum": 0,
22+
"maximum": 700,
23+
"note": "No exact battery-class limits are inferred for an unknown model. This broad 12/24/48 V UI window is not a hardware specification."
24+
},
25+
{
26+
"key": "battery_float_voltage",
27+
"minimum": 0,
28+
"maximum": 700,
29+
"note": "No exact battery-class limits are inferred for an unknown model. This broad 12/24/48 V UI window is not a hardware specification."
30+
},
31+
{
32+
"key": "battery_redischarge_voltage",
33+
"minimum": 0,
34+
"maximum": 700,
35+
"note": "No exact battery-class limits are inferred for an unknown model. This broad 12/24/48 V UI window is not a hardware specification."
36+
},
37+
{
38+
"key": "battery_under_voltage",
39+
"minimum": 0,
40+
"maximum": 700,
41+
"note": "No exact battery-class limits are inferred for an unknown model. This broad 12/24/48 V UI window is not a hardware specification."
42+
},
43+
{
44+
"key": "battery_under_voltage_off_grid",
45+
"minimum": 0,
46+
"maximum": 700,
47+
"note": "No exact battery-class limits are inferred for an unknown model. This broad 12/24/48 V UI window is not a hardware specification."
48+
},
49+
{
50+
"key": "battery_equalization_voltage",
51+
"minimum": 0,
52+
"maximum": 700,
53+
"note": "No exact battery-class limits are inferred for an unknown model. This broad 12/24/48 V UI window is not a hardware specification."
54+
}
55+
]
56+
}

0 commit comments

Comments
 (0)