1.1.0
🚀 Beny WiFi Integration v1.1.0
This release focuses on Observability and Safety Diagnostics. We have unlocked the charger's internal fault-tracking system, providing granular insights into hardware issues that were previously hidden behind a generic "Abnormal" state.
🛠 What's New
🔍 Advanced Diagnostics
- Detailed Fault Reporting: The new
Fault Statussensor now identifies 14 specific hardware conditions (e.g., Under Voltage, Poor Grounding, CP Signal issues, or Contactor Sticking). - Connection Latency: A new sensor tracks the UDP round-trip time in milliseconds, allowing you to monitor the health of your WiFi connection to the charger.
Changes Made by @Jarauvi
- Protocol Expansion: Integrated the
0x6estatus command to decode real-time fault bitmasks. - Binary Sensor Platform: Created a dedicated
binary_sensor.pyto handle hardware safety critical faults with native Home Assistant logic.
Changes Made by @pvandenh
Bug 1 & 2 — Incorrect hybrid current range across coordinator, number, and select (coordinator.py, number.py, select.py, services.yaml)
Root cause
The hybrid current range was independently hardcoded in four separate places with inconsistent values:
coordinator.pyasync_set_dlb_config: validated as6 <= current <= 32, raisingValueErrorfor any value outside this rangenumber.pyBenyWifiHybridCurrentNumber: slidermin_value=1, max_value=32number.pyasync_set_native_value: Hybrid mode detection used1 <= raw <= 32select.pycurrent_option: Hybrid mode detection used1 <= raw <= 32services.yaml:hybrid_currentselector declaredmin: 6, max: 32
The Z-Box app allows setting hybrid current from 1–99A, but the integration rejected anything below 6A at the coordinator level. Additionally, 32A was used as the upper bound for Hybrid mode detection throughout, meaning stored values of 33–98A would be silently misidentified as a different mode.
A further protocol constraint was identified during this fix: FULL_SPEED = 0x63 in the DLB_MODE enum is decimal 99. Since byte12 of SET_DLB_CONFIG encodes the hybrid current as a raw integer, sending value 99 would be misinterpreted by the charger as "switch to Full Speed" rather than "set 99A limit". The true safe maximum is therefore 98A.
Fix
Two module-level constants HYBRID_CURRENT_MIN = 1 and HYBRID_CURRENT_MAX = 98 are introduced in coordinator.py as the single source of truth and imported into number.py and select.py. This eliminates the risk of the four locations drifting out of sync again.
# coordinator.py — Before: hardcoded 6–32A
if not (6 <= current <= 32):
raise ValueError("hybrid_current must be between 6 and 32 amps")
# coordinator.py — After: 1–98A with explanation
if not (HYBRID_CURRENT_MIN <= current <= HYBRID_CURRENT_MAX):
raise ValueError(
f"hybrid_current must be between {HYBRID_CURRENT_MIN} and {HYBRID_CURRENT_MAX} amps "
f"(99 is reserved as the FULL_SPEED sentinel)"
)# number.py — Before: slider hardcoded to 1–32A
super().__init__(coordinator, key, ..., min_value=1, max_value=32)
# number.py — After: driven by shared constants
super().__init__(coordinator, key, ..., min_value=HYBRID_CURRENT_MIN, max_value=HYBRID_CURRENT_MAX)# select.py / number.py — Before: Hybrid detection capped at 32A
elif 1 <= raw <= 32:
return _MODE_TO_LABEL[DLB_MODE.HYBRID]
# select.py / number.py — After: Hybrid detection covers full valid range
elif HYBRID_CURRENT_MIN <= raw <= HYBRID_CURRENT_MAX:
return _MODE_TO_LABEL[DLB_MODE.HYBRID]Implementation Notes
coordinator.py:HYBRID_CURRENT_MINandHYBRID_CURRENT_MAXare the single source of truth for the valid hybrid current range. All validation and detection logic references these constants.number.pyandselect.py: Both import the constants fromcoordinator.py— no values are duplicated.services.yaml:hybrid_currentselector updated tomin: 1, max: 98with an explanatory description noting why 99A is excluded.- No changes to config entry structure, entity IDs, service interfaces, or any non-DLB logic.
Testing
- Hardware: Beny Charger BCP-A2N-L (firmware 1.28) with Solar DLB module
- Verified:
- Hybrid current can be set to 1A via the number entity slider without error
- Selecting Hybrid mode after setting a sub-6A current correctly sends the config to the charger
- Select entity correctly reports Hybrid mode for stored current values across the full 1–98A range
- Setting 98A hybrid current correctly encodes as
0x62in byte12; 99 (0x63) correctly maps to Full Speed and is blocked from the hybrid current path - All other DLB modes (Pure PV, Full Speed, DLB Box) unaffected
Breaking Changes
None. The valid current range is widened, not narrowed. Existing configurations with hybrid current values in the previously accepted 6–32A range continue to work without modification.