Skip to content

Commit

Permalink
Fix for InvBatPower2 register endian change (#694)
Browse files Browse the repository at this point in the history
* Fix for InvBatPower2 register endian change

the latest H3 Pro firmware Master 1.53, Manager 1.22 has flipped the endian for this register; which now matches the Fox modbus definition (V1.05.00.00)
see #685 (reply in thread)
  • Loading branch information
FozzieUK authored Oct 17, 2024
1 parent 48b99d7 commit 7887be5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,11 @@ def _invbatpower(index: int | None, addresses: list[ModbusAddressesSpec]) -> Ite
addresses=[
# It does genuinely look like these two are the wrong way around, see
# https://github.com/nathanmarlor/foxess_modbus/discussions/516#discussioncomment-9569558
ModbusAddressesSpec(holding=[39235, 39236], models=Inv.H3_PRO),
# ^^^^ Following on from this previous comment,
# the H3 Pro firmware from Master 1.53, Manager 1.22 has corrected the endian for this
# batpower2 register; it now matches the Fox modbus definition V1.05.00.00
# see https://github.com/nathanmarlor/foxess_modbus/discussions/685#discussioncomment-10811413
ModbusAddressesSpec(holding=[39236, 39235], models=Inv.H3_PRO),
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
{
"addresses": {
"holding": [
39235,
39236
39236,
39235
]
},
"key": "battery_charge_2",
Expand Down Expand Up @@ -117,8 +117,8 @@
{
"addresses": {
"holding": [
39235,
39236
39236,
39235
]
},
"key": "battery_discharge_2",
Expand Down Expand Up @@ -979,8 +979,8 @@
{
"addresses": {
"holding": [
39235,
39236
39236,
39235
]
},
"key": "invbatpower_2",
Expand Down

0 comments on commit 7887be5

Please sign in to comment.