🚀 Beny WiFi Integration v1.2.0
🛠 What's New
This release adds second coordinator that provides data from the most essential sensors more often
Changes Made by @pvandenh
A second DataUpdateCoordinator subclass is introduced. It polls at a fixed LIVE_POLL_INTERVAL = 5 seconds and is responsible exclusively for:
- Power and current readings (
power,current1–current3,max_current) - Voltage readings (
voltage1–voltage3) - DLB power readings (
grid_power,solar_power,ev_power,house_power) when DLB is enabled
Implementation Notes
- The lock is an
asyncio.Lock, so waiting at the boundary is non-blocking — the HA event loop continues processing other work while one coordinator waits for the other. - The live coordinator uses a 3-second UDP timeout with no retries (vs. the main coordinator's 8-second timeout with 2 retries). This ensures each live poll completes well within the 5-second interval even under adverse conditions.
- The 3-poll cache threshold (15 seconds) is deliberately shorter than the existing DLB stale threshold (~3 minutes). The cache is a short-term buffer for transient failures; the stale threshold handles genuinely absent DLB hardware.
- No changes to the charger communication protocol, entity unique IDs, config entry structure, or service interfaces.
Testing
- Hardware: Beny Charger BCP-A2N-L (firmware 1.28) with Solar DLB module
- Verified:
- Live sensors (power, current, voltage, DLB power) update every 5 seconds
- Main sensors (state, energy, temperature, timers, faults) update at the configured scan interval
- No "unavailable" flashes observed during extended monitoring with both coordinators running
- Simulated UDP timeout on a live poll: sensors retained last known values for 15 seconds before going unavailable
- User-triggered commands (start/stop charging, set max current, set DLB config) no longer collide with scheduled polls
- Integration loads cleanly on HA restart; live coordinator first-refresh failure is handled gracefully
Breaking Changes
None. Sensor entity IDs, unique IDs, and state semantics are unchanged. Existing automations and dashboards referencing these sensors are unaffected. The only observable difference is that live sensors now update at 5-second intervals rather than the main scan interval.