Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start working on supporting KH firmware v1.33 #681

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions custom_components/foxess_modbus/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ class Inv(Flag):
H1_G2 = auto()

KH_PRE119 = auto()
KH_119 = auto()
KH_SET = KH_PRE119 | KH_119
KH_PRE133 = auto()
KH_133 = auto()
KH_SET = KH_PRE119 | KH_PRE133 | KH_133

H3 = auto()
AIO_H3 = auto()
Expand Down
287 changes: 167 additions & 120 deletions custom_components/foxess_modbus/entities/entity_descriptions.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __post_init__(self) -> None:
masks={"Grid Lost Fault": ["Grid Voltage Fault", "Grid Frequency Fault"]},
)

H3_PRO_FAULTS = FaultSet(
H3_PRO_KH_133_FAULTS = FaultSet(
faults=[
[
"PV Over-voltage",
Expand Down Expand Up @@ -215,7 +215,7 @@ def __post_init__(self) -> None:
None,
None,
"Meter Lost Fault",
None,
"BMS Lost Fault", # KN_133 only
None,
None,
None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
pwr_limit_bat_up=None,
pv_voltages=[31000, 31003, 31039, 31042],
),
models=Inv.KH_119,
models=Inv.KH_PRE133,
),
RemoteControlAddressSpec(
# The H3 doesn't support anything above 44005, and the active/reactive power regisers are 2 values
Expand Down
2 changes: 1 addition & 1 deletion custom_components/foxess_modbus/inverter_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def inverter_capacity(self, inverter_model: str) -> int:
# The KH doesn't have a LAN port. It supports both input and holding over RS485
# Some models start with KH-, but some are just e.g. KH10.5
InverterModelProfile(InverterModel.KH, r"^KH([\d\.]+)").add_connection_type(
Inv.KH_119,
Inv.KH_133,
ConnectionType.AUX,
RegisterType.HOLDING,
special_registers=KH_REGISTERS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@
null,
null,
"Meter Lost Fault",
null,
"BMS Lost Fault",
null,
null,
null,
Expand Down Expand Up @@ -1482,7 +1482,7 @@
"addresses": {
"holding": [
39286,
39284
39285
]
},
"key": "pv4_power",
Expand Down Expand Up @@ -1570,7 +1570,7 @@
{
"addresses": {
"holding": [
36001
36002
]
},
"is_hex": false,
Expand Down
Loading
Loading