Repository navigation
feat(battery): report what deye, foxess_h3_smart, alphaess and kstar can do now - #253
Merged
Merged
Conversation
…can do now Core will judge a battery against what it can do now, not only against the order. These drivers now report the device's own temperature and live limits where an open register map documents them, and leave a value out when its read fails or it falls outside -40..100 C or 0..100 kW. - deye 2.2.0: BMS charge/discharge current limits (212/213) as available_charge_W / available_discharge_W at the battery voltage read in the same poll, on three-phase hybrids whose battery runs on its BMS (register 111 = 1). Heatsink temperature (541) now takes off the 1000 offset; it read 100 C too high. Failed temperature reads no longer send 0 C. - foxess_h3_smart 0.10.0: 46018 as available_charge_W when above 0 (an idle pack reads 0 and still charges). battery_temp_c metric, cell temperature range (37617/37618) every sixth poll. - alphaess 1.2.0: cell temperature range (0x010D/0x0110) to history. - kstar 1.2.0: battery temperature (input 3067) and inverter radiator temperature (input 3055). Atmoce, Varta and Ambibox are unchanged: no documented temperature or live limit, and no fabricated temperature to remove. Not verified on hardware. Refs #250 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review of #253: - deye: register 111 had probe_read's give-up, so three early timeouts turned the BMS limits off until restart. It now has its own retry: the next poll after a miss, and every 60 polls after three in a row. A late answer turns the limits on. - foxess_h3_smart: the cell temperatures (37617/37618) had the same give-up. Each now retries every 60 polls after three misses. - foxess_h3_smart: the comment on 46018 now states the trade-off of leaving out a 0: a cold or full pack that truly refuses charge reads 0, the field is absent, and Core sees "unknown" rather than "limited". - alphaess: note that senalse lists the cell temperatures as uint16 and 0x0111 as a present BMS limit, against Alpha2MQTT. Refs #250 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
Keep both CHANGELOG entries (this group and sungrow 1.7.0 from #251) and regenerate index.yaml, devices.yaml and the support status. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]> # Conflicts: # SUPPORT_STATUS.md # drivers/tests/invented-number-baseline.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core will judge a battery against what it can do now, not only against FTW's order. This PR fills in the fields named in #250 for one group of drivers: deye, foxess_h3_smart, alphaess, kstar, atmoce, varta and ambibox. Four change; three have nothing documented to add.
Every new value is left out when its read fails or when it falls outside -40 to 100 °C or 0 to 100 kW. Reads and emits only: no control logic or writes changed. FoxESS still refuses a forced charge near full (srcfl/ftw#1993); that stays Core's to fix.
Refs #250
What each driver now reports
deye 2.2.0
available_charge_W,battery_charge_limit_a,battery_available_charge_wthree_phase_common.py("BMS charging current limit"), ha-solarmandeye_p3.yamlavailable_discharge_W,battery_discharge_limit_a,battery_available_discharge_wtemp_c(battery),battery_temp_ctemp_c(pv),inverter_temp_cfoxess_h3_smart 0.10.0
available_charge_W,battery_available_charge_wremote_control_description.py; the driver already read ittemperature_C(range check added),battery_temp_c(new)battery_cell_temp_max_c/battery_cell_temp_min_c_bms_entities(H3_PRO_SET, H3_SMART)inverter_temp_c, pvtemp_c(range check added)device_fault/not_following(v0.163.0-beta.1) ftw#1993 (the refusal near full).foxess_bms_charge_limit_wstill records every reading, zeros included.available_discharge_Wis not sent. 46607/46608 are owner settings and are not used.alphaess 1.2.0
battery_cell_temp_min_cDefinitions.h, senalse/ha-alphaess-modbusregister_map.mdbattery_cell_temp_max_ctemperature_Cis not sent.kstar 1.2.0
temperature_C,battery_temp_ckstar_hybrid.yaml(from KSTAR Hybrid Inverter Modbus V2.9.1)inverter_temp_cNothing documented, unchanged
chargePowerMax/dischargePowerMaxare not documented as live.available_import_W/available_export_W.Tests
New Lua-harness tests, one file per driver:
test_deye_battery_now.py(13),test_foxess_h3_smart_battery_now.py(8),test_alphaess_battery_now.py(3),test_kstar_battery_now.py(3). They cover scale and sign, a field and metric left out when its read fails, out-of-range values dropped, gating (Deye single-phase, no-BMS mode), read cadence, an absent register settling, and a register that answers late (Deye 111, FoxESS cell temperatures) coming back.make test-driver ID=<id>for deye, foxess_h3_smart, alphaess and kstar: all pass.make check(merged with main at c95f607): 5079 passed, 929 skipped.make absent-register-reportfor deye and foxess_h3_smart: every address settles.Not verified on hardware.
🤖 Generated with Claude Code