⚠️ Major change — new repository, integration renamed to “Omnibattery”
This is the continuation of Marstek Venus Energy Manager (
ffunes/marstek-venus-energy-manager), now living in a new repository —ffunes/omnibattery— and multi-brand (Marstek + Zendure). The HA domain also changed (marstek_venus_energy_manager→omnibattery). Because HACS cannot rename a custom integration's domain/folder in place, this is not an in-place update from the old repo: you install the new repo and migrate across to it. Everything is preserved — configuration, entity IDs (they staymarstek_venus_*), recorder history, long-term statistics, dashboards and automations.How to migrate (take a Home Assistant backup first; your data is safe at every step):
- Update the old integration to its final release first. That build writes a recovery snapshot of your full configuration to disk, so nothing is lost even if the old integration is later removed.
- In HACS → ⋯ → Custom repositories, add
https://github.com/ffunes/omnibattery(type: Integration) and install it. Leave the oldmarstek-venus-energy-managerrepository in place for now.- Restart Home Assistant, then go to Settings → Devices & Services → Add Integration → Omnibattery.
- Confirm the migration when prompted. If your old config is still present it migrates seamlessly; if you had already removed the old integration, it offers to restore from the snapshot written in step 1. Either way it recreates your config on the new domain and re-links every entity, its history and stored state.
- Once Omnibattery is running, remove the old
marstek-venus-energy-managerintegration and repository from HACS.- Hard-refresh the browser (Ctrl+F5) so the renamed sidebar panel loads.
Added
- Zendure SolarFlow support: drives Zendure 2400 AC / AC Pro / AC+ over local HTTP, auto-detecting the model — same control loop, sensors, dashboard and translations as Marstek.
- LilyGo RS485 / ESPHome driver: Marstek batteries bridged by the marstek-lilygo-rs485 firmware are controlled through the ESPHome device's HA entities.
- Modbus serial / RTU support (#350): add a Marstek battery by serial port path (e.g.
/dev/ttyUSB0) instead of an IP; fixed at 115200 8N1. - Tibber price provider for dynamic pricing: no price sensor needed — polls
tibber.get_prices(today's slots, tomorrow's after ~13:00) and refreshes hourly. - No-PD direct-tracking mode (opt-in): the battery follows the consumption sensor 1:1 in a single cycle instead of the PD control law, with a command-delay slider to debounce fast meters.
- Feedforward on confirmed load steps (PD mode): a kettle/oven-sized load step is covered in one deadbeat cycle (~5-7 s) instead of the ~13 s exponential approach; two-sample confirmation and pulse guards keep meter spikes and induction hobs on the stable slow path.
- Temperature-based charge power limiting (opt-in): linear derate of charge power as a battery's temperature crosses a configurable limit and band; optional discharge derate too. Thanks to @syphernl.
- Diagnostics and system health platforms: per-battery connection/driver diagnostics and a system health card. Thanks to @syphernl.
- Separate discharge price floor (#408, dynamic pricing): distinct charge/discharge thresholds with an idle band between them; both exposed as live
numberentities. - Guaranteed minimum SOC floor (#417, predictive charging): forces an overnight grid charge to reach at least the configured SOC by the end of the window, even with no forecast deficit.
- Up to 3 predictive charging windows (Time Slot mode), each with its own start/end and days.
- Per-device exclusion % slider (0–100%): controls how much of an excluded device's demand stays off the battery, instead of all-or-nothing.
- "Cover Home" switch per excluded device (#42): opt-in so the battery covers the home's own load while a solar-surplus device runs, importing from grid only for the device itself.
- Simplified onboarding: weekly full charge, solar charge delay, temperature charge limit, capacity protection, hourly balance and PD controller removed from the setup wizard — new installs configure everything live from the dashboard. Existing installs keep their settings.
- Many more dashboard controls: weekly full charge switch, price-based discharge switch, hourly-balance sliders, charge-delay balance deadband, system power limits toggle, delay-weekly-full-charge toggle, re-evaluate-prices button, and help tooltips for the new features.
- Arrangeable and hideable control cards: an Arrange mode on the Control tab lets you drag feature cards into a fixed layout and hide the ones you don't use, persisted per browser.
- Synthetic energy totals survive a delete + re-add (Zendure): lifetime charge/discharge kWh are backed up keyed by device serial in a delete-proof Store.
Changed
- Rebranded to Omnibattery: new repo and HA domain, with a seamless migration that preserves entity IDs, recorder history, long-term statistics and stored state (see the notice above).
- Opt-in rename of system entities to
omnibattery_*: trigger HA's Recreate entity IDs to renamesensor.marstek_venus_system_*in place (history preserved); new installs get the Omnibattery IDs from the start. Automations referencing old IDs must be repointed manually. - Charge hysteresis is now mandatory (min 2%): the per-battery enable toggle is gone; batteries that had it off get the 2% floor.
- Hourly net balance flagged as Spain-only (RD 244/2019) in the setup/options flow.
- Voltage taper power raised from 95 W to 200 W to keep the cell stable in the CV-like taper zone.
- Slow actuators (Zendure HTTP) skip the hot-path readback, so they no longer block the shared control loop; the loop cadence is not slowed to the fleet's slowest battery.
- Faster response to load bursts: the grid-sample filter passes large steps straight through instead of smoothing them.
- Fresher battery power feedback after a command change: delivered power polls at 1 s for a few seconds after each new setpoint.
- Non-responsive exclusion cooldown is now flat (5 min): removed dead backoff code that never escalated.
- Discharge-window chip shows the active slot number (
Activa · Franja N).
Fixed
- Discharge dropped to 0 W for 5-40 s on downward load steps: the transient export while the discharger ramped down made the incremental PD cross zero and ping-pong with another battery; a charge↔discharge flip must now persist past the actuator settle window.
- False
ack_mismatcherrors and 5-min pool exclusions on laggy RS485 bridges (#77): the post-write echo is accepted within a tolerance (10%, 100 W floor); exact verification is deferred to the poll. - Battery reporting a 0 W power limit crashed the control cycle: zero-limit batteries are now skipped by the load-sharing selector.
- Lost RS485 control / battery exporting after silently dropping forced mode (#434): recovery now re-asserts RS485 without the off-step (which handed control to the battery's internal logic), forces standby, and reconnects fresh when the re-assert doesn't take — no HA restart needed, including after a full-charge cutoff.
- Wake nudge excluded the battery for 5 minutes even when it fixed the fault: one grace cycle after a successful wake before excluding for real.
- Backup Function switch had no effect (all models): register 41200 was missing from the register map.
- Backup-socket load counted as battery discharge with the grid up (#33): off-grid output now counts only when the inverter is in Backup Mode.
- pymodbus "transaction_id mismatch, Skipping" errors + discarded late replies: retries now run inside pymodbus (same transaction id per retry), so late answers are consumed. Requires pymodbus>=3.8.0.
- Modbus retry backoff read a deprecated event-loop clock. Thanks to @syphernl.
- Directional hysteresis was one-shot: the flip-suppression memory now persists across idle cycles.
- Min charge/discharge power created a dead zone: steady loads below ~minimum/kp are now covered — the controller engages at the minimum when the over-correction lands inside the deadband.
- Min-SOC discharge ping-pong: discharge eligibility is latched at min_soc until SOC recovers 2% above it.
- Relay min-ON time never held: the dwell is now timed from the moment idle is requested (not from engagement), and direction swings can no longer bypass it.
- Charge delay unlocked early on balanced-forecast days (#4, #13): the deficit gate now uses the scheduling haircut and a configurable deadband, and holds until the cheapest import hour. Thanks to @syphernl.
- PV-surplus charge delay releases in the cheapest sustained price window (#12, #18): candidate starts are scored by the duration-weighted price over the whole charge; applies only in price-driven modes and never moves the release later. Thanks to @syphernl.
- Transient no-forecast no longer disables Solar Charge Delay for the whole day (#11):
no_forecastunlocks re-arm as soon as the forecast recovers. Thanks to @syphernl. - Solar charge delay let a higher-SOC battery overshoot the setpoint: the SOC floor is now enforced per battery.
- Weekly full charge stalled an imbalanced pack at 3.58 V: the delta-V measurement steps aside during an active weekly charge so the taper reaches the real BMS cutoff.
- Weekly full charge stopped near the top on a solar lull: a BMS cutoff now only counts while the battery is commanded to charge yet refuses.
- Charge hysteresis never latched when the BMS cut off below 99% (e.g. a v2 stopping at 98%): taper-zone arming now runs outside weekly charge too.
- Daily energy sensors could reset mid-day, doubling reported cycling in the Energy Dashboard: a 0 reading is only trusted near local midnight.
- Daily/predictive home consumption inflated with an inverted grid meter: the daily total and predictive estimate now apply the
meter_invertedcorrection. - Consumption average skewed by non-operating days (#46): the history window is now 7 operating days; stale defaults are purged on startup.
- Predictive-charging notification quoted nonsense grid/solar numbers (#46) on floor-driven charges.
- Slot-exit cleanup skipped on solar-sufficient days, silencing the next day's initial evaluation and notification.
- Dynamic pricing charged the whole cheap slot instead of the calculated deficit (#409): charging now stops at the same
energy_deficit_kwhthe scheduler used. - Evening grid-charge reevaluation overcharged on short-solar days (#409): now sizes to the projected deficit until midnight.
- Dynamic pricing missed cheap midday slots after an overnight drain (#411): a SOC-drop trigger re-evaluates upward, counting the day's still-to-come solar forecast pre-dawn.
- Voltage taper oscillated between full power and taper power: the latch now releases only after the cell drops to 3.44 V.
- Energy-flow Solar node showed double the production on DC-coupled systems (#407).
- Excluded device with "Allow solar surplus" still partly charged from the battery (#421/#415): only the real surplus (
solar − home_base_load) is credited, shared across devices. - Recorder database bloat from diagnostic binary sensors: large per-cycle attribute payloads are no longer recorded.
Internal
- Source reorganisation into subpackages: 18 modules moved into
sensors/,control/,tracking/,infra/; root keeps only the HA platform files. - Driver abstraction layer: all hardware access goes through a brand-agnostic
BatteryDriver— the foundation of multi-brand support.drivers/.
History inherited from Marstek Venus Energy Manager (predecessor integration)